directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r573512 - /directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectConnectionDialog.java
Date Fri, 07 Sep 2007 09:08:20 GMT
Author: seelmann
Date: Fri Sep  7 02:08:19 2007
New Revision: 573512

URL: http://svn.apache.org/viewvc?rev=573512&view=rev
Log:
Fix for DIRSTUDIO-183

Modified:
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/SelectConnectionDialog.java

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=573512&r1=573511&r2=573512&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
Fri Sep  7 02:08:19 2007
@@ -21,11 +21,13 @@
 package org.apache.directory.studio.ldapbrowser.common.dialogs;
 
 
+import org.apache.directory.studio.connection.core.Connection;
 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.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -153,9 +155,13 @@
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
-                    if ( o instanceof IBrowserConnection )
+                    if ( o instanceof Connection )
                     {
-                        initialConnection = ( IBrowserConnection ) o;
+                        Connection connection = ( Connection ) o;
+                        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager()
+                            .getBrowserConnection( connection );
+                        initialConnection = browserConnection;
+                        
                     }
                 }
             }
@@ -168,9 +174,12 @@
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
-                    if ( o instanceof IBrowserConnection )
+                    if ( o instanceof Connection )
                     {
-                        initialConnection = ( IBrowserConnection ) o;
+                        Connection connection = ( Connection ) o;
+                        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager()
+                            .getBrowserConnection( connection );
+                        initialConnection = browserConnection;
                         okPressed();
                     }
                 }
@@ -179,7 +188,7 @@
 
         if ( this.initialConnection != null )
         {
-            IBrowserConnection connection = this.initialConnection;
+            Connection connection = this.initialConnection.getConnection();
             this.mainWidget.getViewer().reveal( connection );
             this.mainWidget.getViewer().setSelection( new StructuredSelection( connection
), true );
         }



Mime
View raw message