directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r491104 [1/3] - in /directory/trunks/ldapstudio/ldapstudio-browser-ui: ./ META-INF/ src/main/java/org/apache/directory/ldapstudio/browser/ui/ src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/ src/main/java/org/apache/directo...
Date Fri, 29 Dec 2006 21:15:50 GMT
Author: seelmann
Date: Fri Dec 29 13:15:47 2006
New Revision: 491104

URL: http://svn.apache.org/viewvc?view=rev&rev=491104
Log:
Added extension point for value editors. Refactoring of value editor framework.

Added:
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueEditorDialog.java
      - copied, changed from r490780, directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueProviderDialog.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueEditorDialog.java
      - copied, changed from r490780, directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueProviderDialog.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/
      - copied from r490780, directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueproviders/
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/AbstractDialogBinaryValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/AbstractDialogStringValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/AbstractDialogValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/AbstractInPlaceStringValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/IValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/AddressValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/DnValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/HexValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/ImageValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/InPlaceGeneralizedTimeValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/InPlaceTextValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/MultivaluedValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/ObjectClassValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/PasswordValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/TextValueEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/internal/ValueEditorManager.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/resources/
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/resources/valueEditors.exsd
Removed:
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueProviderDialog.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueProviderDialog.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/AbstractDialogCellEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/AddressValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/DnValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/HexValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/ImageValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/InPlaceGeneralizedTimeValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/InPlaceTextValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/MultivaluedValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/ObjectClassValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/PasswordValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/TextValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/ValueProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueeditors/ValueProviderManager.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/valueproviders/
Modified:
    directory/trunks/ldapstudio/ldapstudio-browser-ui/.classpath
    directory/trunks/ldapstudio/ldapstudio-browser-ui/META-INF/MANIFEST.MF
    directory/trunks/ldapstudio/ldapstudio-browser-ui/plugin.xml
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferencesInitializer.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/BrowserAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/CopyEntryAsCsvAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/DeleteAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/SelectionUtils.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/MultivaluedDialog.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/ValueEditorsPreferencePage.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/LdifEditor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/AbstractOpenValueEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/EditLdifAttributeAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenBestValueEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenValueEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractOpenEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractSearchResultListenerAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenBestEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenMultiValuedEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorActionGroup.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorCellModifier.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorConfiguration.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorCursor.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorFilter.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorLabelProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorSorter.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/SearchResultEditorUniversalListener.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/AbstractOpenEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/EntryEditorWidgetActionGroup.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/EntryEditorWidgetCellModifier.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/EntryEditorWidgetConfiguration.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/EntryEditorWidgetContentProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/EntryEditorWidgetLabelProvider.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/OpenBestEditorAction.java
    directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/entryeditor/OpenEditorAction.java

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/.classpath
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/.classpath?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/.classpath (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/.classpath Fri Dec 29 13:15:47 2006
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="target/classes"/>

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/META-INF/MANIFEST.MF?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/META-INF/MANIFEST.MF (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/META-INF/MANIFEST.MF Fri Dec 29 13:15:47 2006
@@ -19,3 +19,4 @@
  org.eclipse.jface.text
 Eclipse-LazyStart: true
 Bundle-ClassPath: .
+Export-Package: org.apache.directory.ldapstudio.browser.ui.valueeditors

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/plugin.xml
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/plugin.xml?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/plugin.xml (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/plugin.xml Fri Dec 29 13:15:47 2006
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
 <plugin>
+   <extension-point id="valueEditors" name="Value Editors" schema="src/main/resources/valueEditors.exsd"/>
 
    <extension
          point="org.eclipse.ui.perspectives">
@@ -695,6 +696,60 @@
 		parentId="org.eclipse.ui.contexts.window">
 	</context>
  </extension>
+ <extension
+       point="org.apache.directory.ldapstudio.browser.ui.valueEditors">
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.InPlaceTextValueEditor"
+          icon="icons/inplace_texteditor.gif"
+          name="In-Place Text Editor"/>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.TextValueEditor"
+          icon="icons/texteditor.gif"
+          name="Text Editor"/>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.HexValueEditor"
+          icon="icons/hexeditor.gif"
+          name="Hex Editor"/>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.PasswordValueEditor"
+          icon="icons/passwordeditor.gif"
+          name="Password Editor">
+       <attribute attributeType="userPassword"/>
+    </valueEditor>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ImageValueEditor"
+          icon="icons/imageeditor.gif"
+          name="Image Editor">
+       <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.28"/>
+    </valueEditor>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.InPlaceGeneralizedTimeValueEditor"
+          icon="icons/inplace_generalizedtimeeditor.gif"
+          name="In-Place Generalized Time Editor">
+       <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.24"/>
+    </valueEditor>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ObjectClassValueEditor"
+          icon="icons/inplace_oceditor.gif"
+          name="Object Class Editor">
+       <attribute attributeType="objectClass"/>
+    </valueEditor>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.DnValueEditor"
+          icon="icons/dneditor.gif"
+          name="DN Editor">
+       <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.12"/>
+    </valueEditor>
+    <valueEditor
+          class="org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.AddressValueEditor"
+          icon="icons/addresseditor.gif"
+          name="Address Editor">
+       <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.41"/>
+    </valueEditor>
+      
+ </extension>
+
+
 
 
 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java Fri Dec 29 13:15:47 2006
@@ -37,7 +37,7 @@
     private Map attributeValueProviderRelationCache;
 
 
-    public Map getAttributeValueProviderMap()
+    public Map getAttributeValueEditorMap()
     {
         if ( this.attributeValueProviderRelationCache == null )
         {
@@ -86,7 +86,7 @@
     private Map syntaxValueProviderCache;
 
 
-    public Map getSyntaxValueProviderMap()
+    public Map getSyntaxValueEditorMap()
     {
         if ( this.syntaxValueProviderCache == null )
         {

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferencesInitializer.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferencesInitializer.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferencesInitializer.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferencesInitializer.java Fri Dec 29 13:15:47 2006
@@ -21,16 +21,14 @@
 package org.apache.directory.ldapstudio.browser.ui;
 
 
+import java.util.ArrayList;
+import java.util.Collection;
+
 import org.apache.directory.ldapstudio.browser.core.BrowserCoreConstants;
 import org.apache.directory.ldapstudio.browser.core.model.schema.AttributeValueProviderRelation;
 import org.apache.directory.ldapstudio.browser.core.model.schema.SyntaxValueProviderRelation;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.AddressValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.DnValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ImageValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.InPlaceGeneralizedTimeValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ObjectClassValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.PasswordValueProvider;
-
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager.ValueEditorExtension;
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
@@ -91,20 +89,27 @@
         store.setDefault( BrowserUIConstants.PREFERENCE_SHOW_RAW_VALUES, false );
 
         // Value Editors
-        AttributeValueProviderRelation[] attributeValueProviderRelations = new AttributeValueProviderRelation[]
-            { new AttributeValueProviderRelation( "objectClass", ObjectClassValueProvider.class.getName() ),
-                new AttributeValueProviderRelation( "userPassword", PasswordValueProvider.class.getName() ) };
-        BrowserUIPlugin.getDefault().getUIPreferences().setDefaultAttributeValueProviderRelations(
-            attributeValueProviderRelations );
-        SyntaxValueProviderRelation[] syntaxValueProviderRelations = new SyntaxValueProviderRelation[]
+        Collection<AttributeValueProviderRelation> avprs = new ArrayList<AttributeValueProviderRelation>();
+        Collection<SyntaxValueProviderRelation> svprs = new ArrayList<SyntaxValueProviderRelation>();
+        Collection<ValueEditorExtension> valueEditorProxys = ValueEditorManager.getValueEditorProxys();
+        for ( ValueEditorExtension proxy : valueEditorProxys )
+        {
+            for ( String attributeType : proxy.attributeTypes )
             {
-                new SyntaxValueProviderRelation( "1.3.6.1.4.1.1466.115.121.1.24",
-                    InPlaceGeneralizedTimeValueProvider.class.getName() ),
-                new SyntaxValueProviderRelation( "1.3.6.1.4.1.1466.115.121.1.28", ImageValueProvider.class.getName() ),
-                new SyntaxValueProviderRelation( "1.3.6.1.4.1.1466.115.121.1.12", DnValueProvider.class.getName() ),
-                new SyntaxValueProviderRelation( "1.3.6.1.4.1.1466.115.121.1.41", AddressValueProvider.class.getName() ) };
+                AttributeValueProviderRelation avpr = new AttributeValueProviderRelation( attributeType,
+                    proxy.className );
+                avprs.add( avpr );
+            }
+            for ( String syntaxOid : proxy.syntaxOids )
+            {
+                SyntaxValueProviderRelation svpr = new SyntaxValueProviderRelation( syntaxOid, proxy.className );
+                svprs.add( svpr );
+            }
+        }
+        BrowserUIPlugin.getDefault().getUIPreferences().setDefaultAttributeValueProviderRelations(
+            avprs.toArray( new AttributeValueProviderRelation[0] ) );
         BrowserUIPlugin.getDefault().getUIPreferences().setDefaultSyntaxValueProviderRelations(
-            syntaxValueProviderRelations );
+            svprs.toArray( new SyntaxValueProviderRelation[0] ) );
 
         // Browser
         store.setDefault( BrowserUIConstants.PREFERENCE_BROWSER_EXPAND_BASE_ENTRIES, false );

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/BrowserAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/BrowserAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/BrowserAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/BrowserAction.java Fri Dec 29 13:15:47 2006
@@ -25,7 +25,7 @@
 import org.apache.directory.ldapstudio.browser.core.events.ConnectionUpdateEvent;
 import org.apache.directory.ldapstudio.browser.core.events.EntryModificationEvent;
 import org.apache.directory.ldapstudio.browser.core.events.SearchUpdateEvent;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierachie;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
 import org.apache.directory.ldapstudio.browser.core.model.IBookmark;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
@@ -70,7 +70,7 @@
 
     private IAttribute[] selectedAttributes;
 
-    private AttributeHierachie[] selectedAttributeHierarchies;
+    private AttributeHierarchy[] selectedAttributeHierarchies;
 
     private IValue[] selectedValues;
 
@@ -150,7 +150,7 @@
         this.selectedBrowserSearchResultPages = new BrowserSearchResultPage[0];
         this.selectedBookmarks = new IBookmark[0];
         this.selectedAttributes = new IAttribute[0];
-        this.selectedAttributeHierarchies = new AttributeHierachie[0];
+        this.selectedAttributeHierarchies = new AttributeHierarchy[0];
         this.selectedValues = new IValue[0];
 
         this.selectedLdifModel = null;
@@ -172,7 +172,7 @@
         this.selectedBrowserSearchResultPages = new BrowserSearchResultPage[0];
         this.selectedBookmarks = new IBookmark[0];
         this.selectedAttributes = new IAttribute[0];
-        this.selectedAttributeHierarchies = new AttributeHierachie[0];
+        this.selectedAttributeHierarchies = new AttributeHierarchy[0];
         this.selectedValues = new IValue[0];
 
         this.selectedLdifModel = null;
@@ -377,13 +377,13 @@
     }
 
 
-    public AttributeHierachie[] getSelectedAttributeHierarchies()
+    public AttributeHierarchy[] getSelectedAttributeHierarchies()
     {
         return selectedAttributeHierarchies;
     }
 
 
-    public void setSelectedAttributeHierarchies( AttributeHierachie[] ahs )
+    public void setSelectedAttributeHierarchies( AttributeHierarchy[] ahs )
     {
         this.selectedAttributeHierarchies = ahs;
     }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/CopyEntryAsCsvAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/CopyEntryAsCsvAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/CopyEntryAsCsvAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/CopyEntryAsCsvAction.java Fri Dec 29 13:15:47 2006
@@ -29,7 +29,7 @@
 import java.util.Map;
 
 import org.apache.directory.ldapstudio.browser.core.internal.model.AttributeComparator;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierachie;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
 import org.apache.directory.ldapstudio.browser.core.model.IEntry;
 import org.apache.directory.ldapstudio.browser.core.model.ISearch;
@@ -244,7 +244,7 @@
             {
 
                 AttributeComparator comparator = new AttributeComparator( entries[e] );
-                AttributeHierachie ah = entries[e].getAttributeWithSubtypes( returningAttributes[a] );
+                AttributeHierarchy ah = entries[e].getAttributeWithSubtypes( returningAttributes[a] );
                 if ( ah != null )
                 {
 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/DeleteAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/DeleteAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/DeleteAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/DeleteAction.java Fri Dec 29 13:15:47 2006
@@ -36,7 +36,7 @@
 import org.apache.directory.ldapstudio.browser.core.events.ModelModifier;
 import org.apache.directory.ldapstudio.browser.core.jobs.DeleteAttributesValueJob;
 import org.apache.directory.ldapstudio.browser.core.jobs.DeleteEntriesJob;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierachie;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
 import org.apache.directory.ldapstudio.browser.core.model.IBookmark;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
@@ -490,7 +490,7 @@
         {
             // check if a non-modifyable, must or objectClass attribute is
             // selected
-            AttributeHierachie ah = getSelectedAttributeHierarchies()[i];
+            AttributeHierarchy ah = getSelectedAttributeHierarchies()[i];
             for ( Iterator it = ah.iterator(); it.hasNext(); )
             {
                 IAttribute attribute = ( IAttribute ) it.next();
@@ -519,7 +519,7 @@
         {
             // check if a operational, must or objectClass attribute is
             // selected
-            AttributeHierachie ah = getSelectedAttributeHierarchies()[i];
+            AttributeHierarchy ah = getSelectedAttributeHierarchies()[i];
             for ( Iterator it = ah.iterator(); it.hasNext(); )
             {
                 IAttribute attribute = ( IAttribute ) it.next();

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/SelectionUtils.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/SelectionUtils.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/SelectionUtils.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/actions/SelectionUtils.java Fri Dec 29 13:15:47 2006
@@ -30,7 +30,7 @@
 import java.util.Set;
 
 import org.apache.directory.ldapstudio.browser.core.internal.model.Search;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierachie;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
 import org.apache.directory.ldapstudio.browser.core.model.IBookmark;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
@@ -84,11 +84,11 @@
                     {
                         return 1;
                     }
-                    else if ( ( o1 instanceof AttributeHierachie ) && !( o2 instanceof AttributeHierachie ) )
+                    else if ( ( o1 instanceof AttributeHierarchy ) && !( o2 instanceof AttributeHierarchy ) )
                     {
                         return -1;
                     }
-                    else if ( !( o1 instanceof AttributeHierachie ) && ( o2 instanceof AttributeHierachie ) )
+                    else if ( !( o1 instanceof AttributeHierarchy ) && ( o2 instanceof AttributeHierarchy ) )
                     {
                         return 1;
                     }
@@ -123,7 +123,7 @@
                 exampleSearch.setSearchBase( bookmark.getDn() );
             }
 
-            else if ( obj instanceof AttributeHierachie || obj instanceof IAttribute || obj instanceof IValue )
+            else if ( obj instanceof AttributeHierarchy || obj instanceof IAttribute || obj instanceof IValue )
             {
 
                 IEntry entry = null;
@@ -131,9 +131,9 @@
                 for ( int i = 0; i < objects.length; i++ )
                 {
                     Object object = objects[i];
-                    if ( object instanceof AttributeHierachie )
+                    if ( object instanceof AttributeHierarchy )
                     {
-                        AttributeHierachie ah = ( AttributeHierachie ) object;
+                        AttributeHierarchy ah = ( AttributeHierarchy ) object;
                         for ( Iterator it = ah.iterator(); it.hasNext(); )
                         {
                             IAttribute attribute = ( IAttribute ) it.next();
@@ -233,10 +233,10 @@
     }
 
 
-    public static AttributeHierachie[] getAttributeHierarchie( ISelection selection )
+    public static AttributeHierarchy[] getAttributeHierarchie( ISelection selection )
     {
-        List list = getTypes( selection, AttributeHierachie.class );
-        return ( AttributeHierachie[] ) list.toArray( new AttributeHierachie[list.size()] );
+        List list = getTypes( selection, AttributeHierarchy.class );
+        return ( AttributeHierarchy[] ) list.toArray( new AttributeHierarchy[list.size()] );
     }
 
 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/MultivaluedDialog.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/MultivaluedDialog.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/MultivaluedDialog.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/MultivaluedDialog.java Fri Dec 29 13:15:47 2006
@@ -33,7 +33,7 @@
 import org.apache.directory.ldapstudio.browser.core.events.ValueDeletedEvent;
 import org.apache.directory.ldapstudio.browser.core.events.ValueModifiedEvent;
 import org.apache.directory.ldapstudio.browser.core.internal.model.Attribute;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierachie;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
 import org.apache.directory.ldapstudio.browser.core.model.IEntry;
 import org.apache.directory.ldapstudio.browser.core.model.IValue;
@@ -65,7 +65,7 @@
 
     public static final int MAX_HEIGHT = 250;
 
-    private AttributeHierachie attributeHierarchie;
+    private AttributeHierarchy attributeHierarchie;
 
     private EntryEditorWidgetConfiguration configuration;
 
@@ -76,7 +76,7 @@
     private MultiValuedEntryEditorUniversalListener universalListener;
 
 
-    public MultivaluedDialog( Shell parentShell, AttributeHierachie attributeHierarchie )
+    public MultivaluedDialog( Shell parentShell, AttributeHierarchy attributeHierarchie )
     {
         super( parentShell );
         setShellStyle( getShellStyle() | SWT.RESIZE );

Copied: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueEditorDialog.java (from r490780, directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueProviderDialog.java)
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueEditorDialog.java?view=diff&rev=491104&p1=directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueProviderDialog.java&r1=490780&p2=directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueEditorDialog.java&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueProviderDialog.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/AttributeValueEditorDialog.java Fri Dec 29 13:15:47 2006
@@ -26,9 +26,8 @@
 import java.util.TreeMap;
 
 import org.apache.directory.ldapstudio.browser.core.model.schema.AttributeValueProviderRelation;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager.ValueEditorExtension;
 import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
-
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.events.ModifyEvent;
@@ -39,16 +38,16 @@
 import org.eclipse.swt.widgets.Shell;
 
 
-public class AttributeValueProviderDialog extends Dialog
+public class AttributeValueEditorDialog extends Dialog
 {
 
     private AttributeValueProviderRelation relation;
 
-    private SortedMap class2ValueProviderMap;
+    private SortedMap<String, ValueEditorExtension> class2ValueEditorProxyMap;
 
     private String[] attributeTypesAndOids;
 
-    private SortedMap vpName2classMap;
+    private SortedMap<String, String> vpName2classMap;
 
     private AttributeValueProviderRelation returnRelation;
 
@@ -57,21 +56,21 @@
     private Combo valueEditorCombo;
 
 
-    public AttributeValueProviderDialog( Shell parentShell, AttributeValueProviderRelation relation,
-        SortedMap class2ValueProviderMap, String[] attributeTypesAndOids )
+    public AttributeValueEditorDialog( Shell parentShell, AttributeValueProviderRelation relation,
+        SortedMap<String, ValueEditorExtension> class2ValueEditorProxyMap, String[] attributeTypesAndOids )
     {
         super( parentShell );
         this.relation = relation;
-        this.class2ValueProviderMap = class2ValueProviderMap;
+        this.class2ValueEditorProxyMap = class2ValueEditorProxyMap;
         this.attributeTypesAndOids = attributeTypesAndOids;
 
         this.returnRelation = null;
 
-        this.vpName2classMap = new TreeMap();
-        for ( Iterator it = this.class2ValueProviderMap.values().iterator(); it.hasNext(); )
+        this.vpName2classMap = new TreeMap<String, String>();
+        for ( Iterator<ValueEditorExtension> it = this.class2ValueEditorProxyMap.values().iterator(); it.hasNext(); )
         {
-            ValueProvider vp = ( ValueProvider ) it.next();
-            vpName2classMap.put( vp.getCellEditorName(), vp.getClass().getName() );
+            ValueEditorExtension vp = it.next();
+            vpName2classMap.put( vp.name, vp.className );
         }
     }
 
@@ -85,8 +84,8 @@
 
     protected void okPressed()
     {
-        this.returnRelation = new AttributeValueProviderRelation( this.typeOrOidCombo.getText(),
-            ( String ) this.vpName2classMap.get( this.valueEditorCombo.getText() ) );
+        this.returnRelation = new AttributeValueProviderRelation( this.typeOrOidCombo.getText(), this.vpName2classMap
+            .get( this.valueEditorCombo.getText() ) );
         super.okPressed();
     }
 
@@ -112,13 +111,13 @@
         } );
 
         BaseWidgetUtils.createLabel( c, "Value Editor:", 1 );
-        this.valueEditorCombo = BaseWidgetUtils.createReadonlyCombo( c, ( String[] ) vpName2classMap.keySet().toArray(
-            new String[0] ), -1, 1 );
+        this.valueEditorCombo = BaseWidgetUtils.createReadonlyCombo( c, vpName2classMap.keySet()
+            .toArray( new String[0] ), -1, 1 );
         if ( this.relation != null && this.relation.getValueProviderClassname() != null
-            && this.class2ValueProviderMap.containsKey( this.relation.getValueProviderClassname() ) )
+            && this.class2ValueEditorProxyMap.containsKey( this.relation.getValueProviderClassname() ) )
         {
-            this.valueEditorCombo.setText( ( ( ValueProvider ) this.class2ValueProviderMap.get( this.relation
-                .getValueProviderClassname() ) ).getCellEditorName() );
+            this.valueEditorCombo.setText( ( this.class2ValueEditorProxyMap.get( this.relation
+                .getValueProviderClassname() ) ).name );
         }
         this.valueEditorCombo.addModifyListener( new ModifyListener()
         {

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java Fri Dec 29 13:15:47 2006
@@ -357,7 +357,7 @@
     protected void addAttribute()
     {
         AttributeDialog dialog = new AttributeDialog( getShell(), null, this.attributeNamesAndOids );
-        if ( dialog.open() == AttributeValueProviderDialog.OK )
+        if ( dialog.open() == AttributeValueEditorDialog.OK )
         {
             this.attributeList.add( dialog.getAttribute() );
             this.attributeViewer.refresh();
@@ -380,7 +380,7 @@
         {
             BinaryAttribute attribute = ( BinaryAttribute ) sel.getFirstElement();
             AttributeDialog dialog = new AttributeDialog( getShell(), attribute, this.attributeNamesAndOids );
-            if ( dialog.open() == AttributeValueProviderDialog.OK )
+            if ( dialog.open() == AttributeValueEditorDialog.OK )
             {
                 int index = this.attributeList.indexOf( attribute );
                 this.attributeList.set( index, dialog.getAttribute() );
@@ -393,7 +393,7 @@
     protected void addSyntax()
     {
         SyntaxDialog dialog = new SyntaxDialog( getShell(), null, this.syntaxOids );
-        if ( dialog.open() == SyntaxValueProviderDialog.OK )
+        if ( dialog.open() == SyntaxValueEditorDialog.OK )
         {
             this.syntaxList.add( dialog.getSyntax() );
             this.syntaxViewer.refresh();
@@ -416,7 +416,7 @@
         {
             BinarySyntax syntax = ( BinarySyntax ) sel.getFirstElement();
             SyntaxDialog dialog = new SyntaxDialog( getShell(), syntax, this.syntaxOids );
-            if ( dialog.open() == SyntaxValueProviderDialog.OK )
+            if ( dialog.open() == SyntaxValueEditorDialog.OK )
             {
                 int index = this.syntaxList.indexOf( syntax );
                 this.syntaxList.set( index, dialog.getSyntax() );

Copied: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueEditorDialog.java (from r490780, directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueProviderDialog.java)
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueEditorDialog.java?view=diff&rev=491104&p1=directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueProviderDialog.java&r1=490780&p2=directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueEditorDialog.java&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueProviderDialog.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/SyntaxValueEditorDialog.java Fri Dec 29 13:15:47 2006
@@ -26,7 +26,7 @@
 import java.util.TreeMap;
 
 import org.apache.directory.ldapstudio.browser.core.model.schema.SyntaxValueProviderRelation;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager.ValueEditorExtension;
 import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
 
 import org.eclipse.jface.dialogs.Dialog;
@@ -39,16 +39,16 @@
 import org.eclipse.swt.widgets.Shell;
 
 
-public class SyntaxValueProviderDialog extends Dialog
+public class SyntaxValueEditorDialog extends Dialog
 {
 
     private SyntaxValueProviderRelation relation;
 
-    private SortedMap class2ValueProviderMap;
+    private SortedMap<String, ValueEditorExtension> class2ValueEditorProxyMap;
 
     private String[] syntaxOids;
 
-    private SortedMap vpName2classMap;
+    private SortedMap<String, String> vpName2classMap;
 
     private SyntaxValueProviderRelation returnRelation;
 
@@ -57,21 +57,21 @@
     private Combo valueEditorCombo;
 
 
-    public SyntaxValueProviderDialog( Shell parentShell, SyntaxValueProviderRelation relation,
-        SortedMap class2ValueProviderMap, String[] syntaxOids )
+    public SyntaxValueEditorDialog( Shell parentShell, SyntaxValueProviderRelation relation,
+        SortedMap<String, ValueEditorExtension> class2ValueEditorProxyMap, String[] syntaxOids )
     {
         super( parentShell );
         this.relation = relation;
-        this.class2ValueProviderMap = class2ValueProviderMap;
+        this.class2ValueEditorProxyMap = class2ValueEditorProxyMap;
         this.syntaxOids = syntaxOids;
 
         this.returnRelation = null;
 
-        this.vpName2classMap = new TreeMap();
-        for ( Iterator it = this.class2ValueProviderMap.values().iterator(); it.hasNext(); )
+        this.vpName2classMap = new TreeMap<String, String>();
+        for ( Iterator<ValueEditorExtension> it = this.class2ValueEditorProxyMap.values().iterator(); it.hasNext(); )
         {
-            ValueProvider vp = ( ValueProvider ) it.next();
-            vpName2classMap.put( vp.getCellEditorName(), vp.getClass().getName() );
+            ValueEditorExtension vp = it.next();
+            vpName2classMap.put( vp.name, vp.className );
         }
     }
 
@@ -112,13 +112,13 @@
         } );
 
         BaseWidgetUtils.createLabel( c, "Value Editor:", 1 );
-        this.valueEditorCombo = BaseWidgetUtils.createReadonlyCombo( c, ( String[] ) vpName2classMap.keySet().toArray(
-            new String[0] ), -1, 1 );
+        this.valueEditorCombo = BaseWidgetUtils.createReadonlyCombo( c, vpName2classMap.keySet()
+            .toArray( new String[0] ), -1, 1 );
         if ( this.relation != null && this.relation.getValueProviderClassname() != null
-            && this.class2ValueProviderMap.containsKey( this.relation.getValueProviderClassname() ) )
+            && this.class2ValueEditorProxyMap.containsKey( this.relation.getValueProviderClassname() ) )
         {
-            this.valueEditorCombo.setText( ( ( ValueProvider ) this.class2ValueProviderMap.get( this.relation
-                .getValueProviderClassname() ) ).getCellEditorName() );
+            this.valueEditorCombo.setText( ( this.class2ValueEditorProxyMap.get( this.relation
+                .getValueProviderClassname() ) ).name );
         }
         this.valueEditorCombo.addModifyListener( new ModifyListener()
         {

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/ValueEditorsPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/ValueEditorsPreferencePage.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/ValueEditorsPreferencePage.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/dialogs/preferences/ValueEditorsPreferencePage.java Fri Dec 29 13:15:47 2006
@@ -23,6 +23,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 import java.util.SortedMap;
 import java.util.TreeMap;
@@ -36,8 +37,8 @@
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
 import org.apache.directory.ldapstudio.browser.core.model.schema.SyntaxValueProviderRelation;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager.ValueEditorExtension;
 import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
 
 import org.eclipse.jface.preference.PreferencePage;
@@ -65,7 +66,7 @@
 public class ValueEditorsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage
 {
 
-    private SortedMap class2ValueProviderMap;
+    private SortedMap<String, ValueEditorExtension> class2ValueEditorProxyMap;
 
     private SortedMap attributeOid2AtdMap;
 
@@ -119,13 +120,14 @@
         composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
 
         // init available value providers
-        this.class2ValueProviderMap = new TreeMap();
+        this.class2ValueEditorProxyMap = new TreeMap<String, ValueEditorExtension>();
         Composite dummyComposite = new Composite( composite, SWT.NONE );
         dummyComposite.setLayoutData( new GridData( 1, 1 ) );
-        ValueProvider[] valueProviders = ValueProviderManager.getValueProviders( dummyComposite );
-        for ( int i = 0; i < valueProviders.length; i++ )
+        
+        Collection<ValueEditorExtension> valueEditorProxys = ValueEditorManager.getValueEditorProxys();
+        for ( ValueEditorExtension proxy : valueEditorProxys )
         {
-            this.class2ValueProviderMap.put( valueProviders[i].getClass().getName(), valueProviders[i] );
+            this.class2ValueEditorProxyMap.put( proxy.className, proxy );
         }
 
         // init available attribute types
@@ -379,9 +381,9 @@
 
     protected void addAttribute()
     {
-        AttributeValueProviderDialog dialog = new AttributeValueProviderDialog( getShell(), null,
-            this.class2ValueProviderMap, this.attributeTypesAndOids );
-        if ( dialog.open() == AttributeValueProviderDialog.OK )
+        AttributeValueEditorDialog dialog = new AttributeValueEditorDialog( getShell(), null,
+            this.class2ValueEditorProxyMap, this.attributeTypesAndOids );
+        if ( dialog.open() == AttributeValueEditorDialog.OK )
         {
             this.attributeList.add( dialog.getRelation() );
             this.attributeViewer.refresh();
@@ -403,9 +405,9 @@
         if ( !sel.isEmpty() )
         {
             AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) sel.getFirstElement();
-            AttributeValueProviderDialog dialog = new AttributeValueProviderDialog( getShell(), relation,
-                this.class2ValueProviderMap, this.attributeTypesAndOids );
-            if ( dialog.open() == AttributeValueProviderDialog.OK )
+            AttributeValueEditorDialog dialog = new AttributeValueEditorDialog( getShell(), relation,
+                this.class2ValueEditorProxyMap, this.attributeTypesAndOids );
+            if ( dialog.open() == AttributeValueEditorDialog.OK )
             {
                 int index = this.attributeList.indexOf( relation );
                 this.attributeList.set( index, dialog.getRelation() );
@@ -417,9 +419,9 @@
 
     protected void addSyntax()
     {
-        SyntaxValueProviderDialog dialog = new SyntaxValueProviderDialog( getShell(), null,
-            this.class2ValueProviderMap, this.syntaxDescsAndOids );
-        if ( dialog.open() == SyntaxValueProviderDialog.OK )
+        SyntaxValueEditorDialog dialog = new SyntaxValueEditorDialog( getShell(), null,
+            this.class2ValueEditorProxyMap, this.syntaxDescsAndOids );
+        if ( dialog.open() == SyntaxValueEditorDialog.OK )
         {
             this.syntaxList.add( dialog.getRelation() );
             this.syntaxViewer.refresh();
@@ -441,9 +443,9 @@
         if ( !sel.isEmpty() )
         {
             SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) sel.getFirstElement();
-            SyntaxValueProviderDialog dialog = new SyntaxValueProviderDialog( getShell(), relation,
-                this.class2ValueProviderMap, this.syntaxDescsAndOids );
-            if ( dialog.open() == SyntaxValueProviderDialog.OK )
+            SyntaxValueEditorDialog dialog = new SyntaxValueEditorDialog( getShell(), relation,
+                this.class2ValueEditorProxyMap, this.syntaxDescsAndOids );
+            if ( dialog.open() == SyntaxValueEditorDialog.OK )
             {
                 int index = this.syntaxList.indexOf( relation );
                 this.syntaxList.set( index, dialog.getRelation() );
@@ -521,9 +523,8 @@
                 }
                 else if ( index == 2 )
                 {
-                    ValueProvider vp = ( ValueProvider ) class2ValueProviderMap.get( relation
-                        .getValueProviderClassname() );
-                    return vp != null ? vp.getCellEditorName() : null;
+                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
+                    return vp != null ? vp.name : null;
                 }
             }
             return null;
@@ -537,9 +538,8 @@
                 AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) obj;
                 if ( index == 2 )
                 {
-                    ValueProvider vp = ( ValueProvider ) class2ValueProviderMap.get( relation
-                        .getValueProviderClassname() );
-                    return vp != null ? vp.getCellEditorImageDescriptor().createImage() : null;
+                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
+                    return vp != null ? vp.icon.createImage() : null;
                 }
             }
 
@@ -572,9 +572,8 @@
                 }
                 else if ( index == 2 )
                 {
-                    ValueProvider vp = ( ValueProvider ) class2ValueProviderMap.get( relation
-                        .getValueProviderClassname() );
-                    return vp != null ? vp.getCellEditorName() : null;
+                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
+                    return vp != null ? vp.name : null;
                 }
             }
             return null;
@@ -588,9 +587,8 @@
                 SyntaxValueProviderRelation relation = ( SyntaxValueProviderRelation ) obj;
                 if ( index == 2 )
                 {
-                    ValueProvider vp = ( ValueProvider ) class2ValueProviderMap.get( relation
-                        .getValueProviderClassname() );
-                    return vp != null ? vp.getCellEditorImageDescriptor().createImage() : null;
+                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
+                    return vp != null ? vp.icon.createImage() : null;
                 }
             }
 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/LdifEditor.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/LdifEditor.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/LdifEditor.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/LdifEditor.java Fri Dec 29 13:15:47 2006
@@ -42,9 +42,9 @@
 import org.apache.directory.ldapstudio.browser.ui.editors.ldif.actions.OpenDefaultValueEditorAction;
 import org.apache.directory.ldapstudio.browser.ui.editors.ldif.actions.OpenValueEditorAction;
 import org.apache.directory.ldapstudio.browser.ui.editors.ldif.text.LdifPartitionScanner;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.AbstractDialogCellEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogValueEditor;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.IValueEditor;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
 import org.apache.directory.ldapstudio.browser.ui.widgets.BaseWidgetUtils;
 
 import org.eclipse.core.resources.IFile;
@@ -121,7 +121,7 @@
 
     private LdifOutlinePage outlinePage;
 
-    private ValueProviderManager valueProviderManager;
+    private ValueEditorManager valueEditorManager;
 
     private OpenBestValueEditorAction openBestValueEditorAction;
 
@@ -214,14 +214,14 @@
         EventRegistry.addConnectionUpdateListener( this );
         getSite().getPage().addPartListener( this );
 
-        this.valueProviderManager = new ValueProviderManager( getSite().getShell() );
+        this.valueEditorManager = new ValueEditorManager( getSite().getShell() );
     }
 
 
     public void dispose()
     {
 
-        this.valueProviderManager.dispose();
+        this.valueEditorManager.dispose();
 
         deactivateGlobalActionHandlers();
 
@@ -328,9 +328,9 @@
         {
             this.openValueEditorActions[i].update();
             if ( this.openValueEditorActions[i].isEnabled()
-                && this.openValueEditorActions[i].getValueProvider().getClass() != this.openBestValueEditorAction
-                    .getValueProvider().getClass()
-                && this.openValueEditorActions[i].getValueProvider() instanceof AbstractDialogCellEditor )
+                && this.openValueEditorActions[i].getValueEditor().getClass() != this.openBestValueEditorAction
+                    .getValueEditor().getClass()
+                && this.openValueEditorActions[i].getValueEditor() instanceof AbstractDialogValueEditor )
             {
                 valueEditorMenuManager.add( this.openValueEditorActions[i] );
             }
@@ -371,11 +371,11 @@
         setAction( EditLdifAttributeAction.class.getName(), editLdifAttributeAction );
 
         this.openBestValueEditorAction = new OpenBestValueEditorAction( this );
-        ValueProvider[] valueProviders = valueProviderManager.getAllValueProviders();
-        this.openValueEditorActions = new OpenValueEditorAction[valueProviders.length];
+        IValueEditor[] valueEditors = valueEditorManager.getAllValueEditors();
+        this.openValueEditorActions = new OpenValueEditorAction[valueEditors.length];
         for ( int i = 0; i < this.openValueEditorActions.length; i++ )
         {
-            this.openValueEditorActions[i] = new OpenValueEditorAction( this, valueProviders[i] );
+            this.openValueEditorActions[i] = new OpenValueEditorAction( this, valueEditors[i] );
         }
         this.valueEditorPreferencesAction = new ValueEditorPreferencesAction();
 
@@ -694,9 +694,9 @@
     }
 
 
-    public ValueProviderManager getValueProviderManager()
+    public ValueEditorManager getValueEditorManager()
     {
-        return valueProviderManager;
+        return valueEditorManager;
     }
 
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/AbstractOpenValueEditorAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/AbstractOpenValueEditorAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/AbstractOpenValueEditorAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/AbstractOpenValueEditorAction.java Fri Dec 29 13:15:47 2006
@@ -21,6 +21,8 @@
 package org.apache.directory.ldapstudio.browser.ui.editors.ldif.actions;
 
 
+import org.apache.directory.ldapstudio.browser.core.internal.model.DummyConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.core.model.ldif.LdifPart;
 import org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifAttrValLine;
 import org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifControlLine;
@@ -31,10 +33,9 @@
 import org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifValueLineBase;
 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
 import org.apache.directory.ldapstudio.browser.ui.editors.ldif.LdifEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.AbstractDialogCellEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
-
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogValueEditor;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.IValueEditor;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 
@@ -42,21 +43,21 @@
 public abstract class AbstractOpenValueEditorAction extends AbstractLdifAction
 {
 
-    protected ValueProviderManager manager;
+    protected ValueEditorManager valueEditorManager;
 
-    protected ValueProvider valueProvider;
+    protected IValueEditor valueEditor;
 
 
     public AbstractOpenValueEditorAction( LdifEditor editor )
     {
         super( "Edit Value", editor );
-        manager = editor.getValueProviderManager();
+        valueEditorManager = editor.getValueEditorManager();
     }
 
 
-    public Object getValueProvider()
+    public Object getValueEditor()
     {
-        return valueProvider;
+        return valueEditor;
     }
 
 
@@ -69,11 +70,11 @@
             LdifValueLineBase line = ( LdifValueLineBase ) parts[0];
 
             String attributeDescription = getAttributeDescription();
-            Object rawValue = getValueProviderRawValue();
+            Object rawValue = getValueEditorRawValue();
 
-            if ( valueProvider instanceof AbstractDialogCellEditor )
+            if ( valueEditor instanceof AbstractDialogValueEditor )
             {
-                AbstractDialogCellEditor cellEditor = ( AbstractDialogCellEditor ) valueProvider;
+                AbstractDialogValueEditor cellEditor = ( AbstractDialogValueEditor ) valueEditor;
                 cellEditor.setValue( rawValue );
                 cellEditor.activate();
                 Object newValue = cellEditor.getValue();
@@ -124,20 +125,20 @@
     }
 
 
-    protected Schema getSchema()
+    protected IConnection getConnection()
     {
-        return editor.getConnection() != null ? editor.getConnection().getSchema() : Schema.DEFAULT_SCHEMA;
+        return editor.getConnection() != null ? editor.getConnection() : new DummyConnection( Schema.DEFAULT_SCHEMA );
     }
 
 
-    protected Object getValueProviderRawValue()
+    protected Object getValueEditorRawValue()
     {
         Object rawValue = null;
         Object value = getValue();
         if ( value != null )
         {
-            Schema schema = getSchema();
-            rawValue = valueProvider.getRawValue( null, schema, value );
+            IConnection connection = getConnection();
+            rawValue = valueEditor.getRawValue( connection, value );
         }
 
         return rawValue;

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/EditLdifAttributeAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/EditLdifAttributeAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/EditLdifAttributeAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/EditLdifAttributeAction.java Fri Dec 29 13:15:47 2006
@@ -42,7 +42,7 @@
 import org.apache.directory.ldapstudio.browser.core.utils.ModelConverter;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIConstants;
 import org.apache.directory.ldapstudio.browser.ui.editors.ldif.LdifEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
 import org.apache.directory.ldapstudio.browser.ui.wizards.AttributeWizard;
 
 import org.eclipse.jface.dialogs.Dialog;
@@ -55,7 +55,7 @@
 public class EditLdifAttributeAction extends AbstractLdifAction
 {
 
-    ValueProviderManager manager;
+    ValueEditorManager manager;
 
 
     public EditLdifAttributeAction( LdifEditor editor )
@@ -63,7 +63,7 @@
         super( "Edit Attribute Description", editor );
         super.setActionDefinitionId( BrowserUIConstants.ACTION_ID_EDIT_ATTRIBUTE_DESCRIPTION );
 
-        manager = new ValueProviderManager( editor.getSite().getShell() );
+        manager = new ValueEditorManager( editor.getSite().getShell() );
     }
 
 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenBestValueEditorAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenBestValueEditorAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenBestValueEditorAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenBestValueEditorAction.java Fri Dec 29 13:15:47 2006
@@ -21,10 +21,10 @@
 package org.apache.directory.ldapstudio.browser.ui.editors.ldif.actions;
 
 
-import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.ui.editors.ldif.LdifEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.AbstractDialogCellEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.AbstractDialogValueEditor;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.IValueEditor;
 
 
 public class OpenBestValueEditorAction extends AbstractOpenValueEditorAction
@@ -41,31 +41,31 @@
 
         super.setEnabled( isEditableLineSelected() );
 
-        // determine value provider
-        Schema schema = getSchema();
+        // determine value editor
+        IConnection connection = getConnection();
         String attributeDescription = getAttributeDescription();
         Object oldValue = getValue();
 
         if ( attributeDescription != null )
         {
-            valueProvider = manager.getCurrentValueProvider( schema, attributeDescription );
-            Object rawValue = valueProvider.getRawValue( null, schema, oldValue );
-            if ( !( valueProvider instanceof AbstractDialogCellEditor ) || rawValue == null )
+            valueEditor = valueEditorManager.getCurrentValueEditor( connection.getSchema(), attributeDescription );
+            Object rawValue = valueEditor.getRawValue( connection, oldValue );
+            if ( !( valueEditor instanceof AbstractDialogValueEditor ) || rawValue == null )
             {
-                ValueProvider[] vps = manager.getAlternativeValueProvider( schema, attributeDescription );
+                IValueEditor[] vps = valueEditorManager.getAlternativeValueEditors( connection.getSchema(), attributeDescription );
                 for ( int i = 0; i < vps.length
-                    && ( !( valueProvider instanceof AbstractDialogCellEditor ) || rawValue == null ); i++ )
+                    && ( !( valueEditor instanceof AbstractDialogValueEditor ) || rawValue == null ); i++ )
                 {
-                    valueProvider = vps[i];
-                    rawValue = valueProvider.getRawValue( null, schema, oldValue );
+                    valueEditor = vps[i];
+                    rawValue = valueEditor.getRawValue( connection, oldValue );
                 }
             }
         }
 
-        if ( valueProvider != null )
+        if ( valueEditor != null )
         {
-            setText( valueProvider.getCellEditorName() );
-            setImageDescriptor( valueProvider.getCellEditorImageDescriptor() );
+            setText( valueEditor.getValueEditorName() );
+            setImageDescriptor( valueEditor.getValueEditorImageDescriptor() );
         }
     }
 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenValueEditorAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenValueEditorAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenValueEditorAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/ldif/actions/OpenValueEditorAction.java Fri Dec 29 13:15:47 2006
@@ -24,37 +24,37 @@
 import java.util.Arrays;
 
 import org.apache.directory.ldapstudio.browser.ui.editors.ldif.LdifEditor;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.IValueEditor;
 
 
 public class OpenValueEditorAction extends AbstractOpenValueEditorAction
 {
 
-    public OpenValueEditorAction( LdifEditor editor, ValueProvider valueProvider )
+    public OpenValueEditorAction( LdifEditor editor, IValueEditor valueEditor )
     {
         super( editor );
-        super.valueProvider = valueProvider;
+        super.valueEditor = valueEditor;
     }
 
 
     public void update()
     {
         String attributeDescription = getAttributeDescription();
-        Object rawValue = getValueProviderRawValue();
+        Object rawValue = getValueEditorRawValue();
 
         if ( isEditableLineSelected() )
         {
-            ValueProvider[] alternativeVps = this.editor.getValueProviderManager().getAlternativeValueProvider(
-                getSchema(), attributeDescription );
-            super.setEnabled( Arrays.asList( alternativeVps ).contains( this.valueProvider ) && rawValue != null );
+            IValueEditor[] alternativeVps = this.editor.getValueEditorManager().getAlternativeValueEditors(
+                getConnection().getSchema(), attributeDescription );
+            super.setEnabled( Arrays.asList( alternativeVps ).contains( this.valueEditor ) && rawValue != null );
         }
         else
         {
             super.setEnabled( false );
         }
 
-        setText( valueProvider.getCellEditorName() );
-        setImageDescriptor( valueProvider.getCellEditorImageDescriptor() );
+        setText( valueEditor.getValueEditorName() );
+        setImageDescriptor( valueEditor.getValueEditorImageDescriptor() );
     }
 
 }

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractOpenEditorAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractOpenEditorAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractOpenEditorAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractOpenEditorAction.java Fri Dec 29 13:15:47 2006
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.ldapstudio.browser.core.events.ModelModifier;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
 
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.jface.viewers.TableViewer;
@@ -40,7 +40,7 @@
 
     protected SearchResultEditorActionGroup actionGroup;
 
-    protected ValueProviderManager valueProviderManager;
+    protected ValueEditorManager valueEditorManager;
 
     protected TableViewer viewer;
 
@@ -52,13 +52,13 @@
 
 
     protected AbstractOpenEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
-        SearchResultEditorActionGroup actionGroup, ValueProviderManager valueProviderManager )
+        SearchResultEditorActionGroup actionGroup, ValueEditorManager valueEditorManager )
     {
         super( cursor, "Editor", null, null );
         this.actionGroup = actionGroup;
         this.viewer = viewer;
         this.cursor = cursor;
-        this.valueProviderManager = valueProviderManager;
+        this.valueEditorManager = valueEditorManager;
         this.isActive = false;
     }
 
@@ -129,7 +129,7 @@
         }
         else
         {
-            this.valueProviderManager.setUserSelectedValueProvider( null );
+            this.valueEditorManager.setUserSelectedValueEditor( null );
         }
     }
 
@@ -171,7 +171,7 @@
         // activate global actions
         this.actionGroup.activateGlobalActionHandlers();
 
-        this.valueProviderManager.setUserSelectedValueProvider( null );
+        this.valueEditorManager.setUserSelectedValueEditor( null );
 
         // activate cursor
         cursor.setVisible( true );

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractSearchResultListenerAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractSearchResultListenerAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractSearchResultListenerAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/AbstractSearchResultListenerAction.java Fri Dec 29 13:15:47 2006
@@ -24,7 +24,7 @@
 import org.apache.directory.ldapstudio.browser.core.events.EntryModificationEvent;
 import org.apache.directory.ldapstudio.browser.core.events.EntryUpdateListener;
 import org.apache.directory.ldapstudio.browser.core.events.EventRegistry;
-import org.apache.directory.ldapstudio.browser.core.model.AttributeHierachie;
+import org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy;
 import org.apache.directory.ldapstudio.browser.core.model.ISearch;
 import org.apache.directory.ldapstudio.browser.core.model.ISearchResult;
 import org.apache.directory.ldapstudio.browser.ui.actions.SelectionUtils;
@@ -47,7 +47,7 @@
 
     protected ISearchResult selectedSearchResult;
 
-    protected AttributeHierachie selectedAttributeHierarchie;
+    protected AttributeHierarchy selectedAttributeHierarchie;
 
     protected String selectedProperty;
 
@@ -93,7 +93,7 @@
         ISelection selection = event.getSelection();
 
         ISearchResult[] searchResults = SelectionUtils.getSearchResults( selection );
-        AttributeHierachie[] ah = SelectionUtils.getAttributeHierarchie( selection );
+        AttributeHierarchy[] ah = SelectionUtils.getAttributeHierarchie( selection );
         String[] selectedProperties = SelectionUtils.getProperties( selection );
 
         if ( searchResults.length == 1 )

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenBestEditorAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenBestEditorAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenBestEditorAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenBestEditorAction.java Fri Dec 29 13:15:47 2006
@@ -21,27 +21,27 @@
 package org.apache.directory.ldapstudio.browser.ui.editors.searchresult;
 
 
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.IValueEditor;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
 import org.eclipse.jface.viewers.TableViewer;
 
 
 public class OpenBestEditorAction extends AbstractOpenEditorAction
 {
 
-    private ValueProvider valueProvider;
+    private IValueEditor valueEditor;
 
 
     public OpenBestEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
-        SearchResultEditorActionGroup actionGroup, ValueProviderManager valueProviderManager )
+        SearchResultEditorActionGroup actionGroup, ValueEditorManager valueEditorManager )
     {
-        super( viewer, cursor, actionGroup, valueProviderManager );
+        super( viewer, cursor, actionGroup, valueEditorManager );
     }
 
 
-    public ValueProvider getBestValueProvider()
+    public IValueEditor getBestValueEditor()
     {
-        return this.valueProvider;
+        return this.valueEditor;
     }
 
 
@@ -53,20 +53,20 @@
 
             if ( this.selectedAttributeHierarchie == null )
             {
-                this.valueProvider = this.valueProviderManager.getCurrentValueProvider( this.selectedSearchResult
+                this.valueEditor = this.valueEditorManager.getCurrentValueEditor( this.selectedSearchResult
                     .getEntry(), this.selectedProperty );
             }
             else
             {
-                this.valueProvider = this.valueProviderManager
-                    .getCurrentValueProvider( this.selectedAttributeHierarchie );
+                this.valueEditor = this.valueEditorManager
+                    .getCurrentValueEditor( this.selectedAttributeHierarchie );
             }
 
-            super.cellEditor = this.valueProvider.getCellEditor();
+            super.cellEditor = this.valueEditor.getCellEditor();
             this.setEnabled( true );
-            this.setText( "" + this.valueProvider.getCellEditorName() );
-            this.setToolTipText( "" + this.valueProvider.getCellEditorName() );
-            this.setImageDescriptor( this.valueProvider.getCellEditorImageDescriptor() );
+            this.setText( "" + this.valueEditor.getValueEditorName() );
+            this.setToolTipText( "" + this.valueEditor.getValueEditorName() );
+            this.setImageDescriptor( this.valueEditor.getValueEditorImageDescriptor() );
 
         }
         else

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenEditorAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenEditorAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenEditorAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenEditorAction.java Fri Dec 29 13:15:47 2006
@@ -23,33 +23,33 @@
 
 import java.util.Arrays;
 
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProvider;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.IValueEditor;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
 import org.eclipse.jface.viewers.TableViewer;
 
 
 public class OpenEditorAction extends AbstractOpenEditorAction
 {
 
-    private ValueProvider valueProvider;
+    private IValueEditor valueEditor;
 
 
     public OpenEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
-        SearchResultEditorActionGroup actionGroup, ValueProviderManager valueProviderManager,
-        ValueProvider valueProvider )
+        SearchResultEditorActionGroup actionGroup, ValueEditorManager valueEditorManager,
+        IValueEditor valueEditor )
     {
-        super( viewer, cursor, actionGroup, valueProviderManager );
-        super.cellEditor = valueProvider.getCellEditor();
-        this.valueProvider = valueProvider;
-        this.setText( "" + this.valueProvider.getCellEditorName() );
-        this.setToolTipText( "" + this.valueProvider.getCellEditorName() );
-        this.setImageDescriptor( this.valueProvider.getCellEditorImageDescriptor() );
+        super( viewer, cursor, actionGroup, valueEditorManager );
+        super.cellEditor = valueEditor.getCellEditor();
+        this.valueEditor = valueEditor;
+        this.setText( "" + this.valueEditor.getValueEditorName() );
+        this.setToolTipText( "" + this.valueEditor.getValueEditorName() );
+        this.setImageDescriptor( this.valueEditor.getValueEditorImageDescriptor() );
     }
 
 
-    public ValueProvider getValueProvider()
+    public IValueEditor getValueEditor()
     {
-        return this.valueProvider;
+        return this.valueEditor;
     }
 
 
@@ -59,17 +59,17 @@
         if ( viewer.getCellModifier().canModify( this.selectedSearchResult, this.selectedProperty ) )
         {
 
-            ValueProvider[] alternativeVps;
+            IValueEditor[] alternativeVps;
             if ( this.selectedAttributeHierarchie == null )
             {
                 this.setEnabled( false );
             }
             else
             {
-                alternativeVps = this.valueProviderManager
-                    .getAlternativeValueProvider( this.selectedAttributeHierarchie );
-                this.setEnabled( Arrays.asList( alternativeVps ).contains( this.valueProvider )
-                    && this.valueProvider.getRawValue( this.selectedAttributeHierarchie ) != null );
+                alternativeVps = this.valueEditorManager
+                    .getAlternativeValueEditors( this.selectedAttributeHierarchie );
+                this.setEnabled( Arrays.asList( alternativeVps ).contains( this.valueEditor )
+                    && this.valueEditor.getRawValue( this.selectedAttributeHierarchie ) != null );
             }
         }
         else
@@ -81,7 +81,7 @@
 
     public void run()
     {
-        this.valueProviderManager.setUserSelectedValueProvider( this.valueProvider );
+        this.valueEditorManager.setUserSelectedValueEditor( this.valueEditor );
         super.run();
     }
 

Modified: directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenMultiValuedEditorAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenMultiValuedEditorAction.java?view=diff&rev=491104&r1=491103&r2=491104
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenMultiValuedEditorAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/editors/searchresult/OpenMultiValuedEditorAction.java Fri Dec 29 13:15:47 2006
@@ -23,7 +23,7 @@
 
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIConstants;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
-import org.apache.directory.ldapstudio.browser.ui.valueproviders.ValueProviderManager;
+import org.apache.directory.ldapstudio.browser.ui.valueeditors.internal.ValueEditorManager;
 import org.eclipse.jface.viewers.TableViewer;
 
 
@@ -31,10 +31,10 @@
 {
 
     public OpenMultiValuedEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
-        SearchResultEditorActionGroup actionGroup, ValueProviderManager valueProviderManager )
+        SearchResultEditorActionGroup actionGroup, ValueEditorManager valueEditorManager )
     {
-        super( viewer, cursor, actionGroup, valueProviderManager );
-        this.cellEditor = this.valueProviderManager.getMultiValuedValueProvider();
+        super( viewer, cursor, actionGroup, valueEditorManager );
+        this.cellEditor = this.valueEditorManager.getMultiValuedValueEditor().getCellEditor();
         this.setText( "Multivalued Editor" );
         this.setToolTipText( "Multivalued Editor" );
         this.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(



Mime
View raw message