You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2008/09/01 13:58:43 UTC
svn commit: r690948 - in /directory/studio/trunk/apacheds: ./
src/main/java/org/apache/directory/studio/apacheds/
src/main/java/org/apache/directory/studio/apacheds/actions/
src/main/java/org/apache/directory/studio/apacheds/prefs/
Author: pamarcelot
Date: Mon Sep 1 04:58:42 2008
New Revision: 690948
URL: http://svn.apache.org/viewvc?rev=690948&view=rev
Log:
Part of a fix for DIRSTUDIO-375 (Move each plugin IDs in a plugin.properties file).
Modified:
directory/studio/trunk/apacheds/plugin.properties
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginConstants.java
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionAction.java
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/prefs/ServerLogsPage.java
Modified: directory/studio/trunk/apacheds/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/plugin.properties?rev=690948&r1=690947&r2=690948&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/plugin.properties (original)
+++ directory/studio/trunk/apacheds/plugin.properties Mon Sep 1 04:58:42 2008
@@ -73,3 +73,14 @@
Ctx_ServersView_id=org.apache.directory.studio.apacheds.contexts.serversView
Ctx_ServersView_name=In Servers View of Apache DS
Ctx_ServersView_description=In Servers View of Apache DS
+
+Plugin_ConnectionCore_id=org.apache.directory.studio.connection.core
+Plugin_ConnectionUi_id=org.apache.directory.studio.connection.ui
+Plugin_LdapBrowserCommon_id=org.apache.directory.studio.ldapbrowser.common
+Plugin_LdapBrowserCore_id=org.apache.directory.studio.ldapbrowser.core
+Plugin_LdapBrowserUi_id=org.apache.directory.studio.ldapbrowser.ui
+Plugin_LdifEditor_id=org.apache.directory.studio.ldifeditor
+Plugin_LdifParser_id=org.apache.directory.studio.ldifparser
+Plugin_Jars_id=org.apache.directory.studio.jars
+
+Perspective_LdapBrowserPerspective_id=org.apache.directory.studio.ldapbrowser.ui.perspective.BrowserPerspective
\ No newline at end of file
Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginConstants.java?rev=690948&r1=690947&r2=690948&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginConstants.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginConstants.java Mon Sep 1 04:58:42 2008
@@ -90,32 +90,32 @@
// PREFERENCES
// -----------
/** The Preference ID for the Colors and Font Debug Font setting */
- public static final String PREFS_COLORS_AND_FONTS_DEBUG_FONT = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.debugFont";
+ public static final String PREFS_COLORS_AND_FONTS_DEBUG_FONT = "prefs.colorAndFonts.debugFont";
/** The Preference ID for the Colors and Font Debug Color setting */
- public static final String PREFS_COLORS_AND_FONTS_DEBUG_COLOR = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.debugColor";
+ public static final String PREFS_COLORS_AND_FONTS_DEBUG_COLOR = "prefs.colorAndFonts.debugColor";
/** The Preference ID for the Colors and Font Info Font setting */
- public static final String PREFS_COLORS_AND_FONTS_INFO_FONT = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.infoFont";
+ public static final String PREFS_COLORS_AND_FONTS_INFO_FONT = "prefs.colorAndFonts.infoFont";
/** The Preference ID for the Colors and Font Info Color setting */
- public static final String PREFS_COLORS_AND_FONTS_INFO_COLOR = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.infoColor";
+ public static final String PREFS_COLORS_AND_FONTS_INFO_COLOR = "prefs.colorAndFonts.infoColor";
/** The Preference ID for the Colors and Font Warn Font setting */
- public static final String PREFS_COLORS_AND_FONTS_WARN_FONT = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.warnFont";
+ public static final String PREFS_COLORS_AND_FONTS_WARN_FONT = "prefs.colorAndFonts.warnFont";
/** The Preference ID for the Colors and Font Warn Color setting */
- public static final String PREFS_COLORS_AND_FONTS_WARN_COLOR = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.warnColor";
+ public static final String PREFS_COLORS_AND_FONTS_WARN_COLOR = "prefs.colorAndFonts.warnColor";
/** The Preference ID for the Colors and Font Error Font settings */
- public static final String PREFS_COLORS_AND_FONTS_ERROR_FONT = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.errorFont";
+ public static final String PREFS_COLORS_AND_FONTS_ERROR_FONT = "prefs.colorAndFonts.errorFont";
/** The Preference ID for the Colors and Font Error Color setting */
- public static final String PREFS_COLORS_AND_FONTS_ERROR_COLOR = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.errorColor";
+ public static final String PREFS_COLORS_AND_FONTS_ERROR_COLOR = "prefs.colorAndFonts.errorColor";
/** The Preference ID for the Colors and Font Fatal Font setting */
- public static final String PREFS_COLORS_AND_FONTS_FATAL_FONT = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.fatalFont";
+ public static final String PREFS_COLORS_AND_FONTS_FATAL_FONT = "prefs.colorAndFonts.fatalFont";
/** The Preference ID for the Colors and Font Fatal Color setting */
- public static final String PREFS_COLORS_AND_FONTS_FATAL_COLOR = "org.apache.directory.studio.apacheds.prefs.colorAndFonts.fatalColor";
+ public static final String PREFS_COLORS_AND_FONTS_FATAL_COLOR = "prefs.colorAndFonts.fatalColor";
/** The Preference ID for the Servers Logs Level setting */
- public static final String PREFS_SERVER_LOGS_LEVEL = "org.apache.directory.studio.apacheds.prefs.serverLogs.level";
+ public static final String PREFS_SERVER_LOGS_LEVEL = "prefs.serverLogs.level";
/** The Preference ID for the Servers Logs Level Debug value */
public static final String PREFS_SERVER_LOGS_LEVEL_DEBUG = "debug";
/** The Preference ID for the Servers Logs Level Info value */
@@ -128,5 +128,5 @@
public static final String PREFS_SERVER_LOGS_LEVEL_FATAL = "fatal";
/** The Preference ID for the Servers Logs Pattern setting */
- public static final String PREFS_SERVER_LOGS_PATTERN = "org.apache.directory.studio.apacheds.prefs.serverLogs.pattern";
+ public static final String PREFS_SERVER_LOGS_PATTERN = "prefs.serverLogs.pattern";
}
Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionAction.java?rev=690948&r1=690947&r2=690948&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionAction.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionAction.java Mon Sep 1 04:58:42 2008
@@ -23,6 +23,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+import java.util.PropertyResourceBundle;
import org.apache.directory.studio.apacheds.ApacheDsPlugin;
import org.apache.directory.studio.apacheds.ApacheDsPluginConstants;
@@ -228,8 +229,10 @@
*/
private boolean isLdapBrowserPluginsAvailable()
{
+ PropertyResourceBundle properties = ApacheDsPlugin.getDefault().getPluginProperties();
+
// Connection Core Plugin
- Bundle connectionCoreBundle = Platform.getBundle( "org.apache.directory.studio.connection.core" );
+ Bundle connectionCoreBundle = Platform.getBundle( properties.getString( "Plugin_ConnectionCore_id" ) );
if ( connectionCoreBundle != null )
{
// Checking the state of the plugin
@@ -239,7 +242,7 @@
}
// Connection UI Plugin
- Bundle connectionUiBundle = Platform.getBundle( "org.apache.directory.studio.connection.ui" );
+ Bundle connectionUiBundle = Platform.getBundle( properties.getString( "Plugin_ConnectionUi_id" ) );
if ( connectionUiBundle != null )
{
// Checking the state of the plugin
@@ -249,7 +252,7 @@
}
// LDAP Browser Common Plugin
- Bundle ldapBrowserCommonBundle = Platform.getBundle( "org.apache.directory.studio.ldapbrowser.common" );
+ Bundle ldapBrowserCommonBundle = Platform.getBundle( properties.getString( "Plugin_LdapBrowserCommon_id" ) );
if ( ldapBrowserCommonBundle != null )
{
// Checking the state of the plugin
@@ -259,7 +262,7 @@
}
// LDAP Browser Core Plugin
- Bundle ldapBrowserCoreBundle = Platform.getBundle( "org.apache.directory.studio.ldapbrowser.core" );
+ Bundle ldapBrowserCoreBundle = Platform.getBundle( properties.getString( "Plugin_LdapBrowserCore_id" ) );
if ( ldapBrowserCoreBundle != null )
{
// Checking the state of the plugin
@@ -269,7 +272,7 @@
}
// LDAP Browser UI Plugin
- Bundle ldapBrowserUiBundle = Platform.getBundle( "org.apache.directory.studio.ldapbrowser.ui" );
+ Bundle ldapBrowserUiBundle = Platform.getBundle(properties.getString( "Plugin_LdapBrowserUi_id" ) );
if ( ldapBrowserUiBundle != null )
{
// Checking the state of the plugin
@@ -279,7 +282,7 @@
}
// LDIF Editor Plugin
- Bundle ldifEditorBundle = Platform.getBundle( "org.apache.directory.studio.ldifeditor" );
+ Bundle ldifEditorBundle = Platform.getBundle( properties.getString( "Plugin_LdifEditor_id" ) );
if ( ldifEditorBundle != null )
{
// Checking the state of the plugin
@@ -289,7 +292,7 @@
}
// LDIF Parser Plugin
- Bundle ldifParserBundle = Platform.getBundle( "org.apache.directory.studio.ldifparser" );
+ Bundle ldifParserBundle = Platform.getBundle( properties.getString( "Plugin_LdifParser_id" ) );
if ( ldifParserBundle != null )
{
// Checking the state of the plugin
@@ -299,7 +302,7 @@
}
// Jars Plugin
- Bundle jarsBundle = Platform.getBundle( "org.apache.directory.studio.jars" );
+ Bundle jarsBundle = Platform.getBundle( properties.getString( "Plugin_Jars_id" ) );
if ( jarsBundle != null )
{
// Checking the state of the plugin
Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java?rev=690948&r1=690947&r2=690948&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/CreateConnectionActionHelper.java Mon Sep 1 04:58:42 2008
@@ -20,6 +20,7 @@
package org.apache.directory.studio.apacheds.actions;
+import org.apache.directory.studio.apacheds.ApacheDsPlugin;
import org.apache.directory.studio.apacheds.configuration.model.v153.ServerConfigurationV153;
import org.apache.directory.studio.connection.core.Connection;
import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
@@ -139,7 +140,7 @@
{
for ( IPerspectiveDescriptor perspective : PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives() )
{
- if ( "org.apache.directory.studio.ldapbrowser.ui.perspective.BrowserPerspective"
+ if ( ApacheDsPlugin.getDefault().getPluginProperties().getString( "Perspective_LdapBrowserPerspective_id" )
.equalsIgnoreCase( perspective.getId() ) )
{
return perspective;
Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/prefs/ServerLogsPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/prefs/ServerLogsPage.java?rev=690948&r1=690947&r2=690948&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/prefs/ServerLogsPage.java (original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/prefs/ServerLogsPage.java Mon Sep 1 04:58:42 2008
@@ -93,8 +93,8 @@
{
public void widgetSelected( SelectionEvent e )
{
- PreferencesUtil.createPreferenceDialogOn( getShell(),
- "org.apache.directory.studio.apacheds.ColorsAndFontsPage", null, null ); //$NON-NLS-1$
+ PreferencesUtil.createPreferenceDialogOn( getShell(), ApacheDsPlugin.getDefault().getPluginProperties()
+ .getString( "Pref_ColorsAndFontsPage_id" ), null, null ); //$NON-NLS-1$
}
} );