directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r569899 [8/9] - in /directory/studio/trunk: studio-aciitemeditor/META-INF/ studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueedito...
Date Sun, 26 Aug 2007 22:36:14 GMT
Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ConnectionComboContributionItem.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ConnectionComboContributionItem.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ConnectionComboContributionItem.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ConnectionComboContributionItem.java Sun Aug 26 15:36:01 2007
@@ -21,14 +21,15 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.schemabrowser;
 
 
-import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionContentProvider;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionLabelProvider;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.event.ConnectionUpdateListener;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionContentProvider;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionLabelProvider;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.events.ConnectionUpdateEvent;
-import org.apache.directory.studio.ldapbrowser.core.events.ConnectionUpdateListener;
-import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.jface.action.ContributionItem;
 import org.eclipse.jface.util.Assert;
 import org.eclipse.jface.viewers.ComboViewer;
@@ -90,7 +91,7 @@
         comboViewer = new ComboViewer( parent, SWT.DROP_DOWN | SWT.READ_ONLY );
         comboViewer.setLabelProvider( new ConnectionLabelProvider() );
         comboViewer.setContentProvider( new ConnectionContentProvider() );
-        comboViewer.setInput( BrowserCorePlugin.getDefault().getConnectionManager() );
+        comboViewer.setInput( ConnectionCorePlugin.getDefault().getConnectionManager() );
         comboViewer.addSelectionChangedListener( new ISelectionChangedListener()
         {
             public void selectionChanged( SelectionChangedEvent event )
@@ -99,13 +100,13 @@
                 // the selection was changed programatically.
                 if ( !inChange )
                 {
-                    IConnection connection = getConnection();
+                    IBrowserConnection connection = getConnection();
                     schemaPage.getSchemaBrowser().setInput( new SchemaBrowserInput( connection, null ) );
                 }
             }
         } );
 
-        EventRegistry.addConnectionUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
+        ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionUIPlugin.getDefault().getEventRunner() );
 
         // Initialize width of combo
         toolitem.setWidth( comboViewer.getCombo().computeSize( SWT.DEFAULT, SWT.DEFAULT, true ).x );
@@ -119,7 +120,7 @@
      */
     public void dispose()
     {
-        EventRegistry.removeConnectionUpdateListener( this );
+        ConnectionEventRegistry.removeConnectionUpdateListener( this );
         comboViewer = null;
     }
 
@@ -167,28 +168,74 @@
 
 
     /**
-     * {@inheritDoc}
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionUpdated(org.apache.directory.studio.connection.core.Connection)
      */
