directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r691172 - in /directory/studio/trunk/ldifeditor: ./ src/main/java/org/apache/directory/studio/ldifeditor/ src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/ src/main/java/org/apache/directory/studio/ldifeditor/editor/
Date Tue, 02 Sep 2008 09:22:03 GMT
Author: pamarcelot
Date: Tue Sep  2 02:22:02 2008
New Revision: 691172

URL: http://svn.apache.org/viewvc?rev=691172&view=rev
Log:
Part of a fix for DIRSTUDIO-375 (Move each plugin IDs in a plugin.properties file).

Modified:
    directory/studio/trunk/ldifeditor/plugin.properties
    directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorConstants.java
    directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorPreferencePage.java
    directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java

Modified: directory/studio/trunk/ldifeditor/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldifeditor/plugin.properties?rev=691172&r1=691171&r2=691172&view=diff
==============================================================================
--- directory/studio/trunk/ldifeditor/plugin.properties (original)
+++ directory/studio/trunk/ldifeditor/plugin.properties Tue Sep  2 02:22:02 2008
@@ -58,6 +58,13 @@
 
 Ldif_Partitioning_id=org.apache.directory.studio.ldifeditor.LdifPartitioning
 
+Cmd_FormatLdifDocument_id=org.apache.directory.studio.ldifeditor.editor.actions.FormatLdifDocumentAction
+Cmd_FormatLdifRecord_id=org.apache.directory.studio.ldifeditor.editor.actions.FormatLdifRecordAction
+Cmd_ExecuteLdif_id=org.apache.directory.studio.ldifeditor.editor.ExecuteLdifAction
+
 Cmd_EditRecord_id=org.apache.directory.studio.ldapbrowser.action.editRecord
+Cmd_EditAttributeDescription_id=org.apache.directory.studio.ldapbrowser.action.editAttributeDescription
+
+Action_ContentAssist_id=org.apache.directory.studio.ldapbrowser.ContentAssist
 
-Action_ContentAssist_id=org.apache.directory.studio.ldapbrowser.ContentAssist
\ No newline at end of file
+PrefPage_TextFormatsPreferencePage_id=org.apache.directory.studio.ldapbrowser.preferences.TextFormatsPreferencePage
\ No newline at end of file

Modified: directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorConstants.java?rev=691172&r1=691171&r2=691172&view=diff
==============================================================================
--- directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorConstants.java
(original)
+++ directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorConstants.java
Tue Sep  2 02:22:02 2008
@@ -20,6 +20,7 @@
 package org.apache.directory.studio.ldifeditor;
 
 
