Index: src/org/eclipse/gmf/runtime/common/core/command/AbstractCommand.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.core/src/org/eclipse/gmf/runtime/common/core/command/AbstractCommand.java,v retrieving revision 1.2 diff -u -r1.2 AbstractCommand.java --- src/org/eclipse/gmf/runtime/common/core/command/AbstractCommand.java 12 Sep 2005 21:25:25 -0000 1.2 +++ src/org/eclipse/gmf/runtime/common/core/command/AbstractCommand.java 27 Oct 2005 16:11:11 -0000 @@ -22,7 +22,7 @@ import org.eclipse.gmf.runtime.common.core.internal.CommonCoreDebugOptions; import org.eclipse.gmf.runtime.common.core.internal.CommonCorePlugin; import org.eclipse.gmf.runtime.common.core.internal.CommonCoreStatusCodes; -import org.eclipse.gmf.runtime.common.core.internal.l10n.ResourceManager; +import org.eclipse.gmf.runtime.common.core.internal.l10n.CommonCoreMessages; import org.eclipse.gmf.runtime.common.core.util.Log; import org.eclipse.gmf.runtime.common.core.util.Trace; @@ -53,11 +53,6 @@ protected static final String EMPTY_STRING = ""; //$NON-NLS-1$ /** - * The status message for a cancelled command. - */ - protected static final String CANCELLED_MESSAGE = ResourceManager.getInstance().getString("AbstractCommand._INFO_.cancelOperation"); //$NON-NLS-1$ - - /** * The label for this command. */ private final String label; @@ -278,7 +273,7 @@ IStatus.ERROR, getPluginId(), CommonCoreStatusCodes.CANCELLED, - CANCELLED_MESSAGE, + CommonCoreMessages.AbstractCommand__INFO__cancelOperation, null), null); } Index: src/org/eclipse/gmf/runtime/common/core/command/CompositeCommand.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.core/src/org/eclipse/gmf/runtime/common/core/command/CompositeCommand.java,v retrieving revision 1.2 diff -u -r1.2 CompositeCommand.java --- src/org/eclipse/gmf/runtime/common/core/command/CompositeCommand.java 12 Sep 2005 21:25:25 -0000 1.2 +++ src/org/eclipse/gmf/runtime/common/core/command/CompositeCommand.java 27 Oct 2005 16:11:11 -0000 @@ -26,7 +26,7 @@ import org.eclipse.gmf.runtime.common.core.internal.CommonCorePlugin; import org.eclipse.gmf.runtime.common.core.internal.CommonCoreStatusCodes; -import org.eclipse.gmf.runtime.common.core.internal.l10n.ResourceManager; +import org.eclipse.gmf.runtime.common.core.internal.l10n.CommonCoreMessages; /** * A command that is composed of other @@ -53,12 +53,6 @@ protected static final String EMPTY_STRING = ""; //$NON-NLS-1$ /** - * The status message for a cancelled command. - */ - protected static final String CANCELLED_MESSAGE = ResourceManager - .getInstance().getString("AbstractCommand._INFO_.cancelOperation"); //$NON-NLS-1$ - - /** * The commands of which this composite command is composed. */ private final List commands = new ArrayList(); @@ -497,7 +491,7 @@ */ protected CommandResult newCancelledCommandResult() { return new CommandResult(new Status(IStatus.ERROR, getPluginId(), - CommonCoreStatusCodes.CANCELLED, CANCELLED_MESSAGE, null), null); + CommonCoreStatusCodes.CANCELLED, CommonCoreMessages.AbstractCommand__INFO__cancelOperation, null), null); } /** Index: src/org/eclipse/gmf/runtime/common/core/internal/CommonCorePlugin.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.core/src/org/eclipse/gmf/runtime/common/core/internal/CommonCorePlugin.java,v retrieving revision 1.2 diff -u -r1.2 CommonCorePlugin.java --- src/org/eclipse/gmf/runtime/common/core/internal/CommonCorePlugin.java 12 Sep 2005 21:25:25 -0000 1.2 +++ src/org/eclipse/gmf/runtime/common/core/internal/CommonCorePlugin.java 27 Oct 2005 16:11:11 -0000 @@ -17,8 +17,6 @@ import org.eclipse.core.runtime.ILogListener; import org.eclipse.core.runtime.Platform; -import org.eclipse.gmf.runtime.common.core.internal.l10n.ResourceManager; -import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager; import org.eclipse.gmf.runtime.common.core.plugin.XToolsPlugin; /** @@ -79,17 +77,6 @@ } /** - * Retrieves the resource manager for this plug-in. - * - * @return The resource manager for this plug-in. - * - * @see org.eclipse.gmf.runtime.common.core.plugin.XToolsPlugin#getResourceManager() - */ - public AbstractResourceManager getResourceManager() { - return ResourceManager.getInstance(); - } - - /** * Starts up this plug-in. */ protected void doStartup() { Index: src/org/eclipse/gmf/runtime/common/core/internal/l10n/messages.properties =================================================================== RCS file: src/org/eclipse/gmf/runtime/common/core/internal/l10n/messages.properties diff -N src/org/eclipse/gmf/runtime/common/core/internal/l10n/messages.properties --- src/org/eclipse/gmf/runtime/common/core/internal/l10n/messages.properties 12 Sep 2005 21:25:25 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,71 +0,0 @@ -# ============================================================================== -#*+------------------------------------------------------------------------+ -#*| Copyright (c) 2005 IBM Corporation and others. | -#*| All rights reserved. This program and the accompanying materials | -#*| are made available under the terms of the Eclipse Public License v1.0 | -#*| which accompanies this distribution, and is available at | -#*| http://www.eclipse.org/legal/epl-v10.html | -#*| | -#*| Contributors: | -#*| IBM Corporation - initial API and implementation | -#*+------------------------------------------------------------------------+ -# ============================================================================== -# Error message used when startup of a plug-in fails. -# {0} = Plugin name -XToolsPlugin._ERROR_.startupErrorMessage= IRJA0278E Error starting up {0} plug-in -# Error message used when shutdown of a plug-in fails. -# {0} = Plugin name -XToolsPlugin._ERROR_.shutdownErrorMessage= IRJA0279E Error shutting down {0} plug-in - -# Location message to display in a dialog box -ComboDirectoryFieldEditor.SpecifyLocation.label=Specify the location: -# The text on a button -ComboDirectoryFieldEditor.BrowseButton.label=Browse... - -# Error message used when a command is cancelled -AbstractCommand._INFO_.cancelOperation = IRJA0280I The operation has been cancelled. - -# --------------------------------------------------------------------- -# Resources used by the AbstractResourceManager class -# for formatting lists of items. -# --------------------------------------------------------------------- - -# The text that typically appears between items in a list. -# *** note the trailing space. *** -list.separator= , - -# The text that typically appears between a pair of items (i.e., when there is -# only one separator). -# *** note the leading and trailing spaces. *** -list.separator.only= \ and - -# The first separator in a list, when the list has more than two items. -# *** note the trailing space. *** -list.separator.first= , - -# The last separator in a list, when the list has more than two items. -# *** note the trailing space. *** -list.separator.last= , and - -# These two items are text that should precede and follow any list of more than -# two items. -# The prefix and suffix are not defined for English locales. -list.prefix= -list.suffix= - - -# Used in log and trace statements for invalid XML. -# {0} = Declaring XML extension name (followed by) ':' (followed by) XML element name -NavigatorCategoryDescriptor._ERROR_.invalidXML= IRJA0281E Invalid XML element ({0}). -NavigatorContentTypeDescriptor._ERROR_.invalidXML= IRJA0282E Invalid XML element ({0}). - -# Read only file management -# {0} = String describing the reason for editing the file -FileModificationValidator.EditProblemDialogTitle={0} Problems -# {0} = String describing the reason for editing the file -FileModificationValidator.EditProblemDialogMessage.part1={0} could not be completed. -FileModificationValidator.EditProblemDialogMessage.part2=Reason -# {0} = String describing the why file could not be edited -FileModificationValidator.EditProblemDialogMessage.part3={0} - -FileModificationValidator.EditProblemDialogMessage.workspace=File is not in the active workspace. Index: src/org/eclipse/gmf/runtime/common/core/l10n/AbstractResourceManager.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.core/src/org/eclipse/gmf/runtime/common/core/l10n/AbstractResourceManager.java,v retrieving revision 1.3 diff -u -r1.3 AbstractResourceManager.java --- src/org/eclipse/gmf/runtime/common/core/l10n/AbstractResourceManager.java 12 Oct 2005 20:55:20 -0000 1.3 +++ src/org/eclipse/gmf/runtime/common/core/l10n/AbstractResourceManager.java 27 Oct 2005 16:11:12 -0000 @@ -24,6 +24,7 @@ import org.eclipse.gmf.runtime.common.core.internal.CommonCorePlugin; import org.eclipse.gmf.runtime.common.core.internal.CommonCoreStatusCodes; import org.eclipse.gmf.runtime.common.core.internal.l10n.ResourceManager; +//import org.eclipse.gmf.runtime.common.core.internal.l10n.ResourceManager; import org.eclipse.gmf.runtime.common.core.util.Log; import org.eclipse.gmf.runtime.common.core.util.StringStatics; import org.eclipse.gmf.runtime.common.core.util.Trace; @@ -90,6 +91,7 @@ * @see java.util.ResourceBundle * @author Natalia Balaba * @canBeSeenBy %partners + * @deprecated */ public abstract class AbstractResourceManager { @@ -320,7 +322,7 @@ Trace.catching( getPlugin(), CommonCoreDebugOptions.EXCEPTIONS_CATCHING, - ResourceManager.class, + AbstractResourceManager.class, "messageFormat", //$NON-NLS-1$ e); Index: src/org/eclipse/gmf/runtime/common/core/plugin/XToolsPlugin.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.core/src/org/eclipse/gmf/runtime/common/core/plugin/XToolsPlugin.java,v retrieving revision 1.2 diff -u -r1.2 XToolsPlugin.java --- src/org/eclipse/gmf/runtime/common/core/plugin/XToolsPlugin.java 12 Sep 2005 21:25:25 -0000 1.2 +++ src/org/eclipse/gmf/runtime/common/core/plugin/XToolsPlugin.java 27 Oct 2005 16:11:12 -0000 @@ -23,7 +23,7 @@ import org.eclipse.gmf.runtime.common.core.internal.CommonCoreDebugOptions; import org.eclipse.gmf.runtime.common.core.internal.CommonCorePlugin; import org.eclipse.gmf.runtime.common.core.internal.CommonCoreStatusCodes; -import org.eclipse.gmf.runtime.common.core.internal.l10n.ResourceManager; +import org.eclipse.gmf.runtime.common.core.internal.l10n.CommonCoreMessages; import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager; import org.eclipse.gmf.runtime.common.core.util.Log; import org.eclipse.gmf.runtime.common.core.util.Trace; @@ -34,22 +34,10 @@ * @author khussey * @canBeSeenBy %partners */ -public abstract class XToolsPlugin +public class XToolsPlugin extends Plugin { /** - * Error message used when startup of a plug-in fails. - */ - protected static final String STARTUP_ERROR_MESSAGE = ResourceManager - .getI18NString("XToolsPlugin._ERROR_.startupErrorMessage"); //$NON-NLS-1$ - - /** - * Error message used when shutdown of a plug-in fails. - */ - protected static final String SHUTDOWN_ERROR_MESSAGE = ResourceManager - .getI18NString("XToolsPlugin._ERROR_.shutdownErrorMessage"); //$NON-NLS-1$ - - /** * Creates a new plug-in runtime object. */ protected XToolsPlugin() { @@ -73,7 +61,9 @@ * * @return A resource manager instance for this plug-in. */ - public abstract AbstractResourceManager getResourceManager(); + public AbstractResourceManager getResourceManager() { + return null; + } /** * Starts up this plug-in. @@ -98,7 +88,7 @@ * The name of this plug-in. */ protected String getStartupErrorMessage(String pluginName) { - return MessageFormat.format(STARTUP_ERROR_MESSAGE, + return MessageFormat.format(CommonCoreMessages.XToolsPlugin__ERROR__startupErrorMessage, new Object[] {pluginName}); } @@ -111,7 +101,7 @@ * The name of this plug-in. */ protected String getShutdownErrorMessage(String pluginName) { - return MessageFormat.format(SHUTDOWN_ERROR_MESSAGE, + return MessageFormat.format(CommonCoreMessages.XToolsPlugin__ERROR__shutdownErrorMessage, new Object[] {pluginName}); } Index: src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.java =================================================================== RCS file: src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.java diff -N src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.gmf.runtime.common.core.internal.l10n; + +import org.eclipse.osgi.util.NLS; + +public final class CommonCoreMessages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.gmf.runtime.common.core.internal.l10n.CommonCoreMessages";//$NON-NLS-1$ + + private CommonCoreMessages() { + // Do not instantiate + } + + public static String XToolsPlugin__ERROR__startupErrorMessage; + public static String XToolsPlugin__ERROR__shutdownErrorMessage; + public static String ComboDirectoryFieldEditor_SpecifyLocation_label; + public static String ComboDirectoryFieldEditor_BrowseButton_label; + public static String AbstractCommand__INFO__cancelOperation; + public static String list_separator; + public static String list_separator_only; + public static String list_separator_first; + public static String list_separator_last; + public static String list_prefix; + public static String list_suffix; + public static String NavigatorCategoryDescriptor__ERROR__invalidXML; + public static String NavigatorContentTypeDescriptor__ERROR__invalidXML; + public static String FileModificationValidator_EditProblemDialogTitle; + public static String FileModificationValidator_EditProblemDialogMessage_part1; + public static String FileModificationValidator_EditProblemDialogMessage_part2; + public static String FileModificationValidator_EditProblemDialogMessage_part3; + public static String FileModificationValidator_EditProblemDialogMessage_workspace; + + static { + NLS.initializeMessages(BUNDLE_NAME, CommonCoreMessages.class); + } +} Index: src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.properties =================================================================== RCS file: src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.properties diff -N src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/gmf/runtime/common/core/internal/l10n/CommonCoreMessages.properties 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,71 @@ +# ============================================================================== +#*+------------------------------------------------------------------------+ +#*| Copyright (c) 2005 IBM Corporation and others. | +#*| All rights reserved. This program and the accompanying materials | +#*| are made available under the terms of the Eclipse Public License v1.0 | +#*| which accompanies this distribution, and is available at | +#*| http://www.eclipse.org/legal/epl-v10.html | +#*| | +#*| Contributors: | +#*| IBM Corporation - initial API and implementation | +#*+------------------------------------------------------------------------+ +# ============================================================================== +# Error message used when startup of a plug-in fails. +# {0} = Plugin name +XToolsPlugin__ERROR__startupErrorMessage= IRJA0278E Error starting up {0} plug-in +# Error message used when shutdown of a plug-in fails. +# {0} = Plugin name +XToolsPlugin__ERROR__shutdownErrorMessage= IRJA0279E Error shutting down {0} plug-in + +# Location message to display in a dialog box +ComboDirectoryFieldEditor_SpecifyLocation_label=Specify the location: +# The text on a button +ComboDirectoryFieldEditor_BrowseButton_label=Browse... + +# Error message used when a command is cancelled +AbstractCommand__INFO__cancelOperation = IRJA0280I The operation has been cancelled. + +# --------------------------------------------------------------------- +# Resources used by the AbstractResourceManager class +# for formatting lists of items. +# --------------------------------------------------------------------- + +# The text that typically appears between items in a list. +# *** note the trailing space. *** +list_separator= , + +# The text that typically appears between a pair of items (i.e., when there is +# only one separator). +# *** note the leading and trailing spaces. *** +list_separator_only= \ and + +# The first separator in a list, when the list has more than two items. +# *** note the trailing space. *** +list_separator_first= , + +# The last separator in a list, when the list has more than two items. +# *** note the trailing space. *** +list_separator_last= , and + +# These two items are text that should precede and follow any list of more than +# two items. +# The prefix and suffix are not defined for English locales. +list_prefix= +list_suffix= + + +# Used in log and trace statements for invalid XML. +# {0} = Declaring XML extension name (followed by) ':' (followed by) XML element name +NavigatorCategoryDescriptor__ERROR__invalidXML= IRJA0281E Invalid XML element ({0}). +NavigatorContentTypeDescriptor__ERROR__invalidXML= IRJA0282E Invalid XML element ({0}). + +# Read only file management +# {0} = String describing the reason for editing the file +FileModificationValidator_EditProblemDialogTitle={0} Problems +# {0} = String describing the reason for editing the file +FileModificationValidator_EditProblemDialogMessage_part1={0} could not be completed. +FileModificationValidator_EditProblemDialogMessage_part2=Reason +# {0} = String describing the why file could not be edited +FileModificationValidator_EditProblemDialogMessage_part3={0} + +FileModificationValidator_EditProblemDialogMessage_workspace=File is not in the active workspace.