directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r569899 [2/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-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java Sun Aug 26 15:36:01 2007
@@ -32,13 +32,11 @@
 import java.util.Set;
 
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.jobs.DeleteAttributesValueJob;
 import org.apache.directory.studio.ldapbrowser.core.jobs.DeleteEntriesJob;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
 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.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
@@ -68,39 +66,33 @@
     {
         try
         {
-            IConnection[] connections = getConnections();
             IEntry[] entries = getEntries();
             ISearch[] searches = getSearches();
             IBookmark[] bookmarks = getBookmarks();
             IAttribute[] attributes = getAttributes();
             IValue[] values = getValues();
 
-            if ( connections.length > 0 && entries.length == 0 && searches.length == 0 && bookmarks.length == 0
-                && attributes.length == 0 && values.length == 0 )
-            {
-                return connections.length > 1 ? "Delete Connections" : "Delete Connection";
-            }
-            if ( entries.length > 0 && connections.length == 0 && searches.length == 0 && bookmarks.length == 0
+            if ( entries.length > 0 && searches.length == 0 && bookmarks.length == 0
                 && attributes.length == 0 && values.length == 0 )
             {
                 return entries.length > 1 ? "Delete Entries" : "Delete Entry";
             }
-            if ( searches.length > 0 && connections.length == 0 && entries.length == 0 && bookmarks.length == 0
+            if ( searches.length > 0 && entries.length == 0 && bookmarks.length == 0
                 && attributes.length == 0 && values.length == 0 )
             {
                 return searches.length > 1 ? "Delete Searches" : "Delete Search";
             }
-            if ( bookmarks.length > 0 && connections.length == 0 && entries.length == 0 && searches.length == 0
+            if ( bookmarks.length > 0 && entries.length == 0 && searches.length == 0
                 && attributes.length == 0 && values.length == 0 )
             {
                 return bookmarks.length > 1 ? "Delete Bookmarks" : "Delete Bookmark";
             }
-            if ( attributes.length > 0 && connections.length == 0 && entries.length == 0 && searches.length == 0
+            if ( attributes.length > 0 && entries.length == 0 && searches.length == 0
                 && bookmarks.length == 0 && values.length == 0 )
             {
                 return attributes.length > 1 ? "Delete Attributes" : "Delete Attribute";
             }
-            if ( values.length > 0 && connections.length == 0 && entries.length == 0 && searches.length == 0
+            if ( values.length > 0 && entries.length == 0 && searches.length == 0
                 && bookmarks.length == 0 && attributes.length == 0 )
             {
                 return values.length > 1 ? "Delete Values" : "Delete Value";
@@ -139,7 +131,6 @@
     {
         try
         {
-            IConnection[] connections = getConnections();
             IEntry[] entries = getEntries();
             ISearch[] searches = getSearches();
             IBookmark[] bookmarks = getBookmarks();
@@ -148,27 +139,6 @@
 
             StringBuffer message = new StringBuffer();
 
-            if ( connections.length > 0 )
-            {
-                if ( connections.length <= 5 )
-                {
-                    message.append( connections.length == 1 ? "Are your sure to delete the following connection?"
-                        : "Are your sure to delete the following connections?" );
-                    for ( int i = 0; i < connections.length; i++ )
-                    {
-                        message.append( BrowserCoreConstants.LINE_SEPARATOR );
-                        message.append( "  - " );
-                        message.append( connections[i].getName() );
-                    }
-                }
-                else
-                {
-                    message.append( "Are your sure to delete the selected connections?" );
-                }
-                message.append( BrowserCoreConstants.LINE_SEPARATOR );
-                message.append( BrowserCoreConstants.LINE_SEPARATOR );
-            }
-
             if ( entries.length > 0 )
             {
                 if ( entries.length <= 5 )
@@ -288,11 +258,6 @@
 
             if ( message.length() == 0 || MessageDialog.openConfirm( getShell(), getText(), message.toString() ) )
             {
-
-                if ( connections.length > 0 )
-                {
-                    deleteConnections( connections );
-                }
                 if ( entries.length > 0 )
                 {
                     deleteEntries( entries );
@@ -366,14 +331,13 @@
     {
         try
         {
-            IConnection[] connections = getConnections();
             IEntry[] entries = getEntries();
             ISearch[] searches = getSearches();
             IBookmark[] bookmarks = getBookmarks();
             IAttribute[] attributes = getAttributes();
             IValue[] values = getValues();
 
-            return connections.length + entries.length + searches.length + bookmarks.length + attributes.length
+            return entries.length + searches.length + bookmarks.length + attributes.length
                 + values.length > 0;
 
         }
@@ -386,43 +350,6 @@
 
 
     /**
-     * Gets the Connections 
-     *
-     * @return
-     *      the Connections
-     * @throws Exception
-     *      when a is opened
-     */
-    protected IConnection[] getConnections() throws Exception
-    {
-        for ( int i = 0; i < getSelectedConnections().length; i++ )
-        {
-            if ( getSelectedConnections()[i].isOpened() )
-            {
-                throw new Exception();
-            }
-        }
-
-        return getSelectedConnections();
-    }
-
-
-    /**
-     * Deletes Connections
-     *
-     * @param connections
-     *      the Connections to delete
-     */
-    protected void deleteConnections( IConnection[] connections )
-    {
-        for ( int i = 0; i < connections.length; i++ )
-        {
-            BrowserCorePlugin.getDefault().getConnectionManager().removeConnection( connections[i] );
-        }
-    }
-
-
-    /**
      * Gets the Entries.
      *
      * @return
@@ -500,7 +427,7 @@
         for ( int i = 0; i < searches.length; i++ )
         {
             ISearch search = searches[i];
-            search.getConnection().getSearchManager().removeSearch( search );
+            search.getBrowserConnection().getSearchManager().removeSearch( search );
         }
     }
 
@@ -528,7 +455,7 @@
         for ( int i = 0; i < bookmarks.length; i++ )
         {
             IBookmark bookmark = bookmarks[i];
-            bookmark.getConnection().getBookmarkManager().removeBookmark( bookmark );
+            bookmark.getBrowserConnection().getBookmarkManager().removeBookmark( bookmark );
         }
     }
 
@@ -699,7 +626,7 @@
             for ( Iterator it = remainingObjectClassesSet.iterator(); it.hasNext(); )
             {
                 String oc = ( String ) it.next();
-                ObjectClassDescription ocd = entry.getConnection().getSchema().getObjectClassDescription( oc );
+                ObjectClassDescription ocd = entry.getBrowserConnection().getSchema().getObjectClassDescription( oc );
                 if ( ocd != null )
                 {
                     remainingAttributeSet

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java Sun Aug 26 15:36:01 2007
@@ -59,7 +59,7 @@
         if ( getSelectedEntries().length == 1 )
         {
             FilterWidgetDialog dialog = new FilterWidgetDialog( getShell(), "Filter Children", getSelectedEntries()[0]
-                .getChildrenFilter(), getSelectedEntries()[0].getConnection() );
+                .getChildrenFilter(), getSelectedEntries()[0].getBrowserConnection() );
             if ( dialog.open() == Dialog.OK )
             {
                 String newFilter = dialog.getFilter();

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PasteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PasteAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PasteAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PasteAction.java Sun Aug 26 15:36:01 2007
@@ -22,17 +22,13 @@
 
 
 import org.apache.directory.studio.ldapbrowser.common.dialogs.ScopeDialog;
-import org.apache.directory.studio.ldapbrowser.common.dnd.ConnectionTransfer;
 import org.apache.directory.studio.ldapbrowser.common.dnd.EntryTransfer;
 import org.apache.directory.studio.ldapbrowser.common.dnd.ValuesTransfer;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.jobs.CopyEntriesJob;
 import org.apache.directory.studio.ldapbrowser.core.jobs.CreateValuesJob;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
 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.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
 
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.dnd.Clipboard;
@@ -65,13 +61,6 @@
      */
     public String getText()
     {
-        // connection
-        IConnection[] connections = getConnectionsToPaste();
-        if ( connections != null )
-        {
-            return connections.length > 1 ? "Paste Connections" : "Paste Connection";
-        }
-
         // entry
         IEntry[] entries = getEntriesToPaste();
         if ( entries != null )
@@ -113,15 +102,8 @@
      */
     public boolean isEnabled()
     {
-
-        // connection
-        if ( getConnectionsToPaste() != null )
-        {
-            return true;
-        }
-
         // entry
-        else if ( getEntriesToPaste() != null )
+        if ( getEntriesToPaste() != null )
         {
             return true;
         }
@@ -141,18 +123,6 @@
      */
     public void run()
     {
-        // connection
-        IConnection[] connections = getConnectionsToPaste();
-        if ( connections != null )
-        {
-            for ( int i = 0; i < connections.length; i++ )
-            {
-                IConnection newConnection = ( IConnection ) connections[i].clone();
-                BrowserCorePlugin.getDefault().getConnectionManager().addConnection( newConnection );
-            }
-            return;
-        }
-
         // entry
         IEntry[] entries = getEntriesToPaste();
         if ( entries != null )
@@ -182,7 +152,6 @@
      */
     private void pasteEntries( final IEntry parent, final IEntry[] entriesToPaste )
     {
-
         int scope = ISearch.SCOPE_OBJECT;
         boolean askForScope = false;
         for ( int i = 0; i < entriesToPaste.length; i++ )
@@ -246,31 +215,6 @@
             }
             new CreateValuesJob( entry, attributeNames, rawValues ).execute();
         }
-    }
-
-
-    /**
-     * Conditions: - a connection is selected - there are connections in
-     * clipboard
-     * 
-     * @return
-     */
-    private IConnection[] getConnectionsToPaste()
-    {
-        if ( getSelectedBookmarks().length + getSelectedEntries().length + getSelectedSearchResults().length
-            + getSelectedSearches().length + getSelectedAttributes().length + getSelectedValues().length == 0
-            && getSelectedConnections().length > 0 )
-        {
-
-            Object content = this.getFromClipboard( ConnectionTransfer.getInstance() );
-            if ( content != null && content instanceof IConnection[] )
-            {
-                IConnection[] connections = ( IConnection[] ) content;
-                return connections;
-            }
-        }
-
-        return null;
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/PropertiesAction.java Sun Aug 26 15:36:01 2007
@@ -81,8 +81,7 @@
     public boolean isEnabled()
     {
 
-        return getSelectedConnections().length == 1
-            || getSelectedEntries().length + getSelectedSearchResults().length + getSelectedBookmarks().length
+        return getSelectedEntries().length + getSelectedSearchResults().length + getSelectedBookmarks().length
                 + getSelectedSearches().length == 1 || getSelectedAttributes().length + getSelectedValues().length == 1
             || ( getSelectedAttributeHierarchies().length == 1 && getSelectedAttributeHierarchies()[0].size() == 1 );
 
@@ -141,12 +140,6 @@
             element = ( IAdaptable ) getSelectedSearchResults()[0];
             pageId = "org.apache.directory.studio.ldapbrowser.ui.dialogs.properties.EntryPropertyPage";
             title = getSelectedSearchResults()[0].getDn().toString();
-        }
-        else if ( getSelectedConnections().length == 1 )
-        {
-            element = ( IAdaptable ) getSelectedConnections()[0];
-            pageId = "org.apache.directory.studio.ldapbrowser.ui.dialogs.properties.ConnectionPropertyPage";
-            title = getSelectedConnections()[0].getName();
         }
 
         if ( element != null )

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RenameAction.java Sun Aug 26 15:36:01 2007
@@ -22,11 +22,9 @@
 
 
 import org.apache.directory.studio.ldapbrowser.common.dialogs.RenameEntryDialog;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.RootDSE;
 import org.apache.directory.studio.ldapbrowser.core.jobs.RenameEntryJob;
 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.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.RDN;
@@ -61,24 +59,19 @@
     public String getText()
     {
 
-        IConnection[] connections = getConnections();
         IEntry[] entries = getEntries();
         ISearch[] searches = getSearches();
         IBookmark[] bookmarks = getBookmarks();
 
-        if ( connections.length == 1 && entries.length == 0 && searches.length == 0 && bookmarks.length == 0 )
-        {
-            return "Rename Connection...";
-        }
-        else if ( entries.length == 1 && connections.length == 0 && searches.length == 0 && bookmarks.length == 0 )
+        if ( entries.length == 1 && searches.length == 0 && bookmarks.length == 0 )
         {
             return "Rename Entry...";
         }
-        else if ( searches.length == 1 && connections.length == 0 && entries.length == 0 && bookmarks.length == 0 )
+        else if ( searches.length == 1 && entries.length == 0 && bookmarks.length == 0 )
         {
             return "Rename Search...";
         }
-        else if ( bookmarks.length == 1 && connections.length == 0 && entries.length == 0 && searches.length == 0 )
+        else if ( bookmarks.length == 1 && entries.length == 0 && searches.length == 0 )
         {
             return "Rename Bookmark...";
         }
@@ -112,24 +105,19 @@
      */
     public void run()
     {
-        IConnection[] connections = getConnections();
         IEntry[] entries = getEntries();
         ISearch[] searches = getSearches();
         IBookmark[] bookmarks = getBookmarks();
 
-        if ( connections.length == 1 && entries.length == 0 && searches.length == 0 && bookmarks.length == 0 )
-        {
-            renameConnection( connections[0] );
-        }
-        else if ( entries.length == 1 && connections.length == 0 && searches.length == 0 && bookmarks.length == 0 )
+        if ( entries.length == 1 && searches.length == 0 && bookmarks.length == 0 )
         {
             renameEntry( entries[0] );
         }
-        else if ( searches.length == 1 && connections.length == 0 && entries.length == 0 && bookmarks.length == 0 )
+        else if ( searches.length == 1 && entries.length == 0 && bookmarks.length == 0 )
         {
             renameSearch( searches[0] );
         }
-        else if ( bookmarks.length == 1 && connections.length == 0 && entries.length == 0 && searches.length == 0 )
+        else if ( bookmarks.length == 1 && entries.length == 0 && searches.length == 0 )
         {
             renameBookmark( bookmarks[0] );
         }
@@ -143,12 +131,11 @@
     {
         try
         {
-            IConnection[] connections = getConnections();
             IEntry[] entries = getEntries();
             ISearch[] searches = getSearches();
             IBookmark[] bookmarks = getBookmarks();
 
-            return connections.length + entries.length + searches.length + bookmarks.length == 1;
+            return entries.length + searches.length + bookmarks.length == 1;
 
         }
         catch ( Exception e )
@@ -159,58 +146,6 @@
 
 
     /**
-     * Gets the Connections
-     * 
-     * @return
-     *      the Connections
-     */
-    protected IConnection[] getConnections()
-    {
-        if ( getSelectedConnections().length == 1 )
-        {
-            return getSelectedConnections();
-        }
-        else
-        {
-            return new IConnection[0];
-        }
-    }
-
-
-    /**
-     * Renames a Connection.
-     *
-     * @param connection
-     *      the Connection to rename
-     */
-    protected void renameConnection( final IConnection connection )
-    {
-        IInputValidator validator = new IInputValidator()
-        {
-            public String isValid( String newName )
-            {
-                if ( connection.getName().equals( newName ) )
-                    return null;
-                else if ( BrowserCorePlugin.getDefault().getConnectionManager().getConnection( newName ) != null )
-                    return "A connection with this name already exists.";
-                else
-                    return null;
-            }
-        };
-
-        InputDialog dialog = new InputDialog( getShell(), "Rename Connection", "New name:", connection.getName(),
-            validator );
-
-        dialog.open();
-        String newName = dialog.getValue();
-        if ( newName != null )
-        {
-            connection.setName( newName );
-        }
-    }
-
-
-    /**
      * Gets the Entries
      *
      * @return
@@ -300,7 +235,7 @@
             {
                 if ( search.getName().equals( newName ) )
                     return null;
-                else if ( search.getConnection().getSearchManager().getSearch( newName ) != null )
+                else if ( search.getBrowserConnection().getSearchManager().getSearch( newName ) != null )
                     return "A connection with this name already exists.";
                 else
                     return null;
@@ -351,7 +286,7 @@
             {
                 if ( bookmark.getName().equals( newName ) )
                     return null;
-                else if ( bookmark.getConnection().getBookmarkManager().getBookmark( newName ) != null )
+                else if ( bookmark.getBrowserConnection().getBookmarkManager().getBookmark( newName ) != null )
                     return "A bookmark with this name already exists.";
                 else
                     return null;

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/SelectAllAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/SelectAllAction.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/SelectAllAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/SelectAllAction.java Sun Aug 26 15:36:01 2007
@@ -25,7 +25,7 @@
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.directory.studio.ldapbrowser.core.ConnectionManager;
+import org.apache.directory.studio.connection.core.ConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java Sun Aug 26 15:36:01 2007
@@ -21,13 +21,15 @@
 package org.apache.directory.studio.ldapbrowser.common.actions.proxy;
 
 
+import org.apache.directory.studio.connection.core.Connection;
+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.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction;
-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.BookmarkUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.BookmarkUpdateListener;
-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.EntryModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -47,13 +49,14 @@
 
     /** The action handler manager, used to deactivate and activate the action handlers and key bindings. */
     private ActionHandlerManager actionHandlerManager;
-    
+
     protected BrowserAction action;
 
     protected ISelectionProvider selectionProvider;
 
 
-    protected BrowserActionProxy( ISelectionProvider selectionProvider, ActionHandlerManager actionHandlerManager, BrowserAction action, int style )
+    protected BrowserActionProxy( ISelectionProvider selectionProvider, ActionHandlerManager actionHandlerManager,
+        BrowserAction action, int style )
     {
         super( action.getText(), style );
         this.selectionProvider = selectionProvider;
@@ -66,7 +69,7 @@
         selectionProvider.addSelectionChangedListener( this );
         // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().addSelectionListener(this);
 
-        EventRegistry.addConnectionUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
+        ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionUIPlugin.getDefault().getEventRunner() );
         EventRegistry.addEntryUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
         EventRegistry.addSearchUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
         EventRegistry.addBookmarkUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
@@ -75,7 +78,8 @@
     }
 
 
-    protected BrowserActionProxy( ISelectionProvider selectionProvider, ActionHandlerManager actionHandlerManager, BrowserAction action )
+    protected BrowserActionProxy( ISelectionProvider selectionProvider, ActionHandlerManager actionHandlerManager,
+        BrowserAction action )
     {
         this( selectionProvider, actionHandlerManager, action, Action.AS_PUSH_BUTTON );
     }
@@ -83,7 +87,7 @@
 
     public void dispose()
     {
-        EventRegistry.removeConnectionUpdateListener( this );
+        ConnectionEventRegistry.removeConnectionUpdateListener( this );
         EventRegistry.removeEntryUpdateListener( this );
         EventRegistry.removeSearchUpdateListener( this );
         EventRegistry.removeBookmarkUpdateListener( this );
@@ -131,16 +135,64 @@
     }
 
 
-    public final void connectionUpdated( ConnectionUpdateEvent connectionUpdateEvent )
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionUpdated(org.apache.directory.studio.connection.core.Connection)
+     */
+    public final void connectionUpdated( Connection connection )
     {
-        if ( !this.isDisposed() )
+        if ( !isDisposed() )
         {
-            this.action.connectionUpdated( connectionUpdateEvent );
-            this.updateAction();
+            action.connectionUpdated( connection );
+            updateAction();
         }
     }
 
 
+    /**
+     * @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 );
+    }
+
+
     public void inputChanged( Object input )
     {
         if ( !this.isDisposed() )
@@ -158,23 +210,22 @@
         {
             ISelection selection = event.getSelection();
 
-            this.action.setSelectedConnections( SelectionUtils.getConnections( selection ) );
+            this.action.setSelectedBrowserViewCategories( BrowserSelectionUtils.getBrowserViewCategories( selection ) );
+            this.action.setSelectedEntries( BrowserSelectionUtils.getEntries( selection ) );
+            this.action.setSelectedBrowserEntryPages( BrowserSelectionUtils.getBrowserEntryPages( selection ) );
+            this.action.setSelectedSearchResults( BrowserSelectionUtils.getSearchResults( selection ) );
+            this.action.setSelectedBrowserSearchResultPages( BrowserSelectionUtils
+                .getBrowserSearchResultPages( selection ) );
+            this.action.setSelectedBookmarks( BrowserSelectionUtils.getBookmarks( selection ) );
+
+            this.action.setSelectedSearches( BrowserSelectionUtils.getSearches( selection ) );
+
+            this.action.setSelectedAttributes( BrowserSelectionUtils.getAttributes( selection ) );
+            this.action.setSelectedAttributeHierarchies( BrowserSelectionUtils.getAttributeHierarchie( selection ) );
+            this.action.setSelectedValues( BrowserSelectionUtils.getValues( selection ) );
+
+            this.action.setSelectedProperties( BrowserSelectionUtils.getProperties( selection ) );
 
-            this.action.setSelectedBrowserViewCategories( SelectionUtils.getBrowserViewCategories( selection ) );
-            this.action.setSelectedEntries( SelectionUtils.getEntries( selection ) );
-            this.action.setSelectedBrowserEntryPages( SelectionUtils.getBrowserEntryPages( selection ) );
-            this.action.setSelectedSearchResults( SelectionUtils.getSearchResults( selection ) );
-            this.action.setSelectedBrowserSearchResultPages( SelectionUtils.getBrowserSearchResultPages( selection ) );
-            this.action.setSelectedBookmarks( SelectionUtils.getBookmarks( selection ) );
-
-            this.action.setSelectedSearches( SelectionUtils.getSearches( selection ) );
-
-            this.action.setSelectedAttributes( SelectionUtils.getAttributes( selection ) );
-            this.action.setSelectedAttributeHierarchies( SelectionUtils.getAttributeHierarchie( selection ) );
-            this.action.setSelectedValues( SelectionUtils.getValues( selection ) );
-            
-            this.action.setSelectedProperties( SelectionUtils.getProperties( selection ) );
-            
             this.updateAction();
         }
     }
@@ -201,7 +252,7 @@
             {
                 actionHandlerManager.deactivateGlobalActionHandlers();
             }
-            
+
             action.run();
 
             // activate global actions

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterDialog.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterDialog.java Sun Aug 26 15:36:01 2007
@@ -24,7 +24,7 @@
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.filtereditor.FilterSourceViewerConfiguration;
-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.filter.parser.LdapFilterParser;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -48,7 +48,7 @@
 
     private String title;
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private SourceViewer sourceViewer;
 
@@ -59,7 +59,7 @@
     private String filter;
 
 
-    public FilterDialog( Shell parentShell, String title, String filter, IConnection connection )
+    public FilterDialog( Shell parentShell, String title, String filter, IBrowserConnection connection )
     {
         super( parentShell );
         this.title = title;

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterWidgetDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterWidgetDialog.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterWidgetDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/FilterWidgetDialog.java Sun Aug 26 15:36:01 2007
@@ -27,7 +27,7 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.FilterWidget;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
@@ -52,7 +52,7 @@
     private String title;
 
     /** The connection, used for attribute completion. */
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     /** The filter widget. */
     private FilterWidget filterWidget;
@@ -72,7 +72,7 @@
      * @param filter the inital filter
      * @param connection the connection, used for attribute completion
      */
-    public FilterWidgetDialog( Shell parentShell, String title, String filter, IConnection connection )
+    public FilterWidgetDialog( Shell parentShell, String title, String filter, IBrowserConnection connection )
     {
         super( parentShell );
         this.title = title;

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/MoveEntriesDialog.java Sun Aug 26 15:36:01 2007
@@ -112,7 +112,7 @@
         this.dnBuilderWidget = new DnBuilderWidget( false, true );
         this.dnBuilderWidget.addWidgetModifyListener( this );
         this.dnBuilderWidget.createContents( composite );
-        this.dnBuilderWidget.setInput( this.entries[0].getConnection(), null, null, this.entries[0].getDn()
+        this.dnBuilderWidget.setInput( this.entries[0].getBrowserConnection(), null, null, this.entries[0].getDn()
             .getParentDn() );
 
         this.simulateMoveButton = BaseWidgetUtils.createCheckbox( composite,

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java Sun Aug 26 15:36:01 2007
@@ -123,7 +123,7 @@
         this.dnBuilderWidget = new DnBuilderWidget( true, false );
         this.dnBuilderWidget.addWidgetModifyListener( this );
         this.dnBuilderWidget.createContents( composite );
-        this.dnBuilderWidget.setInput( this.entry.getConnection(), this.entry.getSubschema().getAllAttributeNames(),
+        this.dnBuilderWidget.setInput( this.entry.getBrowserConnection(), this.entry.getSubschema().getAllAttributeNames(),
             this.entry.getRdn(), null );
 
         this.deleteOldRdnButton = BaseWidgetUtils.createCheckbox( composite, "Delete old RDN", 1 );

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectConnectionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectConnectionDialog.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectConnectionDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectConnectionDialog.java Sun Aug 26 15:36:01 2007
@@ -21,13 +21,12 @@
 package org.apache.directory.studio.ldapbrowser.common.dialogs;
 
 
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionActionGroup;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionConfiguration;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionUniversalListener;
-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.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionActionGroup;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionConfiguration;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionUniversalListener;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionWidget;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -49,9 +48,9 @@
 
     private String title;
 
-    private IConnection initialConnection;
+    private IBrowserConnection initialConnection;
 
-    private IConnection selectedConnection;
+    private IBrowserConnection selectedConnection;
 
     private ConnectionConfiguration configuration;
 
@@ -62,7 +61,7 @@
     private ConnectionWidget mainWidget;
 
 
-    public SelectConnectionDialog( Shell parentShell, String title, IConnection initialConnection )
+    public SelectConnectionDialog( Shell parentShell, String title, IBrowserConnection initialConnection )
     {
         super( parentShell );
         super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
@@ -135,7 +134,7 @@
         // create main widget
         this.mainWidget = new ConnectionWidget( this.configuration, null );
         this.mainWidget.createWidget( composite );
-        this.mainWidget.setInput( BrowserCorePlugin.getDefault().getConnectionManager() );
+        this.mainWidget.setInput( ConnectionCorePlugin.getDefault().getConnectionManager() );
 
         // create actions and context menu (and register global actions)
         this.actionGroup = new ConnectionActionGroup( this.mainWidget, this.configuration );
@@ -154,9 +153,9 @@
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
-                    if ( o instanceof IConnection )
+                    if ( o instanceof IBrowserConnection )
                     {
-                        initialConnection = ( IConnection ) o;
+                        initialConnection = ( IBrowserConnection ) o;
                     }
                 }
             }
@@ -169,9 +168,9 @@
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
-                    if ( o instanceof IConnection )
+                    if ( o instanceof IBrowserConnection )
                     {
-                        initialConnection = ( IConnection ) o;
+                        initialConnection = ( IBrowserConnection ) o;
                         okPressed();
                     }
                 }
@@ -180,7 +179,7 @@
 
         if ( this.initialConnection != null )
         {
-            IConnection connection = this.initialConnection;
+            IBrowserConnection connection = this.initialConnection;
             this.mainWidget.getViewer().reveal( connection );
             this.mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
         }
@@ -194,7 +193,7 @@
     }
 
 
-    public IConnection getSelectedConnection()
+    public IBrowserConnection getSelectedConnection()
     {
         return this.selectedConnection;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectEntryDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectEntryDialog.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectEntryDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectEntryDialog.java Sun Aug 26 15:36:01 2007
@@ -25,7 +25,7 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserConfiguration;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserUniversalListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserWidget;
-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.eclipse.jface.dialogs.Dialog;

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectReferralConnectionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectReferralConnectionDialog.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectReferralConnectionDialog.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectReferralConnectionDialog.java Sun Aug 26 15:36:01 2007
@@ -21,15 +21,15 @@
 package org.apache.directory.studio.ldapbrowser.common.dialogs;
 
 
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionActionGroup;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionConfiguration;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionUniversalListener;
+import org.apache.directory.studio.connection.ui.widgets.ConnectionWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionActionGroup;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionConfiguration;
-import org.apache.directory.studio.ldapbrowser.common.widgets.connection.ConnectionUniversalListener;
-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.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.URL;
-
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -53,7 +53,7 @@
 
     private URL referralUrl;
 
-    private IConnection selectedConnection;
+    private IBrowserConnection selectedConnection;
 
     private ConnectionConfiguration configuration;
 
@@ -139,7 +139,7 @@
         // create main widget
         this.mainWidget = new ConnectionWidget( this.configuration, null );
         this.mainWidget.createWidget( composite );
-        this.mainWidget.setInput( BrowserCorePlugin.getDefault().getConnectionManager() );
+        this.mainWidget.setInput( ConnectionCorePlugin.getDefault().getConnectionManager() );
 
         // create actions and context menu (and register global actions)
         this.actionGroup = new ConnectionActionGroup( this.mainWidget, this.configuration );
@@ -158,9 +158,9 @@
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
-                    if ( o instanceof IConnection )
+                    if ( o instanceof IBrowserConnection )
                     {
-                        selectedConnection = ( IConnection ) o;
+                        selectedConnection = ( IBrowserConnection ) o;
                     }
                 }
             }
@@ -173,9 +173,9 @@
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
-                    if ( o instanceof IConnection )
+                    if ( o instanceof IBrowserConnection )
                     {
-                        selectedConnection = ( IConnection ) o;
+                        selectedConnection = ( IBrowserConnection ) o;
                         okPressed();
                     }
                 }
@@ -184,10 +184,10 @@
 
         if ( this.referralUrl != null )
         {
-            IConnection[] connections = BrowserCorePlugin.getDefault().getConnectionManager().getConnections();
+            IBrowserConnection[] connections = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnections();
             for ( int i = 0; i < connections.length; i++ )
             {
-                IConnection connection = connections[i];
+                IBrowserConnection connection = connections[i];
                 URL connectionUrl = connection.getUrl();
                 if ( connectionUrl != null && referralUrl.toString().startsWith( connectionUrl.toString() ) )
                 {
@@ -206,7 +206,7 @@
     }
 
 
-    public IConnection getReferralConnection()
+    public IBrowserConnection getReferralConnection()
     {
         return this.selectedConnection;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java Sun Aug 26 15:36:01 2007
@@ -29,8 +29,8 @@
 
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 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.ldapbrowser.core.BrowserConnectionManager;
+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.BinaryAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.BinarySyntax;
@@ -116,8 +116,8 @@
         // init available attribute types
         this.attributeNames2AtdMap = new TreeMap();
         this.attributeOid2AtdMap = new TreeMap();
-        ConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
-        IConnection[] connections = cm.getConnections();
+        BrowserConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
+        IBrowserConnection[] connections = cm.getBrowserConnections();
         for ( int i = 0; i < connections.length; i++ )
         {
             Schema schema = connections[i].getSchema();

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java Sun Aug 26 15:36:01 2007
@@ -31,8 +31,8 @@
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 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.ldapbrowser.core.BrowserConnectionManager;
+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.AttributeValueProviderRelation;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.LdapSyntaxDescription;
@@ -132,8 +132,8 @@
         // init available attribute types
         this.attributeTypes2AtdMap = new TreeMap();
         this.attributeOid2AtdMap = new TreeMap();
-        ConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
-        IConnection[] connections = cm.getConnections();
+        BrowserConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
+        IBrowserConnection[] connections = cm.getBrowserConnections();
         for ( int i = 0; i < connections.length; i++ )
         {
             Schema schema = connections[i].getSchema();

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/EntryTransfer.java Sun Aug 26 15:36:01 2007
@@ -30,9 +30,9 @@
 import java.util.List;
 
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
-import org.apache.directory.studio.ldapbrowser.core.ConnectionManager;
+import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
-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.eclipse.swt.dnd.ByteArrayTransfer;
@@ -104,7 +104,7 @@
 
                 for ( int i = 0; i < entries.length; i++ )
                 {
-                    byte[] connectionName = entries[i].getConnection().getName().getBytes();
+                    byte[] connectionName = entries[i].getBrowserConnection().getName().getBytes();
                     writeOut.writeInt( connectionName.length );
                     writeOut.write( connectionName );
                     byte[] dn = entries[i].getDn().toString().getBytes();
@@ -130,8 +130,8 @@
      * 
      * This implementation just converts the platform specific representation
      * to the connection name and entry DN and invokes 
-     * {@link ConnectionManager#getConnection(String)} to get the
-     * {@link IConnection} object and {@link IConnection#getEntryFromCache(DN)}
+     * {@link BrowserConnectionManager#getConnection(String)} to get the
+     * {@link IBrowserConnection} object and {@link IBrowserConnection#getEntryFromCache(DN)}
      * to get the {@link IEntry} object.
      */
     public Object nativeToJava( TransferData transferData )
@@ -149,7 +149,7 @@
                 List<IEntry> entryList = new ArrayList<IEntry>();
                 try
                 {
-                    IConnection connection = null;
+                    IBrowserConnection connection = null;
                     ByteArrayInputStream in = new ByteArrayInputStream( buffer );
                     DataInputStream readIn = new DataInputStream( in );
 

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/SearchTransfer.java Sun Aug 26 15:36:01 2007
@@ -30,8 +30,8 @@
 import java.util.List;
 
 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.ldapbrowser.core.BrowserConnectionManager;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.eclipse.swt.dnd.ByteArrayTransfer;
 import org.eclipse.swt.dnd.Transfer;
@@ -102,7 +102,7 @@
 
                 for ( int i = 0; i < searches.length; i++ )
                 {
-                    byte[] connectionName = searches[i].getConnection().getName().getBytes();
+                    byte[] connectionName = searches[i].getBrowserConnection().getName().getBytes();
                     writeOut.writeInt( connectionName.length );
                     writeOut.write( connectionName );
                     byte[] searchName = searches[i].getName().getBytes();
@@ -128,8 +128,8 @@
      * 
      * This implementation just converts the platform specific representation
      * to the connection name and search name and invokes 
-     * {@link ConnectionManager#getConnection(String)} to get the
-     * {@link IConnection} object and {@link IConnection#getSearchManager()}
+     * {@link BrowserConnectionManager#getConnection(String)} to get the
+     * {@link IBrowserConnection} object and {@link IBrowserConnection#getSearchManager()}
      * to get the {@link ISearch} object.
      */
     public Object nativeToJava( TransferData transferData )
@@ -147,7 +147,7 @@
                 List<ISearch> searchList = new ArrayList<ISearch>();
                 try
                 {
-                    IConnection connection = null;
+                    IBrowserConnection connection = null;
                     ByteArrayInputStream in = new ByteArrayInputStream( buffer );
                     DataInputStream readIn = new DataInputStream( in );
 

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dnd/ValuesTransfer.java Sun Aug 26 15:36:01 2007
@@ -32,7 +32,7 @@
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 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.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.IValue;
 import org.eclipse.swt.dnd.ByteArrayTransfer;
@@ -103,7 +103,7 @@
 
                 for ( int i = 0; i < values.length; i++ )
                 {
-                    byte[] connectionName = values[i].getAttribute().getEntry().getConnection().getName().getBytes();
+                    byte[] connectionName = values[i].getAttribute().getEntry().getBrowserConnection().getName().getBytes();
                     writeOut.writeInt( connectionName.length );
                     writeOut.write( connectionName );
                     byte[] dn = values[i].getAttribute().getEntry().getDn().toString().getBytes();
@@ -168,7 +168,7 @@
 
                     do
                     {
-                        IConnection connection = null;
+                        IBrowserConnection connection = null;
                         if ( readIn.available() > 1 )
                         {
                             int size = readIn.readInt();

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterSourceViewerConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterSourceViewerConfiguration.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterSourceViewerConfiguration.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterSourceViewerConfiguration.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.common.widgets.DialogContentAssistant;
-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.filter.parser.LdapFilterParser;
 import org.eclipse.jface.text.DefaultInformationControl;
 import org.eclipse.jface.text.IAutoEditStrategy;
@@ -54,7 +54,7 @@
 {
 
     /** The current connection, used to retrieve schema information. */
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     /** The filter parser. */
     private LdapFilterParser parser;
@@ -96,7 +96,7 @@
      * @param parser the filer parser
      * @param connection the connection
      */
-    public FilterSourceViewerConfiguration( LdapFilterParser parser, IConnection connection )
+    public FilterSourceViewerConfiguration( LdapFilterParser parser, IBrowserConnection connection )
     {
         this.parser = parser;
         this.connection = connection;
@@ -108,7 +108,7 @@
      * 
      * @param connection the connection
      */
-    public void setConnection( IConnection connection )
+    public void setConnection( IBrowserConnection connection )
     {
         this.connection = connection;
         contentAssistProcessor.setSchema( connection == null ? null : connection.getSchema() );

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/DnBuilderWidget.java Sun Aug 26 15:36:01 2007
@@ -26,7 +26,7 @@
 
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
-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.RDN;
 import org.apache.directory.studio.ldapbrowser.core.model.RDNPart;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
@@ -126,7 +126,7 @@
      * @param connection the connection
      * @param parentDn the initial parent DN
      */
-    public void setInput( IConnection connection, String[] attributeNames, RDN rdn, DN parentDn )
+    public void setInput( IBrowserConnection connection, String[] attributeNames, RDN rdn, DN parentDn )
     {
         this.attributeNames = attributeNames;
         this.currentRdn = rdn;

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java Sun Aug 26 15:36:01 2007
@@ -33,7 +33,7 @@
 import org.apache.directory.studio.ldapbrowser.common.actions.UpAction;
 import org.apache.directory.studio.ldapbrowser.common.actions.proxy.ActionHandlerManager;
 import org.apache.directory.studio.ldapbrowser.common.actions.proxy.BrowserViewActionProxy;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
@@ -300,7 +300,7 @@
      *
      * @param connection the connection
      */
-    public void setInput( IConnection connection )
+    public void setInput( IBrowserConnection connection )
     {
         for ( Iterator it = browserActionMap.values().iterator(); it.hasNext(); )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserCategory.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserCategory.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserCategory.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserCategory.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.browser;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
 /**
@@ -54,7 +54,7 @@
     public static final String TITLE_BOOKMARKS = "Bookmarks";
 
     /** The category's connection */
-    private IConnection parent;
+    private IBrowserConnection parent;
 
     /** The category's type */
     private int type;
@@ -66,7 +66,7 @@
      * @param type the category's type, one of TYPE_DIT, TYPE_SEARCHES or TYPE_BOOKMARKS
      * @param parent the category's connection
      */
-    public BrowserCategory( int type, IConnection parent )
+    public BrowserCategory( int type, IBrowserConnection parent )
     {
         this.parent = parent;
         this.type = type;
@@ -78,7 +78,7 @@
      * 
      * @return the parent connection
      */
-    public IConnection getParent()
+    public IBrowserConnection getParent()
     {
         return parent;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java Sun Aug 26 15:36:01 2007
@@ -28,14 +28,14 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.studio.connection.core.jobs.OpenConnectionsJob;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.DirectoryMetadataEntry;
 import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenJob;
-import org.apache.directory.studio.ldapbrowser.core.jobs.OpenConnectionsJob;
 import org.apache.directory.studio.ldapbrowser.core.jobs.SearchJob;
 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;
@@ -67,7 +67,7 @@
     private Map<ISearch, BrowserSearchResultPage[]> searchToSearchResultPagesMap;
 
     /** This map contains the top-level categories for each connection */
-    private Map<IConnection, BrowserCategory[]> connectionToCategoriesMap;
+    private Map<IBrowserConnection, BrowserCategory[]> connectionToCategoriesMap;
 
 
     /**
@@ -82,7 +82,7 @@
         this.sorter = sorter;
         this.entryToEntryPagesMap = new HashMap<IEntry, BrowserEntryPage[]>();
         this.searchToSearchResultPagesMap = new HashMap<ISearch, BrowserSearchResultPage[]>();
-        this.connectionToCategoriesMap = new HashMap<IConnection, BrowserCategory[]>();
+        this.connectionToCategoriesMap = new HashMap<IBrowserConnection, BrowserCategory[]>();
     }
 
 
@@ -122,9 +122,9 @@
      */
     public Object[] getElements( Object parent )
     {
-        if ( parent instanceof IConnection )
+        if ( parent instanceof IBrowserConnection )
         {
-            IConnection connection = ( IConnection ) parent;
+            IBrowserConnection connection = ( IBrowserConnection ) parent;
             if ( !connectionToCategoriesMap.containsKey( connection ) )
             {
                 BrowserCategory[] categories = new BrowserCategory[3];
@@ -181,9 +181,9 @@
             IEntry parentEntry = ( ( IEntry ) child ).getParententry();
             if ( parentEntry == null )
             {
-                if ( connectionToCategoriesMap.get( ( ( IEntry ) child ).getConnection() ) != null )
+                if ( connectionToCategoriesMap.get( ( ( IEntry ) child ).getBrowserConnection() ) != null )
                 {
-                    return connectionToCategoriesMap.get( ( ( IEntry ) child ).getConnection() )[0];
+                    return connectionToCategoriesMap.get( ( ( IEntry ) child ).getBrowserConnection() )[0];
                 }
                 else
                 {
@@ -212,7 +212,7 @@
         else if ( child instanceof ISearch )
         {
             ISearch search = ( ( ISearch ) child );
-            return connectionToCategoriesMap.get( search.getConnection() )[1];
+            return connectionToCategoriesMap.get( search.getBrowserConnection() )[1];
         }
         else if ( child instanceof ISearchResult )
         {
@@ -235,7 +235,7 @@
         else if ( child instanceof IBookmark )
         {
             IBookmark bookmark = ( ( IBookmark ) child );
-            return connectionToCategoriesMap.get( bookmark.getConnection() )[2];
+            return connectionToCategoriesMap.get( bookmark.getBrowserConnection() )[2];
         }
         else
         {
@@ -409,16 +409,16 @@
         else if ( parent instanceof BrowserCategory )
         {
             BrowserCategory category = ( BrowserCategory ) parent;
-            IConnection connection = category.getParent();
+            IBrowserConnection connection = category.getParent();
 
             switch ( category.getType() )
             {
                 case BrowserCategory.TYPE_DIT:
                 {
                     // open connection when expanding DIT
-                    if ( !connection.isOpened() )
+                    if ( !connection.getConnection().getJNDIConnectionWrapper().isConnected() )
                     {
-                        new OpenConnectionsJob( connection ).execute();
+                        new OpenConnectionsJob( connection.getConnection() ).execute();
                         return new String[]
                             { "Opening Connection..." };
                     }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java Sun Aug 26 15:36:01 2007
@@ -180,7 +180,7 @@
         {
             ISearchResult sr = ( ISearchResult ) obj;
 
-            if ( !sr.getSearch().getConnection().equals( sr.getEntry().getConnection() ) )
+            if ( !sr.getSearch().getBrowserConnection().equals( sr.getEntry().getBrowserConnection() ) )
             {
                 return sr.getEntry().getUrl().toString();
             }
@@ -255,7 +255,7 @@
         else if ( obj instanceof ISearch )
         {
             ISearch search = ( ISearch ) obj;
-            if ( search.getConnection().isOpened() && search.getSearchResults() != null )
+            if ( search.getSearchResults() != null )
             {
                 return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_SEARCH );
             }
@@ -319,7 +319,7 @@
         {
             return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
         }
-        else if ( entry.getDn().equals( entry.getConnection().getSchema().getDn() ) )
+        else if ( entry.getDn().equals( entry.getBrowserConnection().getSchema().getDn() ) )
         {
             return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
         }

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserUniversalListener.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserUniversalListener.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserUniversalListener.java Sun Aug 26 15:36:01 2007
@@ -21,10 +21,12 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.browser;
 
 
+import org.apache.directory.studio.connection.core.Connection;
+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.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
-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.EntryModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -69,7 +71,7 @@
             {
                 IEntry entry = ( IEntry ) event.getElement();
                 if ( entry.isChildrenInitialized() && entry.hasMoreChildren()
-                    && entry.getChildrenCount() < entry.getConnection().getCountLimit() )
+                    && entry.getChildrenCount() < entry.getBrowserConnection().getCountLimit() )
                 {
                     entry.setChildrenInitialized( false );
                 }
@@ -120,7 +122,7 @@
         viewer.addTreeListener( treeViewerListener );
         viewer.addDoubleClickListener( doubleClickListener );
 
-        EventRegistry.addConnectionUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
+        ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionUIPlugin.getDefault().getEventRunner() );
         EventRegistry.addEntryUpdateListener( this, BrowserCommonActivator.getDefault().getEventRunner() );
     }
 
@@ -135,7 +137,7 @@
             viewer.removeTreeListener( treeViewerListener );
             viewer.removeDoubleClickListener( doubleClickListener );
 
-            EventRegistry.removeConnectionUpdateListener( this );
+            ConnectionEventRegistry.removeConnectionUpdateListener( this );
             EventRegistry.removeEntryUpdateListener( this );
 
             viewer = null;
@@ -144,25 +146,56 @@
 
 
     /**
-     * {@inheritDoc}
-     *
-     * This implementation refreshes the tree and collapses the
-     * tree when the connection is 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_CLOSED )
-        {
-            viewer.collapseAll();
-        }
-        else if ( connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.EventDetail.CONNECTION_OPENED )
-        {
-            viewer.refresh( connectionUpdateEvent.getConnection() );
-        }
-        else
-        {
-            viewer.refresh( connectionUpdateEvent.getConnection() );
-        }
+        viewer.refresh();
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionClosed(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionClosed( Connection connection )
+    {
+        viewer.collapseAll();
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionUpdated(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionUpdated( Connection connection )
+    {
+        viewer.refresh();
+    }
+
+
+    /**
+     * @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 )
+    {
+        viewer.refresh();
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionAdded(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionAdded( Connection connection )
+    {
+        viewer.refresh();
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionRemoved(org.apache.directory.studio.connection.core.Connection)
+     */
+    public void connectionRemoved( Connection connection )
+    {
+        viewer.refresh();
     }
 
 



Mime
View raw message