directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r571060 - in /directory/studio/trunk: studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/jobs/ studio-ldapbrowser-comm...
Date Thu, 30 Aug 2007 07:33:18 GMT
Author: seelmann
Date: Thu Aug 30 00:33:17 2007
New Revision: 571060

URL: http://svn.apache.org/viewvc?rev=571060&view=rev
Log:
Fixed problems when fetching base DNs

Modified:
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/jobs/RunnableContextJobAdapter.java
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java?rev=571060&r1=571059&r2=571060&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
Thu Aug 30 00:33:17 2007
@@ -97,7 +97,8 @@
         catch ( Exception ex )
         {
             ConnectionUIPlugin.getDefault().getExceptionHandler().handleException(
-                new Status( IStatus.ERROR, ConnectionUIPlugin.PLUGIN_ID, IStatus.ERROR, ex.getMessage(),
ex ) );
+                new Status( IStatus.ERROR, ConnectionUIPlugin.PLUGIN_ID, IStatus.ERROR, ex.getMessage()
!= null ? ex
+                    .getMessage() : "", ex ) );
         }
 
         if ( handleError && !job.getExternalResult().isOK() )

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/jobs/RunnableContextJobAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/jobs/RunnableContextJobAdapter.java?rev=571060&r1=571059&r2=571060&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/jobs/RunnableContextJobAdapter.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/jobs/RunnableContextJobAdapter.java
Thu Aug 30 00:33:17 2007
@@ -97,7 +97,8 @@
         catch ( Exception ex )
         {
             BrowserCommonActivator.getDefault().getExceptionHandler().handleException(
-                new Status( IStatus.ERROR, BrowserCommonActivator.PLUGIN_ID, IStatus.ERROR,
ex.getMessage(), ex ) );
+                new Status( IStatus.ERROR, BrowserCommonActivator.PLUGIN_ID, IStatus.ERROR,
+                    ex.getMessage() != null ? ex.getMessage() : "", ex ) );
         }
 
         if ( handleError && !job.getExternalResult().isOK() )

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java?rev=571060&r1=571059&r2=571060&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
Thu Aug 30 00:33:17 2007
@@ -29,7 +29,7 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.AliasesDereferencingWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.LimitWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.ReferralsHandlingWidget;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
+import org.apache.directory.studio.ldapbrowser.core.internal.model.BrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.jobs.FetchBaseDNsJob;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -104,7 +104,7 @@
      */
     private String getBaseDN()
     {
-        return baseDNCombo.getText();
+        return isAutoFetchBaseDns() ? null : baseDNCombo.getText();
     }
 
 
@@ -211,8 +211,7 @@
             public void widgetSelected( SelectionEvent e )
             {
                 Connection connection = getTestConnection();
-                IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager()
-                    .getBrowserConnection( connection );
+                IBrowserConnection browserConnection = new BrowserConnection( connection
);
 
                 FetchBaseDNsJob job = new FetchBaseDNsJob( browserConnection );
                 RunnableContextJobAdapter.execute( job, runnableContext );
@@ -289,18 +288,21 @@
     private void validate()
     {
         // set enabled/disabled state of fields and buttons
-        baseDNCombo.setEnabled( !autoFetchBaseDnsButton.getSelection() );
+        baseDNCombo.setEnabled( !isAutoFetchBaseDns() );
 
         // validate input fields
         message = null;
         errorMessage = null;
-        try
+        if ( !isAutoFetchBaseDns() )
         {
-            new DN( baseDNCombo.getText() );
-        }
-        catch ( NameException e )
-        {
-            message = "Please enter a valid base DN.";
+            try
+            {
+                new DN( getBaseDN() );
+            }
+            catch ( NameException e )
+            {
+                message = "Please enter a valid base DN.";
+            }
         }
     }
 



Mime
View raw message