directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r526891 [2/3] - in /directory/ldapstudio/trunk: ldapstudio-aciitemeditor/ ldapstudio-aciitemeditor/resources/icons/ ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ ldapstudio-aciitemeditor/src/main/java...
Date Mon, 09 Apr 2007 19:50:40 GMT
Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/DialogContentAssistant.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/DialogContentAssistant.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/DialogContentAssistant.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/DialogContentAssistant.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/DialogContentAssistant.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/dialogs/DialogContentAssistant.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/DialogContentAssistant.java Mon Apr  9 12:49:47 2007
@@ -17,8 +17,7 @@
  *  under the License. 
  *  
  */
-
-package org.apache.directory.ldapstudio.aciitemeditor.dialogs;
+package org.apache.directory.ldapstudio.aciitemeditor.sourceeditor;
 
 
 import org.eclipse.core.commands.ExecutionEvent;

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/package-info.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/package-info.java?view=auto&rev=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/package-info.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/sourceeditor/package-info.java Mon Apr  9 12:49:47 2007
@@ -0,0 +1,4 @@
+/**
+ * Contains the source editor configuration.
+ */
+package org.apache.directory.ldapstudio.aciitemeditor.sourceeditor;
\ No newline at end of file

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueDialog.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java Mon Apr  9 12:49:47 2007
@@ -17,17 +17,15 @@
  *  under the License. 
  *  
  */
-
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import java.util.Arrays;
 
+import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
-import org.apache.directory.ldapstudio.valueeditors.ValueEditorsActivator;
-import org.apache.directory.ldapstudio.valueeditors.ValueEditorsConstants;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
@@ -55,9 +53,6 @@
 public class AttributeTypeAndValueDialog extends Dialog
 {
 
-    /** The dialog title */
-    public static final String DIALOG_TITLE = "Attribute Type and Value Editor";
-
     /** The schema. */
     private Schema schema;
 
@@ -112,8 +107,8 @@
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
-        shell.setText( DIALOG_TITLE );
-        //shell.setImage( Activator.getDefault().getImage( ValueEditorsConstants.IMG_TEXTEDITOR ) );
+        shell.setText( Messages.getString("AttributeTypeAndValueDialog.title") ); //$NON-NLS-1$
+        shell.setImage( Activator.getDefault().getImage( Messages.getString("AttributeTypeAndValueDialog.icon") ) ); //$NON-NLS-1$
     }
 
 
@@ -176,7 +171,7 @@
         attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
         attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
 
-        BaseWidgetUtils.createLabel( composite, " = ", 1 );
+        BaseWidgetUtils.createLabel( composite, " = ", 1 ); //$NON-NLS-1$
 
         valueText = BaseWidgetUtils.createText( composite, initialValue, 1 );
 

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueValueEditor.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueValueEditor.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueValueEditor.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeAndValueValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeAndValueValueEditor.java Mon Apr  9 12:49:47 2007
@@ -18,13 +18,12 @@
  *  
  */
 
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
+import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
-import org.apache.directory.ldapstudio.browser.core.model.IValue;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
 import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.swt.widgets.Shell;
