directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r980180 - in /directory/studio/trunk: ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/ ldapbrowser.ui/ ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/
Date Wed, 28 Jul 2010 19:35:42 GMT
Author: seelmann
Date: Wed Jul 28 19:35:41 2010
New Revision: 980180

URL: http://svn.apache.org/viewvc?rev=980180&view=rev
Log:
Fixed detection of selected connection, IConnection was moved to connection-core long time
ago.

Modified:
    directory/studio/trunk/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java
    directory/studio/trunk/ldapbrowser.ui/plugin.xml
    directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java
    directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifWizard.java

Modified: directory/studio/trunk/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java?rev=980180&r1=980179&r2=980180&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java
(original)
+++ directory/studio/trunk/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java
Wed Jul 28 19:35:41 2010
@@ -30,10 +30,12 @@ import java.util.List;
 import java.util.Set;
 
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.ui.actions.SelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserCategory;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserEntryPage;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserSearchResultPage;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 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;
@@ -205,7 +207,20 @@ public abstract class BrowserSelectionUt
                 }
                 exampleSearch.setFilter( filter.toString() );
             }
-
+            else if ( obj instanceof Connection )
+            {
+                IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
+                    .getBrowserConnection( ( Connection ) obj );
+                exampleSearch.setBrowserConnection( connection );
+                if ( connection.getRootDSE().getChildrenCount() > 0 )
+                {
+                    exampleSearch.setSearchBase( connection.getRootDSE().getChildren()[0].getDn()
);
+                }
+                else
+                {
+                    exampleSearch.setSearchBase( connection.getRootDSE().getDn() );
+                }
+            }
             else if ( obj instanceof IBrowserConnection )
             {
                 IBrowserConnection connection = ( IBrowserConnection ) obj;

Modified: directory/studio/trunk/ldapbrowser.ui/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser.ui/plugin.xml?rev=980180&r1=980179&r2=980180&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser.ui/plugin.xml (original)
+++ directory/studio/trunk/ldapbrowser.ui/plugin.xml Wed Jul 28 19:35:41 2010
@@ -175,7 +175,7 @@
        <description>
           %ImportWizard_ImportLdifWizard_description
        </description>
-       <selection class="org.apache.directory.studio.ldapbrowser.core.model.IConnection"/>
+       <selection class="org.apache.directory.studio.connection.core.Connection"/>
        <selection class="org.apache.directory.studio.ldapbrowser.core.model.IEntry"/>
     </wizard>
     <wizard
@@ -187,7 +187,7 @@
        <description>
           %ImportWizard_ImportDsmlWizard_description
        </description>
-       <selection class="org.apache.directory.studio.ldapbrowser.core.model.IConnection"/>
+       <selection class="org.apache.directory.studio.connection.core.Connection"/>
        <selection class="org.apache.directory.studio.ldapbrowser.core.model.IEntry"/>
     </wizard>
  </extension>
@@ -205,7 +205,7 @@
        <description>
           %ExportWizard_ExportLdifWizard_description
        </description>
-       <selection class="org.apache.directory.studio.ldapbrowser.core.model.IConnection"/>
+       <selection class="org.apache.directory.studio.connection.core.Connection"/>
        <selection class="org.apache.directory.studio.ldapbrowser.core.model.IEntry"/>
     </wizard>
     <wizard
@@ -217,7 +217,7 @@
        <description>
           %ExportWizard_ExportDdsmlWizard_description
        </description>
-       <selection class="org.apache.directory.studio.ldapbrowser.core.model.IConnection"/>
+       <selection class="org.apache.directory.studio.connection.core.Connection"/>
        <selection class="org.apache.directory.studio.ldapbrowser.core.model.IEntry"/>
     </wizard>
     <wizard
@@ -229,7 +229,7 @@
        <description>
           %ExportWizard_ExportCsvWizard_description
        </description>
-       <selection class="org.apache.directory.studio.ldapbrowser.core.model.IConnection"/>
+       <selection class="org.apache.directory.studio.connection.core.Connection"/>
        <selection class="org.apache.directory.studio.ldapbrowser.core.model.IEntry"/>
     </wizard>
     <wizard
@@ -241,7 +241,7 @@
        <description>
           %ExportWizard_ExportExcelWizard_description
        </description>
-       <selection class="org.apache.directory.studio.ldapbrowser.core.model.IConnection"/>
+       <selection class="org.apache.directory.studio.connection.core.Connection"/>
        <selection class="org.apache.directory.studio.ldapbrowser.core.model.IEntry"/>
     </wizard>
     <wizard
@@ -253,7 +253,7 @@
        <description>
           %ExportWizard_ExportOdfWizard_description
        </description>
-       <selection class="org.apache.directory.studio.ldapbrowser.core.model.IConnection"/>
+       <selection class="org.apache.directory.studio.connection.core.Connection"/>
        <selection class="org.apache.directory.studio.ldapbrowser.core.model.IEntry"/>
     </wizard>
  </extension>

Modified: directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java?rev=980180&r1=980179&r2=980180&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java
(original)
+++ directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportDsmlWizard.java
Wed Jul 28 19:35:41 2010
@@ -23,6 +23,8 @@ package org.apache.directory.studio.ldap
 
 import java.io.File;
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.jobs.ImportDsmlRunnable;
 import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
@@ -152,6 +154,11 @@ public class ImportDsmlWizard extends Wi
         {
             importConnection = ( IBrowserConnection ) o;
         }
+        else if ( o instanceof Connection )
+        {
+            importConnection = BrowserCorePlugin.getDefault().getConnectionManager()
+                .getBrowserConnection( ( Connection ) o );
+        }
         else
         {
             importConnection = null;

Modified: directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifWizard.java?rev=980180&r1=980179&r2=980180&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifWizard.java
(original)
+++ directory/studio/trunk/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/ImportLdifWizard.java
Wed Jul 28 19:35:41 2010
@@ -23,6 +23,8 @@ package org.apache.directory.studio.ldap
 
 import java.io.File;
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.jobs.ImportLdifRunnable;
 import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
@@ -133,6 +135,11 @@ public class ImportLdifWizard extends Wi
         {
             importConnection = ( IBrowserConnection ) o;
         }
+        else if ( o instanceof Connection )
+        {
+            importConnection = BrowserCorePlugin.getDefault().getConnectionManager()
+                .getBrowserConnection( ( Connection ) o );
+        }
         else
         {
             importConnection = null;



Mime
View raw message