-    public void connectionUpdated( ConnectionUpdateEvent connectionUpdateEvent )
+    public final void connectionUpdated( Connection connection )
     {
         if ( comboViewer != null )
         {
-            this.comboViewer.refresh();
+            comboViewer.refresh();
         }
     }
 
 
     /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionAdded(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionAdded( Connection connection )
+    {
+        connectionUpdated( connection );
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionRemoved(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionRemoved( Connection connection )
+    {
+        connectionUpdated( connection );
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionRenamed(org.apache.directory.studio.connection.core.Connection, java.lang.String)
+     */
+    public void connectionRenamed( Connection connection, String oldName )
+    {
+        connectionUpdated( connection );
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionOpened(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionOpened( Connection connection )
+    {
+        connectionUpdated( connection );
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionClosed(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionClosed( Connection connection )
+    {
+        connectionUpdated( connection );
+    }
+
+
+    /**
      * Gets the connection.
      *
      * @return the connection
      */
-    public IConnection getConnection()
+    public IBrowserConnection getConnection()
     {
         ISelection selection = comboViewer.getSelection();
         if ( !selection.isEmpty() )
         {
-            return ( IConnection ) ( ( IStructuredSelection ) selection ).getFirstElement();
+            Connection connection = ( Connection ) ( ( IStructuredSelection ) selection ).getFirstElement();
+            return BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnection( connection );
         }
 
         return null;
@@ -200,9 +247,9 @@
      *
      * @param connection the connection
      */
-    public void setConnection( IConnection connection )
+    public void setConnection( IBrowserConnection connection )
     {
-        ISelection newSelection = new StructuredSelection( connection );
+        ISelection newSelection = new StructuredSelection( connection.getConnection() );
         ISelection oldSelection = comboViewer.getSelection();
         if ( !newSelection.equals( oldSelection ) )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ReloadSchemaAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ReloadSchemaAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ReloadSchemaAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ReloadSchemaAction.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.core.jobs.ReloadSchemasJob;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
 import org.eclipse.jface.action.Action;
@@ -62,10 +62,10 @@
      */
     public void run()
     {
-        final IConnection connection = schemaPage.getConnection();
+        final IBrowserConnection connection = schemaPage.getConnection();
         if ( connection != null )
         {
-            new ReloadSchemasJob( new IConnection[]
+            new ReloadSchemasJob( new IBrowserConnection[]
                 { connection } ).execute();
             schemaPage.getSchemaBrowser().refresh();
         }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.schemabrowser;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription;
@@ -200,7 +200,7 @@
             SchemaBrowserInput sbi = ( SchemaBrowserInput ) input;
 
             // set connection;
-            IConnection connection = sbi.getConnection();
+            IBrowserConnection connection = sbi.getConnection();
             setConnection( connection );
 
             // set schema element and activate tab
@@ -282,7 +282,7 @@
      * 
      * @param connection the connection
      */
-    public void setConnection( IConnection connection )
+    public void setConnection( IBrowserConnection connection )
     {
         ocdPage.setConnection( connection );
         atdPage.setConnection( connection );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserInput.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserInput.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserInput.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,9 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.schemabrowser;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaPart;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
@@ -52,7 +54,7 @@
 {
 
     /** The connection */
-    private IConnection connection;
+    private IBrowserConnection connection;
     
     /** The schema element */
     private SchemaPart schemaElement;
@@ -67,13 +69,26 @@
      *@param connection the connection
      * @param schemaElement the schema element input
      */
-    public SchemaBrowserInput( IConnection connection, SchemaPart schemaElement )
+    public SchemaBrowserInput( IBrowserConnection connection, SchemaPart schemaElement )
     {
         this.connection = connection;
         this.schemaElement = schemaElement;
     }
     
 
+//    /**
+//     * Creates a new instance of SchemaBrowserInput.
+//     *
+//     *@param connection the connection
+//     * @param schemaElement the schema element input
+//     */
+//    public SchemaBrowserInput( Connection connection, SchemaPart schemaElement )
+//    {
+//        this.connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection( connection );
+//        this.schemaElement = schemaElement;
+//    }
+    
+    
     /**
      * This implementation always return false because
      * a schema element should not be visible in the 
@@ -139,7 +154,7 @@
      *
      * @return the connection
      */
-    public IConnection getConnection()
+    public IBrowserConnection getConnection()
     {
         return connection;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserManager.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserManager.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserManager.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.schemabrowser;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaPart;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
@@ -47,7 +47,7 @@
      * @param connection the connection
      * @param schemaElement the schema element
      */
-    public static void setInput( IConnection connection, SchemaPart schemaElement )
+    public static void setInput( IBrowserConnection connection, SchemaPart schemaElement )
     {
         SchemaBrowserInput input = new SchemaBrowserInput( connection, schemaElement );
         setInput( input );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserNavigationLocation.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserNavigationLocation.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserNavigationLocation.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserNavigationLocation.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription;
@@ -100,7 +100,7 @@
      */
     public void saveState( IMemento memento )
     {
-        IConnection connection = getConnection();
+        IBrowserConnection connection = getConnection();
         SchemaPart schemaElement = getSchemElement();
         memento.putString( "CONNECTION", connection.getName() );
         memento.putString( "SCHEMAELEMENTYPE", schemaElement.getClass().getName() );
@@ -113,7 +113,7 @@
      */
     public void restoreState( IMemento memento )
     {
-        IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
+        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
             memento.getString( "CONNECTION" ) );
         String schemaElementType = memento.getString( "SCHEMAELEMENTYPE" );
         String schemaElementOid = memento.getString( "SCHEMAELEMENTOID" );
@@ -235,7 +235,7 @@
      *
      * @return the connection
      */
-    private IConnection getConnection()
+    private IBrowserConnection getConnection()
     {
         
         Object editorInput = getInput();

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaPage.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaPage.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.schemabrowser;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaPart;
 import org.eclipse.jface.action.Separator;
@@ -390,7 +391,7 @@
      * 
      * @return the connection
      */
-    public IConnection getConnection()
+    public IBrowserConnection getConnection()
     {
         return connectionCombo.getConnection();
     }
@@ -401,7 +402,7 @@
      * 
      * @param connection the connection
      */
-    public void setConnection( IConnection connection )
+    public void setConnection( IBrowserConnection connection )
     {
         connectionCombo.setConnection( connection );
         reloadSchemaAction.updateEnabledState();

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/FilterAndSortJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/FilterAndSortJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/FilterAndSortJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/FilterAndSortJob.java Sun Aug 26 15:36:01 2007
@@ -21,9 +21,9 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.searchresult;
 
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob;
-import org.apache.directory.studio.ldapbrowser.core.jobs.ExtendedProgressMonitor;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
 
 
 /**
@@ -77,7 +77,7 @@
     /**
      * {@inheritDoc}
      */
-    protected void executeAsyncJob( ExtendedProgressMonitor monitor ) throws Exception
+    protected void executeAsyncJob( StudioProgressMonitor monitor ) throws Exception
     {
         monitor.beginTask( "Filter and Sort", 3 );
         monitor.worked( 1 );
@@ -98,9 +98,9 @@
     /**
      * {@inheritDoc}
      */
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[0];
+        return new Connection[0];
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
@@ -74,7 +74,7 @@
     {
         ISearch search = getSearch();
         memento.putString( "SEARCH", search.getName() );
-        memento.putString( "CONNECTION", search.getConnection().getName() );
+        memento.putString( "CONNECTION", search.getBrowserConnection().getName() );
     }
 
 
@@ -83,7 +83,7 @@
      */
     public void restoreState( IMemento memento )
     {
-        IConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
+        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
             memento.getString( "CONNECTION" ) );
         ISearch search = connection.getSearchManager().getSearch( memento.getString( "SEARCH" ) );
         super.setInput( new SearchResultEditorInput( search ) );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java Sun Aug 26 15:36:01 2007
@@ -95,7 +95,7 @@
     private IValue[] getValuesToPaste()
     {
         if ( getSelectedEntries().length + getSelectedBookmarks().length + getSelectedValues().length
-            + getSelectedAttributes().length + getSelectedSearches().length + getSelectedConnections().length == 0
+            + getSelectedAttributes().length + getSelectedSearches().length == 0
             && getSelectedSearchResults().length == 1
             && getSelectedAttributeHierarchies().length == 1
             && getSelectedAttributeHierarchies()[0].size() == 1 )

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java Sun Aug 26 15:36:01 2007
@@ -29,7 +29,7 @@
  */
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
+import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.core.events.EmptyValueAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryUpdateListener;
@@ -120,8 +120,8 @@
             {
                 if ( editor.getSite().getWorkbenchWindow() == part.getSite().getWorkbenchWindow() )
                 {
-                    ISearch[] searches = SelectionUtils.getSearches( selection );
-                    Object[] objects = SelectionUtils.getObjects( selection );
+                    ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
+                    Object[] objects = BrowserSelectionUtils.getObjects( selection );
                     if ( searches.length == 1 && objects.length == 1 )
                     {
                         editor.setInput( new SearchResultEditorInput( searches[0] ) );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java Sun Aug 26 15:36:01 2007
@@ -21,8 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.ui.perspective;
 
 
+import org.apache.directory.studio.connection.ui.wizards.NewConnectionWizard;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
-import org.apache.directory.studio.ldapbrowser.common.wizards.NewConnectionWizard;
 import org.apache.directory.studio.ldapbrowser.ui.views.browser.BrowserView;
 import org.apache.directory.studio.ldapbrowser.ui.views.connection.ConnectionView;
 import org.apache.directory.studio.ldapbrowser.ui.views.modificationlogs.ModificationLogsView;

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/search/SearchPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/search/SearchPage.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/search/SearchPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/search/SearchPage.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.ui.search;
 
 
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
+import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
@@ -121,9 +121,9 @@
     public boolean performAction()
     {
         spw.saveToSearch( search );
-        if ( search.getConnection() != null )
+        if ( search.getBrowserConnection() != null )
         {
-            search.getConnection().getSearchManager().addSearch( search );
+            search.getBrowserConnection().getSearchManager().addSearch( search );
             return spw.performSearch( search );
         }
 
@@ -146,7 +146,7 @@
     public void createControl( Composite parent )
     {
         // declare search
-        search = SelectionUtils.getExampleSearch( container.getSelection() );
+        search = BrowserSelectionUtils.getExampleSearch( container.getSelection() );
 
         // create search page content
         GridLayout gl = new GridLayout();

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java Sun Aug 26 15:36:01 2007
@@ -179,7 +179,7 @@
         {
             ISearch search = ( ISearch ) obj;
 
-            universalListener.setInput( search.getConnection() );
+            universalListener.setInput( search.getBrowserConnection() );
 
             mainWidget.getViewer().expandToLevel( search, 0 );
 
@@ -190,7 +190,7 @@
             ISearchResult searchResult = ( ISearchResult ) obj;
             ISearch search = searchResult.getSearch();
 
-            universalListener.setInput( search.getConnection() );
+            universalListener.setInput( search.getBrowserConnection() );
 
             mainWidget.getViewer().expandToLevel( search, 1 );
 
@@ -200,7 +200,7 @@
         {
             IBookmark bookmark = ( IBookmark ) obj;
 
-            universalListener.setInput( bookmark.getConnection() );
+            universalListener.setInput( bookmark.getBrowserConnection() );
 
             mainWidget.getViewer().expandToLevel( bookmark, 0 );
 
@@ -210,7 +210,7 @@
         {
             IEntry entry = ( IEntry ) obj;
 
-            universalListener.setInput( entry.getConnection() );
+            universalListener.setInput( entry.getBrowserConnection() );
 
             List<IEntry> entryList = new ArrayList<IEntry>();
             IEntry tempEntry = entry;

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java Sun Aug 26 15:36:01 2007
@@ -25,15 +25,18 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
+import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserUniversalListener;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.BookmarkUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.BookmarkUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
-import org.apache.directory.studio.ldapbrowser.core.events.ConnectionUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryMovedEvent;
@@ -42,7 +45,7 @@
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
@@ -78,10 +81,10 @@
 {
 
     /** This map contains all expanded elements for a particular connection */
-    private Map<IConnection, Object[]> connectionToExpandedElementsMap;
+    private Map<IBrowserConnection, Object[]> connectionToExpandedElementsMap;
 
     /** This map contains all selected elements for a particular connection */
-    private Map<IConnection, ISelection> connectionToSelectedElementMap;
+    private Map<IBrowserConnection, ISelection> connectionToSelectedElementMap;
 
     /** The browser view */
     private BrowserView view;
@@ -103,10 +106,12 @@
             {
                 if ( view.getSite().getWorkbenchWindow() == part.getSite().getWorkbenchWindow() )
                 {
-                    IConnection[] connections = SelectionUtils.getConnections( selection );
+                    Connection[] connections = BrowserSelectionUtils.getConnections( selection );
                     if ( connections.length == 1 )
                     {
-                        setInput( connections[0] );
+                        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnection(
+                            connections[0] );
+                        setInput( connection );
                     }
                     else
                     {
@@ -236,14 +241,14 @@
         this.view = view;
 
         // create maps
-        connectionToExpandedElementsMap = new HashMap<IConnection, Object[]>();
-        connectionToSelectedElementMap = new HashMap<IConnection, ISelection>();
+        connectionToExpandedElementsMap = new HashMap<IBrowserConnection, Object[]>();
+        connectionToSelectedElementMap = new HashMap<IBrowserConnection, ISelection>();
 
         // register listeners
         EventRegistry.addSearchUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
         EventRegistry.addBookmarkUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
         EventRegistry.addEntryUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
-        EventRegistry.addConnectionUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
+        ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionUIPlugin.getDefault().getEventRunner() );
 
         view.getSite().getPage().addPartListener( partListener );
         view.getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener( ConnectionView.getId(),
@@ -263,10 +268,10 @@
     {
         if ( view != null )
         {
-            IEntry[] entries = SelectionUtils.getEntries( selection );
-            ISearchResult[] searchResults = SelectionUtils.getSearchResults( selection );
-            IBookmark[] bookmarks = SelectionUtils.getBookmarks( selection );
-            ISearch[] searches = SelectionUtils.getSearches( selection );
+            IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
+            ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
+            IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
+            ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
 
             if ( entries.length + searchResults.length + bookmarks.length + searches.length == 1 )
             {
@@ -329,7 +334,7 @@
             EventRegistry.removeSearchUpdateListener( this );
             EventRegistry.removeBookmarkUpdateListener( this );
             EventRegistry.removeEntryUpdateListener( this );
-            EventRegistry.removeConnectionUpdateListener( this );
+            ConnectionEventRegistry.removeConnectionUpdateListener( this );
 
             view.getSite().getPage().removePartListener( partListener );
             view.getSite().getWorkbenchWindow().getSelectionService().removePostSelectionListener(
@@ -351,13 +356,13 @@
      *
      * @param connection the connection input
      */
-    void setInput( IConnection connection )
+    void setInput( IBrowserConnection connection )
     {
         // only if another connection is selected
         if ( connection != viewer.getInput() )
         {
 
-            IConnection currentConnection = viewer.getInput() instanceof IConnection ? ( IConnection ) viewer
+            IBrowserConnection currentConnection = viewer.getInput() instanceof IBrowserConnection ? ( IBrowserConnection ) viewer
                 .getInput() : null;
 
             // save expanded elements and selection
@@ -392,44 +397,45 @@
 
 
     /**
-     * {@inheritDoc}
-     *
-     * This implementation refreshes the tree and expands/collapses the
-     * tree when the connection is opened/closed.
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionOpened(org.apache.directory.studio.connection.core.Connection)
      */
-    public void connectionUpdated( ConnectionUpdateEvent connectionUpdateEvent )
+    public void connectionOpened( Connection connection )
     {
-        if ( connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.EventDetail.CONNECTION_OPENED )
-        {
-            // expand viewer
-            viewer.refresh( connectionUpdateEvent.getConnection() );
-            viewer.expandToLevel( 2 );
-
-            // expand root DSE to show base entries
-            IRootDSE rootDSE = connectionUpdateEvent.getConnection().getRootDSE();
-            viewer.expandToLevel( rootDSE, 1 );
+        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnection(
+            connection );
 
-            // expand base entries, if requested
-            if ( view.getConfiguration().getPreferences().isExpandBaseEntries() )
-            {
-                viewer.expandToLevel( rootDSE, 2 );
-            }
-        }
-        else if ( connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.EventDetail.CONNECTION_CLOSED )
-        {
-            viewer.collapseAll();
-            connectionToExpandedElementsMap.remove( connectionUpdateEvent.getConnection() );
-            connectionToSelectedElementMap.remove( connectionUpdateEvent.getConnection() );
-            viewer.refresh( connectionUpdateEvent.getConnection() );
-        }
-        else
+        // expand viewer
+        viewer.refresh( browserConnection );
+        viewer.expandToLevel( 2 );
+
+        // expand root DSE to show base entries
+        IRootDSE rootDSE = browserConnection.getRootDSE();
+        viewer.expandToLevel( rootDSE, 1 );
+
+        // expand base entries, if requested
+        if ( view.getConfiguration().getPreferences().isExpandBaseEntries() )
         {
-            viewer.refresh( connectionUpdateEvent.getConnection() );
+            viewer.expandToLevel( rootDSE, 2 );
         }
     }
 
 
     /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionClosed(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionClosed( Connection connection )
+    {
+        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnection(
+            connection );
+        
+        viewer.collapseAll();
+        connectionToExpandedElementsMap.remove( browserConnection );
+        connectionToSelectedElementMap.remove( browserConnection );
+        viewer.refresh( browserConnection );
+    }
+
+
+    /**
      * {@inheritDoc}
      *
      * This viewer selects the updated search.
@@ -439,7 +445,7 @@
         ISearch search = searchUpdateEvent.getSearch();
         viewer.refresh();
 
-        if ( Arrays.asList( search.getConnection().getSearchManager().getSearches() ).contains( search ) )
+        if ( Arrays.asList( search.getBrowserConnection().getSearchManager().getSearches() ).contains( search ) )
         {
             viewer.setSelection( new StructuredSelection( search ), true );
         }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java Sun Aug 26 15:36:01 2007
@@ -21,12 +21,11 @@
 package org.apache.directory.studio.ldapbrowser.ui.views.connection;
 
 
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionConfiguration;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionWidget;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionConfiguration;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionWidget;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
-import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -132,7 +131,7 @@
         // create main widget
         mainWidget = new ConnectionWidget( configuration, getViewSite().getActionBars() );
         mainWidget.createWidget( composite );
-        mainWidget.setInput( BrowserCorePlugin.getDefault().getConnectionManager() );
+        mainWidget.setInput( ConnectionCorePlugin.getDefault().getConnectionManager() );
 
         // create actions and context menu (and register global actions)
         actionGroup = new ConnectionViewActionGroup( this );
@@ -140,20 +139,19 @@
         actionGroup.fillMenu( mainWidget.getMenuManager() );
         actionGroup.enableGlobalActionHandlers( getViewSite().getActionBars() );
         actionGroup.fillContextMenu( configuration.getContextMenuManager( mainWidget.getViewer() ) );
-
+        
         // create the listener
         getSite().setSelectionProvider( mainWidget.getViewer() );
         universalListener = new ConnectionViewUniversalListener( this );
-
+        
         // default selection
-        IConnection[] connections = BrowserCorePlugin.getDefault().getConnectionManager().getConnections();
-        if ( connections.length > 0 )
-        {
-            ISelection selection = new StructuredSelection( connections[0] );
-            mainWidget.getViewer().setSelection( selection );
-            //this.universalListener.selectionChanged( this, selection );
-        }
-
+//        Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager().getConnections();
+//        if ( connections.length > 0 )
+//        {
+//            ISelection selection = new StructuredSelection( connections[0] );
+//            mainWidget.getViewer().setSelection( selection );
+//            //this.universalListener.selectionChanged( this, selection );
+//        }
     }
 
 
@@ -165,9 +163,9 @@
      */
     public void select( Object obj )
     {
-        if ( obj instanceof IConnection )
+        if ( obj instanceof Connection )
         {
-            IConnection connection = ( IConnection ) obj;
+            Connection connection = ( Connection ) obj;
 
             mainWidget.getViewer().reveal( connection );
             mainWidget.getViewer().refresh( connection, true );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java Sun Aug 26 15:36:01 2007
@@ -21,11 +21,11 @@
 package org.apache.directory.studio.ldapbrowser.ui.views.connection;
 
 
+import org.apache.directory.studio.connection.ui.actions.ConnectionViewActionProxy;
+import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionActionGroup;
 import org.apache.directory.studio.ldapbrowser.common.actions.SelectAllAction;
-import org.apache.directory.studio.ldapbrowser.common.actions.proxy.ConnectionViewActionProxy;
-import org.apache.directory.studio.ldapbrowser.common.dnd.ConnectionTransfer;
 import org.apache.directory.studio.ldapbrowser.common.dnd.SearchTransfer;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionActionGroup;
 import org.apache.directory.studio.ldapbrowser.ui.actions.ImportExportAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.OpenSchemaBrowserAction;
 import org.eclipse.jface.action.IAction;

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewUniversalListener.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewUniversalListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewUniversalListener.java Sun Aug 26 15:36:01 2007
@@ -21,10 +21,10 @@
 package org.apache.directory.studio.ldapbrowser.ui.views.connection;
 
 
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionUniversalListener;
-import org.apache.directory.studio.ldapbrowser.core.jobs.OpenConnectionsJob;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.jobs.OpenConnectionsJob;
+import org.apache.directory.studio.connection.ui.actions.SelectionUtils;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionUniversalListener;
 import org.apache.directory.studio.ldapbrowser.ui.views.browser.BrowserView;
 import org.apache.directory.studio.ldapbrowser.ui.views.modificationlogs.ModificationLogsView;
 import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -54,10 +54,10 @@
     {
         public void selectionChanged( SelectionChangedEvent event )
         {
-            IConnection[] connections = SelectionUtils.getConnections( event.getSelection() );
+            Connection[] connections = SelectionUtils.getConnections( event.getSelection() );
             if ( connections.length == 1 )
             {
-                ensureViewVisible( connections[0] );
+                ensureViewVisible();
             }
         }
     };
@@ -67,7 +67,7 @@
     {
         public void doubleClick( DoubleClickEvent event )
         {
-            IConnection[] connections = SelectionUtils.getConnections( event.getSelection() );
+            Connection[] connections = SelectionUtils.getConnections( event.getSelection() );
             if ( connections.length == 1 )
             {
                 toggleConnection( connections[0] );
@@ -103,12 +103,12 @@
 
 
     /**
-     * Ensures that the browser view and modification log viewa are opended 
+     * Ensures that the browser view and modification log views are opended 
      * and ready to show the given selection.
      *
      * @param selection the view's selection.
      */
-    private void ensureViewVisible( IConnection selection )
+    private void ensureViewVisible()
     {
         if ( view != null )
         {
@@ -144,14 +144,11 @@
      *
      * @param connection the connection
      */
-    private void toggleConnection( IConnection connection )
+    private void toggleConnection( Connection connection )
     {
-        if ( connection.isOpened() )
+        if ( connection.getJNDIConnectionWrapper().isConnected() )
         {
-            if ( connection.canClose() )
-            {
-                connection.close();
-            }
+            connection.getJNDIConnectionWrapper().disconnect();
         }
         else
         {

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DragConnectionListener.java Sun Aug 26 15:36:01 2007
@@ -24,8 +24,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.studio.ldapbrowser.common.dnd.ConnectionTransfer;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DragSource;
 import org.eclipse.swt.dnd.DragSourceEvent;
@@ -79,15 +79,15 @@
                 {
                     Table table = ( Table ) dragSource.getControl();
                     TableItem[] items = table.getSelection();
-                    List<IConnection> connectionList = new ArrayList<IConnection>();
+                    List<Connection> connectionList = new ArrayList<Connection>();
                     for ( int i = 0; i < items.length; i++ )
                     {
-                        if ( items[i].getData() instanceof IConnection )
+                        if ( items[i].getData() instanceof Connection )
                         {
-                            connectionList.add( ( IConnection ) items[i].getData() );
+                            connectionList.add( ( Connection ) items[i].getData() );
                         }
                     }
-                    event.data = connectionList.toArray( new IConnection[connectionList.size()] );
+                    event.data = connectionList.toArray( new Connection[connectionList.size()] );
                 }
             }
         }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/DropConnectionListener.java Sun Aug 26 15:36:01 2007
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.studio.ldapbrowser.common.dnd.ConnectionTransfer;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.ConnectionManager;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionManager;
+import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTarget;
 import org.eclipse.swt.dnd.DropTargetEvent;
@@ -103,9 +103,9 @@
         {
             if ( ConnectionTransfer.getInstance().isSupportedType( event.currentDataType ) )
             {
-                if ( event.item != null && event.item.getData() instanceof IConnection )
+                if ( event.item != null && event.item.getData() instanceof Connection )
                 {
-                    IConnection overConn = ( IConnection ) event.item.getData();
+                    Connection overConn = ( Connection ) event.item.getData();
                     if ( event.widget instanceof DropTarget )
                     {
                         DropTarget dropTarget = ( DropTarget ) event.widget;
@@ -113,12 +113,12 @@
                         {
                             Table table = ( Table ) dropTarget.getControl();
                             TableItem[] items = table.getSelection();
-                            List<IConnection> connectionList = new ArrayList<IConnection>();
+                            List<Connection> connectionList = new ArrayList<Connection>();
                             for ( int i = 0; i < items.length; i++ )
                             {
-                                if ( items[i].getData() instanceof IConnection )
+                                if ( items[i].getData() instanceof Connection )
                                 {
-                                    connectionList.add( ( IConnection ) items[i].getData() );
+                                    connectionList.add( ( Connection ) items[i].getData() );
                                 }
                             }
                             if ( connectionList.contains( overConn ) )
@@ -172,15 +172,15 @@
      */
     public void drop( DropTargetEvent event )
     {
-        ConnectionManager connectionManager = BrowserCorePlugin.getDefault().getConnectionManager();
+        ConnectionManager connectionManager = ConnectionCorePlugin.getDefault().getConnectionManager();
 
         try
         {
             if ( ConnectionTransfer.getInstance().isSupportedType( event.currentDataType ) )
             {
                 // get connection to handle
-                IConnection[] connections = ( IConnection[] ) event.data;
-                IConnection targetConnection = ( IConnection ) event.item.getData();
+                Connection[] connections = ( Connection[] ) event.data;
+                Connection targetConnection = ( Connection ) event.item.getData();
 
                 if ( event.detail == DND.DROP_MOVE )
                 {
@@ -208,7 +208,7 @@
                 {
                     for ( int i = 0; i < connections.length; i++ )
                     {
-                        IConnection newConnection = ( IConnection ) connections[i].clone();
+                        Connection newConnection = ( Connection ) connections[i].clone();
                         int index = connectionManager.indexOf( targetConnection );
                         connectionManager.addConnection( index + i + 1, newConnection );
                     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/LinkWithEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/LinkWithEditorAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/LinkWithEditorAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/LinkWithEditorAction.java Sun Aug 26 15:36:01 2007
@@ -212,7 +212,7 @@
                     IEntry entry = eei.getResolvedEntry();
                     if ( entry != null )
                     {
-                        objectToSelect = entry.getConnection();
+                        objectToSelect = entry.getBrowserConnection().getConnection();
                     }
                 }
             }
@@ -226,7 +226,7 @@
                     ISearch search = srei.getSearch();
                     if ( search != null )
                     {
-                        objectToSelect = search.getConnection();
+                        objectToSelect = search.getBrowserConnection().getConnection();
                     }
                 }
             }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsView.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsView.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsView.java Sun Aug 26 15:36:01 2007
@@ -119,10 +119,10 @@
         actionGroup = new ModificationLogsViewActionGroup( this );
         actionGroup.fillActionBars( getViewSite().getActionBars() );
         // this.actionGroup.fillContextMenu(this.configuration.getContextMenuManager(this.mainWidget.getViewer()));
-
+        
         // create the listener
         universalListener = new ModificationLogsViewUniversalListener( this );
-
+        
         // set help context
         PlatformUI.getWorkbench().getHelpSystem().setHelp( mainWidget.getSourceViewer().getTextWidget(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_modification_logs_view" );

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewInput.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewInput.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewInput.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.ui.views.modificationlogs;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
 /**
@@ -35,7 +35,7 @@
 {
 
     /** The connection. */
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     /** The index of the displayed log file */
     private int index;
@@ -47,7 +47,7 @@
      * @param connection the connection
      * @param index the index of the displayed log file
      */
-    public ModificationLogsViewInput( IConnection connection, int index )
+    public ModificationLogsViewInput( IBrowserConnection connection, int index )
     {
         this.connection = connection;
         this.index = index;
@@ -59,7 +59,7 @@
      * 
      * @return the connection
      */
-    public IConnection getConnection()
+    public IBrowserConnection getConnection()
     {
         return connection;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java Sun Aug 26 15:36:01 2007
@@ -25,14 +25,16 @@
 import java.io.FileReader;
 import java.io.FileWriter;
 
+import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
+import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.ChildrenInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
 import org.apache.directory.studio.ldapbrowser.ui.views.connection.ConnectionView;
 import org.eclipse.jface.viewers.ISelection;
@@ -69,10 +71,11 @@
             {
                 if ( view.getSite().getWorkbenchWindow() == part.getSite().getWorkbenchWindow() )
                 {
-                    IConnection[] connections = SelectionUtils.getConnections( selection );
+                    Connection[] connections = BrowserSelectionUtils.getConnections( selection );
                     if ( connections.length == 1 )
                     {
-                        ModificationLogsViewInput input = new ModificationLogsViewInput( connections[0], 0 );
+                        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection( connections[0].getName() );
+                        ModificationLogsViewInput input = new ModificationLogsViewInput( connection, 0 );
                         setInput( input );
                         scrollToNewest();
                     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationApplyOnWizardPage.java Sun Aug 26 15:36:01 2007
@@ -26,7 +26,7 @@
 import java.util.List;
 import java.util.Set;
 
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
+import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
@@ -34,7 +34,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
@@ -208,11 +208,11 @@
     {
         ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
             .getSelection();
-        this.initSearch = SelectionUtils.getExampleSearch( selection );
+        this.initSearch = BrowserSelectionUtils.getExampleSearch( selection );
         this.initSearch.setName( null );
 
         // never follow referrals for a batch operation!
-        this.initSearch.setReferralsHandlingMethod( IConnection.HANDLE_REFERRALS_IGNORE );
+        this.initSearch.setReferralsHandlingMethod( IBrowserConnection.HANDLE_REFERRALS_IGNORE );
     }
 
 
@@ -221,12 +221,12 @@
 
         ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
             .getSelection();
-        ISearch[] searches = SelectionUtils.getSearches( selection );
-        IEntry[] entries = SelectionUtils.getEntries( selection );
-        ISearchResult[] searchResults = SelectionUtils.getSearchResults( selection );
-        IBookmark[] bookmarks = SelectionUtils.getBookmarks( selection );
-        IAttribute[] attributes = SelectionUtils.getAttributes( selection );
-        IValue[] values = SelectionUtils.getValues( selection );
+        ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
+        IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
+        ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
+        IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
+        IAttribute[] attributes = BrowserSelectionUtils.getAttributes( selection );
+        IValue[] values = BrowserSelectionUtils.getValues( selection );
 
         List textList = new ArrayList();
         List dnsList = new ArrayList();

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java Sun Aug 26 15:36:01 2007
@@ -21,14 +21,15 @@
 package org.apache.directory.studio.ldapbrowser.ui.wizards;
 
 
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.jobs.SearchJob;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
@@ -36,7 +37,6 @@
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
 import org.apache.directory.studio.ldifeditor.editor.NonExistingLdifEditorInput;
-
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -61,7 +61,7 @@
 public class BatchOperationWizard extends Wizard implements INewWizard
 {
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private BatchOperationApplyOnWizardPage applyOnPage;
 
@@ -98,25 +98,25 @@
 
         ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
             .getSelection();
-        IConnection[] connections = SelectionUtils.getConnections( selection );
-        ISearch[] searches = SelectionUtils.getSearches( selection );
-        IEntry[] entries = SelectionUtils.getEntries( selection );
-        ISearchResult[] searchResults = SelectionUtils.getSearchResults( selection );
-        IBookmark[] bookmarks = SelectionUtils.getBookmarks( selection );
-        IAttribute[] attributes = SelectionUtils.getAttributes( selection );
-        IValue[] values = SelectionUtils.getValues( selection );
+        Connection[] connections = BrowserSelectionUtils.getConnections( selection );
+        ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
+        IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
+        ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
+        IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
+        IAttribute[] attributes = BrowserSelectionUtils.getAttributes( selection );
+        IValue[] values = BrowserSelectionUtils.getValues( selection );
 
         // if(searches.length + entries.length + searchResults.length +
         // bookmarks.length > 0) {
         if ( connections.length > 0
-            && connections[0].isOpened()
+            && connections[0].getJNDIConnectionWrapper().isConnected()
             || searches.length + entries.length + searchResults.length + bookmarks.length + attributes.length
                 + values.length > 0 )
         {
 
-            ISearch search = SelectionUtils.getExampleSearch( selection );
+            ISearch search = BrowserSelectionUtils.getExampleSearch( selection );
             search.setName( null );
-            this.connection = search.getConnection();
+            this.connection = search.getBrowserConnection();
 
             applyOnPage = new BatchOperationApplyOnWizardPage( BatchOperationApplyOnWizardPage.class.getName(), this );
             addPage( applyOnPage );
@@ -299,7 +299,7 @@
                 if ( applyOnPage.getApplyOnSearch() != null )
                 {
                     ISearch search = applyOnPage.getApplyOnSearch();
-                    if ( search.getConnection() != null )
+                    if ( search.getBrowserConnection() != null )
                     {
                         SearchJob job = new SearchJob( new ISearch[]
                             { search } );
@@ -378,7 +378,7 @@
     }
 
 
-    public IConnection getConnection()
+    public IBrowserConnection getConnection()
     {
         return this.connection;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportBaseWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportBaseWizard.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportBaseWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportBaseWizard.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.ui.wizards;
 
 
-import org.apache.directory.studio.ldapbrowser.common.actions.SelectionUtils;
+import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
@@ -65,7 +65,7 @@
      */
     public void init( IWorkbench workbench, IStructuredSelection selection )
     {
-        search = SelectionUtils.getExampleSearch( selection );
+        search = BrowserSelectionUtils.getExampleSearch( selection );
         search.setName( null );
         exportFilename = "";
     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportCsvWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportCsvWizard.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportCsvWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportCsvWizard.java Sun Aug 26 15:36:01 2007
@@ -99,7 +99,7 @@
         toPage.saveDialogSettings();
         boolean exportDn = this.fromPage.isExportDn();
 
-        ExportCsvJob ecj = new ExportCsvJob( exportFilename, search.getConnection(), search.getSearchParameter(),
+        ExportCsvJob ecj = new ExportCsvJob( exportFilename, search.getBrowserConnection(), search.getSearchParameter(),
             exportDn );
         ecj.execute();
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlWizard.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportDsmlWizard.java Sun Aug 26 15:36:01 2007
@@ -100,7 +100,7 @@
         fromPage.saveDialogSettings();
         toPage.saveDialogSettings();
 
-        ExportDsmlJob edj = new ExportDsmlJob( exportFilename, search.getConnection(), search.getSearchParameter() );
+        ExportDsmlJob edj = new ExportDsmlJob( exportFilename, search.getBrowserConnection(), search.getSearchParameter() );
         edj.execute();
 
         return true;

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportExcelWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportExcelWizard.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportExcelWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportExcelWizard.java Sun Aug 26 15:36:01 2007
@@ -99,7 +99,7 @@
         toPage.saveDialogSettings();
         boolean exportDn = this.fromPage.isExportDn();
 
-        ExportXlsJob eej = new ExportXlsJob( exportFilename, search.getConnection(), search.getSearchParameter(),
+        ExportXlsJob eej = new ExportXlsJob( exportFilename, search.getBrowserConnection(), search.getSearchParameter(),
             exportDn );
         eej.execute();
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportLdifWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportLdifWizard.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportLdifWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ExportLdifWizard.java Sun Aug 26 15:36:01 2007
@@ -98,7 +98,7 @@
         fromPage.saveDialogSettings();
         toPage.saveDialogSettings();
 
-        ExportLdifJob elj = new ExportLdifJob( exportFilename, search.getConnection(), search.getSearchParameter() );
+        ExportLdifJob elj = new ExportLdifJob( exportFilename, search.getBrowserConnection(), search.getSearchParameter() );
         elj.execute();
 
         return true;

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java Sun Aug 26 15:36:01 2007
@@ -26,7 +26,7 @@
 import org.apache.directory.studio.ldapbrowser.core.jobs.ImportDsmlJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
@@ -51,7 +51,7 @@
     public static final String WIZARD_TITLE = "DSML Import";
 
     /** The connection attached to the import */
-    private IConnection importConnection;
+    private IBrowserConnection importConnection;
 
     /** The main page of the wizard */
     private ImportDsmlMainWizardPage mainPage;
@@ -81,7 +81,7 @@
      * @param selectedConnection
      *          The connection to use
      */
-    public ImportDsmlWizard( IConnection selectedConnection )
+    public ImportDsmlWizard( IBrowserConnection selectedConnection )
     {
         setWindowTitle( WIZARD_TITLE );
         this.importConnection = selectedConnection;
@@ -133,27 +133,27 @@
         Object o = selection.getFirstElement();
         if ( o instanceof IEntry )
         {
-            importConnection = ( ( IEntry ) o ).getConnection();
+            importConnection = ( ( IEntry ) o ).getBrowserConnection();
         }
         else if ( o instanceof ISearchResult )
         {
-            importConnection = ( ( ISearchResult ) o ).getEntry().getConnection();
+            importConnection = ( ( ISearchResult ) o ).getEntry().getBrowserConnection();
         }
         else if ( o instanceof IBookmark )
         {
-            importConnection = ( ( IBookmark ) o ).getConnection();
+            importConnection = ( ( IBookmark ) o ).getBrowserConnection();
         }
         else if ( o instanceof IAttribute )
         {
-            importConnection = ( ( IAttribute ) o ).getEntry().getConnection();
+            importConnection = ( ( IAttribute ) o ).getEntry().getBrowserConnection();
         }
         else if ( o instanceof IValue )
         {
-            importConnection = ( ( IValue ) o ).getAttribute().getEntry().getConnection();
+            importConnection = ( ( IValue ) o ).getAttribute().getEntry().getBrowserConnection();
         }
-        else if ( o instanceof IConnection )
+        else if ( o instanceof IBrowserConnection )
         {
-            importConnection = ( IConnection ) o;
+            importConnection = ( IBrowserConnection ) o;
         }
         else
         {
@@ -189,7 +189,7 @@
      * Get the connection attached to the Import
      * @return The connection attached to the Import
      */
-    public IConnection getImportConnection()
+    public IBrowserConnection getImportConnection()
     {
         return importConnection;
     }
@@ -200,7 +200,7 @@
      * @param connection
      *          The connection attached to the Import
      */
-    public void setImportConnection( IConnection connection )
+    public void setImportConnection( IBrowserConnection connection )
     {
         this.importConnection = connection;
     }



Mime
View raw message