@@ -39,6 +38,9 @@
 public class AttributeTypeAndValueValueEditor extends AbstractDialogStringValueEditor
 {
 
+    private static final String EMPTY = ""; //$NON-NLS-1$
+
+
     /**
      * {@inheritDoc}
      * 
@@ -50,8 +52,10 @@
         if ( value != null && value instanceof AttributeTypeAndValueValueEditorRawValueWrapper )
         {
             AttributeTypeAndValueValueEditorRawValueWrapper wrapper = ( AttributeTypeAndValueValueEditorRawValueWrapper ) value;
-            AttributeTypeAndValueDialog dialog = new AttributeTypeAndValueDialog( shell, wrapper.schema, wrapper.attributeType, wrapper.value );
-            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getAttributeType() ) && !"".equals( dialog.getValue() ) )
+            AttributeTypeAndValueDialog dialog = new AttributeTypeAndValueDialog( shell, wrapper.schema,
+                wrapper.attributeType, wrapper.value );
+            if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getAttributeType() )
+                && !EMPTY.equals( dialog.getValue() ) )
             {
                 setValue( dialog.getAttributeType() + '=' + dialog.getValue() );
                 return true;
@@ -64,56 +68,6 @@
     /**
      * {@inheritDoc}
      * 
-     * Returns always the string value.
-     * 
-     * Reimplementation, because getRawValue() returns an 
-     * AttributeTypeValueEditorRawValueWrapper.
-     */
-    public String getDisplayValue( IValue value )
-    {
-        if ( value == null )
-        {
-            return "NULL";
-        }
-
-        String displayValue = value.getStringValue();
-        return displayValue;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns null.
-     * Modification in search result editor not supported.
-     */
-    public Object getRawValue( AttributeHierarchy attributeHierarchy )
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
-     */
-    public Object getRawValue( IValue value )
-    {
-        if ( value == null || !value.isString() )
-        {
-            return null;
-        }
-        else
-        {
-            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
      * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
      */
     public Object getRawValue( IConnection connection, Object value )
@@ -129,10 +83,11 @@
         }
 
         String atavValue = ( String ) value;
-        String[] atav = atavValue.split( "=", 2 );
-        String at = atav.length > 0 ? atav[0] : "";
-        String v = atav.length > 1 ? atav[1] : "";
-        AttributeTypeAndValueValueEditorRawValueWrapper wrapper = new AttributeTypeAndValueValueEditorRawValueWrapper( schema, at, v );
+        String[] atav = atavValue.split( "=", 2 ); //$NON-NLS-1$
+        String at = atav.length > 0 ? atav[0] : EMPTY;
+        String v = atav.length > 1 ? atav[1] : EMPTY;
+        AttributeTypeAndValueValueEditorRawValueWrapper wrapper = new AttributeTypeAndValueValueEditorRawValueWrapper(
+            schema, at, v );
         return wrapper;
     }
 
@@ -153,7 +108,7 @@
 
         /** The attribute type, used as initial attribute type. */
         private String attributeType;
-        
+
         /** The value, used as initial value. */
         private String value;
 

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeDialog.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeDialog.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeDialog.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeDialog.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeDialog.java Mon Apr  9 12:49:47 2007
@@ -18,16 +18,15 @@
  *  
  */
 
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import java.util.Arrays;
 
+import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
-import org.apache.directory.ldapstudio.valueeditors.ValueEditorsActivator;
-import org.apache.directory.ldapstudio.valueeditors.ValueEditorsConstants;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
@@ -53,9 +52,6 @@
 public class AttributeTypeDialog extends Dialog
 {
 
-    /** The dialog title */
-    public static final String DIALOG_TITLE = "Attribute Type Editor";
-
     /** The schema. */
     private Schema schema;
 
@@ -98,8 +94,8 @@
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
-        shell.setText( DIALOG_TITLE );
-        shell.setImage( ValueEditorsActivator.getDefault().getImage( ValueEditorsConstants.IMG_ATDEDITOR ) );
+        shell.setText( Messages.getString("AttributeTypeDialog.title") ); //$NON-NLS-1$
+        shell.setImage( Activator.getDefault().getImage( Messages.getString("AttributeTypeDialog.icon") ) ); //$NON-NLS-1$
     }
 
 

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeValueEditor.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeValueEditor.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeValueEditor.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/AttributeTypeValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/AttributeTypeValueEditor.java Mon Apr  9 12:49:47 2007
@@ -18,14 +18,11 @@
  *  
  */
 
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
-import org.apache.directory.ldapstudio.browser.core.model.IValue;
-import org.apache.directory.ldapstudio.browser.core.model.schema.ObjectClassDescription;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
 import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.swt.widgets.Shell;
@@ -40,6 +37,9 @@
 public class AttributeTypeValueEditor extends AbstractDialogStringValueEditor
 {
 
+    private static final String EMPTY = ""; //$NON-NLS-1$
+
+
     /**
      * {@inheritDoc}
      * 
@@ -52,63 +52,13 @@
         {
             AttributeTypeValueEditorRawValueWrapper wrapper = ( AttributeTypeValueEditorRawValueWrapper ) value;
             AttributeTypeDialog dialog = new AttributeTypeDialog( shell, wrapper.schema, wrapper.attributeType );
-            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getAttributeType() ) )
+            if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getAttributeType() ) )
             {
                 setValue( dialog.getAttributeType() );
                 return true;
             }
         }
         return false;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns always the string value.
-     * 
-     * Reimplementation, because getRawValue() returns an 
-     * AttributeTypeValueEditorRawValueWrapper.
-     */
-    public String getDisplayValue( IValue value )
-    {
-        if ( value == null )
-        {
-            return "NULL";
-        }
-
-        String displayValue = value.getStringValue();
-        return displayValue;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns null.
-     * Modification in search result editor not supported.
-     */
-    public Object getRawValue( AttributeHierarchy attributeHierarchy )
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns a AttributeTypeValueEditorRawValueWrapper.
-     */
-    public Object getRawValue( IValue value )
-    {
-        if ( value == null || !value.isString() )
-        {
-            return null;
-        }
-        else
-        {
-            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
-        }
     }
 
 

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/ExclusionValueEditor.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/ExclusionValueEditor.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/ExclusionValueEditor.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/ExclusionValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/ExclusionValueEditor.java Mon Apr  9 12:49:47 2007
@@ -17,12 +17,13 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
 import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.ldapstudio.browser.common.widgets.search.EntryWidget;
@@ -53,6 +54,10 @@
  */
 public class ExclusionValueEditor extends AbstractDialogStringValueEditor
 {
+
+    private static final String EMPTY = ""; //$NON-NLS-1$
+
+
     /* (non-Javadoc)
      * @see org.apache.directory.ldapstudio.valueeditors.AbstractDialogValueEditor#openDialog(org.eclipse.swt.widgets.Shell)
      */
@@ -62,9 +67,9 @@
         if ( value != null && value instanceof ExclusionWrapper )
         {
             ExclusionDialog dialog = new ExclusionDialog( shell, ( ExclusionWrapper ) value );
-            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getType() ) && !"".equals( dialog.getDN() ) )
+            if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getType() ) && !EMPTY.equals( dialog.getDN() ) )
             {
-                setValue( dialog.getType() + ": \"" + dialog.getDN() + "\"" );
+                setValue( dialog.getType() + ": \"" + dialog.getDN() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
                 return true;
             }
         }
@@ -84,15 +89,15 @@
         }
 
         String stringValue = ( String ) value;
-        String type = "";
-        String dn = "";
+        String type = EMPTY;
+        String dn = EMPTY;
         try
         {
             // for example: chopAfter: "ou=A"
-            Pattern pattern = Pattern.compile( "\\s*(chopBefore|chopAfter):\\s*\"(.*)\"\\s*" );
+            Pattern pattern = Pattern.compile( "\\s*(chopBefore|chopAfter):\\s*\"(.*)\"\\s*" ); //$NON-NLS-1$
             Matcher matcher = pattern.matcher( stringValue );
-            type = matcher.matches() ? matcher.group( 1 ) : "";
-            dn = matcher.matches() ? matcher.group( 2 ) : "";
+            type = matcher.matches() ? matcher.group( 1 ) : EMPTY;
+            dn = matcher.matches() ? matcher.group( 2 ) : EMPTY;
         }
         catch ( Exception e )
         {
@@ -144,8 +149,6 @@
      */
     private class ExclusionDialog extends Dialog
     {
-        /** The dialog title */
-        public static final String DIALOG_TITLE = "Exclusion Editor";
 
         /** The return type */
         private String returnType;
@@ -156,8 +159,8 @@
         /** The wrapper */
         private ExclusionWrapper wrapper;
 
-        private static final String CHOP_BEFORE = "chopBefore";
-        private static final String CHOP_AFTER = "chopAfter";
+        private static final String CHOP_BEFORE = "chopBefore"; //$NON-NLS-1$
+        private static final String CHOP_AFTER = "chopAfter"; //$NON-NLS-1$
 
         // UI Fields
         private Combo typeCombo;
@@ -183,7 +186,8 @@
         protected void configureShell( Shell shell )
         {
             super.configureShell( shell );
-            shell.setText( DIALOG_TITLE );
+            shell.setText( Messages.getString( "ExclusionValueEditor.title" ) ); //$NON-NLS-1$
+            shell.setImage( Activator.getDefault().getImage( Messages.getString( "ExclusionValueEditor.icon" ) ) ); //$NON-NLS-1$
         }
 
 
@@ -209,7 +213,7 @@
             composite.setLayoutData( gd );
             composite.setLayout( new GridLayout( 3, false ) );
 
-            BaseWidgetUtils.createLabel( composite, "Type:", 1 );
+            BaseWidgetUtils.createLabel( composite, Messages.getString( "ExclusionValueEditor.label.type" ), 1 ); //$NON-NLS-1$
             typeCombo = new Combo( composite, SWT.READ_ONLY );
             String[] types = new String[2];
             types[0] = CHOP_BEFORE;
@@ -226,7 +230,7 @@
             gridData.horizontalAlignment = GridData.BEGINNING;
             typeCombo.setLayoutData( gridData );
 
-            BaseWidgetUtils.createLabel( composite, "RDN:", 1 );
+            BaseWidgetUtils.createLabel( composite, Messages.getString( "ExclusionValueEditor.label.rdn" ), 1 ); //$NON-NLS-1$
             entryWidget = new EntryWidget( wrapper.connection, null );
             entryWidget.createWidget( composite );
 

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/FilterValueEditor.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/FilterValueEditor.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/FilterValueEditor.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/FilterValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/FilterValueEditor.java Mon Apr  9 12:49:47 2007
@@ -18,13 +18,12 @@
  *  
  */
 
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import org.apache.directory.ldapstudio.browser.common.dialogs.FilterWidgetDialog;
 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
-import org.apache.directory.ldapstudio.browser.core.model.IValue;
 import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.swt.widgets.Shell;
 
@@ -38,10 +37,13 @@
 public class FilterValueEditor extends AbstractDialogStringValueEditor
 {
 
+    private static final String EMPTY = ""; //$NON-NLS-1$
+
+
     /**
      * {@inheritDoc}
      * 
-     * This implementation opens the TextDialog.
+     * This implementation opens the FilterWidgetDialog.
      */
     public boolean openDialog( Shell shell )
     {
@@ -49,53 +51,16 @@
         if ( value != null && value instanceof FilterValueEditorRawValueWrapper )
         {
             FilterValueEditorRawValueWrapper wrapper = ( FilterValueEditorRawValueWrapper ) value;
-            FilterWidgetDialog dialog = new FilterWidgetDialog( shell, "Filter Editor", wrapper.filter,
+            FilterWidgetDialog dialog = new FilterWidgetDialog( shell, Messages
+                .getString( "FilterValueEditor.dialog.title" ), wrapper.filter, //$NON-NLS-1$
                 wrapper.connection );
-            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getFilter() ) )
+            if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getFilter() ) )
             {
                 setValue( dialog.getFilter() );
                 return true;
             }
         }
         return false;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns always the string value.
-     * 
-     * Reimplementation, because getRawValue() returns an 
-     * AttributeTypeValueEditorRawValueWrapper.
-     */
-    public String getDisplayValue( IValue value )
-    {
-        if ( value == null )
-        {
-            return "NULL";
-        }
-
-        String displayValue = value.getStringValue();
-        return displayValue;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns a FilterValueEditorRawValueWrapper.
-     */
-    public Object getRawValue( IValue value )
-    {
-        if ( value == null || !value.isString() )
-        {
-            return null;
-        }
-        else
-        {
-            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
-        }
     }
 
 

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/MaxValueCountValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java Mon Apr  9 12:49:47 2007
@@ -18,19 +18,18 @@
  *  
  */
 
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import java.util.Arrays;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
 import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
-import org.apache.directory.ldapstudio.browser.core.model.IValue;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
 import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
@@ -60,6 +59,12 @@
 public class MaxValueCountValueEditor extends AbstractDialogStringValueEditor
 {
 
+    private static final String L_CURLY_TYPE = "{ type "; //$NON-NLS-1$
+    private static final String SEP_MAXCOUNT = ", maxCount "; //$NON-NLS-1$
+    private static final String R_CURLY = " }"; //$NON-NLS-1$
+    private static final String EMPTY = ""; //$NON-NLS-1$
+
+
     /**
      * {@inheritDoc}
      * 
@@ -72,9 +77,9 @@
         {
             MaxValueCountValueEditorRawValueWrapper wrapper = ( MaxValueCountValueEditorRawValueWrapper ) value;
             MaxValueCountDialog dialog = new MaxValueCountDialog( shell, wrapper.schema, wrapper.type, wrapper.maxCount );
-            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getType() ) && dialog.getMaxCount() > -1 )
+            if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getType() ) && dialog.getMaxCount() > -1 )
             {
-                setValue( "{ type " + dialog.getType() + ", maxCount " + dialog.getMaxCount() + " }" );
+                setValue( L_CURLY_TYPE + dialog.getType() + SEP_MAXCOUNT + dialog.getMaxCount() + R_CURLY );
                 return true;
             }
         }
@@ -85,56 +90,6 @@
     /**
      * {@inheritDoc}
      * 
-     * Returns always the string value.
-     * 
-     * Reimplementation, because getRawValue() returns an 
-     * MaxValueCountValueEditorRawValueWrapper.
-     */
-    public String getDisplayValue( IValue value )
-    {
-        if ( value == null )
-        {
-            return "NULL";
-        }
-
-        String displayValue = value.getStringValue();
-        return displayValue;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns null.
-     * Modification in search result editor not supported.
-     */
-    public Object getRawValue( AttributeHierarchy attributeHierarchy )
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns an MaxValueCountValueEditorRawValueWrapper.
-     */
-    public Object getRawValue( IValue value )
-    {
-        if ( value == null || !value.isString() )
-        {
-            return null;
-        }
-        else
-        {
-            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
      * Returns an MaxValueCountValueEditorRawValueWrapper.
      */
     public Object getRawValue( IConnection connection, Object value )
@@ -148,23 +103,24 @@
         {
             return null;
         }
-        
+
         String stringValue = ( String ) value;
-        String type = "";
+        String type = EMPTY;
         int maxCount = 0;
-        try 
+        try
         {
             // for example: { type userPassword, maxCount 10 }
-            Pattern pattern = Pattern.compile("\\s*\\{\\s*type\\s*([^,]*),\\s*maxCount\\s*(\\d*)\\s*\\}\\s*");
-            Matcher matcher = pattern.matcher(stringValue);
-            type = matcher.matches() ? matcher.group(1) : "";
-            maxCount = matcher.matches() ? Integer.valueOf( matcher.group(2) ) : 0;
+            Pattern pattern = Pattern.compile( "\\s*\\{\\s*type\\s*([^,]*),\\s*maxCount\\s*(\\d*)\\s*\\}\\s*" ); //$NON-NLS-1$
+            Matcher matcher = pattern.matcher( stringValue );
+            type = matcher.matches() ? matcher.group( 1 ) : EMPTY;
+            maxCount = matcher.matches() ? Integer.valueOf( matcher.group( 2 ) ) : 0;
         }
-        catch(Exception e)
+        catch ( Exception e )
         {
         }
-        
-        MaxValueCountValueEditorRawValueWrapper wrapper = new MaxValueCountValueEditorRawValueWrapper( schema, type, maxCount );
+
+        MaxValueCountValueEditorRawValueWrapper wrapper = new MaxValueCountValueEditorRawValueWrapper( schema, type,
+            maxCount );
         return wrapper;
     }
 
@@ -185,7 +141,7 @@
 
         /** The attribute type, used as initial attribute type. */
         private String type;
-        
+
         /** The max count, used as initial value. */
         private int maxCount;
 
@@ -204,8 +160,7 @@
             this.maxCount = maxCount;
         }
     }
-    
-    
+
     /**
      * This class provides a dialog to enter the MaxValueCount values.
      *
@@ -215,9 +170,6 @@
     private class MaxValueCountDialog extends Dialog
     {
 
-        /** The dialog title */
-        public static final String DIALOG_TITLE = "Max Value Count Editor";
-
         /** The schema. */
         private Schema schema;
 
@@ -254,8 +206,7 @@
          * @param initialType the initial attribute type
          * @param initialMaxCount the initial max count
          */
-        public MaxValueCountDialog( Shell parentShell, Schema schema, String initialType,
-            int initialMaxCount )
+        public MaxValueCountDialog( Shell parentShell, Schema schema, String initialType, int initialMaxCount )
         {
             super( parentShell );
             super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
@@ -273,7 +224,8 @@
         protected void configureShell( Shell shell )
         {
             super.configureShell( shell );
-            shell.setText( DIALOG_TITLE );
+            shell.setText( Messages.getString( "MaxValueCountValueEditor.title" ) ); //$NON-NLS-1$
+            shell.setImage( Activator.getDefault().getImage( Messages.getString( "MaxValueCountValueEditor.icon" ) ) ); //$NON-NLS-1$
         }
 
 
@@ -309,8 +261,8 @@
             composite.setLayoutData( gd );
             composite.setLayout( new GridLayout( 5, false ) );
 
-            BaseWidgetUtils.createLabel( composite, "{ type ", 1 );
-            
+            BaseWidgetUtils.createLabel( composite, L_CURLY_TYPE, 1 );
+
             // combo widget
             String[] allAtNames = schema.getAttributeTypeDescriptionNames();
             Arrays.sort( allAtNames );
@@ -327,7 +279,8 @@
                 }
             } );
             attributeTypeComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
-            attributeTypeComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+            attributeTypeComboField.getLayoutControl()
+                .setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
             attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
             attributeTypeCombo.setItems( allAtNames );
             attributeTypeCombo.setText( initialType );
@@ -338,7 +291,7 @@
             attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
             attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
 
-            BaseWidgetUtils.createLabel( composite, ", maxCount ", 1 );
+            BaseWidgetUtils.createLabel( composite, SEP_MAXCOUNT, 1 );
 
             maxCountSpinner = new Spinner( composite, SWT.BORDER );
             maxCountSpinner.setMinimum( 0 );
@@ -349,8 +302,8 @@
             maxCountSpinner.setSelection( initialMaxCount );
             maxCountSpinner.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
 
-            BaseWidgetUtils.createLabel( composite, " }", 1 );
-            
+            BaseWidgetUtils.createLabel( composite, R_CURLY, 1 );
+
             applyDialogFont( composite );
             return composite;
         }

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/Messages.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/Messages.java?view=auto&rev=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/Messages.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/Messages.java Mon Apr  9 12:49:47 2007
@@ -0,0 +1,31 @@
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.ldapstudio.aciitemeditor.valueeditors.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/RestrictedByValueEditor.java (from r526712, directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java)
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/RestrictedByValueEditor.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/RestrictedByValueEditor.java&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/RestrictedByValueEditor.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/RestrictedByValueEditor.java Mon Apr  9 12:49:47 2007
@@ -17,20 +17,18 @@
  *  under the License. 
  *  
  */
-
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import java.util.Arrays;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
 import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.ldapstudio.browser.common.widgets.ListContentProposalProvider;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
-import org.apache.directory.ldapstudio.browser.core.model.IValue;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
 import org.apache.directory.ldapstudio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
@@ -59,6 +57,12 @@
 public class RestrictedByValueEditor extends AbstractDialogStringValueEditor
 {
 
+    private static final String L_CURLY_TYPE = "{ type "; //$NON-NLS-1$
+    private static final String SEP_VALUESIN = ", valuesIn "; //$NON-NLS-1$
+    private static final String R_CURLY = " }"; //$NON-NLS-1$
+    private static final String EMPTY = ""; //$NON-NLS-1$
+
+
     /**
      * {@inheritDoc}
      * 
@@ -71,9 +75,10 @@
         {
             RestrictedByValueEditorRawValueWrapper wrapper = ( RestrictedByValueEditorRawValueWrapper ) value;
             RestrictedByDialog dialog = new RestrictedByDialog( shell, wrapper.schema, wrapper.type, wrapper.valuesIn );
-            if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getType() ) && !"".equals( dialog.getValuesIn() ) )
+            if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getType() )
+                && !EMPTY.equals( dialog.getValuesIn() ) )
             {
-                setValue( "{ type " + dialog.getType() + ", valuesIn " + dialog.getValuesIn() + " }" );
+                setValue( L_CURLY_TYPE + dialog.getType() + SEP_VALUESIN + dialog.getValuesIn() + R_CURLY );
                 return true;
             }
         }
@@ -84,56 +89,6 @@
     /**
      * {@inheritDoc}
      * 
-     * Returns always the string value.
-     * 
-     * Reimplementation, because getRawValue() returns an 
-     * RestrictedByValueEditorRawValueWrapper.
-     */
-    public String getDisplayValue( IValue value )
-    {
-        if ( value == null )
-        {
-            return "NULL";
-        }
-
-        String displayValue = value.getStringValue();
-        return displayValue;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns null.
-     * Modification in search result editor not supported.
-     */
-    public Object getRawValue( AttributeHierarchy attributeHierarchy )
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
-     * Returns an RestrictedByValueEditorRawValueWrapper.
-     */
-    public Object getRawValue( IValue value )
-    {
-        if ( value == null || !value.isString() )
-        {
-            return null;
-        }
-        else
-        {
-            return getRawValue( value.getAttribute().getEntry().getConnection(), value.getStringValue() );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     * 
      * Returns an RestrictedByValueEditorRawValueWrapper.
      */
     public Object getRawValue( IConnection connection, Object value )
@@ -149,16 +104,16 @@
         }
 
         String stringValue = ( String ) value;
-        String type = "";
-        String valuesIn = "";
+        String type = EMPTY;
+        String valuesIn = EMPTY;
         try
         {
             // for example: { type sn, valuesIn cn }
             Pattern pattern = Pattern
-                .compile( "\\s*\\{\\s*type\\s*([^,\\s]*)\\s*,\\s*valuesIn\\s*([^,\\s]*)\\s*\\}\\s*" );
+                .compile( "\\s*\\{\\s*type\\s*([^,\\s]*)\\s*,\\s*valuesIn\\s*([^,\\s]*)\\s*\\}\\s*" ); //$NON-NLS-1$
             Matcher matcher = pattern.matcher( stringValue );
-            type = matcher.matches() ? matcher.group( 1 ) : "";
-            valuesIn = matcher.matches() ? matcher.group( 2 ) : "";
+            type = matcher.matches() ? matcher.group( 1 ) : EMPTY;
+            valuesIn = matcher.matches() ? matcher.group( 2 ) : EMPTY;
         }
         catch ( Throwable e )
         {
@@ -216,9 +171,6 @@
     private class RestrictedByDialog extends Dialog
     {
 
-        /** The dialog title */
-        public static final String DIALOG_TITLE = "Restricted By Editor";
-
         /** The schema. */
         private Schema schema;
 
@@ -279,7 +231,8 @@
         protected void configureShell( Shell shell )
         {
             super.configureShell( shell );
-            shell.setText( DIALOG_TITLE );
+            shell.setText( Messages.getString( "RestrictedByValueEditor.title" ) ); //$NON-NLS-1$
+            shell.setImage( Activator.getDefault().getImage( Messages.getString( "RestrictedByValueEditor.icon" ) ) ); //$NON-NLS-1$
         }
 
 
@@ -315,7 +268,7 @@
             composite.setLayoutData( gd );
             composite.setLayout( new GridLayout( 5, false ) );
 
-            BaseWidgetUtils.createLabel( composite, "{ type ", 1 );
+            BaseWidgetUtils.createLabel( composite, L_CURLY_TYPE, 1 );
 
             // combo widget
             String[] allAtNames = schema.getAttributeTypeDescriptionNames();
@@ -345,7 +298,7 @@
             typeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
             typeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
 
-            BaseWidgetUtils.createLabel( composite, ", valuesIn ", 1 );
+            BaseWidgetUtils.createLabel( composite, SEP_VALUESIN, 1 );
 
             valuesInComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
             {
@@ -368,7 +321,7 @@
             valuesInCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
             valuesInCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
 
-            BaseWidgetUtils.createLabel( composite, " }", 1 );
+            BaseWidgetUtils.createLabel( composite, R_CURLY, 1 );
 
             applyDialogFont( composite );
             return composite;

Copied: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/SubtreeValueEditor.java (from r526712, 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/valueeditors/SubtreeValueEditor.java?view=diff&rev=526891&p1=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/SubtreeValueEditor.java&r1=526712&p2=directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/SubtreeValueEditor.java&r2=526891
==============================================================================
--- 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/valueeditors/SubtreeValueEditor.java Mon Apr  9 12:49:47 2007
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.ldapstudio.aciitemeditor;
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
 
 
 import java.text.ParseException;
@@ -26,6 +26,7 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog;
 import org.apache.directory.ldapstudio.browser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.ldapstudio.browser.common.widgets.search.EntryWidget;
@@ -69,6 +70,9 @@
  */
 public class SubtreeValueEditor extends AbstractDialogStringValueEditor
 {
+    private static final String EMPTY = ""; //$NON-NLS-1$
+
+
     /* (non-Javadoc)
      * @see org.apache.directory.ldapstudio.valueeditors.AbstractDialogValueEditor#openDialog(org.eclipse.swt.widgets.Shell)
      */
@@ -81,7 +85,7 @@
             SubtreeSpecificationDialog dialog = new SubtreeSpecificationDialog( shell, wrapper.connection,
                 wrapper.subtreeSpecification );
             if ( dialog.open() == TextDialog.OK
-                && ( ( dialog.getBase() != null && !"".equals( dialog.getBase() ) ) || dialog.getMinimum() != 0
+                && ( ( dialog.getBase() != null && !EMPTY.equals( dialog.getBase() ) ) || dialog.getMinimum() != 0
                     || dialog.getMaximum() != 0 || !dialog.getExclusions().isEmpty() ) )
             {
                 String base = dialog.getBase();
@@ -90,42 +94,42 @@
                 List<String> exclusions = dialog.getExclusions();
 
                 StringBuffer sb = new StringBuffer();
-                sb.append( "{" );
+                sb.append( "{" ); //$NON-NLS-1$
 
                 // Adding base
-                if ( base != null && !"".equals( base ) )
+                if ( base != null && !EMPTY.equals( base ) )
                 {
-                    sb.append( " base \"" + base + "\"," );
+                    sb.append( " base \"" + base + "\"," ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
 
                 // Adding Minimum
                 if ( minimum != 0 )
                 {
-                    sb.append( " minimum " + minimum + "," );
+                    sb.append( " minimum " + minimum + "," ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
 
                 // Adding Maximum
                 if ( maximum != 0 )
                 {
-                    sb.append( " maximum " + maximum + "," );
+                    sb.append( " maximum " + maximum + "," ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
 
                 // Adding Exclusions
                 if ( !exclusions.isEmpty() )
                 {
-                    sb.append( " specificExclusions {" );
+                    sb.append( " specificExclusions {" ); //$NON-NLS-1$
 
                     for ( Iterator<String> it = exclusions.iterator(); it.hasNext(); )
                     {
-                        sb.append( " " + it.next() );
+                        sb.append( " " + it.next() ); //$NON-NLS-1$
 
                         if ( it.hasNext() )
                         {
-                            sb.append( "," );
+                            sb.append( "," ); //$NON-NLS-1$
                         }
                     }
 
-                    sb.append( " }," );
+                    sb.append( " }," ); //$NON-NLS-1$
                 }
 
                 // Removing the last ','
@@ -134,7 +138,7 @@
                     sb.deleteCharAt( sb.length() - 1 );
                 }
 
-                sb.append( " }" );
+                sb.append( " }" ); //$NON-NLS-1$
 
                 setValue( sb.toString() );
 
@@ -183,9 +187,6 @@
      */
     private class SubtreeSpecificationDialog extends Dialog
     {
-        /** The dialog title */
-        private static final String DIALOG_TITLE = "Subtree Editor";
-
         /** The connection */
         private IConnection connection;
 
@@ -240,14 +241,14 @@
                 for ( Object chopBeforeExclusion : chopBeforeExclusions )
                 {
                     LdapDN dn = ( LdapDN ) chopBeforeExclusion;
-                    exclusions.add( "chopBefore: \"" + dn.toNormName() + "\"" );
+                    exclusions.add( "chopBefore: \"" + dn.toNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
 
                 Set chopAfterExclusions = subtreeSpecification.getChopAfterExclusions();
                 for ( Object chopAfterExclusion : chopAfterExclusions )
                 {
                     LdapDN dn = ( LdapDN ) chopAfterExclusion;
-                    exclusions.add( "chopAfter: \"" + dn.toNormName() + "\"" );
+                    exclusions.add( "chopAfter: \"" + dn.toNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
             }
         }
@@ -259,7 +260,8 @@
         protected void configureShell( Shell newShell )
         {
             super.configureShell( newShell );
-            newShell.setText( DIALOG_TITLE );
+            newShell.setText( Messages.getString( "SubtreeValueEditor.title" ) ); //$NON-NLS-1$
+            newShell.setImage( Activator.getDefault().getImage( Messages.getString( "SubtreeValueEditor.icon" ) ) ); //$NON-NLS-1$
         }
 
 
@@ -286,7 +288,7 @@
             composite.setLayoutData( gd );
             composite.setLayout( new GridLayout( 3, false ) );
 
-            BaseWidgetUtils.createLabel( composite, "Base:", 1 );
+            BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.base" ), 1 ); //$NON-NLS-1$
             entryWidget = new EntryWidget( connection, null );
             entryWidget.createWidget( composite );
 
@@ -297,7 +299,7 @@
             spinnersGridData.horizontalAlignment = GridData.BEGINNING;
             spinnersGridData.widthHint = 3 * 12;
 
-            BaseWidgetUtils.createLabel( composite, "Minimum:", 1 );
+            BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.minimum" ), 1 ); //$NON-NLS-1$
             minimumSpinner = new Spinner( composite, SWT.BORDER );
             minimumSpinner.setMinimum( 0 );
             minimumSpinner.setMaximum( Integer.MAX_VALUE );
@@ -307,7 +309,7 @@
             minimumSpinner.setSelection( initialMinimum );
             minimumSpinner.setLayoutData( spinnersGridData );
 
-            BaseWidgetUtils.createLabel( composite, "Maximum:", 1 );
+            BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.maximum" ), 1 ); //$NON-NLS-1$
             maximumSpinner = new Spinner( composite, SWT.BORDER );
             maximumSpinner.setMinimum( 0 );
             maximumSpinner.setMaximum( Integer.MAX_VALUE );
@@ -363,7 +365,7 @@
             tableGridData.horizontalAlignment = GridData.FILL;
             tableGridData.heightHint = 100;
 
-            BaseWidgetUtils.createLabel( composite, "Exclusions:", 1 );
+            BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.exclusions" ), 1 ); //$NON-NLS-1$
             Table exclusionsTable = new Table( composite, SWT.BORDER );
             exclusionsTable.setHeaderVisible( false );
             exclusionsTable.setLayoutData( tableGridData );
@@ -406,7 +408,7 @@
             buttonGridData.widthHint = Activator.getButtonWidth( composite );
 
             exclusionsTableAddButton = new Button( buttonComposite, SWT.PUSH );
-            exclusionsTableAddButton.setText( "Add..." );
+            exclusionsTableAddButton.setText( Messages.getString( "SubtreeValueEditor.button.add" ) ); //$NON-NLS-1$
             exclusionsTableAddButton.setLayoutData( buttonGridData );
             exclusionsTableAddButton.addSelectionListener( new SelectionAdapter()
             {
@@ -417,7 +419,7 @@
             } );
 
             exclusionsTableEditButton = new Button( buttonComposite, SWT.PUSH );
-            exclusionsTableEditButton.setText( "Edit..." );
+            exclusionsTableEditButton.setText( Messages.getString( "SubtreeValueEditor.button.edit" ) ); //$NON-NLS-1$
             exclusionsTableEditButton.setLayoutData( buttonGridData );
             exclusionsTableEditButton.addSelectionListener( new SelectionAdapter()
             {
@@ -429,7 +431,7 @@
             exclusionsTableEditButton.setEnabled( false );
 
             exclusionsTableDeleteButton = new Button( buttonComposite, SWT.PUSH );
-            exclusionsTableDeleteButton.setText( "Delete" );
+            exclusionsTableDeleteButton.setText( Messages.getString( "SubtreeValueEditor.button.delete" ) ); //$NON-NLS-1$
             exclusionsTableDeleteButton.setLayoutData( buttonGridData );
             exclusionsTableDeleteButton.addSelectionListener( new SelectionAdapter()
             {
@@ -494,7 +496,7 @@
         {
             ExclusionValueEditor valueEditor = new ExclusionValueEditor();
 
-            Object oldRawValue = valueEditor.getRawValue( connection, "" );
+            Object oldRawValue = valueEditor.getRawValue( connection, "" ); //$NON-NLS-1$
 
             CellEditor cellEditor = valueEditor.getCellEditor();
             cellEditor.setValue( oldRawValue );

Added: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/package-info.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/package-info.java?view=auto&rev=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/package-info.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/valueeditors/package-info.java Mon Apr  9 12:49:47 2007
@@ -0,0 +1,4 @@
+/**
+ * Contains all ACI item editor specific inner value editors.
+ */
+package org.apache.directory.ldapstudio.aciitemeditor.valueeditors;
\ No newline at end of file

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGeneralComposite.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGeneralComposite.java?view=diff&rev=526891&r1=526890&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGeneralComposite.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGeneralComposite.java Mon Apr  9 12:49:47 2007
@@ -165,7 +165,7 @@
         composite.setLayoutData( gridData );
 
         identificationTagLabel = new Label( composite, SWT.NONE );
-        identificationTagLabel.setText( Messages.getString("ACIItemGeneralComposite.idTag.label") ); //$NON-NLS-1$
+        identificationTagLabel.setText( Messages.getString( "ACIItemGeneralComposite.idTag.label" ) ); //$NON-NLS-1$
         identificationTagText = new Text( composite, SWT.BORDER );
         identificationTagText.setLayoutData( identificationTagGridData );
         identificationTagText.addModifyListener( new ModifyListener()
@@ -177,7 +177,7 @@
         } );
 
         precedenceLabel = new Label( composite, SWT.NONE );
-        precedenceLabel.setText( Messages.getString("ACIItemGeneralComposite.precedence.label") ); //$NON-NLS-1$
+        precedenceLabel.setText( Messages.getString( "ACIItemGeneralComposite.precedence.label" ) ); //$NON-NLS-1$
         precedenceSpinner = new Spinner( composite, SWT.BORDER );
         precedenceSpinner.setMinimum( 0 );
         precedenceSpinner.setMaximum( 255 );
@@ -195,7 +195,7 @@
         } );
 
         authenticationLevelLabel = new Label( composite, SWT.NONE );
-        authenticationLevelLabel.setText( Messages.getString("ACIItemGeneralComposite.authLevel.label") ); //$NON-NLS-1$
+        authenticationLevelLabel.setText( Messages.getString( "ACIItemGeneralComposite.authLevel.label" ) ); //$NON-NLS-1$
         authenticationLevelCombo = new Combo( composite, SWT.READ_ONLY );
         authenticationLevelCombo.setLayoutData( authenticationLevelGridData );
         AuthenticationLevel[] authenticationLevels = new AuthenticationLevel[3];
@@ -216,9 +216,9 @@
         } );
 
         userOrItemFirstLabel = new Label( composite, SWT.NONE );
-        userOrItemFirstLabel.setText( Messages.getString("ACIItemGeneralComposite.userOrItemFirst.label") ); //$NON-NLS-1$
+        userOrItemFirstLabel.setText( Messages.getString( "ACIItemGeneralComposite.userOrItemFirst.label" ) ); //$NON-NLS-1$
         userFirstRadioButton = new Button( composite, SWT.RADIO );
-        userFirstRadioButton.setText( Messages.getString("ACIItemGeneralComposite.userFirst.label") ); //$NON-NLS-1$
+        userFirstRadioButton.setText( Messages.getString( "ACIItemGeneralComposite.userFirst.label" ) ); //$NON-NLS-1$
         userFirstRadioButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent event )
@@ -227,7 +227,7 @@
             }
         } );
         itemFirstRadioButton = new Button( composite, SWT.RADIO );
-        itemFirstRadioButton.setText( Messages.getString("ACIItemGeneralComposite.itemFirst.label") ); //$NON-NLS-1$
+        itemFirstRadioButton.setText( Messages.getString( "ACIItemGeneralComposite.itemFirst.label" ) ); //$NON-NLS-1$
         itemFirstRadioButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent event )

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java?view=diff&rev=526891&r1=526890&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java Mon Apr  9 12:49:47 2007
@@ -88,10 +88,10 @@
     private Button redoButton = null;
 
     /** Colum 1 */
-    private static String PERMISSION = Messages.getString("ACIItemGrantsAndDenialsComposite.column1.header"); //$NON-NLS-1$
+    private static String PERMISSION = Messages.getString( "ACIItemGrantsAndDenialsComposite.column1.header" ); //$NON-NLS-1$
 
     /** Colum2 */
-    private static String STATE = Messages.getString("ACIItemGrantsAndDenialsComposite.column2.header"); //$NON-NLS-1$
+    private static String STATE = Messages.getString( "ACIItemGrantsAndDenialsComposite.column2.header" ); //$NON-NLS-1$
 
     /** The colums */
     private static String[] COLUMNS = new String[]
@@ -103,24 +103,28 @@
     /** Used as input for the tree viewer */
     private GrantAndDenialCategory[] grantAndDenialCategories = new GrantAndDenialCategory[]
         {
-            new GrantAndDenialCategory( Messages.getString("ACIItemGrantsAndDenialsComposite.category.read"), true, new GrantAndDenialWrapper[] //$NON-NLS-1$
-                { new GrantAndDenialWrapper( GrantAndDenial.GRANT_BROWSE, GrantAndDenial.DENY_BROWSE ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_READ, GrantAndDenial.DENY_READ ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_COMPARE, GrantAndDenial.DENY_COMPARE ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_FILTER_MATCH, GrantAndDenial.DENY_FILTER_MATCH ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_RETURN_DN, GrantAndDenial.DENY_RETURN_DN ) } ),
-            new GrantAndDenialCategory( Messages.getString("ACIItemGrantsAndDenialsComposite.category.modify"), true, new GrantAndDenialWrapper[] //$NON-NLS-1$
-                { new GrantAndDenialWrapper( GrantAndDenial.GRANT_ADD, GrantAndDenial.DENY_ADD ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_MODIFY, GrantAndDenial.DENY_MODIFY ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_REMOVE, GrantAndDenial.DENY_REMOVE ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_RENAME, GrantAndDenial.DENY_RENAME ) } ),
-            new GrantAndDenialCategory( Messages.getString("ACIItemGrantsAndDenialsComposite.category.advanced"), false, new GrantAndDenialWrapper[] //$NON-NLS-1$
-                {
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_EXPORT, GrantAndDenial.DENY_EXPORT ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_IMPORT, GrantAndDenial.DENY_IMPORT ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_INVOKE, GrantAndDenial.DENY_INVOKE ),
-                    new GrantAndDenialWrapper( GrantAndDenial.GRANT_DISCLOSE_ON_ERROR,
-                        GrantAndDenial.DENY_DISCLOSE_ON_ERROR ) } ) };
+            new GrantAndDenialCategory(
+                Messages.getString( "ACIItemGrantsAndDenialsComposite.category.read" ), true, new GrantAndDenialWrapper[] //$NON-NLS-1$
+                    {
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_BROWSE, GrantAndDenial.DENY_BROWSE ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_READ, GrantAndDenial.DENY_READ ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_COMPARE, GrantAndDenial.DENY_COMPARE ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_FILTER_MATCH, GrantAndDenial.DENY_FILTER_MATCH ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_RETURN_DN, GrantAndDenial.DENY_RETURN_DN ) } ),
+            new GrantAndDenialCategory(
+                Messages.getString( "ACIItemGrantsAndDenialsComposite.category.modify" ), true, new GrantAndDenialWrapper[] //$NON-NLS-1$
+                    { new GrantAndDenialWrapper( GrantAndDenial.GRANT_ADD, GrantAndDenial.DENY_ADD ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_MODIFY, GrantAndDenial.DENY_MODIFY ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_REMOVE, GrantAndDenial.DENY_REMOVE ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_RENAME, GrantAndDenial.DENY_RENAME ) } ),
+            new GrantAndDenialCategory(
+                Messages.getString( "ACIItemGrantsAndDenialsComposite.category.advanced" ), false, new GrantAndDenialWrapper[] //$NON-NLS-1$
+                    {
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_EXPORT, GrantAndDenial.DENY_EXPORT ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_IMPORT, GrantAndDenial.DENY_IMPORT ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_INVOKE, GrantAndDenial.DENY_INVOKE ),
+                        new GrantAndDenialWrapper( GrantAndDenial.GRANT_DISCLOSE_ON_ERROR,
+                            GrantAndDenial.DENY_DISCLOSE_ON_ERROR ) } ) };
 
     /**
      * A GrantAndDenialCategory is used to categorize grants and denials in a tree.
@@ -132,10 +136,11 @@
 
         /** The initial expanded state */
         private boolean expanded;
-        
+
         /** The grants and denials wrappers display under this category */
         private GrantAndDenialWrapper[] grantAndDenialWrappers;
 
+
         /** 
          * Creates a new instance of GrantAndDenialCategory.
          *
@@ -163,19 +168,20 @@
     {
         /** The grant */
         private GrantAndDenial grant;
-        
+
         /** The denial */
         private GrantAndDenial denial;
-        
+
         /** The current state: null=not specified, grant or denial */
         private GrantAndDenial activeGrantAndDenial;
 
-        /** List containing previous states of activeGrandAndDenial */ 
+        /** List containing previous states of activeGrandAndDenial */
         private List<GrantAndDenial> undoStack;
-        
+
         /** List containing "future" states of activeGrandAndDenial */
         private List<GrantAndDenial> redoStack;
 
+
         /**
          * Creates a new instance of GrantAndDenialWrapper.
          *
@@ -205,7 +211,7 @@
 
         GridLayout layout = new GridLayout();
         layout.makeColumnsEqualWidth = false;
-        layout.numColumns = 2;        
+        layout.numColumns = 2;
         setLayout( layout );
 
         GridData layoutData = new GridData();
@@ -222,7 +228,7 @@
         labelGridData.horizontalAlignment = GridData.FILL;
 
         label = new Label( this, SWT.NONE );
-        label.setText( Messages.getString("ACIItemGrantsAndDenialsComposite.description") ); //$NON-NLS-1$
+        label.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.description" ) ); //$NON-NLS-1$
         label.setLayoutData( labelGridData );
 
         createTree();
@@ -237,7 +243,7 @@
      */
     private void createTree()
     {
-        GridData tableGridData = new GridData(GridData.FILL_BOTH);
+        GridData tableGridData = new GridData( GridData.FILL_BOTH );
         tableGridData.grabExcessHorizontalSpace = true;
         tableGridData.grabExcessVerticalSpace = true;
         tableGridData.verticalAlignment = GridData.FILL;
@@ -256,9 +262,9 @@
         TreeColumn c2 = new TreeColumn( tree, SWT.LEFT, 1 );
         c2.setText( COLUMNS[1] );
         c2.setWidth( 80 );
-//        TreeColumn c3 = new TreeColumn( tree, SWT.LEFT, 2 );
-//        c3.setText( " " ); //$NON-NLS-1$
-//        c3.setWidth( 0 );
+        //        TreeColumn c3 = new TreeColumn( tree, SWT.LEFT, 2 );
+        //        c3.setText( " " ); //$NON-NLS-1$
+        //        c3.setWidth( 0 );
 
         treeViewer = new TreeViewer( tree );
         treeViewer.setUseHashlookup( true );
@@ -338,7 +344,7 @@
         buttonComposite.setLayout( gridLayout );
 
         grantAllButton = new Button( buttonComposite, SWT.NONE );
-        grantAllButton.setText( Messages.getString("ACIItemGrantsAndDenialsComposite.grantAll.button") ); //$NON-NLS-1$
+        grantAllButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.grantAll.button" ) ); //$NON-NLS-1$
         grantAllButton.setLayoutData( grantAllButtonGridData );
         grantAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -357,7 +363,7 @@
         } );
 
         denyAllButton = new Button( buttonComposite, SWT.NONE );
-        denyAllButton.setText( Messages.getString("ACIItemGrantsAndDenialsComposite.denyAll.button") ); //$NON-NLS-1$
+        denyAllButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.denyAll.button" ) ); //$NON-NLS-1$
         denyAllButton.setLayoutData( denyAllButtonGridData );
         denyAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -376,7 +382,7 @@
         } );
 
         deselectAllButton = new Button( buttonComposite, SWT.NONE );
-        deselectAllButton.setText( Messages.getString("ACIItemGrantsAndDenialsComposite.deselectAll.button") ); //$NON-NLS-1$
+        deselectAllButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.deselectAll.button" ) ); //$NON-NLS-1$
         deselectAllButton.setLayoutData( deselectAllButtonGridData );
         deselectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -395,7 +401,7 @@
         } );
 
         undoButton = new Button( buttonComposite, SWT.NONE );
-        undoButton.setText( Messages.getString("ACIItemGrantsAndDenialsComposite.undo.button") ); //$NON-NLS-1$
+        undoButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.undo.button" ) ); //$NON-NLS-1$
         undoButton.setLayoutData( undoButtonGridData );
         undoButton.addSelectionListener( new SelectionAdapter()
         {
@@ -408,7 +414,7 @@
         undoButton.setEnabled( false );
 
         redoButton = new Button( buttonComposite, SWT.NONE );
-        redoButton.setText( Messages.getString("ACIItemGrantsAndDenialsComposite.redo.button") ); //$NON-NLS-1$
+        redoButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.redo.button" ) ); //$NON-NLS-1$
         redoButton.setLayoutData( redoButtonGridData );
         redoButton.addSelectionListener( new SelectionAdapter()
         {
@@ -430,8 +436,14 @@
      */
     private class GrantsAndDenialsCellModifier implements ICellModifier
     {
+
         /**
-         * Only GrantAndDenialWrappers and the STATE colum is modifyable
+         * Only GrantAndDenialWrappers and the STATE colum is modifyable.
+         * 
+         * @param element the element
+         * @param property the property
+         * 
+         * @return true, if can modify
          */
         public boolean canModify( Object element, String property )
         {
@@ -443,8 +455,14 @@
             return false;
         }
 
+
         /**
          * The used CheckboxCellEditor accepts only Booleans.
+         * 
+         * @param element the element
+         * @param property the property
+         * 
+         * @return the value
          */
         public Object getValue( Object element, String property )
         {
@@ -459,8 +477,13 @@
             return null;
         }
 
+
         /**
          * Performs the tree-state transtion.
+         * 
+         * @param element the element
+         * @param value the value
+         * @param property the property
          */
         public void modify( Object element, String property, Object value )
         {
@@ -507,6 +530,10 @@
 
         /**
          * Only GrantAndDenialCategories have children.
+         * 
+         * @param parentElement the parent element
+         * 
+         * @return the children
          */
         public Object[] getChildren( Object parentElement )
         {
@@ -521,15 +548,24 @@
 
 
         /**
-         * Not used
+         * Not used.
+         * 
+         * @param element the element
+         * 
+         * @return the parent
          */
         public Object getParent( Object element )
         {
             return null;
         }
 
+
         /**
          * Only GrantAndDenialCategories have children.
+         * 
+         * @param element the element
+         * 
+         * @return true, if has children
          */
         public boolean hasChildren( Object element )
         {
@@ -539,16 +575,21 @@
     }
 
     /**
-    * The label provider used for this tree viewer.
-    *
-    * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-    * @version $Rev$, $Date$
-    */
+     * The label provider used for this tree viewer.
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
     private class GrantsAndDenialsLabelProvider extends LabelProvider implements ITableLabelProvider
     {
 
         /**
          * The STATE is displayed as image.
+         * 
+         * @param element the element
+         * @param columnIndex the column index
+         * 
+         * @return the column image
          */
         public Image getColumnImage( Object element, int columnIndex )
         {
@@ -562,15 +603,18 @@
                     case 1:
                         if ( grantAndDenialWrapper.activeGrantAndDenial == null )
                         {
-                            return Activator.getDefault().getImage( Messages.getString("ACIItemGrantsAndDenialsComposite.unspecified.icon") ); //$NON-NLS-1$
+                            return Activator.getDefault().getImage(
+                                Messages.getString( "ACIItemGrantsAndDenialsComposite.unspecified.icon" ) ); //$NON-NLS-1$
                         }
                         else if ( grantAndDenialWrapper.activeGrantAndDenial == grantAndDenialWrapper.grant )
                         {
-                            return Activator.getDefault().getImage( Messages.getString("ACIItemGrantsAndDenialsComposite.grant.icon") ); //$NON-NLS-1$
+                            return Activator.getDefault().getImage(
+                                Messages.getString( "ACIItemGrantsAndDenialsComposite.grant.icon" ) ); //$NON-NLS-1$
                         }
                         else if ( grantAndDenialWrapper.activeGrantAndDenial == grantAndDenialWrapper.denial )
                         {
-                            return Activator.getDefault().getImage( Messages.getString("ACIItemGrantsAndDenialsComposite.deny.icon") ); //$NON-NLS-1$
+                            return Activator.getDefault().getImage(
+                                Messages.getString( "ACIItemGrantsAndDenialsComposite.deny.icon" ) ); //$NON-NLS-1$
                         }
                     case 2:
                         return null;
@@ -581,7 +625,12 @@
 
 
         /**
-         * Returns GrantAndDenialCategory name or the MicroOperation name. 
+         * Returns GrantAndDenialCategory name or the MicroOperation name.
+         * 
+         * @param element the element
+         * @param columnIndex the column index
+         * 
+         * @return the column text
          */
         public String getColumnText( Object element, int columnIndex )
         {
@@ -683,6 +732,7 @@
         }
     }
 
+
     /**
      * Redos the last modification
      */
@@ -703,6 +753,7 @@
             }
         }
     }
+
 
     /**
      * Saves the current state to the undo stack.

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java?view=diff&rev=526891&r1=526890&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java Mon Apr  9 12:49:47 2007
@@ -28,7 +28,6 @@
 import org.apache.directory.ldapstudio.aciitemeditor.ACIItemValueWithContext;
 import org.apache.directory.ldapstudio.aciitemeditor.Activator;
 import org.apache.directory.ldapstudio.aciitemeditor.dialogs.ItemPermissionDialog;
-import org.apache.directory.ldapstudio.aciitemeditor.dialogs.TextDialog;
 import org.apache.directory.ldapstudio.aciitemeditor.model.UserClassWrapper;
 import org.apache.directory.shared.ldap.aci.GrantAndDenial;
 import org.apache.directory.shared.ldap.aci.ItemPermission;
@@ -60,7 +59,7 @@
  */
 public class ACIItemItemPermissionsComposite extends Composite
 {
-    
+
     /** The context. */
     private ACIItemValueWithContext context;
 
@@ -116,6 +115,8 @@
 
         /**
          * Returns a user-friedly string, displayed in the table.
+         * 
+         * @return the string
          */
         public String toString()
         {
@@ -358,7 +359,7 @@
     /**
      * Shows or hides this composite.
      * 
-     * @see org.eclipse.swt.widgets.control#setVisible(boolean)
+     * @param visible true if visible
      */
     public void setVisible( boolean visible )
     {
@@ -372,12 +373,12 @@
      * 
      * @param context the context
      */
-    public void setContext( ACIItemValueWithContext context ) 
+    public void setContext( ACIItemValueWithContext context )
     {
         this.context = context;
     }
-    
-    
+
+
     /**
      * Sets the item permissions. 
      *
@@ -445,7 +446,7 @@
     private void addItemPermission()
     {
         ItemPermissionDialog dialog = new ItemPermissionDialog( getShell(), null, context );
-        if ( dialog.open() == TextDialog.OK && dialog.getItemPermission() != null )
+        if ( dialog.open() == ItemPermissionDialog.OK && dialog.getItemPermission() != null )
         {
             ItemPermissionWrapper itemPermissionWrapper = new ItemPermissionWrapper( dialog.getItemPermission() );
             itemPermissionWrappers.add( itemPermissionWrapper );
@@ -464,8 +465,9 @@
         ItemPermissionWrapper oldItemPermissionWrapper = getSelectedItemPermissionWrapper();
         if ( oldItemPermissionWrapper != null )
         {
-            ItemPermissionDialog dialog = new ItemPermissionDialog( getShell(), oldItemPermissionWrapper.itemPermission, context );
-            if ( dialog.open() == TextDialog.OK )
+            ItemPermissionDialog dialog = new ItemPermissionDialog( getShell(),
+                oldItemPermissionWrapper.itemPermission, context );
+            if ( dialog.open() == ItemPermissionDialog.OK )
             {
                 oldItemPermissionWrapper.itemPermission = dialog.getItemPermission();
                 tableViewer.refresh();

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java?view=diff&rev=526891&r1=526890&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java Mon Apr  9 12:49:47 2007
@@ -67,7 +67,7 @@
 
     /** The context. */
     private ACIItemValueWithContext context;
-    
+
     /** The inner composite for all the content */
     private Composite composite = null;
 
@@ -96,9 +96,9 @@
     private Button reverseSelectionButton = null;
 
     /** The possible protected items, used as input for the table viewer */
-    private ProtectedItemWrapper[] protectedItemWrappers = ProtectedItemWrapperFactory.createProtectedItemWrappers(); 
-        
-        
+    private ProtectedItemWrapper[] protectedItemWrappers = ProtectedItemWrapperFactory.createProtectedItemWrappers();
+
+
     /**
      * Creates a new instance of ACIItemProtectedItemsComposite.
      *
@@ -315,8 +315,13 @@
      */
     private class ProtectedItemsLabelProvider extends LabelProvider
     {
+
         /**
          * Returns the error icon if the protected item is checked and invalid.
+         * 
+         * @param element the element
+         * 
+         * @return the image
          */
         public Image getImage( Object element )
         {
@@ -341,17 +346,17 @@
         }
     }
 
-    
+
     /**
      * Sets the context.
      * 
      * @param context the context
      */
-    public void setContext( ACIItemValueWithContext context ) 
+    public void setContext( ACIItemValueWithContext context )
     {
         this.context = context;
     }
-    
+
 
     /**
      * Sets the protected items. 
@@ -370,7 +375,7 @@
         {
             for ( ProtectedItemWrapper protectedItemWrapper : protectedItemWrappers )
             {
-                
+
                 if ( protectedItemWrapper.getClazz() == item.getClass() )
                 {
                     protectedItemWrapper.setProtectedItem( item );
@@ -410,7 +415,7 @@
     /**
      * Shows or hides this composite.
      * 
-     * @see org.eclipse.swt.widgets.control#setVisible(boolean)
+     * @param visible true if visible
      */
     public void setVisible( boolean visible )
     {
@@ -477,13 +482,14 @@
     private void editProtectedItem()
     {
         ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();
-        
+
         AbstractDialogStringValueEditor valueEditor = protectedItemWrapper.getValueEditor();
-        if(valueEditor != null)
+        if ( valueEditor != null )
         {
-            if(protectedItemWrapper.isMultivalued())
+            if ( protectedItemWrapper.isMultivalued() )
             {
-                MultiValuedDialog dialog = new MultiValuedDialog( getShell(), protectedItemWrapper.getDisplayName(), protectedItemWrapper.getValues(), context, valueEditor );
+                MultiValuedDialog dialog = new MultiValuedDialog( getShell(), protectedItemWrapper.getDisplayName(),
+                    protectedItemWrapper.getValues(), context, valueEditor );
                 dialog.open();
                 refreshTable();
             }
@@ -493,19 +499,19 @@
                 String oldValue = values.isEmpty() ? null : values.get( 0 );
                 if ( oldValue == null )
                 {
-                    oldValue = "";
+                    oldValue = ""; //$NON-NLS-1$
                 }
                 Object oldRawValue = valueEditor.getRawValue( context.getConnection(), oldValue );
-                
+
                 CellEditor cellEditor = valueEditor.getCellEditor();
                 cellEditor.setValue( oldRawValue );
                 cellEditor.activate();
                 Object newRawValue = cellEditor.getValue();
-                
-                if(newRawValue != null) 
+
+                if ( newRawValue != null )
                 {
-                    String newValue = (String) valueEditor.getStringOrBinaryValue( newRawValue );
-                    
+                    String newValue = ( String ) valueEditor.getStringOrBinaryValue( newRawValue );
+
                     values.clear();
                     values.add( newValue );
                     tableViewer.refresh();
@@ -513,8 +519,8 @@
             }
         }
     }
-    
-    
+
+
     /**
      * Refreshes the table viewer.
      */
@@ -522,6 +528,5 @@
     {
         tableViewer.refresh();
     }
-
 
 }

Modified: directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java?view=diff&rev=526891&r1=526890&r2=526891
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-aciitemeditor/src/main/java/org/apache/directory/ldapstudio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java Mon Apr  9 12:49:47 2007
@@ -24,6 +24,7 @@
 
 import org.apache.directory.ldapstudio.aciitemeditor.ACIItemValueWithContext;
 import org.apache.directory.ldapstudio.aciitemeditor.Activator;
+import org.apache.directory.ldapstudio.aciitemeditor.sourceeditor.ACISourceViewerConfiguration;
 import org.apache.directory.shared.ldap.aci.ACIItem;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.eclipse.jface.resource.JFaceResources;
@@ -50,7 +51,7 @@
 
     /** The source editor */
     private SourceViewer sourceEditor;
-    
+
     /** The source editor configuration. */
     private SourceViewerConfiguration configuration;
 
@@ -78,7 +79,7 @@
     {
         // create source editor
         sourceEditor = new SourceViewer( this, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
-        
+
         // setup basic configuration
         configuration = new ACISourceViewerConfiguration();
         sourceEditor.configure( configuration );
@@ -118,7 +119,7 @@
     public void forceSetInput( String input )
     {
         sourceEditor.getDocument().set( input );
-        
+
         // format
         IRegion region = new Region( 0, sourceEditor.getDocument().getLength() );
         configuration.getContentFormatter( sourceEditor ).format( sourceEditor.getDocument(), region );
@@ -137,16 +138,16 @@
     public String getInput() throws ParseException
     {
         String input = forceGetInput();
-        
+
         // strip new lines
-        input = input.replaceAll( "\\n", " " );
-        input = input.replaceAll( "\\r", " " );
+        input = input.replaceAll( "\\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
+        input = input.replaceAll( "\\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$
 
         ACIItemParser parser = Activator.getDefault().getACIItemParser();
         ACIItem aciItem = parser.parse( input );
 
         StringBuffer buffer = new StringBuffer();
-        if(aciItem != null)
+        if ( aciItem != null )
         {
             aciItem.printToBuffer( buffer );
         }
@@ -173,7 +174,7 @@
      */
     public void setContext( ACIItemValueWithContext context )
     {
-        
+
     }
 
 
@@ -182,8 +183,8 @@
      */
     public void format()
     {
-      IRegion region = new Region( 0, sourceEditor.getDocument().getLength() );
-      configuration.getContentFormatter( sourceEditor ).format( sourceEditor.getDocument(), region );
+        IRegion region = new Region( 0, sourceEditor.getDocument().getLength() );
+        configuration.getContentFormatter( sourceEditor ).format( sourceEditor.getDocument(), region );
     }
-    
+
 }



Mime
View raw message