+
 /**
  * Constants for the LDIF editor.
  *
@@ -35,11 +36,23 @@
     public static final String ACTION_ID_EDIT_RECORD = LdifEditorActivator.getDefault().getPluginProperties()
         .getString( "Cmd_EditRecord_id" );
 
+    public static final String ACTION_ID_EDIT_ATTRIBUTE_DESCRIPTION = LdifEditorActivator.getDefault()
+        .getPluginProperties().getString( "Cmd_EditAttributeDescription_id" );
+
+    public static final String ACTION_ID_FORMAT_LDIF_DOCUMENT = LdifEditorActivator.getDefault()
+        .getPluginProperties().getString( "Cmd_FormatLdifDocument_id" );
+
+    public static final String ACTION_ID_FORMAT_LDIF_RECORD = LdifEditorActivator.getDefault()
+        .getPluginProperties().getString( "Cmd_FormatLdifRecord_id" );
+
+    public static final String ACTION_ID_EXECUTE_LDIF = LdifEditorActivator.getDefault()
+        .getPluginProperties().getString( "Cmd_ExecuteLdif_id" );
+
     public static final String NEW_WIZARD_NEW_LDIF_FILE = LdifEditorActivator.getDefault().getPluginProperties()
         .getString( "NewWizard_NewLdifFileWizard_id" );
 
-    public static final String EDITOR_LDIF_EDITOR = LdifEditorActivator.getDefault().getPluginProperties()
-        .getString( "Editor_LdifEditor_id" );
+    public static final String EDITOR_LDIF_EDITOR = LdifEditorActivator.getDefault().getPluginProperties().getString(
+        "Editor_LdifEditor_id" );
 
     public static final String PREFERENCE_LDIFEDITOR_FORMATTER_AUTOWRAP = "ldifEditorFormatterAutoWrap";
 
@@ -153,4 +166,7 @@
 
     public static final String CONTENTASSIST_ACTION = LdifEditorActivator.getDefault().getPluginProperties().getString(
         "Action_ContentAssist_id" );
+
+    public static final String PREFERENCEPAGEID_TEXTFORMATS = LdifEditorActivator.getDefault().getPluginProperties()
+        .getString( "PrefPage_TextFormatsPreferencePage_id" );
 }

Modified: directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorPreferencePage.java?rev=691172&r1=691171&r2=691172&view=diff
==============================================================================
--- directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorPreferencePage.java
(original)
+++ directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorPreferencePage.java
Tue Sep  2 02:22:02 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.ldifeditor.dialogs.preferences;
 
 
-import org.apache.directory.studio.ldapbrowser.common.dialogs.preferences.TextFormatsPreferencePage;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
@@ -129,7 +128,7 @@
         {
             public void widgetSelected( SelectionEvent e )
             {
-                PreferencesUtil.createPreferenceDialogOn( getShell(), TextFormatsPreferencePage.class.getName(),
null,
+                PreferencesUtil.createPreferenceDialogOn( getShell(), LdifEditorConstants.PREFERENCEPAGEID_TEXTFORMATS,
null,
                     null ); //$NON-NLS-1$
             }
         } );

Modified: directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java?rev=691172&r1=691171&r2=691172&view=diff
==============================================================================
--- directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
(original)
+++ directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
Tue Sep  2 02:22:02 2008
@@ -338,8 +338,9 @@
         }
 
         // add Edit actions
-        addAction( menu, ITextEditorActionConstants.GROUP_EDIT, EditLdifAttributeAction.class.getName()
);
-        addAction( menu, ITextEditorActionConstants.GROUP_EDIT, OpenDefaultValueEditorAction.class.getName()
);
+        addAction( menu, ITextEditorActionConstants.GROUP_EDIT,
+            LdifEditorConstants.ACTION_ID_EDIT_ATTRIBUTE_DESCRIPTION );
+        addAction( menu, ITextEditorActionConstants.GROUP_EDIT, BrowserCommonConstants.ACTION_ID_EDIT_VALUE
);
 
         MenuManager valueEditorMenuManager = new MenuManager( "Edit Value With" );
         if ( this.openBestValueEditorAction.isEnabled() )
@@ -362,12 +363,12 @@
         valueEditorMenuManager.add( this.valueEditorPreferencesAction );
         menu.appendToGroup( ITextEditorActionConstants.GROUP_EDIT, valueEditorMenuManager
);
 
-        addAction( menu, ITextEditorActionConstants.GROUP_EDIT, EditLdifRecordAction.class.getName()
);
+        addAction( menu, ITextEditorActionConstants.GROUP_EDIT, LdifEditorConstants.ACTION_ID_EDIT_RECORD
);
 
         // add Format actions
         MenuManager formatMenuManager = new MenuManager( "Format" );
-        addAction( formatMenuManager, FormatLdifDocumentAction.class.getName() );
-        addAction( formatMenuManager, FormatLdifRecordAction.class.getName() );
+        addAction( formatMenuManager, LdifEditorConstants.ACTION_ID_FORMAT_LDIF_DOCUMENT
);
+        addAction( formatMenuManager, LdifEditorConstants.ACTION_ID_FORMAT_LDIF_RECORD );
         menu.appendToGroup( ITextEditorActionConstants.GROUP_EDIT, formatMenuManager );
     }
 
@@ -388,12 +389,12 @@
         // add execute action (for tool bar)
         ExecuteLdifAction executeLdifAction = new ExecuteLdifAction( this );
         actionToolBarManager.add( executeLdifAction );
-        setAction( ExecuteLdifAction.class.getName(), executeLdifAction );
+        setAction( LdifEditorConstants.ACTION_ID_EXECUTE_LDIF, executeLdifAction );
         actionToolBarManager.update( true );
 
         // add context menu edit actions
         EditLdifAttributeAction editLdifAttributeAction = new EditLdifAttributeAction( this
);
-        setAction( EditLdifAttributeAction.class.getName(), editLdifAttributeAction );
+        setAction( BrowserCommonConstants.ACTION_ID_EDIT_ATTRIBUTE_DESCRIPTION, editLdifAttributeAction
);
 
         openBestValueEditorAction = new OpenBestValueEditorAction( this );
         IValueEditor[] valueEditors = valueEditorManager.getAllValueEditors();
@@ -406,16 +407,16 @@
 
         OpenDefaultValueEditorAction openDefaultValueEditorAction = new OpenDefaultValueEditorAction(
this,
             openBestValueEditorAction );
-        setAction( OpenDefaultValueEditorAction.class.getName(), openDefaultValueEditorAction
);
+        setAction( BrowserCommonConstants.ACTION_ID_EDIT_VALUE, openDefaultValueEditorAction
);
 
         EditLdifRecordAction editRecordAction = new EditLdifRecordAction( this );
-        setAction( EditLdifRecordAction.class.getName(), editRecordAction );
+        setAction( LdifEditorConstants.ACTION_ID_EDIT_RECORD, editRecordAction );
 
         // add context menu format actions
         FormatLdifDocumentAction formatDocumentAction = new FormatLdifDocumentAction( this
);
-        setAction( FormatLdifDocumentAction.class.getName(), formatDocumentAction );
+        setAction( LdifEditorConstants.ACTION_ID_FORMAT_LDIF_DOCUMENT, formatDocumentAction
);
         FormatLdifRecordAction formatRecordAction = new FormatLdifRecordAction( this );
-        setAction( FormatLdifRecordAction.class.getName(), formatRecordAction );
+        setAction( LdifEditorConstants.ACTION_ID_FORMAT_LDIF_RECORD, formatRecordAction );
 
         // update cut, copy, paste
         IAction cutAction = getAction( ITextEditorActionConstants.CUT );
@@ -574,7 +575,7 @@
                     .getConnection().getName() ) );
         // getStatusField("ldapconnection").setText();
 
-        IAction action = getAction( ExecuteLdifAction.class.getName() );
+        IAction action = getAction( LdifEditorConstants.ACTION_ID_EXECUTE_LDIF );
         if ( action != null )
         {
             action.setEnabled( browserConnection == null );
@@ -849,11 +850,11 @@
      */
     public void activateGlobalActionHandlers()
     {
-        IAction elaa = getAction( EditLdifAttributeAction.class.getName() );
+        IAction elaa = getAction( BrowserCommonConstants.ACTION_ID_EDIT_ATTRIBUTE_DESCRIPTION
);
         ActionUtils.activateActionHandler( elaa );
-        IAction elva = getAction( OpenDefaultValueEditorAction.class.getName() );
+        IAction elva = getAction( BrowserCommonConstants.ACTION_ID_EDIT_VALUE );
         ActionUtils.activateActionHandler( elva );
-        IAction elra = getAction( EditLdifRecordAction.class.getName() );
+        IAction elra = getAction( LdifEditorConstants.ACTION_ID_EDIT_RECORD );
         ActionUtils.activateActionHandler( elra );
     }
 
@@ -863,11 +864,11 @@
      */
     public void deactivateGlobalActionHandlers()
     {
-        IAction elaa = getAction( EditLdifAttributeAction.class.getName() );
+        IAction elaa = getAction( BrowserCommonConstants.ACTION_ID_EDIT_ATTRIBUTE_DESCRIPTION
);
         ActionUtils.deactivateActionHandler( elaa );
-        IAction elva = getAction( OpenDefaultValueEditorAction.class.getName() );
+        IAction elva = getAction( BrowserCommonConstants.ACTION_ID_EDIT_VALUE );
         ActionUtils.deactivateActionHandler( elva );
-        IAction elra = getAction( EditLdifRecordAction.class.getName() );
+        IAction elra = getAction( LdifEditorConstants.ACTION_ID_EDIT_RECORD );
         ActionUtils.deactivateActionHandler( elra );
     }
 



Mime
View raw message