directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r488368 [3/23] - in /directory/sandbox/pamarcelot/ldapstudio: ldapstudio-browser-ui/ ldapstudio-browser-ui/META-INF/ ldapstudio-browser-ui/about_files/ ldapstudio-browser-ui/icons/ ldapstudio-browser-ui/icons/ovr16/ ldapstudio-browser-ui/sr...
Date Mon, 18 Dec 2006 17:53:22 GMT
Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/plugin.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/plugin.xml?view=auto&rev=488368
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/plugin.xml (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/plugin.xml Mon Dec 18 09:52:58 2006
@@ -0,0 +1,680 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            icon="icons/browser_browserview.gif"
+            class="org.apache.directory.ldapstudio.browser.ui.perspective.BrowserPerspective"
+            fixed="false"
+            name="LDAP"
+            id="org.apache.directory.ldapstudio.browser.ui.perspective.BroserPerspective"/>
+   </extension>
+    <extension
+       point="org.eclipse.ui.perspectiveExtensions">
+    <perspectiveExtension targetID="org.apache.directory.ldapstudio.browser.ui.perspective.BrowserPerspective">
+       <actionSet id="org.apache.directory.ldapstudio.browser.ldapMenuActionSet"/>
+       <actionSet id="org.apache.directory.ldapstudio.browser.ldapSearchActionSet"/>
+    </perspectiveExtension>
+ </extension>
+ <extension
+       point="org.eclipse.ui.editors">
+    <editor
+          class="org.apache.directory.ldapstudio.browser.ui.editors.ldif.LdifEditor"
+          contributorClass="org.apache.directory.ldapstudio.browser.ui.editors.ldif.LdifEditorContributor"
+          default="true"
+          extensions="ldif, ldiflog"
+          icon="icons/browser_ldifeditor.gif"
+          id="org.apache.directory.ldapstudio.browser.ui.editors.ldif.LdifEditor"
+          name="LDIF Editor"/>
+	<editor
+          class="org.apache.directory.ldapstudio.browser.ui.editors.entry.EntryEditor"
+          default="true"
+          icon="icons/browser_entryeditor.gif"
+          id="org.apache.directory.ldapstudio.browser.ui.editors.entry.EntryEditor"
+          name="Entry Editor"/>
+ <editor
+       class="org.apache.directory.ldapstudio.browser.ui.editors.searchresult.SearchResultEditor"
+       default="true"
+       icon="icons/browser_searchresulteditor.gif"
+       id="org.apache.directory.ldapstudio.browser.ui.editors.searchresult.SearchResultEditor"
+       name="Search Result Editor"/>
+ <editor
+       class="org.apache.directory.ldapstudio.browser.ui.editors.schemabrowser.SchemaBrowser"
+       default="true"
+       icon="icons/browser_schemabrowsereditor.gif"
+       id="org.apache.directory.ldapstudio.browser.ui.editors.schemabrowser.SchemaBrowser"
+       name="Schema Browser"/>
+ </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <category
+            name="LDAP Browser and Editor"
+            id="org.apache.directory.ldapstudio.browser.ui.category"/>
+      <view
+            allowMultiple="false"
+            class="org.apache.directory.ldapstudio.browser.ui.views.connection.ConnectionView"
+            icon="icons/browser_connectionview.gif"
+            category="org.apache.directory.ldapstudio.browser.ui.category"
+            name="Connections"
+            id="org.apache.directory.ldapstudio.browser.ui.views.connection.ConnectionView"/>            
+	  <view
+         allowMultiple="false"
+         category="org.apache.directory.ldapstudio.browser.ui.category"
+         class="org.apache.directory.ldapstudio.browser.ui.views.browser.BrowserView"
+         icon="icons/browser_browserview.gif"
+         id="org.apache.directory.ldapstudio.browser.ui.views.browser.BrowserView"
+         name="LDAP Browser"/>
+   <view
+         allowMultiple="false"
+         category="org.apache.directory.ldapstudio.browser.ui.category"
+         class="org.apache.directory.ldapstudio.browser.ui.views.modificationlogs.ModificationLogsView"
+         icon="icons/browser_modificationlogview.gif"
+         id="org.apache.directory.ldapstudio.browser.ui.views.modificationlogs.ModificationLogsView"
+         name="Modification Logs"/>            
+   </extension>
+   <extension
+         point="org.eclipse.ui.newWizards">
+      <category
+            name="LDAP Browser and Editor"
+            id="org.apache.directory.ldapstudio.browser.ui.wizards.category"/>
+      <wizard
+            category="org.apache.directory.ldapstudio.browser.ui.wizards.category"
+            class="org.apache.directory.ldapstudio.browser.ui.wizards.NewConnectionWizard"
+            hasPages="true"
+            icon="icons/connection_add.gif"
+            id="org.apache.directory.ldapstudio.browser.ui.wizards.NewConnectionWizard"
+            name="LDAP Connection"
+            project="false"/>
+      <wizard
+            category="org.apache.directory.ldapstudio.browser.ui.wizards.category"
+            class="org.apache.directory.ldapstudio.browser.ui.wizards.NewEntryWizard"
+            hasPages="true"
+            icon="icons/entry_add.gif"
+            id="org.apache.directory.ldapstudio.browser.ui.wizards.NewEntryWizard"
+            name="LDAP Entry"
+            project="false"/>
+      <wizard
+            canFinishEarly="true"
+            category="org.apache.directory.ldapstudio.browser.ui.wizards.category"
+            class="org.apache.directory.ldapstudio.browser.ui.wizards.NewSearchWizard"
+            hasPages="false"
+            icon="icons/search_new.gif"
+            id="org.apache.directory.ldapstudio.browser.ui.wizards.NewSearchWizard"
+            name="LDAP Search"
+            project="false"/>
+      <wizard
+            category="org.apache.directory.ldapstudio.browser.ui.wizards.category"
+            class="org.apache.directory.ldapstudio.browser.ui.wizards.NewBookmarkWizard"
+            hasPages="true"
+            icon="icons/bookmark_add.gif"
+            id="org.apache.directory.ldapstudio.browser.ui.wizards.NewBookmarkWizard"
+            name="LDAP Bookmark"
+            project="false"/>
+      <wizard
+            category="org.apache.directory.ldapstudio.browser.ui.wizards.category"
+            class="org.apache.directory.ldapstudio.browser.ui.wizards.BatchOperationWizard"
+            hasPages="true"
+            icon="icons/batch.gif"
+            id="org.apache.directory.ldapstudio.browser.ui.wizards.BatchOperationWizard"
+            name="LDAP Batch Operation"
+            project="false"/>
+      <wizard
+            canFinishEarly="true"
+            category="org.apache.directory.ldapstudio.browser.ui.wizards.category"
+            class="org.apache.directory.ldapstudio.browser.ui.wizards.NewLdifFileWizard"
+            hasPages="false"
+            icon="icons/ldifeditor_new.gif"
+            id="org.apache.directory.ldapstudio.browser.ui.wizards.NewLdifFileWizard"
+            name="LDIF File"
+            project="false"/>
+   </extension>
+ <extension
+       point="org.eclipse.ui.importWizards">
+    <wizard
+          class="org.apache.directory.ldapstudio.browser.ui.wizards.ImportLdifWizard"
+          icon="icons/import_ldif.gif"
+          id="org.apache.directory.ldapstudio.browser.ui.wizards.ImportLdifWizard"
+          name="LDIF into LDAP">
+       <description>
+          Imports a LDIF file into a LDAP directory
+       </description>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IConnection"/>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IEntry"/>
+    </wizard>
+ </extension>
+ <extension
+       point="org.eclipse.ui.exportWizards">
+    <wizard
+          class="org.apache.directory.ldapstudio.browser.ui.wizards.ExportLdifWizard"
+          icon="icons/export_ldif.gif"
+          id="org.apache.directory.ldapstudio.browser.ui.wizards.ExportLdifWizard"
+          name="LDAP to LDIF">
+       <description>
+          Exports a LDIF file from a LDAP directory
+       </description>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IConnection"/>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IEntry"/>
+    </wizard>
+    <wizard
+          class="org.apache.directory.ldapstudio.browser.ui.wizards.ExportCsvWizard"
+          icon="icons/export_csv.gif"
+          id="org.apache.directory.ldapstudio.browser.ui.wizards.ExportCsvWizard"
+          name="LDAP to CSV">
+       <description>
+          Exports a CSV file from a LDAP directory
+       </description>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IConnection"/>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IEntry"/>
+    </wizard>
+    <wizard
+          class="org.apache.directory.ldapstudio.browser.ui.wizards.ExportExcelWizard"
+          icon="icons/export_xls.gif"
+          id="org.apache.directory.ldapstudio.browser.ui.wizards.ExportExcelWizard"
+          name="LDAP to Excel">
+       <description>
+          Exports an Excel file from a LDAP directory
+       </description>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IConnection"/>
+       <selection class="org.apache.directory.ldapstudio.browser.core.model.IEntry"/>
+    </wizard>
+ </extension>
+
+   <extension point="org.eclipse.search.searchPages">
+	   <page
+          enabled="true"
+          label="LDAP Search"
+          class="org.apache.directory.ldapstudio.browser.ui.search.SearchPage"
+          icon="icons/browser_searchresulteditor.gif"
+          showScopeSection="false"
+          sizeHint="450,450"
+          id="org.apache.directory.ldapstudio.browser.ui.search.SearchPage">
+		</page>
+	</extension>
+   
+      <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer class="org.apache.directory.ldapstudio.browser.ui.BrowserUIPreferencesInitializer"/>
+   </extension>
+   
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            name="LDAP">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.AttributesPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.AttributesPreferencePage"
+            name="Attributes">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.colors"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.fonts"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.AttributesPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.BinaryAttributesAndSyntaxesPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.BinaryAttributesAndSyntaxesPreferencePage"
+            name="Binary Attributes">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.AttributesPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.ValueEditorsPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.ValueEditorsPreferencePage"
+            name="Value Editors">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.BrowserPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.BrowserPreferencePage"
+            name="Browser">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+      </page>            
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.EntryEditorPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.EntryEditorPreferencePage"
+            name="Entry Editor">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.SearchResultEditorPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.SearchResultEditorPreferencePage"
+            name="Search Result Editor">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorPreferencePage"
+            name="LDIF Editor">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldif"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorContentAssistPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorContentAssistPreferencePage"
+            name="Content Assist">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldif"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorSyntaxColoringPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorSyntaxColoringPreferencePage"
+            name="Syntax Coloring">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldif"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.colors"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorTemplatesPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.TemplatesPreferencePage"
+            name="Templates">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldif"/>
+      </page>
+      <page
+            category="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage"
+            class="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.TextFormatsPreferencePage"
+            id="org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.TextFormatsPreferencePage"
+            name="Text Formats">
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldap"/>
+         <keywordReference id="org.apache.directory.ldapstudio.browser.keyword.ldif"/>
+      </page>            
+   </extension>
+ <extension
+       point="org.eclipse.ui.keywords">
+    <keyword
+          id="org.apache.directory.ldapstudio.browser.keyword.colors"
+          label="Colors"/>
+    <keyword
+          id="org.apache.directory.ldapstudio.browser.keyword.fonts"
+          label="Fonts"/>
+    <keyword
+          id="org.apache.directory.ldapstudio.browser.keyword.ldap"
+          label="LDAP"/>
+    <keyword
+          id="org.apache.directory.ldapstudio.browser.keyword.ldif"
+          label="LDIF"/>
+ </extension>   
+      <extension
+         point="org.eclipse.ui.editors.templates">
+      <contextType
+            class="org.eclipse.jface.text.templates.TemplateContextType"
+            name="LDAP Filter"
+            id="org.apache.directory.ldapstudio.browser.ui.templates.filter"/>
+      <contextType
+            class="org.eclipse.jface.text.templates.TemplateContextType"
+            id="org.apache.directory.ldapstudio.browser.ui.templates.ldifFile"
+            name="LDIF File"/>
+      <contextType
+            class="org.eclipse.jface.text.templates.TemplateContextType"
+            id="org.apache.directory.ldapstudio.browser.ui.templates.ldifAttrValRecord"
+            name="LDIF Attribute Value Record"/>
+      <contextType
+            class="org.eclipse.jface.text.templates.TemplateContextType"
+            id="org.apache.directory.ldapstudio.browser.ui.templates.ldifModificationRecord"
+            name="LDIF Modification Record"/>
+      <contextType
+            class="org.eclipse.jface.text.templates.TemplateContextType"
+            id="org.apache.directory.ldapstudio.browser.ui.templates.ldifModificationItem"
+            name="LDIF Modification Item"/>
+      <contextType
+            class="org.eclipse.jface.text.templates.TemplateContextType"
+            id="org.apache.directory.ldapstudio.browser.ui.templates.ldifModdnRecord"
+            name="LDIF Moddn Record"/>
+      <include file="templates/templates.xml"/>
+   </extension>
+	<extension
+		point="org.eclipse.ui.propertyPages">
+		<page
+        class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.ConnectionPropertyPage"
+        id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.ConnectionPropertyPage"
+        name="Connection"
+        objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.ConnectionPropertyPageProvider"/>            
+		<page
+        category="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.ConnectionPropertyPage"
+        class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.SchemaPropertyPage"
+        id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.SchemaPropertyPage"
+        name="Schema"
+        objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.ConnectionPropertyPageProvider"/>            
+		<page
+        category="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.ConnectionPropertyPage"
+        class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.RootDSEPropertyPage"
+        id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.RootDSEPropertyPage"
+        name="Root DSE"
+        objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.ConnectionPropertyPageProvider"/>                        
+		<page
+        class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.SearchPropertyPage"
+        id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.SearchPropertyPage"
+        name="Search"
+        objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.SearchPropertyPageProvider"/>            
+		<page
+        class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.EntryPropertyPage"
+        id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.EntryPropertyPage"
+        name="Entry"
+        objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.EntryPropertyPageProvider">
+  </page>            
+		<page
+        category="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.EntryPropertyPage"
+        class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.SubSchemaPropertyPage"
+        id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.SubSchemaPropertyPage"
+        name="Subschema"
+        objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.EntryPropertyPageProvider"/>
+	  <page
+         class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.AttributePropertyPage"
+         id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.AttributePropertyPage"
+         name="Attribute"
+         objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.AttributePropertyPageProvider"/>
+	  <page
+         class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.ValuePropertyPage"
+         id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.ValuePropertyPage"
+         name="Value"
+         objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.ValuePropertyPageProvider"/>
+   <page
+         class="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.BookmarkPropertyPage"
+         id="org.apache.directory.ldapstudio.browser.ui.dialogs.properties.BookmarkPropertyPage"
+         name="Bookmark"
+         objectClass="org.apache.directory.ldapstudio.browser.core.propertypageproviders.BookmarkPropertyPageProvider"/>
+      </extension>
+ <extension
+       point="org.eclipse.ui.actionSets">
+    <actionSet
+          id="org.apache.directory.ldapstudio.browser.ldapSearchActionSet"
+          label="LDAP Search"
+          visible="false">
+          <menu
+	            id="org.eclipse.search.menu"
+	            label="%searchMenu.label"
+	            path="navigate">
+				<groupMarker name="internalDialogGroup"/>   <!-- not to be used by clients  -->
+				<groupMarker name="dialogGroup"/>           <!-- to be used by clients      -->
+	         	<separator name="contextMenuActionsGroup"/>
+				<separator name="internalOccurrencesGroup"/> <!-- not to be used by clients  -->
+	      	</menu>
+	      	
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.OpenSearchAction"
+             icon="icons/browser_searchresulteditor.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.OpenSearchAction"
+             label="%openLDAPSearchPageAction.label"
+             menubarPath="org.eclipse.search.menu/dialogGroup"
+             style="push"/>
+    </actionSet>
+    <actionSet
+          id="org.apache.directory.ldapstudio.browser.ldapMenuActionSet"
+          label="LDAP Menu"
+          visible="false">
+       <menu
+             id="org.apache.directory.ldapstudio.browser.ldapMenu"
+             label="LDAP">
+          <groupMarker name="newConnection"/>
+          <groupMarker name="newEntry"/>
+          <groupMarker name="newAttribute"/>
+          <groupMarker name="newValue"/>
+          <groupMarker name="newSearch"/>
+          <groupMarker name="newBookmark"/>
+          <groupMarker name="newBatchOperation"/>
+          <groupMarker name="newLdifFile"/>
+          <separator name="new"/>
+          <separator name="open"/>
+          <separator name="edit"/>
+          <separator name="importexport"/>
+       </menu>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.OpenSchemaBrowserAction"
+             icon="icons/browser_schemabrowsereditor.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.OpenSchemaBrowserAction"
+             label="Open Schema Browser"
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/open"
+             style="push">
+       </action>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewConnectionAction"
+             icon="icons/connection_add.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewConnectionAction"
+             label="New Connection..."
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newConnection"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewEntryAction"
+             icon="icons/entry_add.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewEntryAction"
+             label="New Entry..."
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newEntry"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewAttributeAction"
+             icon="icons/attribute_add.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewAttributeAction"
+             label="New Attribute..."
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newAttribute"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewValueAction"
+             icon="icons/value_add.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewValueAction"
+             label="New Value"
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newValue"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewSearchAction"
+             icon="icons/search_new.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewSearchAction"
+             label="New Search..."
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newSearch"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewBookmarkAction"
+             icon="icons/bookmark_add.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewBookmarkAction"
+             label="New Bookmark..."
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newBookmark"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewBatchOperationAction"
+             icon="icons/batch.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewBatchOperationAction"
+             label="New Batch Operation..."
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newBatchOperation"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.OpenEncoderDecoderDialogAction"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.OpenEncoderDecoderDialogAction"
+             label="Open Encoder/Decoder"
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/open"
+             style="push"/>
+       <action
+             class="org.apache.directory.ldapstudio.browser.ui.actions.NewLdifFileAction"
+             icon="icons/ldifeditor_new.gif"
+             id="org.apache.directory.ldapstudio.browser.ui.actions.NewLdifFileAction"
+             label="New LDIF File"
+             menubarPath="org.apache.directory.ldapstudio.browser.ldapMenu/newLdifFile"
+             style="push"/>
+    </actionSet>
+ </extension>
+ <extension
+       point="org.eclipse.ui.bindings">
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.addValue"
+          contextId="org.eclipse.ui.contexts.dialogAndWindow"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="M1++"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.addAttribute"
+          contextId="org.eclipse.ui.contexts.dialogAndWindow"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="M1+M2++"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.editAttributeDescription"
+          contextId="org.apache.directory.ldapstudio.browser.action.context"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="F6"/>  
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.editAttributeDescription"
+          contextId="org.eclipse.ui.contexts.dialog"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="F6"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.editValue"
+          contextId="org.apache.directory.ldapstudio.browser.action.context"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="F7"/>  
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.editValue"
+          contextId="org.eclipse.ui.contexts.dialog"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="F7"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.editRecord"
+          contextId="org.apache.directory.ldapstudio.browser.action.context"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="F8"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.delete"
+          contextId="org.eclipse.ui.contexts.dialog"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="DEL"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.copy"
+          contextId="org.eclipse.ui.contexts.dialog"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="CTRL+C"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.paste"
+          contextId="org.eclipse.ui.contexts.dialog"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="CTRL+V"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.find"
+          contextId="org.eclipse.ui.contexts.dialog"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="CTRL+F"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.properties"
+          contextId="org.eclipse.ui.contexts.dialog"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="ALT+RETURN"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.locateInDit"
+          contextId="org.apache.directory.ldapstudio.browser.action.context"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="F3"/>
+    <key
+          commandId="org.apache.directory.ldapstudio.browser.action.openSearchResult"
+          contextId="org.apache.directory.ldapstudio.browser.action.context"
+          schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+          sequence="F4"/>
+ </extension>
+ <extension
+       point="org.eclipse.ui.commands">
+    <category
+          id="org.apache.directory.ldapstudio.browser.commands"
+          name="LDAP Browser and Editor"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Add a value to an existing attribute"
+          id="org.apache.directory.ldapstudio.browser.action.addValue"
+          name="Add Value"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Add an attribute to an existing entry"
+          id="org.apache.directory.ldapstudio.browser.action.addAttribute"
+          name="Add Attribute"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Edit an attribute description"
+          id="org.apache.directory.ldapstudio.browser.action.editAttributeDescription"
+          name="Edit Attribute Description"/>          
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Edit a value"
+          id="org.apache.directory.ldapstudio.browser.action.editValue"
+          name="Edit Value"/>          
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Edit a record"
+          id="org.apache.directory.ldapstudio.browser.action.editRecord"
+          name="Edit Record"/>          
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Delete an element"
+          id="org.apache.directory.ldapstudio.browser.action.delete"
+          name="Delete"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Copy an element"
+          id="org.apache.directory.ldapstudio.browser.action.copy"
+          name="Copy"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Paste an element"
+          id="org.apache.directory.ldapstudio.browser.action.paste"
+          name="Paste"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Find an element"
+          id="org.apache.directory.ldapstudio.browser.action.find"
+          name="Find"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Properties of an element"
+          id="org.apache.directory.ldapstudio.browser.action.properties"
+          name="Properties"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Locate a DN or search result in DIT"
+          id="org.apache.directory.ldapstudio.browser.action.locateInDit"
+          name="Locate in DIT"/>
+    <command
+          categoryId="org.apache.directory.ldapstudio.browser.commands"
+          description="Open a search result"
+          id="org.apache.directory.ldapstudio.browser.action.openSearchResult"
+          name="Open Search Result"/>
+ </extension>
+ <extension
+       point="org.eclipse.ui.decorators">
+    <decorator
+          adaptable="false"
+          class="org.apache.directory.ldapstudio.browser.ui.views.browser.BrowserViewLabelDecorator"
+          id="org.apache.directory.ldapstudio.browser.decorator"
+          label="LDAP Decorator"
+          lightweight="true"
+          location="BOTTOM_RIGHT"
+          state="true">
+       <enablement>
+          <or>
+            <objectClass name="org.apache.directory.ldapstudio.browser.core.model.IEntry"/>
+            <objectClass name="org.apache.directory.ldapstudio.browser.core.model.ISearchResult"/>
+          </or>
+       </enablement>
+       <description>
+          Decorates LDAP icons
+       </description>
+    </decorator>
+ </extension>
+
+ <extension
+       point="org.eclipse.ui.contexts">
+       <context
+		name="Browser context"
+		description="Browser context"
+		id="org.apache.directory.ldapstudio.browser.action.context"
+		parentId="org.eclipse.ui.contexts.window">
+	</context>
+ </extension>
+
+
+
+
+</plugin>

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIAuthHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIAuthHandler.java?view=auto&rev=488368
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIAuthHandler.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIAuthHandler.java Mon Dec 18 09:52:58 2006
@@ -0,0 +1,81 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.browser.ui;
+
+
+import org.apache.directory.ldapstudio.browser.core.internal.model.Credentials;
+import org.apache.directory.ldapstudio.browser.core.model.ConnectionParameter;
+import org.apache.directory.ldapstudio.browser.core.model.IAuthHandler;
+import org.apache.directory.ldapstudio.browser.core.model.ICredentials;
+import org.apache.directory.ldapstudio.browser.ui.dialogs.CredentialsDialog;
+
+import org.eclipse.ui.PlatformUI;
+
+
+public class BrowserUIAuthHandler implements IAuthHandler
+{
+
+    public ICredentials getCredentials( final ConnectionParameter connectionParameter )
+    {
+
+        if ( connectionParameter.getBindPrincipal() == null || "".equals( connectionParameter.getBindPrincipal() ) )
+        {
+            return new Credentials( "", "", connectionParameter );
+        }
+        else if ( connectionParameter.getBindPassword() != null && !"".equals( connectionParameter.getBindPassword() ) )
+        {
+            return new Credentials( connectionParameter.getBindPrincipal(), connectionParameter.getBindPassword(),
+                connectionParameter );
+        }
+        else
+        {
+            final String[] pw = new String[1];
+            PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
+            {
+                public void run()
+                {
+                    CredentialsDialog dialog = new CredentialsDialog( PlatformUI.getWorkbench().getDisplay()
+                        .getActiveShell(), "Enter Password for '" + connectionParameter.getName() + "'",
+                        "Please enter password of user " + connectionParameter.getBindPrincipal() + ":", "", null );
+                    if ( dialog.open() == CredentialsDialog.OK )
+                    {
+                        pw[0] = dialog.getValue();
+                    }
+                    else
+                    {
+                        pw[0] = null;
+                    }
+                }
+            } );
+
+            if ( pw[0] == null )
+            {
+                return null;
+            }
+            else
+            {
+                return new Credentials( connectionParameter.getBindPrincipal(), pw[0], connectionParameter );
+            }
+        }
+
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIConstants.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIConstants.java?view=auto&rev=488368
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIConstants.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIConstants.java Mon Dec 18 09:52:58 2006
@@ -0,0 +1,505 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.browser.ui;
+
+
+public interface BrowserUIConstants
+{
+
+    public static final int HISTORYSIZE = 20;
+
+    public static final String DN = "DN";
+
+    public static final String ACTION_ID_EDIT_VALUE = "org.apache.directory.ldapstudio.browser.action.editValue";
+
+    public static final String ACTION_ID_EDIT_ATTRIBUTE_DESCRIPTION = "org.apache.directory.ldapstudio.browser.action.editAttributeDescription";
+
+    public static final String ACTION_ID_EDIT_RECORD = "org.apache.directory.ldapstudio.browser.action.editRecord";
+
+    public static final String PREFERENCE_TIME_LIMIT = "timeLimit";
+
+    public static final String PREFERENCE_COUNT_LIMIT = "countLimit";
+
+    public static final String PREFERENCE_SYNTAX_VALUEPROVIDER_RELATIONS = "syntaxValueProviderRelations";
+
+    public static final String PREFERENCE_ATTRIBUTE_VALUEPROVIDER_RELATIONS = "attributeValueProviderRelations";
+
+    public static final String FILTER_TEMPLATE_ID = "org.apache.directory.ldapstudio.browser.ui.templates.filter";
+
+    public static final String LDIF_FILE_TEMPLATE_ID = "org.apache.directory.ldapstudio.browser.ui.templates.ldifFile";
+
+    public static final String LDIF_ATTR_VAL_RECORD_TEMPLATE_ID = "org.apache.directory.ldapstudio.browser.ui.templates.ldifAttrValRecord";
+
+    public static final String LDIF_MODIFICATION_RECORD_TEMPLATE_ID = "org.apache.directory.ldapstudio.browser.ui.templates.ldifModificationRecord";
+
+    public static final String LDIF_MODIFICATION_ITEM_TEMPLATE_ID = "org.apache.directory.ldapstudio.browser.ui.templates.ldifModificationItem";
+
+    public static final String LDIF_MODDN_RECORD_TEMPLATE_ID = "org.apache.directory.ldapstudio.browser.ui.templates.ldifModdnRecord";
+
+    public static final String PREFERENCE_OBJECTCLASS_COLOR = "objectClassColor";
+
+    public static final String PREFERENCE_OBJECTCLASS_FONT = "objectClassFont";
+
+    public static final String PREFERENCE_MUSTATTRIBUTE_COLOR = "mustAttributeColor";
+
+    public static final String PREFERENCE_MUSTATTRIBUTE_FONT = "mustAttributeFont";
+
+    public static final String PREFERENCE_MAYATTRIBUTE_COLOR = "mayAttributeColor";
+
+    public static final String PREFERENCE_MAYATTRIBUTE_FONT = "mayAttributeFont";
+
+    public static final String PREFERENCE_OPERATIONALATTRIBUTE_COLOR = "operationalAttributeColor";
+
+    public static final String PREFERENCE_OPERATIONALATTRIBUTE_FONT = "operationalAttributeFont";
+
+    public static final String PREFERENCE_WARNING_FONT = "warningFont";
+
+    public static final String PREFERENCE_WARNING_COLOR = "warningColor";
+
+    public static final String PREFERENCE_ERROR_FONT = "errorFont";
+
+    public static final String PREFERENCE_ERROR_COLOR = "errorColor";
+
+    public static final String PREFERENCE_QUICKFILTER_BACKGROUND_COLOR = "quickfilterBackgroundColor";
+
+    public static final String PREFERENCE_QUICKFILTER_FOREGROUND_COLOR = "quickfilterForegroundColor";
+
+    public static final String PREFERENCE_QUICKFILTER_FONT = "quickfilterFont";
+
+    public static final String PREFERENCE_SHOW_RAW_VALUES = "showRawValues";
+
+    public static final String PREFERENCE_FORMAT_TABLE_ATTRIBUTEDELIMITER = "formatTableAttributeDelimiter";
+
+    public static final String PREFERENCE_FORMAT_TABLE_VALUEDELIMITER = "formatTableValueDelimiter";
+
+    public static final String PREFERENCE_FORMAT_TABLE_QUOTECHARACTER = "formatTableQuoteCharacter";
+
+    public static final String PREFERENCE_FORMAT_TABLE_LINESEPARATOR = "formatTableLineSeparator";
+
+    public static final String PREFERENCE_FORMAT_TABLE_BINARYENCODING = "formatTableBinaryEncoding";
+
+    public static final String PREFERENCE_BROWSER_EXPAND_BASE_ENTRIES = "browserExpandBaseEntries";
+
+    public static final String PREFERENCE_BROWSER_ENABLE_FOLDING = "browserEnableFolding";
+
+    public static final String PREFERENCE_BROWSER_FOLDING_SIZE = "browserFoldingSize";
+
+    public static final String PREFERENCE_BROWSER_ENTRY_LABEL = "browserEntryLabel";
+
+    public static final String PREFERENCE_BROWSER_ENTRY_ABBREVIATE = "browserEntryAbbreviate";
+
+    public static final String PREFERENCE_BROWSER_ENTRY_ABBREVIATE_MAX_LENGTH = "browserentryAbbreviateMaxLength";
+
+    public static final String PREFERENCE_BROWSER_SEARCH_RESULT_LABEL = "browserSearchResultLabel";
+
+    public static final String PREFERENCE_BROWSER_SEARCH_RESULT_ABBREVIATE = "browserWearchResultAbbreviate";
+
+    public static final String PREFERENCE_BROWSER_SEARCH_RESULT_ABBREVIATE_MAX_LENGTH = "browserSearchResultAbbreviateMaxLength";
+
+    public static final String PREFERENCE_BROWSER_SHOW_DIT = "browserShowDIT";
+
+    public static final String PREFERENCE_BROWSER_SHOW_SEARCHES = "browserShowSearches";
+
+    public static final String PREFERENCE_BROWSER_SHOW_BOOKMARKS = "browserShowBookmarks";
+
+    public static final String PREFERENCE_BROWSER_SHOW_DIRECTORY_META_ENTRIES = "browserShowDirectoryMetaEntries";
+
+    public static final String PREFERENCE_BROWSER_SORT_BY = "browserSortBy";
+
+    public static final String PREFERENCE_BROWSER_SORT_ORDER = "browserSortOrder";
+
+    public static final String PREFERENCE_BROWSER_SORT_LIMIT = "browserSortLimit";
+
+    public static final String PREFERENCE_BROWSER_LEAF_ENTRIES_FIRST = "browserLeafEntriesFirst";
+
+    public static final String PREFERENCE_BROWSER_META_ENTRIES_LAST = "browserMetaEntriesLast";
+
+    public static final String PREFERENCE_ENTRYEDITOR_SHOW_MAY_ATTRIBUTES = "entryeditorShowMayAttributes";
+
+    public static final String PREFERENCE_ENTRYEDITOR_SHOW_MUST_ATTRIBUTES = "entryeditorShowMustAttributes";
+
+    public static final String PREFERENCE_ENTRYEDITOR_SHOW_OBJECTCLASS_ATTRIBUTES = "entryeditorShowObjectClassAttribute";
+
+    public static final String PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES = "entryeditorShowOperationalAttributes";
+
+    public static final String PREFERENCE_ENTRYEDITOR_ENABLE_FOLDING = "entryeditorEnableFolding";
+
+    public static final String PREFERENCE_ENTRYEDITOR_FOLDING_THRESHOLD = "entryeditorFoldingThreshold";
+
+    public static final String PREFERENCE_ENTRYEDITOR_OBJECTCLASS_AND_MUST_ATTRIBUTES_FIRST = "entryeditorObjectClassAndMustAttributesFirst";
+
+    public static final String PREFERENCE_ENTRYEDITOR_OPERATIONAL_ATTRIBUTES_LAST = "entryeditorOperationalAttributesLast";
+
+    public static final String PREFERENCE_ENTRYEDITOR_DEFAULT_SORT_BY = "entryeditorDefaultSortBy";
+
+    public static final String PREFERENCE_ENTRYEDITOR_DEFAULT_SORT_ORDER = "entryeditorDefaultSortOrder";
+
+    public static final String PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN = "searchResultEditorShowDn";
+
+    public static final String PREFERENCE_SEARCHRESULTEDITOR_SHOW_LINKS = "searchResultEditorShowLinks";
+
+    public static final String PREFERENCE_LDIFEDITOR_FORMATTER_AUTOWRAP = "ldifEditorFormatterAutoWrap";
+
+    public static final String PREFERENCE_LDIFEDITOR_FOLDING_ENABLE = "ldifEditorFoldingEnable";
+
+    public static final String PREFERENCE_LDIFEDITOR_FOLDING_INITIALLYFOLDCOMMENTS = "ldifEditorFoldingInitiallyFoldComments";
+
+    public static final String PREFERENCE_LDIFEDITOR_FOLDING_INITIALLYFOLDRECORDS = "ldifEditoroldingInitiallyFoldRecords";
+
+    public static final String PREFERENCE_LDIFEDITOR_FOLDING_INITIALLYFOLDWRAPPEDLINES = "ldifEditorFoldingInitiallyFoldWrappedLines";
+
+    public static final String PREFERENCE_LDIFEDITOR_DOUBLECLICK_USELDIFDOUBLECLICK = "ldifEditorDoubleClickUserLdifDoubleClick";
+
+    public static final String PREFERENCE_LDIFEDITOR_CONTENTASSIST_INSERTSINGLEPROPOSALAUTO = "ldifEditorCodeAssistInsertSingleProposalAuto";
+
+    public static final String PREFERENCE_LDIFEDITOR_CONTENTASSIST_ENABLEAUTOACTIVATION = "ldifEditorCodeAssistEnableAutoActivation";
+
+    public static final String PREFERENCE_LDIFEDITOR_CONTENTASSIST_AUTOACTIVATIONDELAY = "ldifEditorCodeAssistAutoActivationDelay";
+
+    public static final String PREFERENCE_LDIFEDITOR_CONTENTASSIST_SMARTINSERTATTRIBUTEINMODSPEC = "ldifEditorCodeAssistInsertAttributeInModSpec";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX = "_RGB";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX = "_STYLE";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_COMMENT = "ldifEditorSyntaxComment";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_KEYWORD = "ldifEditorSyntaxKeyword";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_DN = "ldifEditorSyntaxDn";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_ATTRIBUTE = "ldifEditorSyntaxAttribute";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_VALUETYPE = "ldifEditorSyntaxValueType";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_VALUE = "ldifEditorSyntaxValue";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEADD = "ldifEditorSyntaxChangetypeAdd";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEMODIFY = "ldifEditorSyntaxChangetypeModify";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEDELETE = "ldifEditorSyntaxChangetypeDelete";
+
+    public static final String PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEMODDN = "ldifEditorSyntaxChangetypeModdn";
+
+    public static final String PREFERENCEPAGEID_MAIN = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.MainPreferencePage";
+
+    public static final String PREFERENCEPAGEID_ATTRIBUTES = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.AttributesPreferencePage";
+
+    public static final String PREFERENCEPAGEID_BINARYATTRIBUTES = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.BinaryAttributesAndSyntaxesPreferencePage";
+
+    public static final String PREFERENCEPAGEID_VALUEEDITORS = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.ValueEditorsPreferencePage";
+
+    public static final String PREFERENCEPAGEID_BROWSER = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.BrowserPreferencePage";
+
+    public static final String PREFERENCEPAGEID_ENTRYEDITOR = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.EntryEditorPreferencePage";
+
+    public static final String PREFERENCEPAGEID_SEARCHRESULTEDITOR = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.SearchResultEditorPreferencePage";
+
+    public static final String PREFERENCEPAGEID_LDIFEDITOR = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorPreferencePage";
+
+    public static final String PREFERENCEPAGEID_LDIFEDITOR_CONTENTASSIST = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorContentAssistPreferencePage";
+
+    public static final String PREFERENCEPAGEID_LDIFEDITOR_SYNTAXCOLORING = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.LdifEditorSyntaxColoringPreferencePage";
+
+    public static final String PREFERENCEPAGEID_LDIFEDITOR_TEMPLATES = "org.apache.directory.ldapstudio.browser.ui.dialogs.preferences.TemplatesPreferencePage";
+
+    public static final String DIALOGSETTING_KEY_RETURNING_ATTRIBUTES_HISTORY = "returningAttributesHistory";
+
+    public static final String DIALOGSETTING_KEY_SEARCH_FILTER_HISTORY = "searchFilterHistory";
+
+    public static final String DIALOGSETTING_KEY_DN_HISTORY = "dnHistory";
+
+    public static final String DIALOGSETTING_KEY_HOST_HISTORY = "hostHistory";
+
+    public static final String DIALOGSETTING_KEY_PORT_HISTORY = "portHistory";
+
+    public static final String DIALOGSETTING_KEY_RECENT_FILE_PATH = "recentFilePath";
+
+    public static final String DIALOGSETTING_KEY_FILE_HISTORY = "fileHistory";
+
+    public static final String IMG_TEMPLATE = "icons/template.gif";
+
+    public static final String IMG_PULLDOWN = "icons/pulldown.gif";
+
+    public static final String IMG_CLEAR = "icons/clear.gif";
+
+    public static final String IMG_REFRESH = "icons/refresh.gif";
+
+    public static final String IMG_COLLAPSEALL = "icons/collapseall.gif";
+
+    public static final String IMG_EXPANDALL = "icons/expandall.gif";
+
+    public static final String IMG_PARENT = "icons/parent.gif";
+
+    public static final String IMG_BATCH = "icons/batch.gif";
+
+    public static final String IMG_IMPORT = "icons/import.gif";
+
+    public static final String IMG_EXPORT = "icons/export.gif";
+
+    public static final String IMG_IMPORT_LDIF_WIZARD = "icons/import_ldif_wizard.gif";
+
+    public static final String IMG_EXPORT_LDIF_WIZARD = "icons/export_ldif_wizard.gif";
+
+    public static final String IMG_IMPORT_CSV_WIZARD = "icons/import_csv_wizard.gif";
+
+    public static final String IMG_EXPORT_CSV_WIZARD = "icons/export_csv_wizard.gif";
+
+    public static final String IMG_IMPORT_XLS_WIZARD = "icons/import_xls_wizard.gif";
+
+    public static final String IMG_EXPORT_XLS_WIZARD = "icons/export_xls_wizard.gif";
+
+    public static final String IMG_IMPORT_LDIF = "icons/import_ldif.gif";
+
+    public static final String IMG_EXPORT_LDIF = "icons/export_ldif.gif";
+
+    public static final String IMG_IMPORT_CSV = "icons/import_csv.gif";
+
+    public static final String IMG_EXPORT_CSV = "icons/export_csv.gif";
+
+    public static final String IMG_IMPORT_XLS = "icons/import_xls.gif";
+
+    public static final String IMG_EXPORT_XLS = "icons/export_xls.gif";
+
+    public static final String IMG_BROWSER_CONNECTIONVIEW = "icons/browser_connectionview.gif";
+
+    public static final String IMG_CONNECTION_ADD = "icons/connection_add.gif";
+
+    public static final String IMG_CONNECTION_WIZARD = "icons/connection_wizard.gif";
+
+    public static final String IMG_CONNECTION_CONNECTED = "icons/connection_connected.gif";
+
+    public static final String IMG_CONNECTION_DISCONNECTED = "icons/connection_disconnected.gif";
+
+    public static final String IMG_CONNECTION_CONNECT = "icons/connection_connect.gif";
+
+    public static final String IMG_CONNECTION_DISCONNECT = "icons/connection_disconnect.gif";
+
+    public static final String IMG_BROWSER_BROWSERVIEW = "icons/browser_browserview.gif";
+
+    public static final String IMG_DIT = "icons/dit.gif";
+
+    public static final String IMG_ENTRY = "icons/entry_default.gif";
+
+    public static final String IMG_ENTRY_ROOT = "icons/entry_root.gif";
+
+    public static final String IMG_ENTRY_DC = "icons/entry_dc.gif";
+
+    public static final String IMG_ENTRY_ORG = "icons/entry_org.gif";
+
+    public static final String IMG_ENTRY_PERSON = "icons/entry_person.gif";
+
+    public static final String IMG_ENTRY_GROUP = "icons/entry_group.gif";
+
+    public static final String IMG_ENTRY_REF = "icons/entry_ref.gif";
+
+    public static final String IMG_ENTRY_ALIAS = "icons/entry_alias.gif";
+
+    public static final String IMG_ENTRY_ADD = "icons/entry_add.gif";
+
+    public static final String IMG_ENTRY_WIZARD = "icons/entry_wizard.gif";
+
+    public static final String IMG_LOCATE_DN_IN_DIT = "icons/locate_dn_in_dit.gif";
+
+    public static final String IMG_LOCATE_SEARCHRESULT_IN_DIT = "icons/locate_searchresult_in_dit.gif";
+
+    public static final String IMG_LOCATE_BOOKMARK_IN_DIT = "icons/locate_bookmark_in_dit.gif";
+
+    public static final String IMG_LOCATE_ENTRY_IN_DIT = "icons/locate_entry_in_dit.gif";
+
+    public static final String IMG_OPEN_SEARCHRESULT = "icons/open_searchresult.gif";
+
+    public static final String IMG_BROWSER_ENTRYEDITOR = "icons/browser_entryeditor.gif";
+
+    public static final String IMG_ATTRIBUTE = "icons/attribute.gif";
+
+    public static final String IMG_ATTRIBUTE_ADD = "icons/attribute_add.gif";
+
+    public static final String IMG_VALUE = "icons/value.gif";
+
+    public static final String IMG_VALUE_ADD = "icons/value_add.gif";
+
+    public static final String IMG_COPY_LDIF = "icons/copy_ldif.gif";
+
+    public static final String IMG_COPY_LDIF_USER = "icons/copy_ldif_user.gif";
+
+    public static final String IMG_COPY_LDIF_OPERATIONAL = "icons/copy_ldif_operational.gif";
+
+    public static final String IMG_COPY_LDIF_SEARCHRESULT = "icons/copy_ldif_searchresult.gif";
+
+    public static final String IMG_COPY_CSV = "icons/copy_csv.gif";
+
+    public static final String IMG_COPY_CSV_USER = "icons/copy_csv_user.gif";
+
+    public static final String IMG_COPY_CSV_OPERATIONAL = "icons/copy_csv_operational.gif";
+
+    public static final String IMG_COPY_CSV_SEARCHRESULT = "icons/copy_csv_searchresult.gif";
+
+    public static final String IMG_COPY_BASE64 = "icons/copy_base64.gif";
+
+    public static final String IMG_COPY_HEX = "icons/copy_hex.gif";
+
+    public static final String IMG_COPY_UTF8 = "icons/copy_raw.gif";
+
+    public static final String IMG_COPY_DN = "icons/copy_dn.gif";
+
+    public static final String IMG_COPY_URL = "icons/copy_url.gif";
+
+    public static final String IMG_COPY_ATT = "icons/copy_att.gif";
+
+    public static final String IMG_COPY_TABLE = "icons/copy_table.gif";
+
+    public static final String IMG_TABLE = "icons/table.gif";
+
+    public static final String IMG_DELETE_ALL = "icons/delete_all.gif";
+
+    public static final String IMG_SORT = "icons/sort.gif";
+
+    public static final String IMG_SORT_NONE = "icons/sort_none.gif";
+
+    public static final String IMG_SORT_ASCENDING = "icons/sort_ascending.gif";
+
+    public static final String IMG_SORT_DESCENDING = "icons/sort_descending.gif";
+
+    public static final String IMG_FILTER = "icons/filter.gif";
+
+    public static final String IMG_FILTER_DIT = "icons/filter_dit.gif";
+
+    public static final String IMG_UNFILTER_DIT = "icons/unfilter_dit.gif";
+
+    public static final String IMG_FILTER_EQUALS = "icons/filter_equals.gif";
+
+    public static final String IMG_FILTER_AND = "icons/filter_and.gif";
+
+    public static final String IMG_FILTER_OR = "icons/filter_or.gif";
+
+    public static final String IMG_FILTER_NOT = "icons/filter_not.gif";
+
+    public static final String IMG_BROWSER_SEARCHRESULTEDITOR = "icons/browser_searchresulteditor.gif";
+
+    public static final String IMG_SEARCHES = "icons/searches.gif";
+
+    public static final String IMG_SEARCH = "icons/search.gif";
+
+    public static final String IMG_SEARCH_NEW = "icons/search_new.gif";
+
+    public static final String IMG_SEARCH_UNPERFORMED = "icons/search_unperformed.gif";
+
+    public static final String IMG_BOOKMARKS = "icons/bookmarks.gif";
+
+    public static final String IMG_BOOKMARK = "icons/bookmark.gif";
+
+    public static final String IMG_BOOKMARK_ADD = "icons/bookmark_add.gif";
+
+    public static final String IMG_MARK = "icons/mark.gif";
+
+    public static final String IMG_BROWSER_SCHEMABROWSEREDITOR = "icons/browser_schemabrowsereditor.gif";
+
+    public static final String IMG_DEFAULT_SCHEMA = "icons/defaultschema.gif";
+
+    public static final String IMG_HEXEDITOR = "icons/hexeditor.gif";
+
+    public static final String IMG_EHEPHEXEDITOR = "icons/ehep.gif";
+
+    public static final String IMG_IMAGEEDITOR = "icons/imageeditor.gif";
+
+    public static final String IMG_ADDRESSEDITOR = "icons/addresseditor.gif";
+
+    public static final String IMG_TEXTEDITOR = "icons/texteditor.gif";
+
+    public static final String IMG_DNEDITOR = "icons/dneditor.gif";
+
+    public static final String IMG_PASSWORDEDITOR = "icons/passwordeditor.gif";
+
+    public static final String IMG_INPLACE_TEXTEDITOR = "icons/inplace_texteditor.gif";
+
+    public static final String IMG_INPLACE_OCEDITOR = "icons/inplace_oceditor.gif";
+
+    public static final String IMG_INPLACE_GENERALIZEDTIMEEDITOR = "icons/inplace_generalizedtimeeditor.gif";
+
+    public static final String IMG_MULTIVALUEDEDITOR = "icons/multivaluededitor.gif";
+
+    public static final String IMG_BROWSER_LDIFEDITOR = "icons/browser_ldifeditor.gif";
+
+    public static final String IMG_LDIFEDITOR_NEW = "icons/ldifeditor_new.gif";
+
+    public static final String IMG_LDIF_ADD = "icons/ldif_add.gif";
+
+    public static final String IMG_LDIF_MODIFY = "icons/ldif_modify.gif";
+
+    public static final String IMG_LDIF_DELETE = "icons/ldif_delete.gif";
+
+    public static final String IMG_LDIF_RENAME = "icons/ldif_rename.gif";
+
+    public static final String IMG_LDIF_ATTRIBUTE = "icons/ldif_attribute.gif";
+
+    public static final String IMG_LDIF_VALUE = "icons/ldif_value.gif";
+
+    public static final String IMG_LDIF_MOD_ADD = "icons/ldif_mod_add.gif";
+
+    public static final String IMG_LDIF_MOD_REPLACE = "icons/ldif_mod_replace.gif";
+
+    public static final String IMG_LDIF_MOD_DELETE = "icons/ldif_mod_delete.gif";
+
+    public static final String IMG_LDIF_COMMENT = "icons/ldif_comment.gif";
+
+    public static final String IMG_LDIF_DN = "icons/ldif_dn.gif";
+
+    public static final String IMG_ATD = "icons/atd.gif";
+
+    public static final String IMG_OCD = "icons/ocd.gif";
+
+    public static final String IMG_MRD = "icons/mrd.gif";
+
+    public static final String IMG_MRUD = "icons/mrud.gif";
+
+    public static final String IMG_LSD = "icons/lsd.gif";
+
+    public static final String IMG_MRD_EQUALITY = "icons/mrd_equality.gif";
+
+    public static final String IMG_MRD_SUBSTRING = "icons/mrd_substring.gif";
+
+    public static final String IMG_MRD_ORDERING = "icons/mrd_ordering.gif";
+
+    public static final String IMG_OVR_FILTERED = "icons/ovr16/filtered.gif";
+
+    public static final String IMG_OVR_SEARCHRESULT = "icons/ovr16/searchresult.gif";
+
+    public static final String IMG_OVR_ERROR = "icons/ovr16/error.gif";
+
+    public static final String IMG_OVR_WARNING = "icons/ovr16/warning.gif";
+
+    public static final String IMG_OVR_MARK = "icons/ovr16/mark.gif";
+
+    public static final String IMG_EXECUTE = "icons/execute.gif";
+
+    public static final String IMG_NEXT = "icons/next.gif";
+
+    public static final String IMG_PREVIOUS = "icons/previous.gif";
+
+    public static final int SHOW_DN = 0;
+
+    public static final int SHOW_RDN = 1;
+
+    public static final int SHOW_RDN_VALUE = 2;
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPlugin.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPlugin.java?view=auto&rev=488368
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPlugin.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPlugin.java Mon Dec 18 09:52:58 2006
@@ -0,0 +1,438 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.browser.ui;
+
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCorePlugin;
+import org.apache.directory.ldapstudio.browser.core.events.EventRegistry;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.jface.resource.FontRegistry;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.templates.ContextTypeRegistry;
+import org.eclipse.jface.text.templates.GlobalTemplateVariables;
+import org.eclipse.jface.text.templates.persistence.TemplateStore;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
+import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class BrowserUIPlugin extends AbstractUIPlugin
+{
+
+    // The plugin ID
+    public static final String PLUGIN_ID = "org.apache.directory.ldapstudio.browser.ui";
+
+    // The shared instance.
+    private static BrowserUIPlugin plugin;
+
+    // Resource bundle.
+    private ResourceBundle resourceBundle;
+
+    // The event dispatcher
+    private ExceptionHandler exceptionHandler;
+
+    // The font registry
+    private FontRegistry fontRegistry;
+
+    // The color registry
+    private ColorRegistry colorRegistry;
+
+    // The template store
+    private ContributionTemplateStore ldifTemplateStore;
+
+    private ContributionTemplateStore filterTemplateStore;
+
+    // The context type registry
+    private ContributionContextTypeRegistry ldifTemplateContextTypeRegistry;
+
+    private ContributionContextTypeRegistry filterTemplateContextTypeRegistry;
+
+    // The event dispatcher
+    private EventDispatcherSync eventDispatcher;
+
+    // The preferences
+    private BrowserUIPreferences uiPreferences;
+
+
+    /**
+     * The constructor.
+     */
+    public BrowserUIPlugin()
+    {
+        plugin = this;
+        this.uiPreferences = new BrowserUIPreferences();
+        try
+        {
+            resourceBundle = ResourceBundle.getBundle( "org.apache.directory.ldapstudio.browser.ui.browseruimessages" );
+        }
+        catch ( MissingResourceException x )
+        {
+            resourceBundle = null;
+        }
+    }
+
+
+    /**
+     * This method is called upon plug-in activation
+     */
+    public void start( BundleContext context ) throws Exception
+    {
+        super.start( context );
+
+        if ( this.eventDispatcher == null )
+        {
+            this.eventDispatcher = new EventDispatcherSync();
+            this.eventDispatcher.startEventDispatcher();
+        }
+        EventRegistry.init( this.eventDispatcher );
+
+        if ( this.exceptionHandler == null )
+        {
+            this.exceptionHandler = new ExceptionHandler();
+        }
+
+        if ( this.fontRegistry == null )
+        {
+            this.fontRegistry = new FontRegistry( this.getWorkbench().getDisplay() );
+        }
+        if ( this.colorRegistry == null )
+        {
+            this.colorRegistry = new ColorRegistry( this.getWorkbench().getDisplay() );
+        }
+        if ( this.filterTemplateContextTypeRegistry == null )
+        {
+            this.filterTemplateContextTypeRegistry = new ContributionContextTypeRegistry();
+            this.filterTemplateContextTypeRegistry.addContextType( BrowserUIConstants.FILTER_TEMPLATE_ID );
+            this.filterTemplateContextTypeRegistry.getContextType( BrowserUIConstants.FILTER_TEMPLATE_ID ).addResolver(
+                new GlobalTemplateVariables.Cursor() );
+        }
+        if ( this.ldifTemplateContextTypeRegistry == null )
+        {
+            this.ldifTemplateContextTypeRegistry = new ContributionContextTypeRegistry();
+
+            this.ldifTemplateContextTypeRegistry.addContextType( BrowserUIConstants.LDIF_FILE_TEMPLATE_ID );
+            this.ldifTemplateContextTypeRegistry.getContextType( BrowserUIConstants.LDIF_FILE_TEMPLATE_ID )
+                .addResolver( new GlobalTemplateVariables.Cursor() );
+
+            this.ldifTemplateContextTypeRegistry.addContextType( BrowserUIConstants.LDIF_ATTR_VAL_RECORD_TEMPLATE_ID );
+            this.ldifTemplateContextTypeRegistry.getContextType( BrowserUIConstants.LDIF_ATTR_VAL_RECORD_TEMPLATE_ID )
+                .addResolver( new GlobalTemplateVariables.Cursor() );
+
+            this.ldifTemplateContextTypeRegistry
+                .addContextType( BrowserUIConstants.LDIF_MODIFICATION_RECORD_TEMPLATE_ID );
+            this.ldifTemplateContextTypeRegistry.getContextType(
+                BrowserUIConstants.LDIF_MODIFICATION_RECORD_TEMPLATE_ID ).addResolver(
+                new GlobalTemplateVariables.Cursor() );
+
+            this.ldifTemplateContextTypeRegistry.addContextType( BrowserUIConstants.LDIF_MODIFICATION_ITEM_TEMPLATE_ID );
+
+            this.ldifTemplateContextTypeRegistry.addContextType( BrowserUIConstants.LDIF_MODDN_RECORD_TEMPLATE_ID );
+        }
+        if ( this.filterTemplateStore == null )
+        {
+            this.filterTemplateStore = new ContributionTemplateStore( getFilterTemplateContextTypeRegistry(),
+                getPreferenceStore(), "templates" );
+            try
+            {
+                this.filterTemplateStore.load();
+            }
+            catch ( IOException e )
+            {
+                e.printStackTrace();
+            }
+        }
+        if ( this.ldifTemplateStore == null )
+        {
+            this.ldifTemplateStore = new ContributionTemplateStore( getLdifTemplateContextTypeRegistry(),
+                getPreferenceStore(), "templates" );
+            try
+            {
+                this.ldifTemplateStore.load();
+            }
+            catch ( IOException e )
+            {
+                e.printStackTrace();
+            }
+        }
+
+        BrowserCorePlugin.getDefault().setAuthHandler( new BrowserUIAuthHandler() );
+        BrowserCorePlugin.getDefault().setReferralHandler( new BrowserUIReferralHandler() );
+    }
+
+
+    /**
+     * This method is called when the plug-in is stopped
+     */
+    public void stop( BundleContext context ) throws Exception
+    {
+        super.stop( context );
+
+        if ( this.eventDispatcher != null )
+        {
+            this.eventDispatcher.stopEventDispatcher();
+            this.eventDispatcher = null;
+        }
+
+        if ( this.exceptionHandler != null )
+        {
+            this.exceptionHandler = null;
+        }
+
+        if ( this.fontRegistry != null )
+        {
+            this.fontRegistry = null;
+        }
+        if ( this.colorRegistry != null )
+        {
+            this.colorRegistry = null;
+        }
+        if ( this.filterTemplateContextTypeRegistry != null )
+        {
+            this.filterTemplateContextTypeRegistry = null;
+        }
+        if ( this.ldifTemplateContextTypeRegistry != null )
+        {
+            this.ldifTemplateContextTypeRegistry = null;
+        }
+        if ( this.filterTemplateStore != null )
+        {
+            try
+            {
+                this.filterTemplateStore.save();
+            }
+            catch ( IOException e )
+            {
+                e.printStackTrace();
+            }
+            this.filterTemplateStore = null;
+        }
+        if ( this.ldifTemplateStore != null )
+        {
+            try
+            {
+                this.ldifTemplateStore.save();
+            }
+            catch ( IOException e )
+            {
+                e.printStackTrace();
+            }
+            this.ldifTemplateStore = null;
+        }
+        plugin = null;
+    }
+
+
+    /**
+     * Returns the shared instance.
+     */
+    public static BrowserUIPlugin getDefault()
+    {
+        return plugin;
+    }
+
+
+    public ResourceBundle getResourceBundle()
+    {
+        return resourceBundle;
+    }
+
+
+    public static String getResourceString( String key )
+    {
+        ResourceBundle bundle = getDefault().getResourceBundle();
+        try
+        {
+            return ( bundle != null ) ? bundle.getString( key ) : key;
+        }
+        catch ( MissingResourceException e )
+        {
+            return key;
+        }
+    }
+
+
+    /**
+     * 
+     * @return The exception handler
+     */
+    public ExceptionHandler getExceptionHandler()
+    {
+        return this.exceptionHandler;
+    }
+
+
+    /**
+     * Use this method to get SWT images. Use the IMG_ constants from
+     * BrowserUIConstants for the key.
+     * 
+     * @param key
+     *                The key (relative path to the image im filesystem)
+     * @return The image discriptor or null
+     */
+    public ImageDescriptor getImageDescriptor( String key )
+    {
+        if ( key != null )
+        {
+            URL url = this.find( new Path( key ) );
+            if ( url != null )
+                return ImageDescriptor.createFromURL( url );
+            else
+                return null;
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+
+    /**
+     * Use this method to get SWT images. Use the IMG_ constants from
+     * BrowserUIConstants for the key. A ImageRegistry is used to manage the
+     * the key->Image mapping.
+     * <p>
+     * Note: Don't dispose the returned SWT Image. It is disposed
+     * automatically when the plugin is stopped.
+     * 
+     * @param key
+     *                The key (relative path to the image im filesystem)
+     * @return The SWT Image or null
+     * @see BrowserUIConstants
+     */
+    public Image getImage( String key )
+    {
+        Image image = getImageRegistry().get( key );
+        if ( image == null )
+        {
+            ImageDescriptor id = this.getImageDescriptor( key );
+            if ( id != null )
+            {
+                image = id.createImage();
+                getImageRegistry().put( key, image );
+            }
+        }
+        return image;
+    }
+
+
+    /**
+     * Use this method to get SWT fonts. A FontRegistry is used to manage
+     * the FontData[]->Font mapping.
+     * <p>
+     * Note: Don't dispose the returned SWT Font. It is disposed
+     * automatically when the plugin is stopped.
+     * 
+     * @param fontData
+     *                the font data
+     * @return The SWT Font
+     */
+
+    public Font getFont( FontData[] fontData )
+    {
+        if ( !this.fontRegistry.hasValueFor( fontData[0].toString() ) )
+            this.fontRegistry.put( fontData[0].toString(), fontData );
+
+        return this.fontRegistry.get( fontData[0].toString() );
+    }
+
+
+    /**
+     * Use this method to get SWT colors. A ColorRegistry is used to manage
+     * the RGB->Color mapping.
+     * <p>
+     * Note: Don't dispose the returned color. It is disposed automatically
+     * when the plugin is stopped.
+     * 
+     * @param rgb
+     *                the rgb color data
+     * @return The SWT Color
+     */
+    public Color getColor( RGB rgb )
+    {
+        if ( !this.colorRegistry.hasValueFor( rgb.toString() ) )
+            this.colorRegistry.put( rgb.toString(), rgb );
+
+        return this.colorRegistry.get( rgb.toString() );
+    }
+
+
+    /**
+     * 
+     * @return The filter template store
+     */
+    public TemplateStore getFilterTemplateStore()
+    {
+        return this.filterTemplateStore;
+    }
+
+
+    /**
+     * 
+     * @return The LDIF template store
+     */
+    public TemplateStore getLdifTemplateStore()
+    {
+        return this.ldifTemplateStore;
+    }
+
+
+    /**
+     * 
+     * @return The filter template context type registry
+     */
+    public ContextTypeRegistry getFilterTemplateContextTypeRegistry()
+    {
+        return this.filterTemplateContextTypeRegistry;
+    }
+
+
+    /**
+     * 
+     * @return The LDIF template context type registry
+     */
+    public ContextTypeRegistry getLdifTemplateContextTypeRegistry()
+    {
+        return this.ldifTemplateContextTypeRegistry;
+    }
+
+
+    public BrowserUIPreferences getUIPreferences()
+    {
+        return this.uiPreferences;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java?view=auto&rev=488368
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-ui/src/org/apache/directory/ldapstudio/browser/ui/BrowserUIPreferences.java Mon Dec 18 09:52:58 2006
@@ -0,0 +1,166 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.browser.ui;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+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.core.utils.Utils;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+
+
+public class BrowserUIPreferences
+{
+
+    private Map attributeValueProviderRelationCache;
+
+
+    public Map getAttributeValueProviderMap()
+    {
+        if ( this.attributeValueProviderRelationCache == null )
+        {
+            this.attributeValueProviderRelationCache = new HashMap();
+            AttributeValueProviderRelation[] relations = this.getAttributeValueProviderRelations();
+            for ( int i = 0; i < relations.length; i++ )
+            {
+                if ( relations[i].getAttributeNumericOidOrType() != null )
+                {
+                    this.attributeValueProviderRelationCache.put( relations[i].getAttributeNumericOidOrType()
+                        .toLowerCase(), relations[i].getValueProviderClassname() );
+                }
+            }
+        }
+        return this.attributeValueProviderRelationCache;
+    }
+
+
+    public AttributeValueProviderRelation[] getAttributeValueProviderRelations()
+    {
+        AttributeValueProviderRelation[] avpr = ( AttributeValueProviderRelation[] ) load( BrowserUIConstants.PREFERENCE_ATTRIBUTE_VALUEPROVIDER_RELATIONS );
+        return avpr;
+    }
+
+
+    public void setAttributeValueProviderRelations( AttributeValueProviderRelation[] attributeValueProviderRelations )
+    {
+        store( BrowserUIConstants.PREFERENCE_ATTRIBUTE_VALUEPROVIDER_RELATIONS, attributeValueProviderRelations );
+        this.attributeValueProviderRelationCache = null;
+    }
+
+
+    public AttributeValueProviderRelation[] getDefaultAttributeValueProviderRelations()
+    {
+        AttributeValueProviderRelation[] avpr = ( AttributeValueProviderRelation[] ) loadDefault( BrowserUIConstants.PREFERENCE_ATTRIBUTE_VALUEPROVIDER_RELATIONS );
+        return avpr;
+    }
+
+
+    public void setDefaultAttributeValueProviderRelations(
+        AttributeValueProviderRelation[] attributeValueProviderRelations )
+    {
+        storeDefault( BrowserUIConstants.PREFERENCE_ATTRIBUTE_VALUEPROVIDER_RELATIONS, attributeValueProviderRelations );
+    }
+
+    private Map syntaxValueProviderCache;
+
+
+    public Map getSyntaxValueProviderMap()
+    {
+        if ( this.syntaxValueProviderCache == null )
+        {
+            this.syntaxValueProviderCache = new HashMap();
+            SyntaxValueProviderRelation[] relations = this.getSyntaxValueProviderRelations();
+            for ( int i = 0; i < relations.length; i++ )
+            {
+                if ( relations[i].getSyntaxOID() != null )
+                {
+                    this.syntaxValueProviderCache.put( relations[i].getSyntaxOID().toLowerCase(), relations[i]
+                        .getValueProviderClassname() );
+                }
+            }
+        }
+        return this.syntaxValueProviderCache;
+    }
+
+
+    public void setSyntaxValueProviderRelations( SyntaxValueProviderRelation[] syntaxValueProviderRelations )
+    {
+        store( BrowserUIConstants.PREFERENCE_SYNTAX_VALUEPROVIDER_RELATIONS, syntaxValueProviderRelations );
+        this.syntaxValueProviderCache = null;
+    }
+
+
+    public SyntaxValueProviderRelation[] getSyntaxValueProviderRelations()
+    {
+        SyntaxValueProviderRelation[] svpr = ( SyntaxValueProviderRelation[] ) load( BrowserUIConstants.PREFERENCE_SYNTAX_VALUEPROVIDER_RELATIONS );
+        return svpr;
+    }
+
+
+    public SyntaxValueProviderRelation[] getDefaultSyntaxValueProviderRelations()
+    {
+        SyntaxValueProviderRelation[] svpr = ( SyntaxValueProviderRelation[] ) loadDefault( BrowserUIConstants.PREFERENCE_SYNTAX_VALUEPROVIDER_RELATIONS );
+        return svpr;
+    }
+
+
+    public void setDefaultSyntaxValueProviderRelations( SyntaxValueProviderRelation[] syntaxValueProviderRelations )
+    {
+        storeDefault( BrowserUIConstants.PREFERENCE_SYNTAX_VALUEPROVIDER_RELATIONS, syntaxValueProviderRelations );
+    }
+
+
+    private static Object load( String key )
+    {
+        IPreferenceStore store = BrowserUIPlugin.getDefault().getPreferenceStore();
+        String s = store.getString( key );
+        return Utils.deserialize( s );
+    }
+
+
+    private static void store( String key, Object o )
+    {
+        IPreferenceStore store = BrowserUIPlugin.getDefault().getPreferenceStore();
+        String s = Utils.serialize( o );
+        store.setValue( key, s );
+    }
+
+
+    private static Object loadDefault( String key )
+    {
+        IPreferenceStore store = BrowserUIPlugin.getDefault().getPreferenceStore();
+        String s = store.getDefaultString( key );
+        return Utils.deserialize( s );
+    }
+
+
+    private static void storeDefault( String key, Object o )
+    {
+        IPreferenceStore store = BrowserUIPlugin.getDefault().getPreferenceStore();
+        String s = Utils.serialize( o );
+        store.setDefault( key, s );
+    }
+
+}



Mime
View raw message