diff options
author | david_williams | 2004-12-08 23:26:56 +0000 |
---|---|---|
committer | david_williams | 2004-12-08 23:26:56 +0000 |
commit | 455e217a54ac165c535801e26fbb5f00a284a767 (patch) | |
tree | f4fca5f07e9938dd5fa5ef2d28dbd4eb977c8a6b /bundles/org.eclipse.wst.css.ui/src | |
parent | 9c082e5ad14ccbc4c895e5c5b4a4d2503e6a2c28 (diff) | |
download | webtools.sourceediting-455e217a54ac165c535801e26fbb5f00a284a767.tar.gz webtools.sourceediting-455e217a54ac165c535801e26fbb5f00a284a767.tar.xz webtools.sourceediting-455e217a54ac165c535801e26fbb5f00a284a767.zip |
[80517] properties related changes
Diffstat (limited to 'bundles/org.eclipse.wst.css.ui/src')
16 files changed, 140 insertions, 192 deletions
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java index 3f6861c093..66ed713a36 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java @@ -22,7 +22,7 @@ import org.eclipse.ui.texteditor.RetargetTextEditorAction; import org.eclipse.wst.sse.ui.edit.util.ActionContributor; import org.eclipse.wst.sse.ui.edit.util.ActionDefinitionIds; import org.eclipse.wst.sse.ui.edit.util.StructuredTextEditorActionConstants; -import org.eclipse.wst.sse.ui.nls.ResourceHandler; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; /** * ActionContributorCSS @@ -49,7 +49,7 @@ public class ActionContributorCSS extends ActionContributor { public ActionContributorCSS() { super(); - ResourceBundle resourceBundle = ResourceHandler.getResourceBundle(); + ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle(); // edit commands fContentAssist = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$ @@ -65,7 +65,7 @@ public class ActionContributorCSS extends ActionContributor { fFormatActiveElements = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$ fFormatActiveElements.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS); - fFormatMenu = new MenuManager(ResourceHandler.getString("FormatMenu.label")); //$NON-NLS-1$ + fFormatMenu = new MenuManager(SSEUIPlugin.getResourceString("%FormatMenu.label")); //$NON-NLS-1$ fFormatMenu.add(fFormatDocument); fFormatMenu.add(fFormatActiveElements); } @@ -88,7 +88,7 @@ public class ActionContributorCSS extends ActionContributor { } // source commands - String sourceMenuLabel = ResourceHandler.getString("SourceMenu.label"); //$NON-NLS-1$ + String sourceMenuLabel = SSEUIPlugin.getResourceString("%SourceMenu.label"); //$NON-NLS-1$ String sourceMenuId = "sourceMenuId"; // This is just a menu id. No // need to translate. // //$NON-NLS-1$ diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java index a929d5376d..4757c8ab18 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java @@ -12,25 +12,25 @@ import java.util.ResourceBundle; import org.eclipse.jface.action.Action; import org.eclipse.wst.css.ui.edit.ui.CleanupActionCSS; +import org.eclipse.wst.css.ui.internal.CSSUIPlugin; import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds; -import org.eclipse.wst.css.ui.internal.nls.ResourceHandler; import org.eclipse.wst.css.ui.internal.selection.StructureSelectEnclosingCSSAction; import org.eclipse.wst.css.ui.internal.selection.StructureSelectNextCSSAction; import org.eclipse.wst.css.ui.internal.selection.StructureSelectPreviousCSSAction; import org.eclipse.wst.sse.ui.StructuredTextEditor; import org.eclipse.wst.sse.ui.edit.util.ActionDefinitionIds; import org.eclipse.wst.sse.ui.edit.util.StructuredTextEditorActionConstants; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory; import org.eclipse.wst.sse.ui.internal.selection.StructureSelectHistoryAction; - public class StructuredTextEditorCSS extends StructuredTextEditor { protected void createActions() { super.createActions(); - ResourceBundle resourceBundle = ResourceHandler.getResourceBundle(); + ResourceBundle resourceBundle = CSSUIPlugin.getDefault().getResourceBundle(); - Action action = new CleanupActionCSS(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + DOT, this); + Action action = new CleanupActionCSS(SSEUIPlugin.getDefault().getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + DOT, this); action.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT); setAction(StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT, action); diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java index 97638179f1..8862b955eb 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java @@ -13,10 +13,10 @@ import java.util.Iterator; import org.eclipse.wst.css.core.metamodel.CSSProfile; import org.eclipse.wst.css.core.metamodel.CSSProfileRegistry; import org.eclipse.wst.sse.ui.contentproperties.ui.ComboList; -import org.eclipse.wst.sse.ui.nls.ResourceHandler; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; public final class ContentSettingsRegistry { - private static final String NONE = ResourceHandler.getString("UI_none"); //$NON-NLS-1$ + private static final String NONE = SSEUIPlugin.getResourceString("%UI_none"); //$NON-NLS-1$ public static void setCSSMetaModelRegistryInto(ComboList combo) { combo.add(NONE, ""); //$NON-NLS-1$ diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java index bb901ea12c..6f2a6ae1df 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java @@ -8,8 +8,6 @@ ****************************************************************************/ package org.eclipse.wst.css.ui.edit.ui; - - import org.eclipse.jface.dialogs.Dialog; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridLayout; @@ -22,7 +20,7 @@ import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategy; import org.eclipse.wst.css.core.cleanup.CSSCleanupStrategyImpl; import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds; -import org.eclipse.wst.sse.ui.nls.ResourceHandler; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; public class CleanupDialogCSS extends Dialog { @@ -60,9 +58,9 @@ public class CleanupDialogCSS extends Dialog { */ public Control createDialogArea(Composite parent) { if (isEmbeddedCSS()) - getShell().setText(ResourceHandler.getString("CSS_Cleanup_UI_")); //$NON-NLS-1$ = "CSS Cleanup" + getShell().setText(SSEUIPlugin.getResourceString("%CSS_Cleanup_UI_")); //$NON-NLS-1$ = "CSS Cleanup" else - getShell().setText(ResourceHandler.getString("Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup" + getShell().setText(SSEUIPlugin.getResourceString("%Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup" Composite panel = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); @@ -79,16 +77,16 @@ public class CleanupDialogCSS extends Dialog { // //$NON-NLS-1$ = "Identifier case:" // Canvas identCase = new Canvas(panel, SWT.NULL); Group identCase = new Group(panel, SWT.NULL); - identCase.setText(ResourceHandler.getString("Identifier_case__UI_")); //$NON-NLS-1$ = "Identifier case:" + identCase.setText(SSEUIPlugin.getResourceString("%Identifier_case__UI_")); //$NON-NLS-1$ = "Identifier case:" GridLayout hLayout = new GridLayout(); hLayout.numColumns = 3; identCase.setLayout(hLayout); fRadioButtonIdentCaseAsis = new Button(identCase, SWT.RADIO); - fRadioButtonIdentCaseAsis.setText(ResourceHandler.getString("As-is_UI_")); //$NON-NLS-1$ = "As-is" + fRadioButtonIdentCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is" fRadioButtonIdentCaseLower = new Button(identCase, SWT.RADIO); - fRadioButtonIdentCaseLower.setText(ResourceHandler.getString("Lower_UI_")); //$NON-NLS-1$ = "Lower" + fRadioButtonIdentCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower" fRadioButtonIdentCaseUpper = new Button(identCase, SWT.RADIO); - fRadioButtonIdentCaseUpper.setText(ResourceHandler.getString("Upper_UI_")); //$NON-NLS-1$ = "Upper" + fRadioButtonIdentCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper" // Convert property name case // ACC: Group radio buttons together so associated label is read @@ -97,16 +95,16 @@ public class CleanupDialogCSS extends Dialog { // //$NON-NLS-1$ = "Property name case:" // Canvas propNameCase = new Canvas(panel, SWT.NULL); Group propNameCase = new Group(panel, SWT.NULL); - propNameCase.setText(ResourceHandler.getString("Property_name_case__UI_")); //$NON-NLS-1$ = "Property name case:" + propNameCase.setText(SSEUIPlugin.getResourceString("%Property_name_case__UI_")); //$NON-NLS-1$ = "Property name case:" hLayout = new GridLayout(); hLayout.numColumns = 3; propNameCase.setLayout(hLayout); fRadioButtonPropNameCaseAsis = new Button(propNameCase, SWT.RADIO); - fRadioButtonPropNameCaseAsis.setText(ResourceHandler.getString("As-is_UI_")); //$NON-NLS-1$ = "As-is" + fRadioButtonPropNameCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is" fRadioButtonPropNameCaseLower = new Button(propNameCase, SWT.RADIO); - fRadioButtonPropNameCaseLower.setText(ResourceHandler.getString("Lower_UI_")); //$NON-NLS-1$ = "Lower" + fRadioButtonPropNameCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower" fRadioButtonPropNameCaseUpper = new Button(propNameCase, SWT.RADIO); - fRadioButtonPropNameCaseUpper.setText(ResourceHandler.getString("Upper_UI_")); //$NON-NLS-1$ = "Upper" + fRadioButtonPropNameCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper" // Convert property Value case // ACC: Group radio buttons together so associated label is read @@ -115,16 +113,16 @@ public class CleanupDialogCSS extends Dialog { // //$NON-NLS-1$ = "Property value case:" // Canvas propValueCase = new Canvas(panel, SWT.NULL); Group propValueCase = new Group(panel, SWT.NULL); - propValueCase.setText(ResourceHandler.getString("Property_value_case__UI_")); //$NON-NLS-1$ = "Property value case:" + propValueCase.setText(SSEUIPlugin.getResourceString("%Property_value_case__UI_")); //$NON-NLS-1$ = "Property value case:" hLayout = new GridLayout(); hLayout.numColumns = 3; propValueCase.setLayout(hLayout); fRadioButtonPropValueCaseAsis = new Button(propValueCase, SWT.RADIO); - fRadioButtonPropValueCaseAsis.setText(ResourceHandler.getString("As-is_UI_")); //$NON-NLS-1$ = "As-is" + fRadioButtonPropValueCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is" fRadioButtonPropValueCaseLower = new Button(propValueCase, SWT.RADIO); - fRadioButtonPropValueCaseLower.setText(ResourceHandler.getString("Lower_UI_")); //$NON-NLS-1$ = "Lower" + fRadioButtonPropValueCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower" fRadioButtonPropValueCaseUpper = new Button(propValueCase, SWT.RADIO); - fRadioButtonPropValueCaseUpper.setText(ResourceHandler.getString("Upper_UI_")); //$NON-NLS-1$ = "Upper" + fRadioButtonPropValueCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper" if (!isEmbeddedCSS()) { // Convert selector tag case @@ -134,26 +132,26 @@ public class CleanupDialogCSS extends Dialog { // //$NON-NLS-1$ = "Selector tag name case:" // Canvas selectorTagCase = new Canvas(panel, SWT.NULL); Group selectorTagCase = new Group(panel, SWT.NULL); - selectorTagCase.setText(ResourceHandler.getString("Selector_tag_name_case__UI_")); //$NON-NLS-1$ = "Selector tag name case:" + selectorTagCase.setText(SSEUIPlugin.getResourceString("%Selector_tag_name_case__UI_")); //$NON-NLS-1$ = "Selector tag name case:" hLayout = new GridLayout(); hLayout.numColumns = 3; selectorTagCase.setLayout(hLayout); fRadioButtonSelectorTagCaseAsis = new Button(selectorTagCase, SWT.RADIO); - fRadioButtonSelectorTagCaseAsis.setText(ResourceHandler.getString("As-is_UI_")); //$NON-NLS-1$ = "As-is" + fRadioButtonSelectorTagCaseAsis.setText(SSEUIPlugin.getResourceString("%As-is_UI_")); //$NON-NLS-1$ = "As-is" fRadioButtonSelectorTagCaseLower = new Button(selectorTagCase, SWT.RADIO); - fRadioButtonSelectorTagCaseLower.setText(ResourceHandler.getString("Lower_UI_")); //$NON-NLS-1$ = "Lower" + fRadioButtonSelectorTagCaseLower.setText(SSEUIPlugin.getResourceString("%Lower_UI_")); //$NON-NLS-1$ = "Lower" fRadioButtonSelectorTagCaseUpper = new Button(selectorTagCase, SWT.RADIO); - fRadioButtonSelectorTagCaseUpper.setText(ResourceHandler.getString("Upper_UI_")); //$NON-NLS-1$ = "Upper" + fRadioButtonSelectorTagCaseUpper.setText(SSEUIPlugin.getResourceString("%Upper_UI_")); //$NON-NLS-1$ = "Upper" } // Quote attribute values fCheckBoxQuoteValues = new Button(panel, SWT.CHECK); - fCheckBoxQuoteValues.setText(ResourceHandler.getString("Quote_values_UI_")); //$NON-NLS-1$ = "Quote values" + fCheckBoxQuoteValues.setText(SSEUIPlugin.getResourceString("%Quote_values_UI_")); //$NON-NLS-1$ = "Quote values" if (!isEmbeddedCSS()) { // Format source fCheckBoxFormatSource = new Button(panel, SWT.CHECK); - fCheckBoxFormatSource.setText(ResourceHandler.getString("Format_source_UI_")); //$NON-NLS-1$ = "Format source" + fCheckBoxFormatSource.setText(SSEUIPlugin.getResourceString("%Format_source_UI_")); //$NON-NLS-1$ = "Format source" } setCleanupOptions(); diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java index 9dc08fe286..ee42ad7154 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.wst.css.ui.internal; +import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; @@ -19,11 +20,10 @@ import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier; import org.eclipse.wst.css.ui.style.IStyleConstantsCSS; -import org.eclipse.wst.sse.ui.EditorPlugin; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator; import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper; - /** * The main plugin class to be used in the desktop. */ @@ -33,6 +33,8 @@ public class CSSUIPlugin extends AbstractUIPlugin { private static CSSUIPlugin plugin; //Resource bundle. private ResourceBundle resourceBundle; + private static final String KEY_PREFIX = "%"; //$NON-NLS-1$ + private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$ /** * The constructor. @@ -40,16 +42,11 @@ public class CSSUIPlugin extends AbstractUIPlugin { public CSSUIPlugin() { super(); plugin = this; - try { - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.css.ui.CSSEditorPluginResources"); //$NON-NLS-1$ - } catch (MissingResourceException x) { - resourceBundle = null; - } // Force a call to initialize default preferences since // initializeDefaultPreferences is only called if *this* plugin's // preference store is accessed - initializeDefaultCSSPreferences(EditorPlugin.getDefault().getPreferenceStore()); + initializeDefaultCSSPreferences(SSEUIPlugin.getDefault().getPreferenceStore()); } /** @@ -66,31 +63,11 @@ public class CSSUIPlugin extends AbstractUIPlugin { return ResourcesPlugin.getWorkspace(); } - /** - * Returns the string from the plugin's resource bundle, or 'key' if not - * found. - */ - public static String getResourceString(String key) { - ResourceBundle bundle = CSSUIPlugin.getDefault().getResourceBundle(); - try { - return bundle.getString(key); - } catch (MissingResourceException e) { - return key; - } - } - - /** - * Returns the plugin's resource bundle, - */ - public ResourceBundle getResourceBundle() { - return resourceBundle; - } - protected void initializeDefaultPreferences(IPreferenceStore store) { // ignore this preference store // use EditorPlugin preference store - IPreferenceStore editorStore = EditorPlugin.getDefault().getPreferenceStore(); + IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore(); initializeDefaultCSSPreferences(editorStore); } @@ -128,4 +105,49 @@ public class CSSUIPlugin extends AbstractUIPlugin { styleValue = ColorHelper.getColorString(191, 63, 63) + NOBACKGROUNDBOLD; store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsCSS.ERROR, ctId), styleValue); } + + /** + * Returns the string from the plugin's resource bundle, + * or 'key' if not found. + */ + public static String getResourceString(String value) { + String s = value.trim(); + if (!s.startsWith(KEY_PREFIX, 0)) + return s; + if (s.startsWith(KEY_DOUBLE_PREFIX, 0)) + return s.substring(1); + + int ix = s.indexOf(' '); + String key = ix == -1 ? s : s.substring(0, ix); + + ResourceBundle bundle = getDefault().getResourceBundle(); + try { + return (bundle != null) ? bundle.getString(key.substring(1)) : key; + } catch (MissingResourceException e) { + return key; + } + } + + public static String getResourceString(String key, Object[] args) { + + try { + return MessageFormat.format(getResourceString(key), args); + } catch (IllegalArgumentException e) { + return getResourceString(key); + } + + } + + /** + * Returns the plugin's resource bundle, + */ + public ResourceBundle getResourceBundle() { + try { + if (resourceBundle == null) + resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.css.ui.internal.CSSUIPluginResources"); + } catch (MissingResourceException x) { + resourceBundle = null; + } + return resourceBundle; + } } diff --git a/bundles/org.eclipse.wst.css.ui/src/EditingCSS.properties b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties index 2fa1626e12..2fa1626e12 100644 --- a/bundles/org.eclipse.wst.css.ui/src/EditingCSS.properties +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/nls/ResourceHandler.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/nls/ResourceHandler.java deleted file mode 100644 index a14f3f636b..0000000000 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/nls/ResourceHandler.java +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2004 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.wst.css.ui.internal.nls; - - - -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -public class ResourceHandler { - - - private static ResourceBundle fgResourceBundle; - - /** - * Returns the resource bundle used by all classes in this Project - */ - public static ResourceBundle getResourceBundle() { - try { - return ResourceBundle.getBundle("EditingCSS");//$NON-NLS-1$ - } catch (MissingResourceException e) { - // does nothing - this method will return null and - // getString(String) will return the key - // it was called with - } - return null; - } - - public static String getString(String key) { - if (fgResourceBundle == null) { - fgResourceBundle = getResourceBundle(); - } - - if (fgResourceBundle != null) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$ - } - } else { - return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$ - } - } - - public static String getString(String key, Object[] args) { - - try { - return MessageFormat.format(getString(key), args); - } catch (IllegalArgumentException e) { - return getString(key); - } - - } - - public static String getString(String key, Object[] args, int x) { - - return getString(key); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java index 62b67c2583..e6b2dde1f5 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java @@ -12,16 +12,16 @@ import org.eclipse.jface.text.Region; import org.eclipse.wst.css.core.document.ICSSNode; import org.eclipse.wst.sse.core.IndexedRegion; import org.eclipse.wst.sse.ui.StructuredTextEditor; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory; -import org.eclipse.wst.sse.ui.nls.ResourceHandler; import org.w3c.dom.Node; public class StructureSelectEnclosingCSSAction extends StructureSelectCSSAction { public StructureSelectEnclosingCSSAction(StructuredTextEditor editor, SelectionHistory history) { super(editor, history); - setText(ResourceHandler.getString("StructureSelectEnclosing.label")); //$NON-NLS-1$ - setToolTipText(ResourceHandler.getString("StructureSelectEnclosing.tooltip")); //$NON-NLS-1$ - setDescription(ResourceHandler.getString("StructureSelectEnclosing.description")); //$NON-NLS-1$ + setText(SSEUIPlugin.getResourceString("%StructureSelectEnclosing.label")); //$NON-NLS-1$ + setToolTipText(SSEUIPlugin.getResourceString("%StructureSelectEnclosing.tooltip")); //$NON-NLS-1$ + setDescription(SSEUIPlugin.getResourceString("%StructureSelectEnclosing.description")); //$NON-NLS-1$ } protected IndexedRegion getCursorIndexedRegion() { diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java index 7e469265ec..acd37156c5 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java @@ -12,16 +12,16 @@ import org.eclipse.jface.text.Region; import org.eclipse.wst.css.core.document.ICSSNode; import org.eclipse.wst.sse.core.IndexedRegion; import org.eclipse.wst.sse.ui.StructuredTextEditor; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory; -import org.eclipse.wst.sse.ui.nls.ResourceHandler; import org.w3c.dom.Node; public class StructureSelectNextCSSAction extends StructureSelectCSSAction { public StructureSelectNextCSSAction(StructuredTextEditor editor, SelectionHistory history) { super(editor, history); - setText(ResourceHandler.getString("StructureSelectNext.label")); //$NON-NLS-1$ - setToolTipText(ResourceHandler.getString("StructureSelectNext.tooltip")); //$NON-NLS-1$ - setDescription(ResourceHandler.getString("StructureSelectNext.description")); //$NON-NLS-1$ + setText(SSEUIPlugin.getResourceString("%StructureSelectNext.label")); //$NON-NLS-1$ + setToolTipText(SSEUIPlugin.getResourceString("%StructureSelectNext.tooltip")); //$NON-NLS-1$ + setDescription(SSEUIPlugin.getResourceString("%StructureSelectNext.description")); //$NON-NLS-1$ } protected IndexedRegion getCursorIndexedRegion() { diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java index 762eb0b6a4..91b001dd8a 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java @@ -12,16 +12,16 @@ import org.eclipse.jface.text.Region; import org.eclipse.wst.css.core.document.ICSSNode; import org.eclipse.wst.sse.core.IndexedRegion; import org.eclipse.wst.sse.ui.StructuredTextEditor; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.internal.selection.SelectionHistory; -import org.eclipse.wst.sse.ui.nls.ResourceHandler; import org.w3c.dom.Node; public class StructureSelectPreviousCSSAction extends StructureSelectCSSAction { public StructureSelectPreviousCSSAction(StructuredTextEditor editor, SelectionHistory history) { super(editor, history); - setText(ResourceHandler.getString("StructureSelectPrevious.label")); //$NON-NLS-1$ - setToolTipText(ResourceHandler.getString("StructureSelectPrevious.tooltip")); //$NON-NLS-1$ - setDescription(ResourceHandler.getString("StructureSelectPrevious.description")); //$NON-NLS-1$ + setText(SSEUIPlugin.getResourceString("%StructureSelectPrevious.label")); //$NON-NLS-1$ + setToolTipText(SSEUIPlugin.getResourceString("%StructureSelectPrevious.tooltip")); //$NON-NLS-1$ + setDescription(SSEUIPlugin.getResourceString("%StructureSelectPrevious.description")); //$NON-NLS-1$ } protected IndexedRegion getCursorIndexedRegion() { diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java index 21c001d342..58afb63421 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java @@ -8,8 +8,6 @@ ****************************************************************************/ package org.eclipse.wst.css.ui.preferences.ui; - - import java.util.ArrayList; import java.util.Dictionary; import java.util.Hashtable; @@ -22,12 +20,12 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier; import org.eclipse.wst.css.core.parser.CSSRegionContexts; +import org.eclipse.wst.css.ui.internal.CSSUIPlugin; import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds; -import org.eclipse.wst.css.ui.internal.nls.ResourceHandler; import org.eclipse.wst.css.ui.style.IStyleConstantsCSS; import org.eclipse.wst.sse.core.IModelManager; import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.ui.EditorPlugin; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore; import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore.OverlayKey; import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator; @@ -82,7 +80,7 @@ public class CSSColorPage extends AbstractColorPage { * getSampleText method comment. */ public String getSampleText() { - return ResourceHandler.getString("PrefsLabel.ColorSample"); //$NON-NLS-1$ + return CSSUIPlugin.getResourceString("%PrefsLabel.ColorSample"); //$NON-NLS-1$ } /** @@ -157,19 +155,19 @@ public class CSSColorPage extends AbstractColorPage { */ protected void initDescriptions(Dictionary descriptions) { // create descriptions for hilighting types - descriptions.put(IStyleConstantsCSS.NORMAL, ResourceHandler.getString("PrefsLabel.ColorNormal"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.ATMARK_RULE, ResourceHandler.getString("PrefsLabel.ColorAtmarkRule"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.SELECTOR, ResourceHandler.getString("PrefsLabel.ColorSelector"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.MEDIA, ResourceHandler.getString("PrefsLabel.ColorMedia"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.COMMENT, ResourceHandler.getString("PrefsLabel.ColorComment"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.PROPERTY_NAME, ResourceHandler.getString("PrefsLabel.ColorPropertyName"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.PROPERTY_VALUE, ResourceHandler.getString("PrefsLabel.ColorPropertyValue"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.URI, ResourceHandler.getString("PrefsLabel.ColorUri"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.STRING, ResourceHandler.getString("PrefsLabel.ColorString"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.COLON, ResourceHandler.getString("PrefsLabel.ColorColon"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.SEMI_COLON, ResourceHandler.getString("PrefsLabel.ColorSemiColon"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.CURLY_BRACE, ResourceHandler.getString("PrefsLabel.ColorCurlyBrace"));//$NON-NLS-1$ - descriptions.put(IStyleConstantsCSS.ERROR, ResourceHandler.getString("PrefsLabel.ColorError"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.NORMAL, CSSUIPlugin.getResourceString("%PrefsLabel.ColorNormal"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.ATMARK_RULE, CSSUIPlugin.getResourceString("%PrefsLabel.ColorAtmarkRule"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.SELECTOR, CSSUIPlugin.getResourceString("%PrefsLabel.ColorSelector"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.MEDIA, CSSUIPlugin.getResourceString("%PrefsLabel.ColorMedia"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.COMMENT, CSSUIPlugin.getResourceString("%PrefsLabel.ColorComment"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.PROPERTY_NAME, CSSUIPlugin.getResourceString("%PrefsLabel.ColorPropertyName"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.PROPERTY_VALUE, CSSUIPlugin.getResourceString("%PrefsLabel.ColorPropertyValue"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.URI, CSSUIPlugin.getResourceString("%PrefsLabel.ColorUri"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.STRING, CSSUIPlugin.getResourceString("%PrefsLabel.ColorString"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.COLON, CSSUIPlugin.getResourceString("%PrefsLabel.ColorColon"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.SEMI_COLON, CSSUIPlugin.getResourceString("%PrefsLabel.ColorSemiColon"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.CURLY_BRACE, CSSUIPlugin.getResourceString("%PrefsLabel.ColorCurlyBrace"));//$NON-NLS-1$ + descriptions.put(IStyleConstantsCSS.ERROR, CSSUIPlugin.getResourceString("%PrefsLabel.ColorError"));//$NON-NLS-1$ } /** @@ -217,13 +215,13 @@ public class CSSColorPage extends AbstractColorPage { } protected IPreferenceStore doGetPreferenceStore() { - return EditorPlugin.getDefault().getPreferenceStore(); + return SSEUIPlugin.getDefault().getPreferenceStore(); } public boolean performOk() { super.performOk(); - EditorPlugin.getDefault().savePluginPreferences(); + SSEUIPlugin.getDefault().savePluginPreferences(); return true; } }
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java index 076835fa91..dc603827e6 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java @@ -13,7 +13,7 @@ import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.help.WorkbenchHelp; -import org.eclipse.wst.css.core.CSSCorePlugin; +import org.eclipse.wst.css.core.internal.CSSCorePlugin; import org.eclipse.wst.css.ui.internal.CSSUIPlugin; import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds; import org.eclipse.wst.xml.ui.preferences.XMLFilesPreferencePage; diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java index 5259032f87..ca756c3437 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.wst.css.ui.preferences.ui; - import org.eclipse.core.runtime.Preferences; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; @@ -21,12 +20,12 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier; -import org.eclipse.wst.css.core.CSSCorePlugin; +import org.eclipse.wst.css.core.internal.CSSCorePlugin; import org.eclipse.wst.css.core.preferences.CSSModelPreferenceNames; +import org.eclipse.wst.css.ui.internal.CSSUIPlugin; import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds; -import org.eclipse.wst.css.ui.internal.nls.ResourceHandler; import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames; -import org.eclipse.wst.sse.ui.EditorPlugin; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator; import org.eclipse.wst.xml.ui.preferences.XMLSourcePreferencePage; @@ -34,24 +33,24 @@ import org.eclipse.wst.xml.ui.preferences.XMLSourcePreferencePage; */ public class CSSSourcePreferencePage extends XMLSourcePreferencePage { // Formatting - private final static String FORMATTING_GROUP = ResourceHandler.getString("Formatting_UI_"); //$NON-NLS-1$ - // private final static String FORMATTING_SPLIT_LINES = "Split lines"; - private final static String FORMATTING_LINE_WIDTH = ResourceHandler.getString("Line_width__UI_"); //$NON-NLS-1$; - private final static String FORMATTING_INSERT_LINE_BREAK = ResourceHandler.getString("PrefsLabel.WrappingInsertLineBreak"); //$NON-NLS-1$ - private final static String FORMATTING_WRAPPING_WITHOUT_ATTR = ResourceHandler.getString("PrefsLabel.WrappingWithoutAttr");//$NON-NLS-1$ - private final static String FORMATTING_INDENT_USING_TABS = ResourceHandler.getString("&Indent_using_tabs_3"); //$NON-NLS-1$ + private final static String FORMATTING_GROUP = SSEUIPlugin.getResourceString("%Formatting_UI_"); //$NON-NLS-1$ + private final static String FORMATTING_LINE_WIDTH = SSEUIPlugin.getResourceString("%Line_width__UI_"); //$NON-NLS-1$; + private final static String FORMATTING_INDENT_USING_TABS = SSEUIPlugin.getResourceString("%&Indent_using_tabs_3"); //$NON-NLS-1$ + // CSS Formatting + private final static String FORMATTING_INSERT_LINE_BREAK = CSSUIPlugin.getResourceString("%PrefsLabel.WrappingInsertLineBreak"); //$NON-NLS-1$ + private final static String FORMATTING_WRAPPING_WITHOUT_ATTR = CSSUIPlugin.getResourceString("%PrefsLabel.WrappingWithoutAttr");//$NON-NLS-1$ // Case - private final static String CASE_GROUP = ResourceHandler.getString("PrefsLabel.CaseGroup"); //$NON-NLS-1$ - private final static String CASE_IDENT = ResourceHandler.getString("PrefsLabel.CaseIdent"); //$NON-NLS-1$ - private final static String CASE_PROP_NAME = ResourceHandler.getString("PrefsLabel.CasePropName"); //$NON-NLS-1$ - private final static String CASE_PROP_VALUE = ResourceHandler.getString("PrefsLabel.CasePropValue"); //$NON-NLS-1$ - private final static String CASE_IDENT_UPPER = ResourceHandler.getString("PrefsLabel.CaseIdentUpper"); //$NON-NLS-1$ - private final static String CASE_IDENT_LOWER = ResourceHandler.getString("PrefsLabel.CaseIdentLower"); //$NON-NLS-1$ - private final static String CASE_PROP_NAME_UPPER = ResourceHandler.getString("PrefsLabel.CasePropNameUpper"); //$NON-NLS-1$ - private final static String CASE_PROP_NAME_LOWER = ResourceHandler.getString("PrefsLabel.CasePropNameLower"); //$NON-NLS-1$ - private final static String CASE_PROP_VALUE_UPPER = ResourceHandler.getString("PrefsLabel.CasePropValueUpper"); //$NON-NLS-1$ - private final static String CASE_PROP_VALUE_LOWER = ResourceHandler.getString("PrefsLabel.CasePropValueLower"); //$NON-NLS-1$ + private final static String CASE_GROUP = CSSUIPlugin.getResourceString("%PrefsLabel.CaseGroup"); //$NON-NLS-1$ + private final static String CASE_IDENT = CSSUIPlugin.getResourceString("%PrefsLabel.CaseIdent"); //$NON-NLS-1$ + private final static String CASE_PROP_NAME = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropName"); //$NON-NLS-1$ + private final static String CASE_PROP_VALUE = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropValue"); //$NON-NLS-1$ + private final static String CASE_IDENT_UPPER = CSSUIPlugin.getResourceString("%PrefsLabel.CaseIdentUpper"); //$NON-NLS-1$ + private final static String CASE_IDENT_LOWER = CSSUIPlugin.getResourceString("%PrefsLabel.CaseIdentLower"); //$NON-NLS-1$ + private final static String CASE_PROP_NAME_UPPER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropNameUpper"); //$NON-NLS-1$ + private final static String CASE_PROP_NAME_LOWER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropNameLower"); //$NON-NLS-1$ + private final static String CASE_PROP_VALUE_UPPER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropValueUpper"); //$NON-NLS-1$ + private final static String CASE_PROP_VALUE_LOWER = CSSUIPlugin.getResourceString("%PrefsLabel.CasePropValueLower"); //$NON-NLS-1$ // one property per one line protected Button fPropertyPerLine; @@ -213,7 +212,7 @@ public class CSSSourcePreferencePage extends XMLSourcePreferencePage { * @see com.ibm.sse.editor.xml.preferences.ui.XMLFilesPreferencePage#doSavePreferenceStore() */ protected void doSavePreferenceStore() { - EditorPlugin.getDefault().savePluginPreferences(); + SSEUIPlugin.getDefault().savePluginPreferences(); CSSCorePlugin.getDefault().savePluginPreferences(); // model } diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java index 27bf5378cd..6fd8dee474 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java @@ -19,7 +19,7 @@ import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier; import org.eclipse.wst.css.core.parser.CSSRegionContexts; import org.eclipse.wst.sse.core.text.ITextRegion; -import org.eclipse.wst.sse.ui.EditorPlugin; +import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator; import org.eclipse.wst.sse.ui.style.AbstractLineStyleProvider; import org.eclipse.wst.sse.ui.style.LineStyleProvider; @@ -197,6 +197,6 @@ public class LineStyleProviderForCSS extends AbstractLineStyleProvider implement } protected IPreferenceStore getColorPreferences() { - return EditorPlugin.getDefault().getPreferenceStore(); + return SSEUIPlugin.getDefault().getPreferenceStore(); } }
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java index fb244e2fc5..ea59ec43a5 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java @@ -25,7 +25,6 @@ import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.eclipse.wst.css.ui.internal.CSSUIPlugin; import org.eclipse.wst.css.ui.internal.editor.CSSEditorPluginImages; -import org.eclipse.wst.css.ui.internal.nls.ResourceHandler; import org.eclipse.wst.sse.ui.views.contentoutline.PropertyChangeUpdateAction; /** @@ -35,7 +34,7 @@ class SortAction extends PropertyChangeUpdateAction { private TreeViewer treeViewer; public SortAction(TreeViewer viewer, IPreferenceStore store, String preferenceKey) { - super(ResourceHandler.getString("SortAction.0"), store, preferenceKey, false); //$NON-NLS-1$ + super(CSSUIPlugin.getResourceString("%SortAction.0"), store, preferenceKey, false); //$NON-NLS-1$ ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(CSSUIPlugin.ID, CSSEditorPluginImages.IMG_OBJ_SORT); setImageDescriptor(desc); setToolTipText(getText()); diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java index 41b771c5fc..2249ea55a5 100644 --- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java +++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java @@ -10,8 +10,6 @@ *******************************************************************************/ package org.eclipse.wst.css.ui.views.properties; - - import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -34,7 +32,7 @@ import org.eclipse.wst.css.core.metamodel.CSSMMNode; import org.eclipse.wst.css.core.metamodel.CSSMetaModel; import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelFinder; import org.eclipse.wst.css.core.metamodel.util.CSSMetaModelUtil; -import org.eclipse.wst.css.ui.internal.nls.ResourceHandler; +import org.eclipse.wst.css.ui.internal.CSSUIPlugin; import org.eclipse.wst.sse.core.INodeAdapter; import org.eclipse.wst.sse.core.INodeNotifier; import org.w3c.dom.css.CSSStyleDeclaration; @@ -74,7 +72,7 @@ public class CSSPropertySource implements INodeAdapter, IPropertySource { if (name != null && 0 < name.length()) { name = name.toLowerCase(); if (category == null) { - category = ResourceHandler.getString("INFO_Not_Categorized_1"); //$NON-NLS-1$ + category = CSSUIPlugin.getResourceString("%INFO_Not_Categorized_1"); //$NON-NLS-1$ } descriptor = new CSSTextPropertyDescriptor(name, name, fNode, category); // if (category == null) { @@ -310,8 +308,8 @@ public class CSSPropertySource implements INodeAdapter, IPropertySource { } } catch (Exception e) { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - String title = ResourceHandler.getString("Title.InvalidValue"); //$NON-NLS-1$ - String message = ResourceHandler.getString("Message.InvalidValue"); //$NON-NLS-1$ + String title = CSSUIPlugin.getResourceString("%Title.InvalidValue"); //$NON-NLS-1$ + String message = CSSUIPlugin.getResourceString("%Message.InvalidValue"); //$NON-NLS-1$ MessageDialog.openWarning(window.getShell(), title, message); } } |