directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r525515 - /directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java
Date Wed, 04 Apr 2007 14:06:15 GMT
Author: pamarcelot
Date: Wed Apr  4 07:06:14 2007
New Revision: 525515

URL: http://svn.apache.org/viewvc?view=rev&rev=525515
Log:
Fixed a bug that prevented the Subtree Dialog to open when adding a new Subtree Specification.

Modified:
    directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java?view=diff&rev=525515&r1=525514&r2=525515
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java
Wed Apr  4 07:06:14 2007
@@ -34,6 +34,7 @@
 import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.ldapstudio.browser.ui.widgets.search.EntryWidget;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.subtree.BaseSubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
 import org.eclipse.jface.dialogs.Dialog;
@@ -79,7 +80,9 @@
             SubtreeSpecificationValueWrapper wrapper = ( SubtreeSpecificationValueWrapper
) value;
             SubtreeSpecificationDialog dialog = new SubtreeSpecificationDialog( shell, wrapper.connection,
                 wrapper.subtreeSpecification );
-            if ( dialog.open() == TextDialog.OK )
+            if ( dialog.open() == TextDialog.OK
+                && ( ( dialog.getBase() != null && !"".equals( dialog.getBase()
) ) || dialog.getMinimum() != 0
+                    || dialog.getMaximum() != 0 || !dialog.getExclusions().isEmpty() ) )
             {
                 String base = dialog.getBase();
                 int minimum = dialog.getMinimum();
@@ -90,7 +93,7 @@
                 sb.append( "{" );
 
                 // Adding base
-                if ( base != null )
+                if ( base != null && !"".equals( base ) )
                 {
                     sb.append( " base \"" + base + "\"," );
                 }
@@ -157,6 +160,10 @@
                 if ( subtreeSpecification != null )
                 {
                     return new SubtreeSpecificationValueWrapper( connection, subtreeSpecification
);
+                }
+                else
+                {
+                    return new SubtreeSpecificationValueWrapper( connection, new BaseSubtreeSpecification()
);
                 }
             }
             catch ( ParseException e1 )



Mime
View raw message