Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavid_williams2004-12-08 23:26:56 +0000
committerdavid_williams2004-12-08 23:26:56 +0000
commit455e217a54ac165c535801e26fbb5f00a284a767 (patch)
treef4fca5f07e9938dd5fa5ef2d28dbd4eb977c8a6b
parent9c082e5ad14ccbc4c895e5c5b4a4d2503e6a2c28 (diff)
downloadwebtools.sourceediting-455e217a54ac165c535801e26fbb5f00a284a767.tar.gz
webtools.sourceediting-455e217a54ac165c535801e26fbb5f00a284a767.tar.xz
webtools.sourceediting-455e217a54ac165c535801e26fbb5f00a284a767.zip
[80517] properties related changes
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/JSPCorePlugin.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java75
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties (renamed from bundles/org.eclipse.jst.jsp.core/src/ModelsJSP.properties)0
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/nls/ResourceHandler.java72
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/ActionContributorJSP.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/JSPEditorPlugin.java21
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextEditorJSP.java11
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaBreakpointProvider.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaScriptBreakpointProvider.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaStratumBreakpointProvider.java3
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java58
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties (renamed from bundles/org.eclipse.jst.jsp.ui/src/EditingJSP.properties)0
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementAction.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java7
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementAction.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java9
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/nls/ResourceHandler.java72
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/openon/JSPJavaOpenOnJSP.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPColorPage.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPFilesPreferencePage.java2
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/LineStyleProviderForJSP.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/JavaColorProvider.java6
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/LineStyleProviderForJava.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSP.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttribute.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttributeValue.java4
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPTag.java4
-rw-r--r--bundles/org.eclipse.wst.css.core/src/ModelsCSS.properties31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java74
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java7
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/nls/ResourceHandler.java72
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java5
-rw-r--r--bundles/org.eclipse.wst.css.ui/plugin.properties4
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/ActionContributorCSS.java8
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextEditorCSS.java8
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/contentproperties/ContentSettingsRegistry.java4
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/edit/ui/CleanupDialogCSS.java44
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java80
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties (renamed from bundles/org.eclipse.wst.css.ui/src/EditingCSS.properties)0
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/nls/ResourceHandler.java66
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectEnclosingCSSAction.java8
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectNextCSSAction.java8
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructureSelectPreviousCSSAction.java8
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSColorPage.java38
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSFilesPreferencePage.java2
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/preferences/ui/CSSSourcePreferencePage.java41
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/style/LineStyleProviderForCSS.java4
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java3
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySource.java10
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java6
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java8
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java7
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java5
-rw-r--r--bundles/org.eclipse.wst.html.core/src/ModelsHTML.properties40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatProcessorImpl.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java6
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatterFactory.java4
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/nls/ResourceHandler.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/MessageFactory.java62
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.properties6
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java5
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java7
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ContentSettingsRegistry.java6
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/HTMLContentSettingsPropertyPage.java10
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ProjectContentSettingsPropertyPage.java11
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/edit/ui/CleanupDialogHTML.java40
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java59
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties (renamed from bundles/org.eclipse.wst.html.ui/src/EditingHTML.properties)15
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java4
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java4
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/nls/ResourceHandler.java70
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLColorPage.java6
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLFilesPreferencePage.java17
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLSourcePreferencePage.java20
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTML.java5
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttribute.java6
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttributeValue.java5
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLTag.java5
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java5
-rw-r--r--bundles/org.eclipse.wst.sse.core/plugin.properties6
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/AbstractStructuredModel.java3
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/ModelManagerImpl.java10
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingException.java6
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingRuntimeException.java6
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java53
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePluginResources.properties (renamed from bundles/org.eclipse.wst.sse.core/src/Models.properties)27
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/builder/StructuredDocumentBuilder.java6
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler.java70
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler1.java70
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextUndoManager.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/plugin.properties10
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-contentproperties/org/eclipse/wst/sse/ui/contentproperties/ContentPropertiesPlugin.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ExtensionsPlugin.java6
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FileModelProvider.java30
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/GotoAnnotationAction.java7
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/SpellCheckActionWrapper.java7
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StorageModelProvider.java8
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextAnnotationHover.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java32
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewer.java15
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentproperties/ui/ContentSettingsPropertyPage.java13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ActionContributor.java9
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/CleanupAction.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ConvertLineDelimitersToCRLFActionDelegate.java24
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java23
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java53
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties (renamed from bundles/org.eclipse.wst.sse.ui/src/Editing.properties)99
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java7
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java10
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionProvider.java6
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java8
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectEnclosingAction.java9
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java9
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectNextAction.java9
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectPreviousAction.java9
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/nls/ResourceHandler.java70
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/openon/AbstractOpenOn.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/PreferenceManager.java7
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractColorPage.java6
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferencePage.java4
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferenceTab.java9
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/EditStructuredTextEditorPreferencesAction.java7
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/FilePreferencePage.java7
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/NavigationPreferenceTab.java15
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StructuredTextEditorPreferencePage.java36
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StyledTextColorPicker.java19
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TaskTagPreferenceTab.java50
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TextHoverPreferenceTab.java28
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TranslucencyPreferenceTab.java6
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/AnnotationHoverProcessor.java6
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/TextHoverManager.java7
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/util/ShowViewAction.java4
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/RefreshOutlineJob.java4
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/StructuredContentOutlineConfiguration.java8
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/RemoveAction.java5
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/ShowPropertiesAction.java5
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/XMLCleanupPreferencesImpl.java5
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/FormatProcessorXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java5
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java77
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties17
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java15
-rw-r--r--bundles/org.eclipse.wst.xml.ui/plugin.properties16
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResourceHandler.java65
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResources.properties (renamed from bundles/org.eclipse.wst.xml.ui/src-multipage/xmleditor.properties)0
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java13
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java21
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java13
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/nls2/ResourceHandler.java64
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java7
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java72
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java9
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java18
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java29
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditAttributeAction.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java12
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java6
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java59
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java7
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java9
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java15
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java20
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java13
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java19
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java20
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java27
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java9
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java11
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java59
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties (renamed from bundles/org.eclipse.wst.xml.ui/src/EditingXML.properties)14
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java7
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java41
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java7
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java7
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nls/ResourceHandler.java68
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java22
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java18
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java9
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java13
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java7
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java46
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java34
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java36
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java16
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java31
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java7
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/style/LineStyleProviderForXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java17
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXML.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttribute.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttributeValue.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLTag.java4
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/util/XMLCommonResources.java8
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java5
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java7
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java5
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMultiPageEditorPart.java10
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java4
240 files changed, 1674 insertions, 2370 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/JSPCorePlugin.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/JSPCorePlugin.java
deleted file mode 100644
index d114f04120..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/JSPCorePlugin.java
+++ /dev/null
@@ -1,20 +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.jst.jsp.core;
-
-/**
- * @deprecated use internal JSPCorePlugin class instead if possible
- */
-public class JSPCorePlugin extends
- org.eclipse.jst.jsp.core.internal.JSPCorePlugin {
- // see org.eclipse.jst.jsp.core.internal.JSPCorePlugin
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java
index b6c1488abb..72e45b5d0f 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.jsp.core.internal;
+import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -34,6 +35,8 @@ public class JSPCorePlugin extends Plugin {
private static JSPCorePlugin 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.
@@ -41,12 +44,6 @@ public class JSPCorePlugin extends Plugin {
public JSPCorePlugin() {
super();
plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.jsp.core.JspPluginResources"); //$NON-NLS-1$
- }
- catch (MissingResourceException x) {
- resourceBundle = null;
- }
}
/**
@@ -63,27 +60,6 @@ public class JSPCorePlugin extends Plugin {
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 = JSPCorePlugin.getDefault().getResourceBundle();
- try {
- return bundle.getString(key);
- }
- catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
/* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#initializeDefaultPluginPreferences()
*/
@@ -149,4 +125,49 @@ public class JSPCorePlugin extends Plugin {
super.stop(context);
}
+
+ /**
+ * 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.jst.jsp.core.internal.JSPCorePluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/ModelsJSP.properties b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
index bfa64fe7b2..bfa64fe7b2 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/ModelsJSP.properties
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java
index 7004dfe7c2..1f60ad0127 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java
@@ -22,7 +22,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jst.jsp.core.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
/**
@@ -95,7 +95,7 @@ public class IndexWorkspaceJob extends Job {
public IndexWorkspaceJob() {
// pa_TODO may want to say something like "Rebuilding JSP Index" to be more
// descriptive instead of "Updating JSP Index" since they are 2 different things
- super(ResourceHandler.getString("JSPIndexManager.0"));
+ super(JSPCorePlugin.getResourceString("%JSPIndexManager.0"));
setPriority(Job.LONG);
setSystem(true);
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
index d780d8b0a4..826a6764ed 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
@@ -11,7 +11,6 @@
package org.eclipse.jst.jsp.core.internal.java.search;
import java.io.File;
-import java.text.MessageFormat;
import java.util.HashMap;
import org.eclipse.core.resources.IFile;
@@ -36,7 +35,6 @@ import org.eclipse.jdt.internal.core.index.Index;
import org.eclipse.jdt.internal.core.search.indexing.IndexManager;
import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.nls.ResourceHandler;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
/**
@@ -209,7 +207,7 @@ public class JSPIndexManager implements IResourceChangeListener {
try {
ss.addJspFile(this.jspFiles [i]);
// JSP Indexer processing n files
- processingNFiles = MessageFormat.format(ResourceHandler.getString("JSPIndexManager.2"), new String[]{Integer.toString((this.jspFiles .length -i))});
+ processingNFiles = JSPCorePlugin.getResourceString("%JSPIndexManager.2", new String[]{Integer.toString((this.jspFiles .length -i))});
monitor.subTask(processingNFiles + " - " + this.jspFiles [i].getName());
monitor.worked(1);
@@ -443,7 +441,7 @@ public class JSPIndexManager implements IResourceChangeListener {
*/
private void processFiles(IFile[] files) {
// updating JSP Index
- String taskName = ResourceHandler.getString("JSPIndexManager.0");
+ String taskName = JSPCorePlugin.getResourceString("%JSPIndexManager.0");
// Processing resource delta
final Job processFiles = new ProcessFilesJob(taskName, files);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/nls/ResourceHandler.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/nls/ResourceHandler.java
deleted file mode 100644
index 817d96ffab..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/nls/ResourceHandler.java
+++ /dev/null
@@ -1,72 +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.jst.jsp.core.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("ModelsJSP");//$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.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/ActionContributorJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/ActionContributorJSP.java
index fb13985125..468f0d8567 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/ActionContributorJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/ActionContributorJSP.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jst.jsp.ui.internal.IActionConstantsJSP;
import org.eclipse.jst.jsp.ui.internal.IActionDefinitionIdsJSP;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
@@ -47,7 +47,7 @@ public class ActionContributorJSP extends ActionContributorHTML {
public ActionContributorJSP() {
super();
- ResourceBundle bundle = ResourceHandler.getResourceBundle();
+ ResourceBundle bundle = JSPUIPlugin.getDefault().getResourceBundle();
this.renameElementAction = new RetargetTextEditorAction(bundle, IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT + StructuredTextEditorActionConstants.DOT);
this.renameElementAction.setActionDefinitionId(IActionDefinitionIdsJSP.RENAME_ELEMENT);
@@ -55,7 +55,7 @@ public class ActionContributorJSP extends ActionContributorHTML {
this.moveElementAction.setActionDefinitionId(IActionDefinitionIdsJSP.MOVE_ELEMENT);
// the refactor menu, add the menu itself to add all refactor actions
- this.refactorMenu = new MenuManager(ResourceHandler.getString("ActionContributorJSP.0"), RefactorActionGroup.MENU_ID); //$NON-NLS-1$
+ this.refactorMenu = new MenuManager(JSPUIPlugin.getResourceString("%ActionContributorJSP.0"), RefactorActionGroup.MENU_ID); //$NON-NLS-1$
refactorMenu.add(this.renameElementAction);
refactorMenu.add(this.moveElementAction);
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/JSPEditorPlugin.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/JSPEditorPlugin.java
deleted file mode 100644
index 9de40af68a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/JSPEditorPlugin.java
+++ /dev/null
@@ -1,21 +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.jst.jsp.ui;
-
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-
-/**
- * @deprecated use internal JSPUIPlugin class instead if possible
- */
-public class JSPEditorPlugin extends JSPUIPlugin {
- // see org.eclipse.jst.jsp.ui.internal.JSPUIPlugin
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextEditorJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextEditorJSP.java
index 588dec24f8..5c1d6d9e6d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextEditorJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextEditorJSP.java
@@ -21,6 +21,7 @@ import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
import org.eclipse.jst.jsp.ui.internal.IActionConstantsJSP;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
import org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPMoveElementAction;
import org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameElementAction;
@@ -33,8 +34,8 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
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.search.FindOccurrencesActionProvider;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.core.document.XMLDocument;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.ui.actions.AddBlockCommentActionXML;
@@ -46,7 +47,7 @@ public class StructuredTextEditorJSP extends StructuredTextEditor {
protected void createActions() {
super.createActions();
- ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
+ ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
Action action = new CleanupActionHTML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + DOT, this);
action.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
@@ -71,11 +72,11 @@ public class StructuredTextEditorJSP extends StructuredTextEditor {
setAction(StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES, foAction);
markAsSelectionDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES, true);
- JSPRenameElementAction renameAction = new JSPRenameElementAction(org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler.getResourceBundle(), IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT + DOT, this);
+ JSPRenameElementAction renameAction = new JSPRenameElementAction(JSPUIPlugin.getDefault().getResourceBundle(), IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT + DOT, this);
setAction(IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT, renameAction);
markAsSelectionDependentAction(IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT, true);
- JSPMoveElementAction moveAction = new JSPMoveElementAction(org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler.getResourceBundle(), IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT + DOT, this);
+ JSPMoveElementAction moveAction = new JSPMoveElementAction(JSPUIPlugin.getDefault().getResourceBundle(), IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT + DOT, this);
setAction(IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT, moveAction);
markAsSelectionDependentAction(IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT, true);
}
@@ -119,7 +120,7 @@ public class StructuredTextEditorJSP extends StructuredTextEditor {
super.addContextMenuActions(menu);
if (getSourceViewer().isEditable()) {
- String label = org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler.getString("Refactor.label"); //$NON-NLS-1$ = "Format"
+ String label = JSPUIPlugin.getResourceString("%Refactor.label"); //$NON-NLS-1$ = "Format"
MenuManager subMenu = new MenuManager(label, "Refactor"); // menu id //$NON-NLS-1$
addAction(subMenu, IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT);
addAction(subMenu, IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT);
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
index 87c977ac15..4e6d8a1e4a 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
@@ -69,11 +69,11 @@ import org.eclipse.wst.sse.core.IModelManager;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.sse.ui.EditorPlugin;
import org.eclipse.wst.sse.ui.StructuredTextReconciler;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
import org.eclipse.wst.sse.ui.format.StructuredFormattingStrategy;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.style.IHighlighter;
@@ -410,7 +410,7 @@ public class StructuredTextViewerConfigurationJSP extends StructuredTextViewerCo
//fReconciler.setEditor(editorPart);
}
- IPreferenceStore store = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
boolean reconcilingEnabled = store.getBoolean(CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS);
// the second time through, the strategies are set
@@ -426,7 +426,7 @@ public class StructuredTextViewerConfigurationJSP extends StructuredTextViewerCo
// check language (ContentTypeID)....
String contentTypeId = sModel.getContentTypeIdentifier();
String generatedKey = PreferenceKeyGenerator.generateKey(CommonEditorPreferenceNames.EDITOR_VALIDATION_METHOD, contentTypeId);
- String validationMethodPref = EditorPlugin.getInstance().getPreferenceStore().getString(generatedKey);
+ String validationMethodPref = SSEUIPlugin.getInstance().getPreferenceStore().getString(generatedKey);
IReconcilingStrategy defaultStrategy = null;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaBreakpointProvider.java
index a66f189a70..48140a2ca6 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaBreakpointProvider.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaBreakpointProvider.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.breakpointproviders;
-
-
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -20,7 +18,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.debug.core.JDIDebugModel;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.wst.sse.ui.extensions.breakpoint.SourceEditingTextTools;
@@ -79,7 +76,7 @@ public class JavaBreakpointProvider extends AbstractBreakpointProvider {
}
}
}
- return new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, ResourceHandler.getString("OK"), null); //$NON-NLS-1$
+ return new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, JSPUIPlugin.getResourceString("%OK"), null); //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaScriptBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaScriptBreakpointProvider.java
index 4259d92f6c..3c2899e816 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaScriptBreakpointProvider.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaScriptBreakpointProvider.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.breakpointproviders;
-
-
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
@@ -21,7 +19,6 @@ import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ui.IEditorInput;
import org.eclipse.wst.sse.ui.extensions.breakpoint.SourceEditingTextTools;
import org.w3c.dom.Document;
@@ -53,7 +50,7 @@ public class JavaScriptBreakpointProvider extends AbstractBreakpointProvider {
// }
}
}
- return new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, ResourceHandler.getString("OK"), null); //$NON-NLS-1$
+ return new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, JSPUIPlugin.getResourceString("%OK"), null); //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaStratumBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaStratumBreakpointProvider.java
index 3912f5a91e..ea0734d8ff 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaStratumBreakpointProvider.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/breakpointproviders/JavaStratumBreakpointProvider.java
@@ -28,7 +28,6 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITypedRegion;
import org.eclipse.jst.jsp.core.internal.text.rules.StructuredTextPartitionerForJSP;
import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.wst.sse.ui.StructuredResourceMarkerAnnotationModel;
@@ -90,7 +89,7 @@ public class JavaStratumBreakpointProvider implements IBreakpointProvider, IExec
}
}
if (status == null) {
- status = new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, ResourceHandler.getString("OK"), null); //$NON-NLS-1$
+ status = new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, JSPUIPlugin.getResourceString("%OK"), null); //$NON-NLS-1$
}
return status;
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java
index 76e0befefb..41ea8e1e48 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java
@@ -11,6 +11,9 @@
package org.eclipse.jst.jsp.ui.internal;
import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
@@ -24,7 +27,7 @@ import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
import org.eclipse.wst.html.ui.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.ui.EditorPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper;
@@ -40,6 +43,10 @@ public class JSPUIPlugin extends AbstractUIPlugin {
public final static String ID = "org.eclipse.jst.jsp.ui"; //$NON-NLS-1$
protected static JSPUIPlugin instance = null;
+ //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 template store for the jsp editor.
@@ -58,7 +65,7 @@ public class JSPUIPlugin extends AbstractUIPlugin {
// Force a call to initializeDefaultJSPPreferences since
// initializeDefaultPreferences is only called if *this* plugin's
// preference store is accessed
- initializeDefaultJSPPreferences(EditorPlugin.getDefault().getPreferenceStore());
+ initializeDefaultJSPPreferences(SSEUIPlugin.getDefault().getPreferenceStore());
}
public static JSPUIPlugin getDefault() {
@@ -86,7 +93,7 @@ public class JSPUIPlugin extends AbstractUIPlugin {
// ignore this preference store
// use EditorPlugin preference store
- IPreferenceStore editorStore = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
initializeDefaultJSPPreferences(editorStore);
}
@@ -161,4 +168,49 @@ public class JSPUIPlugin extends AbstractUIPlugin {
return fContextTypeRegistry;
}
+
+ /**
+ * 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.jst.jsp.ui.internal.JSPUIPluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/EditingJSP.properties b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
index 3b54f9cc1f..3b54f9cc1f 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/EditingJSP.properties
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
index d44bf6b244..72bcf60615 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-
import java.util.HashMap;
import java.util.Iterator;
@@ -36,7 +34,7 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.ui.IReleasable;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.contentassist.IResourceDependentProcessor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.xml.core.document.XMLDocument;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.document.XMLNode;
@@ -126,7 +124,7 @@ public class JSPCompletionProcessor implements IContentAssistProcessor, IReleasa
}
ICompletionProposal[] results = fCollector.getResults();
if (results == null || results.length < 1)
- fErrorMessage = ResourceHandler.getString("Java_Content_Assist_is_not_UI_"); //$NON-NLS-1$ = "Java Content Assist is not available for the current cursor location"
+ fErrorMessage = SSEUIPlugin.getResourceString("%Java_Content_Assist_is_not_UI_"); //$NON-NLS-1$ = "Java Content Assist is not available for the current cursor location"
return results;
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
index 3f67a84ed7..9f76984826 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -71,11 +69,11 @@ import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.sse.ui.EditorPlugin;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.contentassist.IRelevanceCompletionProposal;
import org.eclipse.wst.sse.ui.contentassist.IResourceDependentProcessor;
import org.eclipse.wst.sse.ui.edit.util.SharedEditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceConstants;
@@ -1096,7 +1094,7 @@ public class JSPContentAssistProcessor extends AbstractContentAssistProcessor im
// since we know that we are inhereiting the preference for auto
// activation from HTML
// AbstractUIPlugin htmlPlugin = (AbstractUIPlugin) Platform.getPlugin(HTMLEditorPlugin.ID);
- IPreferenceStore store = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
String key = PreferenceKeyGenerator.generateKey(CommonEditorPreferenceNames.AUTO_PROPOSE_CODE, IContentTypeIdentifier.ContentTypeID_HTML);
String chars = store.getString(key);
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
index 65c9170d49..4521b8e08d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-
import java.util.ArrayList;
import java.util.List;
@@ -32,9 +30,9 @@ import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.ui.IReleasable;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.contentassist.IResourceDependentProcessor;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.jsp.model.parser.temp.XMLJSPRegionContexts;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
@@ -45,7 +43,7 @@ public class JSPJavaContentAssistProcessor implements IContentAssistProcessor, I
protected IResource fResource;
protected char completionProposalAutoActivationCharacters[] = new char[]{'.'};
protected char contextInformationAutoActivationCharacters[] = null;
- protected static final String UNKNOWN_CONTEXT = ResourceHandler.getString("Content_Assist_not_availab_UI_"); //$NON-NLS-1$ = "Content Assist not available at the current location "
+ protected static final String UNKNOWN_CONTEXT = SSEUIPlugin.getResourceString("%Content_Assist_not_availab_UI_"); //$NON-NLS-1$ = "Content Assist not available at the current location "
protected String fErrorMessage = null;
private JSPCompletionProcessor fJspCompletionProcessor = null;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java
index ac6ec1588c..4544376d40 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java
@@ -34,8 +34,8 @@ import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.text.edits.MalformedTreeException;
@@ -121,7 +121,7 @@ public class BasicRefactorSearchRequestor extends SearchRequestor {
private TextEdit fEdit = null;
private IFile fJSPFile = null;
private IDocument fJSPDoc = null;
- private String fDescription = ResourceHandler.getString("BasicRefactorSearchRequestor.0"); //$NON-NLS-1$
+ private String fDescription = JSPUIPlugin.getResourceString("%BasicRefactorSearchRequestor.0"); //$NON-NLS-1$
public RenameChange(IFile jspFile, IDocument jspDoc, TextEdit edit, String description) {
this.fEdit = edit;
@@ -332,7 +332,7 @@ public class BasicRefactorSearchRequestor extends SearchRequestor {
try {
// document lines are 0 based
String lineNumber = Integer.toString(doc.getLineOfOffset(edit.getOffset()) + 1);
- description += " " + MessageFormat.format(ResourceHandler.getString("BasicRefactorSearchRequestor.1"), new String[]{file, lineNumber}); //$NON-NLS-1$
+ description += " " + MessageFormat.format(JSPUIPlugin.getResourceString("%BasicRefactorSearchRequestor.1"), new String[]{file, lineNumber}); //$NON-NLS-1$
}
catch (BadLocationException e) {
Logger.logException(e);
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java
index e9d16d1614..ac0d947224 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java
@@ -15,11 +15,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
/**
* @author pavery
*/
@@ -39,7 +38,7 @@ public class JSPMethodRenameChange extends Change {
}
public String getName() {
- return ResourceHandler.getString("JSP_changes"); //$NON-NLS-1$
+ return JSPUIPlugin.getResourceString("%JSP_changes"); //$NON-NLS-1$
}
public void initializeValidationData(IProgressMonitor pm) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java
index d50145dcab..600a74a032 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java
@@ -20,8 +20,8 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
@@ -74,7 +74,7 @@ public class JSPMethodRenameParticipant extends RenameParticipant {
Change[] changes = JSPMethodRenameChange.createChangesFor(this.fMethod, getArguments().getNewName());
CompositeChange multiChange = null;
if(changes.length > 0)
- multiChange = new CompositeChange(ResourceHandler.getString("JSP_changes"), changes); //$NON-NLS-1$
+ multiChange = new CompositeChange(JSPUIPlugin.getResourceString("%JSP_changes"), changes); //$NON-NLS-1$
return multiChange;
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java
index 1cbaedbcbb..c417700765 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java
@@ -15,7 +15,7 @@ import java.text.MessageFormat;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.search.SearchMatch;
import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
/**
* @author pavery
@@ -41,7 +41,7 @@ public class JSPMethodRenameRequestor extends BasicRefactorSearchRequestor {
String methodName = getElement().getElementName();
String newName = getNewName();
- String description = MessageFormat.format(ResourceHandler.getString("BasicRefactorSearchRequestor.3"), new String[]{methodName, newName}); //$NON-NLS-1$
+ String description = MessageFormat.format(JSPUIPlugin.getResourceString("%BasicRefactorSearchRequestor.3"), new String[]{methodName, newName}); //$NON-NLS-1$
return description;
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementAction.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementAction.java
index f23f39a61b..fd2e1feb31 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementAction.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementAction.java
@@ -27,8 +27,8 @@ import org.eclipse.jdt.internal.ui.refactoring.reorg.ReorgQueries;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jst.jsp.ui.StructuredTextEditorJSP;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ltk.core.refactoring.participants.MoveRefactoring;
import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
import org.eclipse.swt.widgets.Shell;
@@ -126,7 +126,7 @@ public class JSPMoveElementAction extends TextEditorAction {
}
}
else {
- PlatformStatusLineUtil.displayErrorMessage(ResourceHandler.getString("JSPMoveElementAction.0")); //$NON-NLS-1$
+ PlatformStatusLineUtil.displayErrorMessage(JSPUIPlugin.getResourceString("%JSPMoveElementAction.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java
index 6c0de39683..cc81a7b629 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java
@@ -15,11 +15,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
/**
* @author pavery
*/
@@ -39,7 +38,7 @@ public class JSPPackageRenameChange extends Change {
}
public String getName() {
- return ResourceHandler.getString("JSP_changes"); //$NON-NLS-1$
+ return JSPUIPlugin.getResourceString("%JSP_changes"); //$NON-NLS-1$
}
public void initializeValidationData(IProgressMonitor pm) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java
index c15f8c8f82..719c3d78ca 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java
@@ -13,14 +13,13 @@ package org.eclipse.jst.jsp.ui.internal.java.refactoring;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-
/**
* Remember to change the plugin.xml file if the name of this class changes.
*
@@ -67,7 +66,7 @@ public class JSPPackageRenameParticipant extends RenameParticipant {
Change[] changes = JSPPackageRenameChange.createChangesFor(this.fPkg, getArguments().getNewName());
CompositeChange multiChange = null;
if(changes.length > 0)
- multiChange = new CompositeChange(ResourceHandler.getString("JSP_changes"), changes); //$NON-NLS-1$
+ multiChange = new CompositeChange(JSPUIPlugin.getResourceString("%JSP_changes"), changes); //$NON-NLS-1$
return multiChange;
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java
index 3a2fe60923..3e79baa69e 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java
@@ -10,11 +10,8 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.internal.java.refactoring;
-import java.text.MessageFormat;
-
import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
-
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
/**
* Overrides get description
@@ -37,7 +34,7 @@ public class JSPPackageRenameRequestor extends BasicRefactorSearchRequestor {
protected String getDescription() {
String packageName = getElement().getElementName();
String newName = getNewName();
- String description = MessageFormat.format(ResourceHandler.getString("BasicRefactorSearchRequestor.5"), new String[]{packageName, newName}); //$NON-NLS-1$
+ String description = JSPUIPlugin.getResourceString("%BasicRefactorSearchRequestor.5", new String[]{packageName, newName}); //$NON-NLS-1$
return description;
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementAction.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementAction.java
index e1ed88ea4b..b19c9d1137 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementAction.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementAction.java
@@ -19,8 +19,8 @@ import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.ui.refactoring.RenameSupport;
import org.eclipse.jst.jsp.ui.StructuredTextEditorJSP;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.TextEditorAction;
@@ -88,7 +88,7 @@ public class JSPRenameElementAction extends TextEditorAction {
}
}
else {
- PlatformStatusLineUtil.displayErrorMessage(ResourceHandler.getString("JSPRenameElementAction.0")); //$NON-NLS-1$
+ PlatformStatusLineUtil.displayErrorMessage(JSPUIPlugin.getResourceString("%JSPRenameElementAction.0")); //$NON-NLS-1$
PlatformStatusLineUtil.addOneTimeClearListener();
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java
index daea4f87c0..dba800962d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java
@@ -15,11 +15,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IType;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
/**
* @author pavery
*/
@@ -39,7 +38,7 @@ public class JSPTypeMoveChange extends Change {
}
public String getName() {
- return ResourceHandler.getString("JSP_changes"); //$NON-NLS-1$
+ return JSPUIPlugin.getResourceString("%JSP_changes"); //$NON-NLS-1$
}
public void initializeValidationData(IProgressMonitor pm) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java
index edcdbd787e..a3322c201d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java
@@ -14,14 +14,13 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
-
/**
* @author pavery
*/
@@ -73,7 +72,7 @@ public class JSPTypeMoveParticipant extends MoveParticipant {
Change[] changes = JSPTypeMoveChange.createChangesFor(fType, ((IPackageFragment)dest).getElementName());
if(dest instanceof IPackageFragment && changes.length > 0)
- multiChange = new CompositeChange(ResourceHandler.getString("JSP_changes"), changes); //$NON-NLS-1$
+ multiChange = new CompositeChange(JSPUIPlugin.getResourceString("%JSP_changes"), changes); //$NON-NLS-1$
return multiChange;
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java
index bfa6caf2b1..01aaa315c6 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java
@@ -16,7 +16,7 @@ import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.search.SearchMatch;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
/**
* @author pavery
@@ -54,7 +54,7 @@ public class JSPTypeMoveRequestor extends BasicRefactorSearchRequestor {
String typeName = getElement().getElementName();
String newName = getNewName();
- String description = MessageFormat.format(ResourceHandler.getString("BasicRefactorSearchRequestor.2"), new String[]{typeName, newName}); //$NON-NLS-1$
+ String description = MessageFormat.format(JSPUIPlugin.getResourceString("%BasicRefactorSearchRequestor.2"), new String[]{typeName, newName}); //$NON-NLS-1$
return description;
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java
index c08ae83b7c..802acbf6c1 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IType;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
@@ -40,7 +40,7 @@ public class JSPTypeRenameChange extends Change {
}
public String getName() {
- return ResourceHandler.getString("JSP_changes"); //$NON-NLS-1$
+ return JSPUIPlugin.getResourceString("%JSP_changes"); //$NON-NLS-1$
}
public void initializeValidationData(IProgressMonitor pm) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java
index 9ab22db4fd..409dd804a0 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java
@@ -14,8 +14,8 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
@@ -72,7 +72,7 @@ public class JSPTypeRenameParticipant extends RenameParticipant {
Change[] changes = JSPTypeRenameChange.createChangesFor(fType, getArguments().getNewName());
CompositeChange multiChange = null;
if(changes.length > 0)
- multiChange = new CompositeChange(ResourceHandler.getString("JSP_changes"), changes); //$NON-NLS-1$
+ multiChange = new CompositeChange(JSPUIPlugin.getResourceString("%JSP_changes"), changes); //$NON-NLS-1$
return multiChange;
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java
index 36fcf03ca6..5566e72022 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
- package org.eclipse.jst.jsp.ui.internal.java.refactoring;
+package org.eclipse.jst.jsp.ui.internal.java.refactoring;
import java.text.MessageFormat;
@@ -16,7 +16,7 @@ import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.search.SearchMatch;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
/**
* Creates document change(s) for a type rename.
@@ -57,7 +57,7 @@ public class JSPTypeRenameRequestor extends BasicRefactorSearchRequestor {
String typeName = getElement().getElementName();
String newName = getNewName();
- String description = MessageFormat.format(ResourceHandler.getString("BasicRefactorSearchRequestor.4"), new String[]{typeName, newName}); //$NON-NLS-1$
+ String description = MessageFormat.format(JSPUIPlugin.getResourceString("%BasicRefactorSearchRequestor.4"), new String[]{typeName, newName}); //$NON-NLS-1$
return description;
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java
index bad0dd75bd..a317c56b89 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.internal.java.search;
-import java.text.MessageFormat;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.runtime.CoreException;
@@ -24,8 +22,8 @@ import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
import org.eclipse.jst.jsp.ui.internal.Logger;
import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.search.BasicSearchQuery;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
/**
* Implementation of <code>ISearchQuery</code> for <code>IJavaElement</code>s in JSP files.
@@ -111,13 +109,12 @@ public class JSPSearchQuery extends BasicSearchQuery {
* @see org.eclipse.search.ui.ISearchQuery#getLabel()
*/
public String getLabel() {
- String label = ResourceHandler.getString("OccurrencesSearchQuery.0"); //$NON-NLS-1$
String[] args = {getSearchText(), getOccurrencesCountText(), getFilename()};
- return MessageFormat.format(label, args);
+ return SSEUIPlugin.getResourceString("%OccurrencesSearchQuery.0", args);
}
private String getFilename() {
- String filename = ResourceHandler.getString("OccurrencesSearchQuery.2"); //$NON-NLS-1$
+ String filename = SSEUIPlugin.getResourceString("%OccurrencesSearchQuery.2"); //$NON-NLS-1$
if(getFile() != null)
filename = getFile().getName();
return filename;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/nls/ResourceHandler.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/nls/ResourceHandler.java
deleted file mode 100644
index 6d01f010ad..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/nls/ResourceHandler.java
+++ /dev/null
@@ -1,72 +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.jst.jsp.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("EditingJSP");//$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.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/openon/JSPJavaOpenOnJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/openon/JSPJavaOpenOnJSP.java
index 331bfb93e1..3dcf87c775 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/openon/JSPJavaOpenOnJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/openon/JSPJavaOpenOnJSP.java
@@ -26,8 +26,8 @@ import org.eclipse.jface.window.Window;
import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.texteditor.ITextEditor;
@@ -43,8 +43,8 @@ import org.eclipse.wst.xml.core.document.XMLModel;
public class JSPJavaOpenOnJSP extends AbstractOpenOn {
//private final String SSE_MODEL_ID = IModelManagerPlugin.ID; //$NON-NLS-1$
- private final String SELECT_JAVA_TITLE = ResourceHandler.getString("JSPJavaOpenOnJSP.0"); //$NON-NLS-1$
- private final String SELECT_JAVA_MESSAGE = ResourceHandler.getString("JSPJavaOpenOnJSP.1"); //$NON-NLS-1$
+ private final String SELECT_JAVA_TITLE = JSPUIPlugin.getResourceString("%JSPJavaOpenOnJSP.0"); //$NON-NLS-1$
+ private final String SELECT_JAVA_MESSAGE = JSPUIPlugin.getResourceString("%JSPJavaOpenOnJSP.1"); //$NON-NLS-1$
/**
* Get JSP translation object
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPColorPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPColorPage.java
index 907b814738..48aeec5e6d 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPColorPage.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPColorPage.java
@@ -15,8 +15,8 @@ import java.util.Dictionary;
import java.util.Hashtable;
import java.util.Iterator;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.help.WorkbenchHelp;
@@ -54,7 +54,7 @@ public class JSPColorPage extends XMLColorPage {
}
public String getSampleText() {
- return ResourceHandler.getString("Sample_JSP_doc"); //$NON-NLS-1$ = "<%@ page \n\tlanguage=\"java\" \n\tcontentType=\"text/html; charset=ISO-8859-1\"\n%>\n<jsp:include flush=\"true\" page=\"titleBar.jsp\"/>\n\n<%-- Use below tags ONLY for JSP 1.1 --%>\n<%\n\tSystem.out.println(\"Welcome!\");\n%>\n<%-- Use below tags ONLY for JSP 1.2 --%>\n<jsp:scriptlet>\n\tSystem.out.println(\"Welcome!\");\n</jsp:scriptlet>"
+ return JSPUIPlugin.getResourceString("%Sample_JSP_doc"); //$NON-NLS-1$ = "<%@ page \n\tlanguage=\"java\" \n\tcontentType=\"text/html; charset=ISO-8859-1\"\n%>\n<jsp:include flush=\"true\" page=\"titleBar.jsp\"/>\n\n<%-- Use below tags ONLY for JSP 1.1 --%>\n<%\n\tSystem.out.println(\"Welcome!\");\n%>\n<%-- Use below tags ONLY for JSP 1.2 --%>\n<jsp:scriptlet>\n\tSystem.out.println(\"Welcome!\");\n</jsp:scriptlet>"
}
protected void initContextStyleMap(Dictionary contextStyleMap) {
@@ -88,7 +88,7 @@ public class JSPColorPage extends XMLColorPage {
initCommonDescriptions(descriptions);
descriptions.remove(IStyleConstantsXML.XML_CONTENT); // leave content between tags alone
descriptions.remove(IStyleConstantsXML.DECL_BORDER); // xml/html specific
- descriptions.put(IStyleConstantsHTML.SCRIPT_AREA_BORDER, ResourceHandler.getString("JSP_Delimiters_UI_")); //$NON-NLS-1$ = "JSP Delimiters"
+ descriptions.put(IStyleConstantsHTML.SCRIPT_AREA_BORDER, JSPUIPlugin.getResourceString("%JSP_Delimiters_UI_")); //$NON-NLS-1$ = "JSP Delimiters"
}
protected void initStyleList(ArrayList list) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPFilesPreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPFilesPreferencePage.java
index 6b05a65777..bd082eaf5e 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPFilesPreferencePage.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/preferences/ui/JSPFilesPreferencePage.java
@@ -12,7 +12,7 @@ package org.eclipse.jst.jsp.ui.preferences.ui;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.jsp.core.JSPCorePlugin;
+import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
import org.eclipse.swt.widgets.Composite;
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/LineStyleProviderForJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/LineStyleProviderForJSP.java
index d432079497..aa08d57068 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/LineStyleProviderForJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/LineStyleProviderForJSP.java
@@ -16,7 +16,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
import org.eclipse.wst.html.ui.style.IStyleConstantsHTML;
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;
@@ -117,7 +117,7 @@ public class LineStyleProviderForJSP extends AbstractLineStyleProvider implement
protected IPreferenceStore getColorPreferences() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
protected String getPreferenceKey(String key) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/JavaColorProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/JavaColorProvider.java
index f49d47ced6..8201aca593 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/JavaColorProvider.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/JavaColorProvider.java
@@ -10,15 +10,13 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.style.java;
-
-
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
-import org.eclipse.wst.sse.ui.EditorPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
/**
* Colors used in the Java editor
@@ -90,7 +88,7 @@ public class JavaColorProvider {
EDITOR_BACKGROUND = new RGB(255, 255, 255);
- IPreferenceStore sseStore = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore sseStore = SSEUIPlugin.getDefault().getPreferenceStore();
EDITOR_CURRENT_LINE = sseStore.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE);
EDITOR_CURRENT_LINE_COLOR = PreferenceConverter.getColor(sseStore, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR);
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/LineStyleProviderForJava.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/LineStyleProviderForJava.java
index 3c788b3869..bf3620b4bf 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/LineStyleProviderForJava.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/style/java/LineStyleProviderForJava.java
@@ -29,7 +29,7 @@ import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
import org.eclipse.wst.html.ui.style.IStyleConstantsHTML;
-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;
@@ -201,7 +201,7 @@ public class LineStyleProviderForJava extends AbstractLineStyleProvider implemen
}
protected IPreferenceStore getColorPreferences() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
protected void setDocument(IDocument document) {
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSP.java
index 55c87aad61..971def77fb 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSP.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSP.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.templates;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeXML;
@@ -22,7 +22,7 @@ public class TemplateContextTypeJSP extends TemplateContextTypeXML {
public static final String JSP_PREFIX = "jsp_"; //$NON-NLS-1$
public TemplateContextTypeJSP() {
- this(generateContextTypeId(TemplateContextTypeIds.ALL), ResourceHandler.getString("TemplateContextTypeJSP.0")); //$NON-NLS-1$
+ this(generateContextTypeId(TemplateContextTypeIds.ALL), JSPUIPlugin.getResourceString("%TemplateContextTypeJSP.0")); //$NON-NLS-1$
}
/**
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttribute.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttribute.java
index d817badfc7..65d6b878a5 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttribute.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttribute.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.templates;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
/**
@@ -19,6 +19,6 @@ import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
public class TemplateContextTypeJSPAttribute extends TemplateContextTypeJSP {
public TemplateContextTypeJSPAttribute() {
- super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTE), ResourceHandler.getString("TemplateContextTypeJSPAttribute.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTE), JSPUIPlugin.getResourceString("%TemplateContextTypeJSPAttribute.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttributeValue.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttributeValue.java
index 95a8cc2441..f408d315ed 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttributeValue.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPAttributeValue.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.templates;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
/**
@@ -20,6 +20,6 @@ import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
public class TemplateContextTypeJSPAttributeValue extends TemplateContextTypeJSP {
public TemplateContextTypeJSPAttributeValue() {
- super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTEVALUE), ResourceHandler.getString("TemplateContextTypeJSPAttributeValue.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTEVALUE), JSPUIPlugin.getResourceString("%TemplateContextTypeJSPAttributeValue.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPTag.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPTag.java
index b5eb1c820c..36ecea8b2f 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPTag.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/templates/TemplateContextTypeJSPTag.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.jsp.ui.templates;
-import org.eclipse.jst.jsp.ui.internal.nls.ResourceHandler;
+import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
/**
@@ -19,6 +19,6 @@ import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
public class TemplateContextTypeJSPTag extends TemplateContextTypeJSP {
public TemplateContextTypeJSPTag() {
- super(generateContextTypeId(TemplateContextTypeIds.TAG), ResourceHandler.getString("TemplateContextTypeJSPTag.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.TAG), JSPUIPlugin.getResourceString("%TemplateContextTypeJSPTag.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.css.core/src/ModelsCSS.properties b/bundles/org.eclipse.wst.css.core/src/ModelsCSS.properties
deleted file mode 100644
index 315c83f54b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/ModelsCSS.properties
+++ /dev/null
@@ -1,31 +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
-###############################################################################
-Please_specify_CSS_file_na=Please specify CSS file name.
-ERROR__Cannot_use_a_static_ERROR_=IWAK0071E ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.
-You_cannot_use_CSSStyleShe_UI_=You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()
-Missing_return_statement_i_ERROR_=IWAK0072E Missing return statement in function
-1concat_ERROR_=IWAK0073E {0}first flat node is null.
-2concat_ERROR_=IWAK0074E {0}first flat node is not in model.
-3concat_ERROR_=IWAK0075E {0}last flat node is null.
-4concat_ERROR_=IWAK0076E {0}last flat node is not in model.
-25concat_ERROR_=IWAK0077E {0}first region is null.
-26concat_ERROR_=IWAK0078E {0}first region is not in model.
-27concat_ERROR_=IWAK0079E {0}last region is null.
-28concat_ERROR_=IWAK0080E {0}last region is not in model.
-5concat_ERROR_=IWAK0081E {0}first region is null.
-6concat_ERROR_=IWAK0082E {0}first region is not in model.
-7concat_ERROR_=IWAK0083E {0}last region is null.
-8concat_ERROR_=IWAK0084E {0}last region is not in model.
-9concat_ERROR_=IWAK0085E Invalid escape character at line {0} column {1}.
-12concat_EXC_=IWAK0086E Caught Exception: {0}
-13concat_ERROR_=IWAK0087E Error: Ignoring invalid lexical state : {0}. State unchanged.
-15concat_ERROR_=IWAK0088E Lexical error at line {0}, column {1}. Encountered: {2} after :
-ERROR__Cannot_use_a_static_ERROR__ERROR_=IWAK0089E ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java
index 65819235ad..ee035424c3 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.wst.css.core.internal;
+import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -22,7 +23,6 @@ import org.eclipse.wst.common.encoding.CommonEncodingPreferenceNames;
import org.eclipse.wst.css.core.preferences.CSSPreferenceHelper;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-
/**
* The main plugin class to be used in the desktop.
*/
@@ -31,6 +31,8 @@ public class CSSCorePlugin extends Plugin {
private static CSSCorePlugin 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.
@@ -38,12 +40,6 @@ public class CSSCorePlugin extends Plugin {
public CSSCorePlugin() {
super();
plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.css.core.CssPluginResources"); //$NON-NLS-1$
- }
- catch (MissingResourceException x) {
- resourceBundle = null;
- }
}
/**
@@ -60,27 +56,6 @@ public class CSSCorePlugin extends Plugin {
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 = CSSCorePlugin.getDefault().getResourceBundle();
- try {
- return bundle.getString(key);
- }
- catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
/*
* (non-Javadoc)
*
@@ -122,5 +97,48 @@ public class CSSCorePlugin extends Plugin {
prefs.setDefault(CommonModelPreferenceNames.TAG_NAME_CASE, CommonModelPreferenceNames.LOWER);
prefs.setDefault(CommonModelPreferenceNames.ATTR_NAME_CASE, CommonModelPreferenceNames.LOWER);
}
+ /**
+ * 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.core.internal.CSSCorePluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties
new file mode 100644
index 0000000000..8b7eabba04
--- /dev/null
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties
@@ -0,0 +1,31 @@
+###############################################################################
+# 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
+###############################################################################
+Please_specify_CSS_file_na=Please specify CSS file name.
+ERROR__Cannot_use_a_static_ERROR_=ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.
+You_cannot_use_CSSStyleShe_UI_=You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()
+Missing_return_statement_i_ERROR_=Missing return statement in function
+1concat_ERROR_={0}first flat node is null.
+2concat_ERROR_={0}first flat node is not in model.
+3concat_ERROR_={0}last flat node is null.
+4concat_ERROR_={0}last flat node is not in model.
+25concat_ERROR_={0}first region is null.
+26concat_ERROR_={0}first region is not in model.
+27concat_ERROR_={0}last region is null.
+28concat_ERROR_={0}last region is not in model.
+5concat_ERROR_={0}first region is null.
+6concat_ERROR_={0}first region is not in model.
+7concat_ERROR_={0}last region is null.
+8concat_ERROR_={0}last region is not in model.
+9concat_ERROR_=Invalid escape character at line {0} column {1}.
+12concat_EXC_=Caught Exception: {0}
+13concat_ERROR_=Error: Ignoring invalid lexical state : {0}. State unchanged.
+15concat_ERROR_=Lexical error at line {0}, column {1}. Encountered: {2} after :
+ERROR__Cannot_use_a_static_ERROR__ERROR_=ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java
index 7fc0557985..a2efd80e27 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.css.core.internal.document;
-
-
import java.util.Iterator;
import java.util.Vector;
@@ -19,14 +17,13 @@ import org.eclipse.wst.css.core.document.ICSSAttr;
import org.eclipse.wst.css.core.document.ICSSNode;
import org.eclipse.wst.css.core.document.ICSSNodeList;
import org.eclipse.wst.css.core.document.ICSSRuleContainer;
-import org.eclipse.wst.css.core.internal.nls.ResourceHandler;
+import org.eclipse.wst.css.core.internal.CSSCorePlugin;
import org.eclipse.wst.css.core.parser.CSSRegionContexts;
import org.eclipse.wst.css.core.util.CSSUtil;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
-
/**
*
*/
@@ -72,22 +69,22 @@ class CSSModelUtil {
String nodeText = CSSUtil.getClassString(node) + ": ";//$NON-NLS-1$
IStructuredDocumentRegion flatNode = node.getFirstStructuredDocumentRegion();
if (flatNode == null && (!(node instanceof CSSStyleDeclarationImpl || node instanceof CSSStyleSheetImpl) || node.getFirstChild() != null)) {
- errors.add(ResourceHandler.getString("1concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is null."
+ errors.add(CSSCorePlugin.getResourceString("%1concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is null."
}
else if (flatNode != null) {
IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(flatNode.getStart());
if (flatNode != modelNode) {
- errors.add(ResourceHandler.getString("2concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is not in model."
+ errors.add(CSSCorePlugin.getResourceString("%2concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is not in model."
}
}
flatNode = node.getLastStructuredDocumentRegion();
if (flatNode == null && (!(node instanceof CSSStyleDeclarationImpl || node instanceof CSSStyleSheetImpl) || node.getFirstChild() != null)) {
- errors.add(ResourceHandler.getString("3concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is null."
+ errors.add(CSSCorePlugin.getResourceString("%3concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is null."
}
else if (flatNode != null) {
IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(flatNode.getStart());
if (flatNode != modelNode) {
- errors.add(ResourceHandler.getString("4concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is not in model."
+ errors.add(CSSCorePlugin.getResourceString("%4concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is not in model."
}
}
}
@@ -97,26 +94,26 @@ class CSSModelUtil {
ITextRegion region = node.getFirstRegion();
IStructuredDocumentRegion parentRegion = node.getDocumentRegion();
if (region == null && (!(node instanceof MediaListImpl) || node.getFirstChild() != null)) {
- errors.add(ResourceHandler.getString("25concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
+ errors.add(CSSCorePlugin.getResourceString("%25concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
}
else if (region != null) {
int offset = parentRegion.getStartOffset(region);
IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
if (region != modelRegion) {
- errors.add(ResourceHandler.getString("26concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
+ errors.add(CSSCorePlugin.getResourceString("%26concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
}
}
region = node.getLastRegion();
if (region == null && (!(node instanceof MediaListImpl) || node.getFirstChild() != null)) {
- errors.add(ResourceHandler.getString("27concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
+ errors.add(CSSCorePlugin.getResourceString("%27concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
}
else if (region != null) {
int offset = parentRegion.getStartOffset(region);
IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
if (region != modelRegion) {
- errors.add(ResourceHandler.getString("28concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
+ errors.add(CSSCorePlugin.getResourceString("%28concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
}
}
}
@@ -130,26 +127,26 @@ class CSSModelUtil {
ITextRegion region = node.getFirstRegion();
IStructuredDocumentRegion parentRegion = node.getDocumentRegion();
if (region == null && 0 < attr.getValue().length()) {
- errors.add(ResourceHandler.getString("5concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
+ errors.add(CSSCorePlugin.getResourceString("%5concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
}
else if (region != null) {
int offset = parentRegion.getStartOffset(region);
IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
if (region != modelRegion) {
- errors.add(ResourceHandler.getString("6concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
+ errors.add(CSSCorePlugin.getResourceString("%6concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
}
}
region = node.getLastRegion();
if (region == null && 0 < attr.getValue().length()) {
- errors.add(ResourceHandler.getString("7concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
+ errors.add(CSSCorePlugin.getResourceString("%7concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
}
else if (region != null) {
int offset = parentRegion.getStartOffset(region);
IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
if (region != modelRegion) {
- errors.add(ResourceHandler.getString("8concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
+ errors.add(CSSCorePlugin.getResourceString("%8concat_ERROR_", (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
}
}
}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java
index a9d721901f..aa4c29af00 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.css.core.internal.document;
-
-
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
@@ -26,8 +24,8 @@ import org.eclipse.wst.css.core.document.ICSSPageRule;
import org.eclipse.wst.css.core.document.ICSSStyleDeclaration;
import org.eclipse.wst.css.core.document.ICSSStyleRule;
import org.eclipse.wst.css.core.document.ICSSStyleSheet;
+import org.eclipse.wst.css.core.internal.CSSCorePlugin;
import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.css.core.internal.nls.ResourceHandler;
import org.eclipse.wst.css.core.util.ImportRuleCollector;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.util.Assert;
@@ -44,7 +42,6 @@ import org.w3c.dom.stylesheets.MediaList;
import org.w3c.dom.stylesheets.StyleSheet;
import org.w3c.dom.stylesheets.StyleSheetList;
-
/**
*
*/
@@ -436,7 +433,7 @@ class CSSStyleSheetImpl extends CSSDocumentImpl implements ICSSStyleSheet {
* will contain the <code>Node</code>.
*/
public CSSRule getOwnerRule() {
- Assert.isTrue(false, ResourceHandler.getString("You_cannot_use_CSSStyleShe_UI_")); //$NON-NLS-1$ = "You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()"
+ Assert.isTrue(false, CSSCorePlugin.getResourceString("%You_cannot_use_CSSStyleShe_UI_")); //$NON-NLS-1$ = "You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()"
// for @import
return null;
}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/nls/ResourceHandler.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/nls/ResourceHandler.java
deleted file mode 100644
index 18b6491de2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/nls/ResourceHandler.java
+++ /dev/null
@@ -1,72 +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.core.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("ModelsCSS");//$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.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java
index ebf8551930..2db57c4664 100644
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java
+++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/preferences/CSSPreferenceHelper.java
@@ -13,10 +13,9 @@ package org.eclipse.wst.css.core.preferences;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.wst.css.core.document.ICSSModel;
import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.sse.core.ModelPlugin;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-
/**
* this a temp dummy class to map to ModelPreferences
*/
@@ -75,7 +74,7 @@ public class CSSPreferenceHelper {
return "\t"; //$NON-NLS-1$
}
else {
- int n = ModelPlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
+ int n = SSECorePlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
StringBuffer buf = new StringBuffer();
while (0 < n--) {
buf.append(" "); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.css.ui/plugin.properties b/bundles/org.eclipse.wst.css.ui/plugin.properties
index e144d9a99f..e5c874c9ff 100644
--- a/bundles/org.eclipse.wst.css.ui/plugin.properties
+++ b/bundles/org.eclipse.wst.css.ui/plugin.properties
@@ -15,5 +15,7 @@ CSS_Source_Page_Editor.name=CSS Source Page Editor
CSS_Files.name=CSS Files
CSS_Source.name=CSS Source
CSS_Styles.name=CSS Styles
-CSS_Annotations.name=CSS Annotations
WebContentSettings.name=Web Content Settings
+###############################################################################
+# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
+#CSS_Annotations.name=CSS Annotations
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);
}
}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
index d8f45f06ef..5b2028ef36 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
@@ -22,7 +22,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
import org.eclipse.wst.dtd.ui.style.IStyleConstantsDTD;
-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;
@@ -85,7 +85,7 @@ public class DTDUIPlugin extends AbstractUIPlugin {
// Force a call to initialize default preferences since
// initializeDefaultPreferences is only called if *this* plugin's
// preference store is accessed
- initializeDefaultDTDPreferences(EditorPlugin.getDefault()
+ initializeDefaultDTDPreferences(SSEUIPlugin.getDefault()
.getPreferenceStore());
}
@@ -146,7 +146,7 @@ public class DTDUIPlugin extends AbstractUIPlugin {
protected void initializeDefaultPreferences(IPreferenceStore store) {
// ignore this preference store
// use EditorPlugin preference store
- IPreferenceStore editorStore = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
initializeDefaultDTDPreferences(editorStore);
}
}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java
index 200e0ea462..a4c3a60ffd 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/preferences/DTDColorPage.java
@@ -29,15 +29,13 @@ import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.dtd.ui.style.IStyleConstantsDTD;
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;
import org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage;
import org.eclipse.wst.sse.ui.preferences.ui.StyledTextColorPicker;
-
-
public class DTDColorPage extends AbstractColorPage {
protected Control createContents(Composite parent) {
@@ -69,7 +67,7 @@ public class DTDColorPage extends AbstractColorPage {
}
protected IPreferenceStore doGetPreferenceStore() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
public String getSampleText() {
@@ -147,7 +145,7 @@ public class DTDColorPage extends AbstractColorPage {
// saving its own
super.performOk();
- EditorPlugin.getDefault().savePluginPreferences();
+ SSEUIPlugin.getDefault().savePluginPreferences();
return true;
}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java
index be41e5e67a..7f24c94bed 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTD.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.dtd.ui.style;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -20,12 +18,11 @@ import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
import org.eclipse.wst.dtd.core.parser.DTDRegionTypes;
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;
-
public class LineStyleProviderForDTD extends AbstractLineStyleProvider implements LineStyleProvider {
public LineStyleProviderForDTD() {
super();
@@ -80,7 +77,7 @@ public class LineStyleProviderForDTD extends AbstractLineStyleProvider implement
}
protected IPreferenceStore getColorPreferences() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
protected String getPreferenceKey(String key) {
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java
index e75860e636..f937117893 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/style/LineStyleProviderForDTDSubSet.java
@@ -30,13 +30,12 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
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.preferences.ui.ColorHelper;
import org.eclipse.wst.sse.ui.style.AbstractLineStyleProvider;
import org.eclipse.wst.sse.ui.style.LineStyleProvider;
-
public class LineStyleProviderForDTDSubSet extends AbstractLineStyleProvider implements LineStyleProvider {
private int fInternalAdjustment;
@@ -76,7 +75,7 @@ public class LineStyleProviderForDTDSubSet extends AbstractLineStyleProvider imp
}
protected IPreferenceStore getColorPreferences() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
/**
diff --git a/bundles/org.eclipse.wst.html.core/src/ModelsHTML.properties b/bundles/org.eclipse.wst.html.core/src/ModelsHTML.properties
deleted file mode 100644
index 05eff27e6d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/ModelsHTML.properties
+++ /dev/null
@@ -1,40 +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
-###############################################################################
-No_error._UI_=No error.
-Undefined_attribute_name_(_ERROR_=IWAK0043E Undefined attribute name ({0}).
-Undefined_attribute_value__ERROR_=IWAK0044E Undefined attribute value ({0}).
-Multiple_values_specified__ERROR_=IWAK0045E Multiple values specified for an attribute ({0}).
-Attribute_name_({0})_uses__ERROR_=IWAK0046E Attribute name ({0}) uses wrong case character.
-Invalid_attribute_name_({0_ERROR_=IWAK0047E Invalid attribute name ({0}).
-Invalid_attribute_({0})._ERROR_=IWAK0048E Invalid attribute ({0}).
-Invalid_location_of_tag_({_ERROR_=IWAK0049E Invalid location of tag ({0}).
-Duplicate_tag_({0})._ERROR_=IWAK0050E Duplicate tag ({0}).
-No_start_tag_(<{0}>)._ERROR_=IWAK0051E No start tag (<{0}>).
-No_end_tag_(</{0}>)._ERROR_=IWAK0052E No end tag (</{0}>).
-End_tag_(</{0}>)_not_neede_ERROR_=IWAK0053E End tag (</{0}>) not needed.
-Unknown_tag_({0})._ERROR_=IWAK0054E Unknown tag ({0}).
-Tag_name_({0})_uses_wrong__ERROR_=IWAK0055E Tag name ({0}) uses wrong case character.
-Invalid_tag_name_({0})._ERROR_=IWAK0056E Invalid tag name ({0}).
-Invalid_JSP_directive_({0}_ERROR_=IWAK0057E Invalid JSP directive ({0}).
-Invalid_text_string_({0})._ERROR_=IWAK0058E Invalid text string ({0}).
-Invalid_character_used_in__ERROR_=IWAK0059E Invalid character used in text string ({0}).
-Unknown_error._ERROR_=IWAK0060E Unknown error.
-Start_tag_(<{0}>)_not_clos_ERROR_=IWAK0061E Start tag (<{0}>) not closed.
-End_tag_(</{0}>)_not_close_ERROR_=IWAK0062E End tag (</{0}>) not closed.
-Tag_({0})_not_closed._ERROR_=IWAK0063E Tag ({0}) not closed.
-Attribute_value_({0})_uses_ERROR_=IWAK0064E Attribute value ({0}) uses wrong case character.
-Comment_not_closed._ERROR_=IWAK0065E Comment not closed.
-DOCTYPE_declaration_not_cl_ERROR_=IWAK0066E DOCTYPE declaration not closed.
-Processing_instruction_not_ERROR_=IWAK0067E Processing instruction not closed.
-CDATA_section_not_closed._ERROR_=IWAK0068E CDATA section not closed.
-# From here, the new messages are added for V5
-_ERROR_Tag_({0})_should_be_an_empty-element_tag_1=IWAK0069E Tag ({0}) should be an empty-element tag.
-_ERROR_Attribute_value_({0})_not_closed._1=IWAK0070E Attribute value ({0}) not closed.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatProcessorImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatProcessorImpl.java
index 89a9555f5d..8e49a516e7 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatProcessorImpl.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatProcessorImpl.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.format;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.sse.core.ModelPlugin;
import org.eclipse.wst.sse.core.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.format.IStructuredFormatter;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
import org.eclipse.wst.xml.core.format.IStructuredFormatPreferencesXML;
@@ -45,7 +45,7 @@ public class HTMLFormatProcessorImpl extends FormatProcessorXML {
if (preferences.getBoolean(CommonModelPreferenceNames.INDENT_USING_TABS))
fFormatPreferences.setIndent("\t"); //$NON-NLS-1$
else {
- int tabWidth = ModelPlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
+ int tabWidth = SSECorePlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
String indent = ""; //$NON-NLS-1$
for (int i = 0; i < tabWidth; i++) {
indent += " "; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
index 104efefe85..f4c55ce14c 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatter.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.html.core.format;
-
-
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.text.BadLocationException;
@@ -20,10 +18,10 @@ import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.html.core.HTMLCMProperties;
import org.eclipse.wst.html.core.HTMLFormatContraints;
import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.sse.core.ModelPlugin;
import org.eclipse.wst.sse.core.format.IStructuredFormatContraints;
import org.eclipse.wst.sse.core.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.format.IStructuredFormatter;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
@@ -622,7 +620,7 @@ public class HTMLFormatter implements IStructuredFormatter {
if (preferences.getBoolean(CommonModelPreferenceNames.INDENT_USING_TABS))
fFormatPreferences.setIndent("\t"); //$NON-NLS-1$
else {
- int tabWidth = ModelPlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
+ int tabWidth = SSECorePlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
String indent = ""; //$NON-NLS-1$
for (int i = 0; i < tabWidth; i++) {
indent += " "; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatterFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatterFactory.java
index ce0c3ebab7..68e11d0497 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatterFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/format/HTMLFormatterFactory.java
@@ -12,9 +12,9 @@ package org.eclipse.wst.html.core.format;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.sse.core.ModelPlugin;
import org.eclipse.wst.sse.core.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.format.IStructuredFormatter;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.xml.core.format.IStructuredFormatPreferencesXML;
import org.eclipse.wst.xml.core.format.StructuredFormatPreferencesXML;
@@ -93,7 +93,7 @@ class HTMLFormatterFactory {
if (preferences.getBoolean(CommonModelPreferenceNames.INDENT_USING_TABS))
fFormatPreferences.setIndent("\t"); //$NON-NLS-1$
else {
- int tabWidth = ModelPlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
+ int tabWidth = SSECorePlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
String indent = ""; //$NON-NLS-1$
for (int i = 0; i < tabWidth; i++) {
indent += " "; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java
index 39d751edd7..09292d725b 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.wst.html.core.internal;
+import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -30,6 +31,8 @@ public class HTMLCorePlugin extends Plugin {
private static HTMLCorePlugin 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.
@@ -37,12 +40,6 @@ public class HTMLCorePlugin extends Plugin {
public HTMLCorePlugin() {
super();
plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.html.core.HtmlPluginResources"); //$NON-NLS-1$
- }
- catch (MissingResourceException x) {
- resourceBundle = null;
- }
}
/**
@@ -59,27 +56,6 @@ public class HTMLCorePlugin extends Plugin {
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 = HTMLCorePlugin.getDefault().getResourceBundle();
- try {
- return bundle.getString(key);
- }
- catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
/* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#initializeDefaultPluginPreferences()
*/
@@ -120,5 +96,48 @@ public class HTMLCorePlugin extends Plugin {
prefs.setDefault(HTMLFilesPreferenceNames.GENERATE_DOCUMENT_TYPE, true);
prefs.setDefault(HTMLFilesPreferenceNames.GENERATE_GENERATOR, true);
}
+ /**
+ * 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.html.core.internal.HTMLCorePluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties
new file mode 100644
index 0000000000..816989ed77
--- /dev/null
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties
@@ -0,0 +1,40 @@
+###############################################################################
+# 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
+###############################################################################
+No_error._UI_=No error.
+Undefined_attribute_name_(_ERROR_=Undefined attribute name ({0}).
+Undefined_attribute_value__ERROR_=Undefined attribute value ({0}).
+Multiple_values_specified__ERROR_=Multiple values specified for an attribute ({0}).
+Attribute_name_({0})_uses__ERROR_=Attribute name ({0}) uses wrong case character.
+Invalid_attribute_name_({0_ERROR_=Invalid attribute name ({0}).
+Invalid_attribute_({0})._ERROR_=Invalid attribute ({0}).
+Invalid_location_of_tag_({_ERROR_=Invalid location of tag ({0}).
+Duplicate_tag_({0})._ERROR_=Duplicate tag ({0}).
+No_start_tag_(<{0}>)._ERROR_=No start tag (<{0}>).
+No_end_tag_(</{0}>)._ERROR_=No end tag (</{0}>).
+End_tag_(</{0}>)_not_neede_ERROR_=End tag (</{0}>) not needed.
+Unknown_tag_({0})._ERROR_=Unknown tag ({0}).
+Tag_name_({0})_uses_wrong__ERROR_=Tag name ({0}) uses wrong case character.
+Invalid_tag_name_({0})._ERROR_=Invalid tag name ({0}).
+Invalid_JSP_directive_({0}_ERROR_=Invalid JSP directive ({0}).
+Invalid_text_string_({0})._ERROR_=Invalid text string ({0}).
+Invalid_character_used_in__ERROR_=Invalid character used in text string ({0}).
+Unknown_error._ERROR_=Unknown error.
+Start_tag_(<{0}>)_not_clos_ERROR_=Start tag (<{0}>) not closed.
+End_tag_(</{0}>)_not_close_ERROR_=End tag (</{0}>) not closed.
+Tag_({0})_not_closed._ERROR_=Tag ({0}) not closed.
+Attribute_value_({0})_uses_ERROR_=Attribute value ({0}) uses wrong case character.
+Comment_not_closed._ERROR_=Comment not closed.
+DOCTYPE_declaration_not_cl_ERROR_=DOCTYPE declaration not closed.
+Processing_instruction_not_ERROR_=Processing instruction not closed.
+CDATA_section_not_closed._ERROR_=CDATA section not closed.
+# From here, the new messages are added for V5
+_ERROR_Tag_({0})_should_be_an_empty-element_tag_1=Tag ({0}) should be an empty-element tag.
+_ERROR_Attribute_value_({0})_not_closed._1=Attribute value ({0}) not closed.
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/nls/ResourceHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/nls/ResourceHandler.java
deleted file mode 100644
index c164012219..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/nls/ResourceHandler.java
+++ /dev/null
@@ -1,72 +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.html.core.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("ModelsHTML");//$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.html.core/src/org/eclipse/wst/html/core/validate/MessageFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/MessageFactory.java
index 0419e925d5..9e3277d8f6 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/MessageFactory.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/validate/MessageFactory.java
@@ -10,13 +10,11 @@
*******************************************************************************/
package org.eclipse.wst.html.core.validate;
-
-
import java.text.MessageFormat;
import java.util.Hashtable;
+import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
import org.eclipse.wst.html.core.internal.Logger;
-import org.eclipse.wst.html.core.internal.nls.ResourceHandler;
import org.eclipse.wst.sse.core.validate.ValidationMessage;
import org.w3c.dom.Node;
@@ -79,35 +77,35 @@ class MessageFactory implements ErrorState {
}
// error messages
- private static final String MSG_NO_ERROR = ResourceHandler.getString("No_error._UI_"); //$NON-NLS-1$ = "No error."
- private static final String MSG_UNDEFINED_ATTR_ERROR = ResourceHandler.getString("Undefined_attribute_name_(_ERROR_"); //$NON-NLS-1$ = "Undefined attribute name ({0})."
- private static final String MSG_UNDEFINED_VALUE_ERROR = ResourceHandler.getString("Undefined_attribute_value__ERROR_"); //$NON-NLS-1$ = "Undefined attribute value ({0})."
- private static final String MSG_DUPLICATE_ATTR_ERROR = ResourceHandler.getString("Multiple_values_specified__ERROR_"); //$NON-NLS-1$ = "Multiple values specified for an attribute ({0})."
- private static final String MSG_MISMATCHED_ATTR_ERROR = ResourceHandler.getString("Attribute_name_({0})_uses__ERROR_"); //$NON-NLS-1$ = "Attribute name ({0}) uses wrong case character."
- private static final String MSG_INVALID_ATTR_ERROR = ResourceHandler.getString("Invalid_attribute_name_({0_ERROR_"); //$NON-NLS-1$ = "Invalid attribute name ({0})."
- private static final String MSG_ATTR_NO_VALUE_ERROR = ResourceHandler.getString("Invalid_attribute_({0})._ERROR_"); //$NON-NLS-1$ = "Invalid attribute ({0})."
- private static final String MSG_INVALID_CONTENT_ERROR = ResourceHandler.getString("Invalid_location_of_tag_({_ERROR_"); //$NON-NLS-1$ = "Invalid location of tag ({0})."
- private static final String MSG_DUPLICATE_TAG_ERROR = ResourceHandler.getString("Duplicate_tag_({0})._ERROR_"); //$NON-NLS-1$ = "Duplicate tag ({0})."
- private static final String MSG_MISSING_START_TAG_ERROR = ResourceHandler.getString("No_start_tag_(<{0}>)._ERROR_"); //$NON-NLS-1$ = "No start tag (<{0}>)."
- private static final String MSG_MISSING_END_TAG_ERROR = ResourceHandler.getString("No_end_tag_(</{0}>)._ERROR_"); //$NON-NLS-1$ = "No end tag (</{0}>)."
- private static final String MSG_UNNECESSARY_END_TAG_ERROR = ResourceHandler.getString("End_tag_(</{0}>)_not_neede_ERROR_"); //$NON-NLS-1$ = "End tag (</{0}>) not needed."
- private static final String MSG_UNDEFINED_TAG_ERROR = ResourceHandler.getString("Unknown_tag_({0})._ERROR_"); //$NON-NLS-1$ = "Unknown tag ({0})."
- private static final String MSG_MISMATCHED_TAG_ERROR = ResourceHandler.getString("Tag_name_({0})_uses_wrong__ERROR_"); //$NON-NLS-1$ = "Tag name ({0}) uses wrong case character."
- private static final String MSG_INVALID_TAG_ERROR = ResourceHandler.getString("Invalid_tag_name_({0})._ERROR_"); //$NON-NLS-1$ = "Invalid tag name ({0})."
- private static final String MSG_INVALID_DIRECTIVE_ERROR = ResourceHandler.getString("Invalid_JSP_directive_({0}_ERROR_"); //$NON-NLS-1$ = "Invalid JSP directive ({0})."
- private static final String MSG_INVALID_TEXT_ERROR = ResourceHandler.getString("Invalid_text_string_({0})._ERROR_"); //$NON-NLS-1$ = "Invalid text string ({0})."
- private static final String MSG_INVALID_CHAR_ERROR = ResourceHandler.getString("Invalid_character_used_in__ERROR_"); //$NON-NLS-1$ = "Invalid character used in text string ({0})."
- private static final String MSG_UNKNOWN_ERROR = ResourceHandler.getString("Unknown_error._ERROR_"); //$NON-NLS-1$ = "Unknown error."
- private static final String MSG_UNCLOSED_START_TAG_ERROR = ResourceHandler.getString("Start_tag_(<{0}>)_not_clos_ERROR_"); //$NON-NLS-1$ = "Start tag (<{0}>) not closed."
- private static final String MSG_UNCLOSED_END_TAG_ERROR = ResourceHandler.getString("End_tag_(</{0}>)_not_close_ERROR_"); //$NON-NLS-1$ = "End tag (</{0}>) not closed."
- private static final String MSG_UNCLOSED_TAG_ERROR = ResourceHandler.getString("Tag_({0})_not_closed._ERROR_"); //$NON-NLS-1$ = "Tag ({0}) not closed."
- private static final String MSG_MISMATCHED_ATTR_VALUE_ERROR = ResourceHandler.getString("Attribute_value_({0})_uses_ERROR_"); //$NON-NLS-1$ = "Attribute value ({0}) uses wrong case character."
- private static final String MSG_UNCLOSED_COMMENT_ERROR = ResourceHandler.getString("Comment_not_closed._ERROR_"); //$NON-NLS-1$ = "Comment not closed."
- private static final String MSG_UNCLOSED_DOCTYPE_ERROR = ResourceHandler.getString("DOCTYPE_declaration_not_cl_ERROR_"); //$NON-NLS-1$ = "DOCTYPE declaration not closed."
- private static final String MSG_UNCLOSED_PI_ERROR = ResourceHandler.getString("Processing_instruction_not_ERROR_"); //$NON-NLS-1$ = "Processing instruction not closed."
- private static final String MSG_UNCLOSED_CDATA_SECTION_ERROR = ResourceHandler.getString("CDATA_section_not_closed._ERROR_"); //$NON-NLS-1$ = "CDATA section not closed."
- private static final String MSG_INVALID_EMPTY_ELEMENT_TAG = ResourceHandler.getString("_ERROR_Tag_({0})_should_be_an_empty-element_tag_1"); //$NON-NLS-1$ = "Tag ({0}) should be an empty-element tag."
- private static final String MSG_UNCLOSED_ATTR_VALUE_ERROR = ResourceHandler.getString("_ERROR_Attribute_value_({0})_not_closed._1"); //$NON-NLS-1$ ="Attribute value ({0}) not closed."
+ private static final String MSG_NO_ERROR = HTMLCorePlugin.getResourceString("%No_error._UI_"); //$NON-NLS-1$ = "No error."
+ private static final String MSG_UNDEFINED_ATTR_ERROR = HTMLCorePlugin.getResourceString("%Undefined_attribute_name_(_ERROR_"); //$NON-NLS-1$ = "Undefined attribute name ({0})."
+ private static final String MSG_UNDEFINED_VALUE_ERROR = HTMLCorePlugin.getResourceString("%Undefined_attribute_value__ERROR_"); //$NON-NLS-1$ = "Undefined attribute value ({0})."
+ private static final String MSG_DUPLICATE_ATTR_ERROR = HTMLCorePlugin.getResourceString("%Multiple_values_specified__ERROR_"); //$NON-NLS-1$ = "Multiple values specified for an attribute ({0})."
+ private static final String MSG_MISMATCHED_ATTR_ERROR = HTMLCorePlugin.getResourceString("%Attribute_name_({0})_uses__ERROR_"); //$NON-NLS-1$ = "Attribute name ({0}) uses wrong case character."
+ private static final String MSG_INVALID_ATTR_ERROR = HTMLCorePlugin.getResourceString("%Invalid_attribute_name_({0_ERROR_"); //$NON-NLS-1$ = "Invalid attribute name ({0})."
+ private static final String MSG_ATTR_NO_VALUE_ERROR = HTMLCorePlugin.getResourceString("%Invalid_attribute_({0})._ERROR_"); //$NON-NLS-1$ = "Invalid attribute ({0})."
+ private static final String MSG_INVALID_CONTENT_ERROR = HTMLCorePlugin.getResourceString("%Invalid_location_of_tag_({_ERROR_"); //$NON-NLS-1$ = "Invalid location of tag ({0})."
+ private static final String MSG_DUPLICATE_TAG_ERROR = HTMLCorePlugin.getResourceString("%Duplicate_tag_({0})._ERROR_"); //$NON-NLS-1$ = "Duplicate tag ({0})."
+ private static final String MSG_MISSING_START_TAG_ERROR = HTMLCorePlugin.getResourceString("%No_start_tag_(<{0}>)._ERROR_"); //$NON-NLS-1$ = "No start tag (<{0}>)."
+ private static final String MSG_MISSING_END_TAG_ERROR = HTMLCorePlugin.getResourceString("%No_end_tag_(</{0}>)._ERROR_"); //$NON-NLS-1$ = "No end tag (</{0}>)."
+ private static final String MSG_UNNECESSARY_END_TAG_ERROR = HTMLCorePlugin.getResourceString("%End_tag_(</{0}>)_not_neede_ERROR_"); //$NON-NLS-1$ = "End tag (</{0}>) not needed."
+ private static final String MSG_UNDEFINED_TAG_ERROR = HTMLCorePlugin.getResourceString("%Unknown_tag_({0})._ERROR_"); //$NON-NLS-1$ = "Unknown tag ({0})."
+ private static final String MSG_MISMATCHED_TAG_ERROR = HTMLCorePlugin.getResourceString("%Tag_name_({0})_uses_wrong__ERROR_"); //$NON-NLS-1$ = "Tag name ({0}) uses wrong case character."
+ private static final String MSG_INVALID_TAG_ERROR = HTMLCorePlugin.getResourceString("%Invalid_tag_name_({0})._ERROR_"); //$NON-NLS-1$ = "Invalid tag name ({0})."
+ private static final String MSG_INVALID_DIRECTIVE_ERROR = HTMLCorePlugin.getResourceString("%Invalid_JSP_directive_({0}_ERROR_"); //$NON-NLS-1$ = "Invalid JSP directive ({0})."
+ private static final String MSG_INVALID_TEXT_ERROR = HTMLCorePlugin.getResourceString("%Invalid_text_string_({0})._ERROR_"); //$NON-NLS-1$ = "Invalid text string ({0})."
+ private static final String MSG_INVALID_CHAR_ERROR = HTMLCorePlugin.getResourceString("%Invalid_character_used_in__ERROR_"); //$NON-NLS-1$ = "Invalid character used in text string ({0})."
+ private static final String MSG_UNKNOWN_ERROR = HTMLCorePlugin.getResourceString("%Unknown_error._ERROR_"); //$NON-NLS-1$ = "Unknown error."
+ private static final String MSG_UNCLOSED_START_TAG_ERROR = HTMLCorePlugin.getResourceString("%Start_tag_(<{0}>)_not_clos_ERROR_"); //$NON-NLS-1$ = "Start tag (<{0}>) not closed."
+ private static final String MSG_UNCLOSED_END_TAG_ERROR = HTMLCorePlugin.getResourceString("%End_tag_(</{0}>)_not_close_ERROR_"); //$NON-NLS-1$ = "End tag (</{0}>) not closed."
+ private static final String MSG_UNCLOSED_TAG_ERROR = HTMLCorePlugin.getResourceString("%Tag_({0})_not_closed._ERROR_"); //$NON-NLS-1$ = "Tag ({0}) not closed."
+ private static final String MSG_MISMATCHED_ATTR_VALUE_ERROR = HTMLCorePlugin.getResourceString("%Attribute_value_({0})_uses_ERROR_"); //$NON-NLS-1$ = "Attribute value ({0}) uses wrong case character."
+ private static final String MSG_UNCLOSED_COMMENT_ERROR = HTMLCorePlugin.getResourceString("%Comment_not_closed._ERROR_"); //$NON-NLS-1$ = "Comment not closed."
+ private static final String MSG_UNCLOSED_DOCTYPE_ERROR = HTMLCorePlugin.getResourceString("%DOCTYPE_declaration_not_cl_ERROR_"); //$NON-NLS-1$ = "DOCTYPE declaration not closed."
+ private static final String MSG_UNCLOSED_PI_ERROR = HTMLCorePlugin.getResourceString("%Processing_instruction_not_ERROR_"); //$NON-NLS-1$ = "Processing instruction not closed."
+ private static final String MSG_UNCLOSED_CDATA_SECTION_ERROR = HTMLCorePlugin.getResourceString("%CDATA_section_not_closed._ERROR_"); //$NON-NLS-1$ = "CDATA section not closed."
+ private static final String MSG_INVALID_EMPTY_ELEMENT_TAG = HTMLCorePlugin.getResourceString("%_ERROR_Tag_({0})_should_be_an_empty-element_tag_1"); //$NON-NLS-1$ = "Tag ({0}) should be an empty-element tag."
+ private static final String MSG_UNCLOSED_ATTR_VALUE_ERROR = HTMLCorePlugin.getResourceString("%_ERROR_Attribute_value_({0})_not_closed._1"); //$NON-NLS-1$ ="Attribute value ({0}) not closed."
private static ErrorTable[] errTables = new ErrorTable[NodeType.MAX_TYPE];
static {
diff --git a/bundles/org.eclipse.wst.html.ui/plugin.properties b/bundles/org.eclipse.wst.html.ui/plugin.properties
index 0c52951a8b..883d7616b4 100644
--- a/bundles/org.eclipse.wst.html.ui/plugin.properties
+++ b/bundles/org.eclipse.wst.html.ui/plugin.properties
@@ -16,10 +16,12 @@ HTML_Files.name=HTML Files
HTML_Source.name=HTML Source
HTML_Templates.name=HTML Templates
HTML_Styles.name=HTML Styles
-HTML_Annotations.name=HTML Annotations
WebContentSettings.name=Web Content Settings
Device_Profile_Entry_Provider_Extension.name=Device Profile Entry Provider Extension
All_HTML_context_type_Extension_Element.name=All HTML context type
HTML_Tag_context_type_Extension_Element.name=HTML Tag context type
HTML_Attribute_context_type_Extension_Element.name=HTML Attribute context type
-HTML_Attribute_value_context_type_Extension_Element.name=HTML Attribute value context type \ No newline at end of file
+HTML_Attribute_value_context_type_Extension_Element.name=HTML Attribute value context type
+###############################################################################
+# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
+#HTML_Annotations.name=HTML Annotations
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java
index 8704f70e53..23e5266953 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextEditorHTML.java
@@ -19,18 +19,17 @@ import org.eclipse.wst.html.ui.internal.search.HTMLFindOccurrencesAction;
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.search.FindOccurrencesActionProvider;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.ui.actions.AddBlockCommentActionXML;
import org.eclipse.wst.xml.ui.actions.RemoveBlockCommentActionXML;
import org.eclipse.wst.xml.ui.actions.ToggleCommentActionXML;
-
public class StructuredTextEditorHTML extends StructuredTextEditor {
protected void createActions() {
super.createActions();
- ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
+ ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
Action action = new CleanupActionHTML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + DOT, this);
action.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java
index 26a531e3ff..7cf796b5cb 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java
@@ -54,11 +54,11 @@ import org.eclipse.wst.sse.core.IModelManager;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.sse.ui.EditorPlugin;
import org.eclipse.wst.sse.ui.StructuredTextReconciler;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
import org.eclipse.wst.sse.ui.format.StructuredFormattingStrategy;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.style.IHighlighter;
@@ -74,7 +74,6 @@ import org.eclipse.wst.xml.ui.internal.correction.CorrectionProcessorXML;
import org.eclipse.wst.xml.ui.reconcile.StructuredTextReconcilingStrategyForContentModel;
import org.eclipse.wst.xml.ui.reconcile.StructuredTextReconcilingStrategyForMarkup;
-
public class StructuredTextViewerConfigurationHTML extends StructuredTextViewerConfiguration {
InformationPresenter fInformationPresenter = null;
@@ -261,7 +260,7 @@ public class StructuredTextViewerConfigurationHTML extends StructuredTextViewerC
//fReconciler.setEditor(editorPart);
}
- IPreferenceStore store = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
boolean reconcilingEnabled = store.getBoolean(CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS);
// the second time through, the strategies are set
@@ -277,7 +276,7 @@ public class StructuredTextViewerConfigurationHTML extends StructuredTextViewerC
// check language (ContentTypeID)....
String contentTypeId = sModel.getContentTypeIdentifier(); //sModel.getModelHandler().getAssociatedContentTypeId();
String generatedKey = PreferenceKeyGenerator.generateKey(CommonEditorPreferenceNames.EDITOR_VALIDATION_METHOD, contentTypeId);
- String validationMethodPref = EditorPlugin.getInstance().getPreferenceStore().getString(generatedKey);
+ String validationMethodPref = SSEUIPlugin.getInstance().getPreferenceStore().getString(generatedKey);
IReconcilingStrategy defaultStrategy = null;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ContentSettingsRegistry.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ContentSettingsRegistry.java
index 4e75cdb47f..82aee306a0 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ContentSettingsRegistry.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ContentSettingsRegistry.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.contentproperties.ui;
-
-
import java.util.Enumeration;
import java.util.Iterator;
@@ -21,11 +19,11 @@ import org.eclipse.wst.css.core.metamodel.CSSProfileRegistry;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeEntry;
import org.eclipse.wst.html.core.document.HTMLDocumentTypeRegistry;
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 String maxLengthStringInHTMLDocumentTypeRegistry = ""; //$NON-NLS-1$
public static String maxLengthStringInCharacterCodeRegistry = ""; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/HTMLContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/HTMLContentSettingsPropertyPage.java
index 0cc12bdcdb..6d6e0dcfe4 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/HTMLContentSettingsPropertyPage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/HTMLContentSettingsPropertyPage.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.contentproperties.ui;
-
-
import java.util.Map;
import org.eclipse.core.resources.IResource;
@@ -26,7 +24,7 @@ import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.sse.ui.contentproperties.IContentSettings;
import org.eclipse.wst.sse.ui.contentproperties.ui.ComboListOnPropertyPage;
import org.eclipse.wst.sse.ui.contentproperties.ui.ContentSettingsPropertyPage;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public final class HTMLContentSettingsPropertyPage extends ContentSettingsPropertyPage implements org.eclipse.swt.events.SelectionListener {
@@ -53,7 +51,7 @@ public final class HTMLContentSettingsPropertyPage extends ContentSettingsProper
// create description of implecit DOCTYPE
Label label = new Label(propertyPage, SWT.LEFT);
- label.setText(ResourceHandler.getString("UI_Description_of_role_of_following_DOCTYPE"));//$NON-NLS-1$
+ label.setText(SSEUIPlugin.getResourceString("%UI_Description_of_role_of_following_DOCTYPE"));//$NON-NLS-1$
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = numCols;
@@ -201,7 +199,7 @@ public final class HTMLContentSettingsPropertyPage extends ContentSettingsProper
GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
data.horizontalIndent = 10;
publicLabel.setLayoutData(data);
- publicLabel.setText(ResourceHandler.getString("UI_Public_ID"));//$NON-NLS-1$
+ publicLabel.setText(SSEUIPlugin.getResourceString("%UI_Public_ID"));//$NON-NLS-1$
publicIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
data = new GridData();
@@ -211,7 +209,7 @@ public final class HTMLContentSettingsPropertyPage extends ContentSettingsProper
data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
data.horizontalIndent = 10;
systemLabel.setLayoutData(data);
- systemLabel.setText(ResourceHandler.getString("UI_System_ID"));//$NON-NLS-1$
+ systemLabel.setText(SSEUIPlugin.getResourceString("%UI_System_ID"));//$NON-NLS-1$
systemIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
data = new GridData();
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ProjectContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ProjectContentSettingsPropertyPage.java
index e5203dbfd1..0dd50b8a52 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ProjectContentSettingsPropertyPage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/contentproperties/ui/ProjectContentSettingsPropertyPage.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.contentproperties.ui;
-
-
import java.util.Map;
import org.eclipse.core.resources.IResource;
@@ -21,14 +19,13 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.html.ui.internal.Logger;
import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.html.ui.internal.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.contentproperties.IContentSettings;
import org.eclipse.wst.sse.ui.contentproperties.ui.ComboListOnPropertyPage;
import org.eclipse.wst.sse.ui.contentproperties.ui.ContentSettingsPropertyPage;
-
public final class ProjectContentSettingsPropertyPage extends ContentSettingsPropertyPage implements org.eclipse.swt.events.SelectionListener {
@@ -54,7 +51,7 @@ public final class ProjectContentSettingsPropertyPage extends ContentSettingsPro
// create description of implecit DOCTYPE
Label label = new Label(propertyPage, SWT.LEFT);
- label.setText(ResourceHandler.getString("UI_Description_of_role_of_following_DOCTYPE"));//$NON-NLS-1$
+ label.setText(HTMLUIPlugin.getResourceString("%UI_Description_of_role_of_following_DOCTYPE"));//$NON-NLS-1$
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = numCols;
@@ -205,7 +202,7 @@ public final class ProjectContentSettingsPropertyPage extends ContentSettingsPro
GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
data.horizontalIndent = 10;
publicLabel.setLayoutData(data);
- publicLabel.setText(ResourceHandler.getString("UI_Public_ID"));//$NON-NLS-1$
+ publicLabel.setText(HTMLUIPlugin.getResourceString("%UI_Public_ID"));//$NON-NLS-1$
publicIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
data = new GridData();
@@ -215,7 +212,7 @@ public final class ProjectContentSettingsPropertyPage extends ContentSettingsPro
data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
data.horizontalIndent = 10;
systemLabel.setLayoutData(data);
- systemLabel.setText(ResourceHandler.getString("UI_System_ID"));//$NON-NLS-1$
+ systemLabel.setText(HTMLUIPlugin.getResourceString("%UI_System_ID"));//$NON-NLS-1$
systemIdText = new Text(super.propertyPage, SWT.BORDER | SWT.READ_ONLY);
data = new GridData();
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/edit/ui/CleanupDialogHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/edit/ui/CleanupDialogHTML.java
index 1f1d042748..8d264b162a 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/edit/ui/CleanupDialogHTML.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/edit/ui/CleanupDialogHTML.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.edit.ui;
-
-
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
@@ -26,12 +24,12 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.CommonEncodingPreferenceNames;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.html.core.HTMLCorePlugin;
+import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.modelhandler.IModelHandler;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.xml.core.cleanup.XMLCleanupPreferencesImpl;
public class CleanupDialogHTML extends Dialog implements SelectionListener {
@@ -58,7 +56,7 @@ public class CleanupDialogHTML extends Dialog implements SelectionListener {
}
public Control createDialogArea(Composite parent) {
- getShell().setText(ResourceHandler.getString("Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup"
+ getShell().setText(SSEUIPlugin.getResourceString("%Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup"
Composite composite = new Composite(parent, SWT.NULL);
createDialogAreaInComposite(composite);
@@ -71,33 +69,33 @@ public class CleanupDialogHTML extends Dialog implements SelectionListener {
// Convert tag name case
// d257064 need to associate group w/ radio buttons so radio buttons header can be read
Group tagNameCase = new Group(composite, SWT.NONE);
- tagNameCase.setText(ResourceHandler.getString("Tag_name_case_for_HTML_UI_")); //$NON-NLS-1$ = "Tag name case for HTML:"
+ tagNameCase.setText(SSEUIPlugin.getResourceString("%Tag_name_case_for_HTML_UI_")); //$NON-NLS-1$ = "Tag name case for HTML:"
GridLayout hLayout = new GridLayout();
hLayout.numColumns = 3;
tagNameCase.setLayout(hLayout);
fRadioButtonTagNameCaseAsis = new Button(tagNameCase, SWT.RADIO);
- fRadioButtonTagNameCaseAsis.setText(ResourceHandler.getString("Tag_name_case_As-is_UI_")); //$NON-NLS-1$ = "&As-is"
+ fRadioButtonTagNameCaseAsis.setText(SSEUIPlugin.getResourceString("%Tag_name_case_As-is_UI_")); //$NON-NLS-1$ = "&As-is"
fRadioButtonTagNameCaseAsis.addSelectionListener(this);
fRadioButtonTagNameCaseLower = new Button(tagNameCase, SWT.RADIO);
- fRadioButtonTagNameCaseLower.setText(ResourceHandler.getString("Tag_name_case_Lower_UI_")); //$NON-NLS-1$ = "&Lower"
+ fRadioButtonTagNameCaseLower.setText(SSEUIPlugin.getResourceString("%Tag_name_case_Lower_UI_")); //$NON-NLS-1$ = "&Lower"
fRadioButtonTagNameCaseLower.addSelectionListener(this);
fRadioButtonTagNameCaseUpper = new Button(tagNameCase, SWT.RADIO);
- fRadioButtonTagNameCaseUpper.setText(ResourceHandler.getString("Tag_name_case_Upper_UI_")); //$NON-NLS-1$ = "&Upper"
+ fRadioButtonTagNameCaseUpper.setText(SSEUIPlugin.getResourceString("%Tag_name_case_Upper_UI_")); //$NON-NLS-1$ = "&Upper"
fRadioButtonTagNameCaseUpper.addSelectionListener(this);
// Convert attr name case
// d257064 need to associate group w/ radio buttons so radio buttons header can be read
Group attrNameCase = new Group(composite, SWT.NONE);
- attrNameCase.setText(ResourceHandler.getString("Attribute_name_case_for_HTML_UI_")); //$NON-NLS-1$ = "Attribute name case for HTML:"
+ attrNameCase.setText(SSEUIPlugin.getResourceString("%Attribute_name_case_for_HTML_UI_")); //$NON-NLS-1$ = "Attribute name case for HTML:"
attrNameCase.setLayout(hLayout);
fRadioButtonAttrNameCaseAsis = new Button(attrNameCase, SWT.RADIO);
- fRadioButtonAttrNameCaseAsis.setText(ResourceHandler.getString("Attribute_name_case_As-is_UI_")); //$NON-NLS-1$ = "A&s-is"
+ fRadioButtonAttrNameCaseAsis.setText(SSEUIPlugin.getResourceString("%Attribute_name_case_As-is_UI_")); //$NON-NLS-1$ = "A&s-is"
fRadioButtonAttrNameCaseAsis.addSelectionListener(this);
fRadioButtonAttrNameCaseLower = new Button(attrNameCase, SWT.RADIO);
- fRadioButtonAttrNameCaseLower.setText(ResourceHandler.getString("Attribute_name_case_Lower_UI_")); //$NON-NLS-1$ = "L&ower"
+ fRadioButtonAttrNameCaseLower.setText(SSEUIPlugin.getResourceString("%Attribute_name_case_Lower_UI_")); //$NON-NLS-1$ = "L&ower"
fRadioButtonAttrNameCaseLower.addSelectionListener(this);
fRadioButtonAttrNameCaseUpper = new Button(attrNameCase, SWT.RADIO);
- fRadioButtonAttrNameCaseUpper.setText(ResourceHandler.getString("Attribute_name_case_Upper_UI_")); //$NON-NLS-1$ = "U&pper"
+ fRadioButtonAttrNameCaseUpper.setText(SSEUIPlugin.getResourceString("%Attribute_name_case_Upper_UI_")); //$NON-NLS-1$ = "U&pper"
fRadioButtonAttrNameCaseUpper.addSelectionListener(this);
}
@@ -116,40 +114,40 @@ public class CleanupDialogHTML extends Dialog implements SelectionListener {
// Insert missing required attrs
fCheckBoxInsertRequiredAttrs = new Button(composite, SWT.CHECK);
- fCheckBoxInsertRequiredAttrs.setText(ResourceHandler.getString("Insert_required_attributes_UI_")); //$NON-NLS-1$
+ fCheckBoxInsertRequiredAttrs.setText(SSEUIPlugin.getResourceString("%Insert_required_attributes_UI_")); //$NON-NLS-1$
fCheckBoxInsertRequiredAttrs.addSelectionListener(this);
// Insert missing begin/end tags
fCheckBoxInsertMissingTags = new Button(composite, SWT.CHECK);
- fCheckBoxInsertMissingTags.setText(ResourceHandler.getString("Insert_missing_tags_UI_")); //$NON-NLS-1$ = "Insert missing tags"
+ fCheckBoxInsertMissingTags.setText(SSEUIPlugin.getResourceString("%Insert_missing_tags_UI_")); //$NON-NLS-1$ = "Insert missing tags"
fCheckBoxInsertMissingTags.addSelectionListener(this);
// Quote attribute values
fCheckBoxQuoteAttrValues = new Button(composite, SWT.CHECK);
- fCheckBoxQuoteAttrValues.setText(ResourceHandler.getString("Quote_attribute_values_UI_")); //$NON-NLS-1$ = "Quote attribute values"
+ fCheckBoxQuoteAttrValues.setText(SSEUIPlugin.getResourceString("%Quote_attribute_values_UI_")); //$NON-NLS-1$ = "Quote attribute values"
fCheckBoxQuoteAttrValues.addSelectionListener(this);
// Format source
fCheckBoxFormatSource = new Button(composite, 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"
fCheckBoxFormatSource.addSelectionListener(this);
// Convert EOL code
fCheckBoxConvertEOLCodes = new Button(composite, SWT.CHECK);
- fCheckBoxConvertEOLCodes.setText(ResourceHandler.getString("Convert_EOL_codes_UI_")); //$NON-NLS-1$ = "Convert end-of-line codes"
+ fCheckBoxConvertEOLCodes.setText(SSEUIPlugin.getResourceString("%Convert_EOL_codes_UI_")); //$NON-NLS-1$ = "Convert end-of-line codes"
fCheckBoxConvertEOLCodes.addSelectionListener(this);
Composite EOLCodes = new Composite(composite, SWT.NULL);
GridLayout hLayout = new GridLayout();
hLayout.numColumns = 3;
EOLCodes.setLayout(hLayout);
fRadioButtonConvertEOLWindows = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLWindows.setText(ResourceHandler.getString("EOL_Windows_UI")); //$NON-NLS-1$ = "Windows"
+ fRadioButtonConvertEOLWindows.setText(SSEUIPlugin.getResourceString("%EOL_Windows_UI")); //$NON-NLS-1$ = "Windows"
fRadioButtonConvertEOLWindows.addSelectionListener(this);
fRadioButtonConvertEOLUnix = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLUnix.setText(ResourceHandler.getString("EOL_Unix_UI")); //$NON-NLS-1$ = "Unix"
+ fRadioButtonConvertEOLUnix.setText(SSEUIPlugin.getResourceString("%EOL_Unix_UI")); //$NON-NLS-1$ = "Unix"
fRadioButtonConvertEOLUnix.addSelectionListener(this);
fRadioButtonConvertEOLMac = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLMac.setText(ResourceHandler.getString("EOL_Mac_UI")); //$NON-NLS-1$ = "Mac"
+ fRadioButtonConvertEOLMac.setText(SSEUIPlugin.getResourceString("%EOL_Mac_UI")); //$NON-NLS-1$ = "Mac"
fRadioButtonConvertEOLMac.addSelectionListener(this);
}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java
index a7890b24e6..19e5b746af 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java
@@ -11,6 +11,9 @@
package org.eclipse.wst.html.ui.internal;
import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
@@ -24,7 +27,7 @@ import org.eclipse.wst.html.ui.templates.TemplateContextTypeHTML;
import org.eclipse.wst.html.ui.templates.TemplateContextTypeHTMLAttribute;
import org.eclipse.wst.html.ui.templates.TemplateContextTypeHTMLAttributeValue;
import org.eclipse.wst.html.ui.templates.TemplateContextTypeHTMLTag;
-import org.eclipse.wst.sse.ui.EditorPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper;
@@ -33,7 +36,6 @@ import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistryImpl;
import org.eclipse.wst.sse.ui.registry.embedded.EmbeddedAdapterFactoryRegistryImpl;
import org.eclipse.wst.xml.ui.style.IStyleConstantsXML;
-
/**
* The main plugin class to be used in the desktop.
*/
@@ -41,6 +43,10 @@ public class HTMLUIPlugin extends AbstractUIPlugin {
public final static String ID = "org.eclipse.wst.html.ui"; //$NON-NLS-1$
protected static HTMLUIPlugin instance = null;
+ //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 template store for the html editor.
@@ -59,7 +65,7 @@ public class HTMLUIPlugin extends AbstractUIPlugin {
// Force a call to initialize default preferences since
// initializeDefaultPreferences is only called if *this* plugin's
// preference store is accessed
- initializeDefaultHTMLPreferences(EditorPlugin.getDefault().getPreferenceStore());
+ initializeDefaultHTMLPreferences(SSEUIPlugin.getDefault().getPreferenceStore());
}
public static HTMLUIPlugin getDefault() {
@@ -87,7 +93,7 @@ public class HTMLUIPlugin extends AbstractUIPlugin {
// ignore this preference store
// use EditorPlugin preference store
- IPreferenceStore editorStore = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
initializeDefaultHTMLPreferences(editorStore);
}
@@ -189,4 +195,49 @@ public class HTMLUIPlugin extends AbstractUIPlugin {
return fContextTypeRegistry;
}
+
+ /**
+ * 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.html.ui.internal.HTMLUIPluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.wst.html.ui/src/EditingHTML.properties b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties
index 0cbee1cfaf..47296db127 100644
--- a/bundles/org.eclipse.wst.html.ui/src/EditingHTML.properties
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties
@@ -35,8 +35,8 @@ _UI_MENU_VALIDATE_XML=Validate XML File
_UI_LABEL_UNDO_ADD_DESCRIPTION=Add
_UI_LABEL_UNDO_REPLACE_DESCRIPTION=Replace
_UI_LABEL_EDIT_DOCTYPE=Edit DOCTYPE
-_UI_INFO_EXPAND_ALL=IWAK0105I Expand All
-_UI_INFO_COLLAPSE_ALL=IWAK0106I Collapse All
+_UI_INFO_EXPAND_ALL=Expand All
+_UI_INFO_COLLAPSE_ALL=Collapse All
_UI_MENU_ADD_DTD_INFORMATION=Add DTD Information...
_UI_MENU_ADD_SCHEMA_INFORMATION=Add Schema Information...
@@ -145,14 +145,7 @@ _UI_WARNING_PREFIX_NOT_SPECIFIED=A prefix must be specified for the namespace na
_UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED=A root element name must be specified.
_UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED=A system ID must be specified.
-!======================================================================================
-!
-! Here is the list of Error string that have message IDs - make sure they are unique
-! Range for XMLBuilder messageIDs: IWAX1601E - IWAX1800E
-! Since we'll be combing these plugins at some later point we'll use the same range
-! and be carefull not to clobber those defined in xmlbuilder's plugin.properties
-!======================================================================================
-_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS=IWAK0107E The element already has an attribute with this name.
+_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS=The element already has an attribute with this name.
#
TemplateContextTypeHTMLTag.0=HTML Tags
@@ -163,4 +156,4 @@ TemplateContextTypeHTMLAttribute.0=HTML Attributes
HTMLFilesPreferencePage.0=Loading files...
HTMLFilesPreferencePage.1=Add this suffix (if not specified):
HTMLFilesPreferencePage.2=Insert DOCTYPE declaration
-HTMLFilesPreferencePage.3=Insert GENERATOR with META tag \ No newline at end of file
+HTMLFilesPreferencePage.3=Insert GENERATOR with META tag
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
index b016096985..d6d201b385 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java
@@ -38,9 +38,9 @@ import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.EditorPlugin;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.edit.util.SharedEditorPluginImageHelper;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
@@ -412,7 +412,7 @@ public class HTMLContentAssistProcessor extends AbstractContentAssistProcessor i
protected IPreferenceStore getPreferenceStore() {
if (fPreferenceStore == null)
- fPreferenceStore = EditorPlugin.getDefault().getPreferenceStore();
+ fPreferenceStore = SSEUIPlugin.getDefault().getPreferenceStore();
return fPreferenceStore;
}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
index 1d04f65b89..a056830a9e 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.internal.contentassist;
-
-
import org.eclipse.core.runtime.Preferences;
import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.html.core.HTMLCorePlugin;
import org.eclipse.wst.html.core.contentmodel.HTMLElementDeclaration;
+import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.xml.ui.contentassist.XMLContentModelGenerator;
import org.w3c.dom.Node;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/nls/ResourceHandler.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/nls/ResourceHandler.java
deleted file mode 100644
index a629f04897..0000000000
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/nls/ResourceHandler.java
+++ /dev/null
@@ -1,70 +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.html.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("EditingHTML");//$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.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLColorPage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLColorPage.java
index a77e0f2515..490522ce74 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLColorPage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLColorPage.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.preferences.ui;
-
-
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -21,8 +19,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
+import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.html.ui.internal.nls.ResourceHandler;
import org.eclipse.wst.sse.core.IModelManager;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
@@ -54,7 +52,7 @@ public class HTMLColorPage extends XMLColorPage {
}
public String getSampleText() {
- return ResourceHandler.getString("Sample_HTML_doc"); //$NON-NLS-1$ = "<!DOCTYPE HTML\n\tPUBLIC \"-//W3C/DTD/ HTML 4.01 Transitional//EN\"\n\t\"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n\t<HEAD>\n\t\t<META content=\"text/html\">\n\t\t<TITLE>HTML Highlighting Preferences</TITLE>\n\t</HEAD>\n<BODY>\n\t<!--\n\t\twe need a flaming logo!\n\t-->\n\t<%\t%>\n</BODY>\n</HTML>"
+ return HTMLUIPlugin.getResourceString("%Sample_HTML_doc"); //$NON-NLS-1$ = "<!DOCTYPE HTML\n\tPUBLIC \"-//W3C/DTD/ HTML 4.01 Transitional//EN\"\n\t\"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML>\n\t<HEAD>\n\t\t<META content=\"text/html\">\n\t\t<TITLE>HTML Highlighting Preferences</TITLE>\n\t</HEAD>\n<BODY>\n\t<!--\n\t\twe need a flaming logo!\n\t-->\n\t<%\t%>\n</BODY>\n</HTML>"
}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLFilesPreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLFilesPreferencePage.java
index 53bd4784ea..0b896b7f7c 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLFilesPreferencePage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLFilesPreferencePage.java
@@ -21,16 +21,15 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.html.core.HTMLCorePlugin;
import org.eclipse.wst.html.core.HTMLFilesPreferenceNames;
+import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.html.ui.internal.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.xml.ui.preferences.EncodingSettings;
import org.eclipse.wst.xml.ui.preferences.WorkbenchDefaultEncodingSettings;
import org.eclipse.wst.xml.ui.preferences.XMLFilesPreferencePage;
-
public class HTMLFilesPreferencePage extends XMLFilesPreferencePage {
private WorkbenchDefaultEncodingSettings fInputEncodingSettings = null;
private Text fHtmlext_Field;
@@ -77,7 +76,7 @@ public class HTMLFilesPreferencePage extends XMLFilesPreferencePage {
protected void createContentsForLoadingGroup(Composite parent) {
Group group = createGroup(parent, 1);
- group.setText(ResourceHandler.getString("HTMLFilesPreferencePage.0")); //$NON-NLS-1$
+ group.setText(HTMLUIPlugin.getResourceString("%HTMLFilesPreferencePage.0")); //$NON-NLS-1$
fInputEncodingSettings = new WorkbenchDefaultEncodingSettings(group);
}
@@ -126,24 +125,24 @@ public class HTMLFilesPreferencePage extends XMLFilesPreferencePage {
*/
protected void createContentsForCreatingGroup(Composite parent) {
Group creatingGroup = createGroup(parent, 2);
- creatingGroup.setText(org.eclipse.wst.sse.ui.nls.ResourceHandler.getString("Creating_files")); //$NON-NLS-1$
+ creatingGroup.setText(SSEUIPlugin.getResourceString("%Creating_files")); //$NON-NLS-1$
// Add this suffix..
- createLabel(creatingGroup, ResourceHandler.getString("HTMLFilesPreferencePage.1")); //$NON-NLS-1$
+ createLabel(creatingGroup, HTMLUIPlugin.getResourceString("%HTMLFilesPreferencePage.1")); //$NON-NLS-1$
fHtmlext_Field = createTextField(creatingGroup);
// Encoding..
- Label label = createLabel(creatingGroup, org.eclipse.wst.sse.ui.nls.ResourceHandler.getString("Encoding_desc")); //$NON-NLS-1$
+ Label label = createLabel(creatingGroup, SSEUIPlugin.getResourceString("%Encoding_desc")); //$NON-NLS-1$
((GridData)label.getLayoutData()).horizontalSpan = 2;
fEncodingSettings = new EncodingSettings(creatingGroup);
((GridData)fEncodingSettings.getLayoutData()).horizontalSpan = 2;
// Insert DOCTYPE declaration
- fDoctype_Button = createCheckBox(creatingGroup, ResourceHandler.getString("HTMLFilesPreferencePage.2")); //$NON-NLS-1$
+ fDoctype_Button = createCheckBox(creatingGroup, HTMLUIPlugin.getResourceString("%HTMLFilesPreferencePage.2")); //$NON-NLS-1$
((GridData)fDoctype_Button.getLayoutData()).horizontalSpan = 2;
// Insert GENERATOR with META tag
- fGenerator_Button = createCheckBox(creatingGroup, ResourceHandler.getString("HTMLFilesPreferencePage.3")); //$NON-NLS-1$
+ fGenerator_Button = createCheckBox(creatingGroup, HTMLUIPlugin.getResourceString("%HTMLFilesPreferencePage.3")); //$NON-NLS-1$
((GridData)fGenerator_Button.getLayoutData()).horizontalSpan = 2;
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLSourcePreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLSourcePreferencePage.java
index 35fbea7fe2..56f6eacd7f 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLSourcePreferencePage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/preferences/ui/HTMLSourcePreferencePage.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.preferences.ui;
-
-
import org.eclipse.core.runtime.Preferences;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -19,10 +17,10 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.html.core.HTMLCorePlugin;
+import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
import org.eclipse.wst.html.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.xml.ui.preferences.XMLSourcePreferencePage;
@@ -60,19 +58,19 @@ public class HTMLSourcePreferencePage extends XMLSourcePreferencePage {
protected Composite createContentsForPreferredCaseGroup(Composite parent, int columnSpan) {
Group caseGroup = createGroup(parent, columnSpan);
- caseGroup.setText(ResourceHandler.getString("Preferred_markup_case_UI_")); //$NON-NLS-1$ = "Preferred markup case"
+ caseGroup.setText(SSEUIPlugin.getResourceString("%Preferred_markup_case_UI_")); //$NON-NLS-1$ = "Preferred markup case"
// d257064 need to associate group w/ radio buttons so radio buttons header can be read
Group tagNameGroup = createGroup(caseGroup, 1);
- tagNameGroup.setText(ResourceHandler.getString("Tag_names__UI_")); //$NON-NLS-1$ = "Tag names:"
- fTagNameUpper = createRadioButton(tagNameGroup, ResourceHandler.getString("Tag_names_Upper_case_UI_")); //$NON-NLS-1$ = "&Upper case"
- fTagNameLower = createRadioButton(tagNameGroup, ResourceHandler.getString("Tag_names_Lower_case_UI_")); //$NON-NLS-1$ = "&Lower case"
+ tagNameGroup.setText(SSEUIPlugin.getResourceString("%Tag_names__UI_")); //$NON-NLS-1$ = "Tag names:"
+ fTagNameUpper = createRadioButton(tagNameGroup, SSEUIPlugin.getResourceString("%Tag_names_Upper_case_UI_")); //$NON-NLS-1$ = "&Upper case"
+ fTagNameLower = createRadioButton(tagNameGroup, SSEUIPlugin.getResourceString("%Tag_names_Lower_case_UI_")); //$NON-NLS-1$ = "&Lower case"
// d257064 need to associate group w/ radio buttons so radio buttons header can be read
Group attrNameGroup = createGroup(caseGroup, 1);
- attrNameGroup.setText(ResourceHandler.getString("Attribute_names__UI_")); //$NON-NLS-1$ = "Attribute names:"
- fAttrNameUpper = createRadioButton(attrNameGroup, ResourceHandler.getString("Attribute_names_Upper_case_UI_")); //$NON-NLS-1$ = "U&pper case"
- fAttrNameLower = createRadioButton(attrNameGroup, ResourceHandler.getString("Attribute_names_Lower_case_UI_")); //$NON-NLS-1$ = "L&ower case"
+ attrNameGroup.setText(SSEUIPlugin.getResourceString("%Attribute_names__UI_")); //$NON-NLS-1$ = "Attribute names:"
+ fAttrNameUpper = createRadioButton(attrNameGroup, SSEUIPlugin.getResourceString("%Attribute_names_Upper_case_UI_")); //$NON-NLS-1$ = "U&pper case"
+ fAttrNameLower = createRadioButton(attrNameGroup, SSEUIPlugin.getResourceString("%Attribute_names_Lower_case_UI_")); //$NON-NLS-1$ = "L&ower case"
return parent;
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTML.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTML.java
index a06a0377e9..3267389534 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTML.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTML.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.templates;
-import org.eclipse.wst.html.ui.internal.nls.ResourceHandler;
+import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeXML;
-
/**
* Base class for HTML template context types. Templates of this context
* type apply to any place within HTML content type.
@@ -23,7 +22,7 @@ public class TemplateContextTypeHTML extends TemplateContextTypeXML {
public static final String HTML_PREFIX = "html_"; //$NON-NLS-1$
public TemplateContextTypeHTML() {
- this(generateContextTypeId(TemplateContextTypeIds.ALL), ResourceHandler.getString("TemplateContextTypeHTML.0")); //$NON-NLS-1$
+ this(generateContextTypeId(TemplateContextTypeIds.ALL), HTMLUIPlugin.getResourceString("%TemplateContextTypeHTML.0")); //$NON-NLS-1$
}
/**
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttribute.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttribute.java
index 1ad10c7050..50f78b8b16 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttribute.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttribute.java
@@ -10,17 +10,15 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.templates;
-import org.eclipse.wst.html.ui.internal.nls.ResourceHandler;
+import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
-
-
/**
* Templates of this context type apply to any attributes within HTML content type.
*/
public class TemplateContextTypeHTMLAttribute extends TemplateContextTypeHTML {
public TemplateContextTypeHTMLAttribute() {
- super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTE), ResourceHandler.getString("TemplateContextTypeHTMLAttribute.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTE), HTMLUIPlugin.getResourceString("%TemplateContextTypeHTMLAttribute.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttributeValue.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttributeValue.java
index 33f1ecb949..33fb8051a0 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttributeValue.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLAttributeValue.java
@@ -10,10 +10,9 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.templates;
-import org.eclipse.wst.html.ui.internal.nls.ResourceHandler;
+import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
-
/**
* Templates of this context type apply to any attribute values
* within HTML content type.
@@ -21,6 +20,6 @@ import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
public class TemplateContextTypeHTMLAttributeValue extends TemplateContextTypeHTML {
public TemplateContextTypeHTMLAttributeValue() {
- super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTEVALUE), ResourceHandler.getString("TemplateContextTypeHTMLAttributeValue.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTEVALUE), HTMLUIPlugin.getResourceString("%TemplateContextTypeHTMLAttributeValue.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLTag.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLTag.java
index ee62385096..49b8b3809b 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLTag.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/templates/TemplateContextTypeHTMLTag.java
@@ -10,16 +10,15 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.templates;
-import org.eclipse.wst.html.ui.internal.nls.ResourceHandler;
+import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeIds;
-
/**
* Templates of this context type apply to any tags within HTML content type.
*/
public class TemplateContextTypeHTMLTag extends TemplateContextTypeHTML {
public TemplateContextTypeHTMLTag() {
- super(generateContextTypeId(TemplateContextTypeIds.TAG), ResourceHandler.getString("TemplateContextTypeHTMLTag.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.TAG), HTMLUIPlugin.getResourceString("%TemplateContextTypeHTMLTag.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java
index 797099ef25..b1d94971ca 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLNodeActionManager.java
@@ -10,17 +10,14 @@
*******************************************************************************/
package org.eclipse.wst.html.ui.views.contentoutline;
-
-
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.common.contentmodel.util.DOMContentBuilder;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
import org.eclipse.wst.html.core.HTMLCMProperties;
-import org.eclipse.wst.html.core.HTMLCorePlugin;
-import org.eclipse.wst.html.core.PreferenceNames;
import org.eclipse.wst.html.core.format.HTMLFormatProcessorImpl;
+import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
import org.eclipse.wst.html.core.preferences.HTMLContentBuilder;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.format.IStructuredFormatProcessor;
diff --git a/bundles/org.eclipse.wst.sse.core/plugin.properties b/bundles/org.eclipse.wst.sse.core/plugin.properties
index cf728c60c4..5ea54cc879 100644
--- a/bundles/org.eclipse.wst.sse.core/plugin.properties
+++ b/bundles/org.eclipse.wst.sse.core/plugin.properties
@@ -21,9 +21,11 @@ Content_Type_Factory_Contribution_Extension.name=Content Type Factory Contributi
CSS_Profile_Extension.name=CSS Profile Extension
Comment_Element_Handler_Extension.name=Comment Element Handler Extension
Model_Handler_Extension.name=Model Handler Extension
-Structured_Builder_Participant_Extension.name=Structured Builder Participant Extension
SDMB.name=Structured Document and Model Builder
Format_Processors_Extension_Point.name=Format Processors Extension Point
-JSP_Embedded_Content_Type_Handler_Extension_Point.name=JSP Embedded Content Type Handler Extension Point
Structured_Builder_Delegate_Extension_Point.name=Structured Builder Delegate Extension Point
Structured_Sources_Task_Extension.name=Structured Sources Task
+###############################################################################
+# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
+#JSP_Embedded_Content_Type_Handler_Extension_Point.name=JSP Embedded Content Type Handler Extension Point
+#Structured_Builder_Participant_Extension.name=Structured Builder Participant Extension
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/AbstractStructuredModel.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/AbstractStructuredModel.java
index 5dabf2d3ac..129acb4246 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/AbstractStructuredModel.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/AbstractStructuredModel.java
@@ -38,7 +38,6 @@ import org.eclipse.wst.sse.core.exceptions.ResourceInUse;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.internal.Logger;
import org.eclipse.wst.sse.core.internal.SSECorePlugin;
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler1;
import org.eclipse.wst.sse.core.modelhandler.IModelHandler;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.undo.IStructuredTextUndoManager;
@@ -1390,7 +1389,7 @@ public abstract class AbstractStructuredModel implements IStructuredModel {
// since it uses hashtables, and you can't have a null id for a
// hashtable.
if (newId == null)
- throw new IllegalArgumentException(ResourceHandler1.getString("A_model's_id_can_not_be_nu_EXC_")); //$NON-NLS-1$ = "A model's id can not be null"
+ throw new IllegalArgumentException(SSECorePlugin.getResourceString("%A_model's_id_can_not_be_nu_EXC_")); //$NON-NLS-1$ = "A model's id can not be null"
// To gaurd againt throwing a spurious ResourceInUse exception,
// which can occur when two pieces of code both want to change the id,
// so the second request is spurious, we'll ignore any requests that
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/ModelManagerImpl.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/ModelManagerImpl.java
index 985a9619d1..3fbd9f0135 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/ModelManagerImpl.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/ModelManagerImpl.java
@@ -58,8 +58,8 @@ import org.eclipse.wst.sse.core.exceptions.ResourceInUse;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
import org.eclipse.wst.sse.core.internal.Logger;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry;
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler1;
import org.eclipse.wst.sse.core.modelhandler.IModelHandler;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.util.Assert;
@@ -67,8 +67,6 @@ import org.eclipse.wst.sse.core.util.ProjectResolver;
import org.eclipse.wst.sse.core.util.URIResolver;
import org.eclipse.wst.sse.core.util.Utilities;
-
-
/**
* Not intended to be subclassed.
*
@@ -1610,7 +1608,7 @@ class ModelManagerImpl implements IModelManager {
// let's see if we already have it in our cache
SharedObject sharedObject = (SharedObject) fManagedObjects.get(id);
if (sharedObject == null || sharedObject.theSharedObject == null) {
- throw new SourceEditingRuntimeException(ResourceHandler1.getString("Program_Error__ModelManage_EXC_")); //$NON-NLS-1$ = "Program Error: ModelManagerImpl::saveModel. Model should be in the cache"
+ throw new SourceEditingRuntimeException(SSECorePlugin.getResourceString("%Program_Error__ModelManage_EXC_")); //$NON-NLS-1$ = "Program Error: ModelManagerImpl::saveModel. Model should be in the cache"
} else {
boolean saved = false;
// if this model was based on a File Buffer and we're writing back
@@ -1646,7 +1644,7 @@ class ModelManagerImpl implements IModelManager {
// let's see if we already have it in our cache
SharedObject sharedObject = (SharedObject) fManagedObjects.get(id);
if (sharedObject == null) {
- throw new SourceEditingRuntimeException(ResourceHandler1.getString("Program_Error__ModelManage_EXC_")); //$NON-NLS-1$ = "Program Error: ModelManagerImpl::saveModel. Model should be in the cache"
+ throw new SourceEditingRuntimeException(SSECorePlugin.getResourceString("%Program_Error__ModelManage_EXC_")); //$NON-NLS-1$ = "Program Error: ModelManagerImpl::saveModel. Model should be in the cache"
} else {
// if this model was based on a File Buffer and we're writing back
// to the same location, use the buffer to do the writing
@@ -1675,7 +1673,7 @@ class ModelManagerImpl implements IModelManager {
// let's see if we already have it in our cache
SharedObject sharedObject = (SharedObject) fManagedObjects.get(id);
if (sharedObject == null) {
- throw new SourceEditingRuntimeException(ResourceHandler1.getString("Program_Error__ModelManage_EXC_")); //$NON-NLS-1$ = "Program Error: ModelManagerImpl::saveModel. Model should be in the cache"
+ throw new SourceEditingRuntimeException(SSECorePlugin.getResourceString("%Program_Error__ModelManage_EXC_")); //$NON-NLS-1$ = "Program Error: ModelManagerImpl::saveModel. Model should be in the cache"
} else {
CodedStreamCreator codedStreamCreator = new CodedStreamCreator();
codedStreamCreator.set(sharedObject.theSharedObject.getId(), new DocumentReader(sharedObject.theSharedObject.getStructuredDocument()));
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingException.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingException.java
index cc681b25c7..4f14749c7f 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingException.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingException.java
@@ -12,9 +12,7 @@
*******************************************************************************/
package org.eclipse.wst.sse.core.exceptions;
-
-
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
/**
* The SourceEditingException is often thrown by Source Editor methods in
@@ -77,7 +75,7 @@ public class SourceEditingException extends Exception {
// we don't put super.toString to "hide" that it was a
// sourceEditing exception
String s = null; //super.toString();
- String originalError = ResourceHandler.getString("Original_Error__UI_"); //$NON-NLS-1$ = "Original Error:"
+ String originalError = SSECorePlugin.getResourceString("%Original_Error__UI_"); //$NON-NLS-1$ = "Original Error:"
if (originalException != null) {
s = originalError + " " + originalException.toString(); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingRuntimeException.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingRuntimeException.java
index 45a41f165c..8b09a61156 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingRuntimeException.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/exceptions/SourceEditingRuntimeException.java
@@ -12,9 +12,7 @@
*******************************************************************************/
package org.eclipse.wst.sse.core.exceptions;
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler;
-
-
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
/**
* The SourceEditingRuntimeException is often thrown by Source Editor methods
@@ -64,7 +62,7 @@ public class SourceEditingRuntimeException extends RuntimeException {
embeddedMessage = originalException.getClass().getName() + ": " + originalException.getMessage(); //$NON-NLS-1$
// not all exceptions have messages (e.g. many
// NullPointerException)
- String originalError = ResourceHandler.getString("Original_Error__UI_"); //$NON-NLS-1$ = "Original Error:"
+ String originalError = SSECorePlugin.getResourceString("%Original_Error__UI_"); //$NON-NLS-1$ = "Original Error:"
if (result == null)
result = ""; //$NON-NLS-1$
if (embeddedMessage != null)
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java
index 6a13a63378..3a1880c3ad 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java
@@ -12,6 +12,10 @@
*******************************************************************************/
package org.eclipse.wst.sse.core.internal;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.wst.common.encoding.CommonEncodingPreferenceNames;
@@ -53,6 +57,10 @@ import org.osgi.framework.BundleContext;
*/
public class SSECorePlugin extends Plugin implements IModelManagerPlugin {
static SSECorePlugin instance = null;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+ private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
+ private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
private static final String OFF = "off"; //$NON-NLS-1$
public static final String STRUCTURED_BUILDER = "org.eclipse.wst.sse.core.structuredbuilder"; //$NON-NLS-1$
@@ -130,4 +138,49 @@ public class SSECorePlugin extends Plugin implements IModelManagerPlugin {
public IModelManager getModelManager() {
return StructuredModelManager.getInstance().getModelManager();
}
+
+ /**
+ * 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.sse.core.internal.SSECorePluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.wst.sse.core/src/Models.properties b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePluginResources.properties
index 59e9955494..a956704bdd 100644
--- a/bundles/org.eclipse.wst.sse.core/src/Models.properties
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePluginResources.properties
@@ -10,17 +10,18 @@
# Jens Lukowski/Innoopract - initial renaming/restructuring
#
###############################################################################
-Invalid_character_('<')_fo_ERROR_=IWAK0028E Invalid character ('<') found
-Invalid_character_('>')_fo_ERROR_=IWAK0029E Invalid character ('>') found
-Invalid_character_('&')_fo_ERROR_=IWAK0030E Invalid character ('&') found
+A_model's_id_can_not_be_nu_EXC_=A model's id can not be null
+Program_Error__ModelManage_EXC_=Program Error: ModelManagerImpl::saveModel. Model should be in the cache
Original_Error__UI_=Original Error:
-Program_Error__ModelManage_EXC_=IWAK0031E Program Error: ModelManagerImpl::saveModel. Model should be in the cache
-Invalid_character_('__')_f_EXC_=IWAK0032E Invalid character ('\"') found
-Unkown_internal_scanner_er_ERROR_=IWAK0033E Unkown internal scanner error
-Internal_error__unknown_st_ERROR_=IWAK0034E Internal error: unknown state
-Error__could_not_match_inp_ERROR_=IWAK0035E Error: could not match input
-Error__pushback_value_was__ERROR_=IWAK0036E Error: pushback value was too large
-An_I/O_error_occured_while_EXC_=IWAK0037E An I/O error occured while scanning :
+ModelPlugin.0=Structured Builder
+StructuredDocumentBuilder.0=Updating builders
+Text_Change_UI_=Text Change
+###############################################################################
+Unkown_internal_scanner_er_ERROR_=Unkown internal scanner error
+Internal_error__unknown_st_ERROR_=Internal error: unknown state
+Error__could_not_match_inp_ERROR_=Error: could not match input
+Error__pushback_value_was__ERROR_=Error: pushback value was too large
+An_I/O_error_occured_while_EXC_=An I/O error occured while scanning :
3concat=File not found : \"{0}\"
5concat=Error opening file \"{0}\"
ul_____(template)_UI_=ul (template)
@@ -36,10 +37,9 @@ html____(template)_UI_=html (template)
script_____(commented)_UI_=script (commented)
style_____(commented)_UI_=style (commented)
img_____(map)_UI=img (map)
-Usage___java_HTMLTokenizer_EXC_=IWAK0038E Usage : java HTMLTokenizer <inputfile>
+Usage___java_HTMLTokenizer_EXC_=Usage : java HTMLTokenizer <inputfile>
## on the following line, just translate: "place title here" and "place content here"
__>_n_t_t<TITLE><|c>place__UI_=\">\n\t\t<TITLE><|c>place title here</TITLE>\n\t</HEAD>\n\t<BODY>\n\t\tplace content here\n\t</BODY>\n</HTML>
-A_model's_id_can_not_be_nu_EXC_=IWAK0039E A model's id can not be null
Flatmodel_constructor_doesn__t_know_how_to_deal_with_non-string_4=Flatmodel constructor doesn\'t know how to deal with non-string
unexpected_ModelManager_Impl_1=unexpected ModelManager Impl
continuous_1=continuous
@@ -67,6 +67,3 @@ Formatting_element_{0}=Formatting element \"{0}\"
Formatting_indentation_before_element_{0}=Formatting indentation before element \"{0}\"
Formatting_indentation_after_element_{0}=Formatting indentation after element \"{0}\"
Formatting_element_{0}=Formatting element \"{0}\"
-StructuredDocumentBuilder.0=Updating builders
-ModelPlugin.0=Structured Builder
-Text_Change_UI_=Text Change
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/builder/StructuredDocumentBuilder.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/builder/StructuredDocumentBuilder.java
index 057d600584..84cd0e265e 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/builder/StructuredDocumentBuilder.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/builder/StructuredDocumentBuilder.java
@@ -49,10 +49,8 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.wst.sse.core.builder.IBuilderDelegate;
import org.eclipse.wst.sse.core.internal.Logger;
import org.eclipse.wst.sse.core.internal.SSECorePlugin;
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-
public class StructuredDocumentBuilder extends IncrementalProjectBuilder implements IExecutableExtension {
protected static final boolean _debugBuilder = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.core/builder")); //$NON-NLS-1$ //$NON-NLS-2$
@@ -241,7 +239,7 @@ public class StructuredDocumentBuilder extends IncrementalProjectBuilder impleme
}
IProject[] allProjects = root.getProjects();
IProgressMonitor localMonitor = subMonitorFor(monitor, allProjects.length);
- localMonitor.beginTask(ResourceHandler.getString("StructuredDocumentBuilder.0"), 1); //$NON-NLS-1$
+ localMonitor.beginTask(SSECorePlugin.getResourceString("%StructuredDocumentBuilder.0"), 1); //$NON-NLS-1$
for (int i = 0; i < allProjects.length && !monitor.isCanceled(); i++) {
add(localMonitor, allProjects[i], validateEditContext);
localMonitor.worked(1);
@@ -539,7 +537,7 @@ public class StructuredDocumentBuilder extends IncrementalProjectBuilder impleme
void doTaskTagProcessing() {
// Must make sure the builder is registered for projects which may
// have been created before this plugin was activated.
- Job adder = new WorkspaceJob(ResourceHandler.getString("ModelPlugin.0")) { //$NON-NLS-1$
+ Job adder = new WorkspaceJob(SSECorePlugin.getResourceString("%ModelPlugin.0")) { //$NON-NLS-1$
public IStatus runInWorkspace(IProgressMonitor monitor) {
add(monitor, ResourcesPlugin.getWorkspace().getRoot(), null);
return Status.OK_STATUS;
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler.java
deleted file mode 100644
index 3af05489ad..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.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("Models");//$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);
- }
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler1.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler1.java
deleted file mode 100644
index 347999b9cb..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/nls/ResourceHandler1.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.internal.nls;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class ResourceHandler1 {
-
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("Models");//$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);
- }
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextUndoManager.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextUndoManager.java
index 501e962247..92796b0759 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextUndoManager.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextUndoManager.java
@@ -29,7 +29,7 @@ import org.eclipse.wst.sse.core.events.RegionChangedEvent;
import org.eclipse.wst.sse.core.events.RegionsReplacedEvent;
import org.eclipse.wst.sse.core.events.StructuredDocumentEvent;
import org.eclipse.wst.sse.core.events.StructuredDocumentRegionsReplacedEvent;
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.undo.CommandCursorPosition;
import org.eclipse.wst.sse.core.undo.IDocumentSelectionMediator;
@@ -39,7 +39,6 @@ import org.eclipse.wst.sse.core.undo.UndoDocumentEvent;
import org.eclipse.wst.sse.core.util.Assert;
import org.eclipse.wst.sse.core.util.Utilities;
-
public class StructuredTextUndoManager implements IStructuredTextUndoManager {
class InternalCommandStackListener implements CommandStackListener {
@@ -135,7 +134,7 @@ public class StructuredTextUndoManager implements IStructuredTextUndoManager {
}
- private static final String TEXT_CHANGE_TEXT = ResourceHandler.getString("Text_Change_UI_"); //$NON-NLS-1$
+ private static final String TEXT_CHANGE_TEXT = SSECorePlugin.getResourceString("%Text_Change_UI_"); //$NON-NLS-1$
private CommandStack fCommandStack = null;
private StructuredTextCompoundCommandImpl fCompoundCommand = null;
private String fCompoundCommandDescription = null;
diff --git a/bundles/org.eclipse.wst.sse.ui/plugin.properties b/bundles/org.eclipse.wst.sse.ui/plugin.properties
index 5ddd9cc28a..64b261488f 100644
--- a/bundles/org.eclipse.wst.sse.ui/plugin.properties
+++ b/bundles/org.eclipse.wst.sse.ui/plugin.properties
@@ -20,23 +20,17 @@ Structured_Text_Editor.name=Structured Text Editors
#
sourceEditorFontDefiniton.label=Structured Text Editor Text Font
-sourceEditorFontDefintion.description=The Structured text editor text font is used by Structured text editors.
Adapter_Factory_Description_Extension.name=Adapter Factory Description Extension
Embedded_Content_Type_Adapter_Factory_Provider_Extension.name=Embedded Content Type Adapter Factory Provider Extension
Extended_Editor_Actions_Extension.name=Extended Editor Actions Extension
Drop_Target_Transfers_Extension.name=Drop Target Transfers Extension
-Bean_Info_Provider_Extension.name=Bean Info Provider Extension
Extended_Editor_Configuration_Extension.name=Extended Editor Configuration Extension
##########################################################################
# These strings are used in Workbench Keys Preferences
##########################################################################
scope.structuredTextEditor.name=Editing in Structured Text Editors
scope.structuredTextEditor.description=Editing in Structured Text Editors
-command.comment.name=Comment
-command.comment.description=Comment
-command.uncomment.name=Uncomment
-command.uncomment.description=Uncomment
command.toggle.comment.name=Toggle Comment
command.toggle.comment.description=Toggle Comment
command.add.block.comment.name=Add Block Comment
@@ -83,3 +77,7 @@ Breakpoint_Extension_Point.name=Breakpoint Extension Point
SpellCheck_Extension_Point.name=SpellCheck Extension Point
Reconcile_Validator_Extension_Point.name=Reconcile Validator Extension Point
Open_On_Extension_Point.name=Open On Extension Point
+###############################################################################
+# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
+#sourceEditorFontDefintion.description=The Structured text editor text font is used by Structured text editors.
+#Bean_Info_Provider_Extension.name=Bean Info Provider Extension
diff --git a/bundles/org.eclipse.wst.sse.ui/src-contentproperties/org/eclipse/wst/sse/ui/contentproperties/ContentPropertiesPlugin.java b/bundles/org.eclipse.wst.sse.ui/src-contentproperties/org/eclipse/wst/sse/ui/contentproperties/ContentPropertiesPlugin.java
index 954403aa5e..01d4a220e0 100644
--- a/bundles/org.eclipse.wst.sse.ui/src-contentproperties/org/eclipse/wst/sse/ui/contentproperties/ContentPropertiesPlugin.java
+++ b/bundles/org.eclipse.wst.sse.ui/src-contentproperties/org/eclipse/wst/sse/ui/contentproperties/ContentPropertiesPlugin.java
@@ -66,11 +66,6 @@ public class ContentPropertiesPlugin extends Plugin implements IStartup {
public ContentPropertiesPlugin(IPluginDescriptor descriptor) {
super(descriptor);
plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.sse.ui.contentproperties.ContentPropertiesPluginResources"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
}
private void disableSynchronizer() {
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ExtensionsPlugin.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ExtensionsPlugin.java
index aeb6b22174..71884052f5 100644
--- a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ExtensionsPlugin.java
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ExtensionsPlugin.java
@@ -65,12 +65,6 @@ public class ExtensionsPlugin extends Plugin {
public ExtensionsPlugin(IPluginDescriptor descriptor) {
super(descriptor);
plugin = this;
- try {
- resourceBundle = ResourceBundle
- .getBundle("org.eclipse.wst.sse.ui.extensions.ExtensionsPluginResources"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
}
/**
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FileModelProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FileModelProvider.java
index 045f65ef90..dcc02742ea 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FileModelProvider.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FileModelProvider.java
@@ -63,15 +63,13 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.undo.IStructuredTextUndoManager;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistry;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistryImpl;
import org.eclipse.wst.sse.ui.util.Assert;
-
/**
* This version of an IDocumentProvider is the editor side counter part to
* IModelManager. It is responsible for providing the structuredModel, which
@@ -204,7 +202,7 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
// //$NON-NLS-1$
//$NON-NLS-1$ = "This encoding({0}) is not supported. The default encoding will be used instead."
// CSSFileModelProvider will use this.
- protected static final String UNSUPPORTED_ENCODING_WARNING_TITLE = ResourceHandler.getString("Encoding_warning_UI_"); //$NON-NLS-1$ = "Encoding warning"
+ protected static final String UNSUPPORTED_ENCODING_WARNING_TITLE = SSEUIPlugin.getResourceString("%Encoding_warning_UI_"); //$NON-NLS-1$ = "Encoding warning"
public synchronized static FileModelProvider getInstance() {
if (fInstance == null)
@@ -628,7 +626,7 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
}
}
if (!resource.exists()) {
- progressMonitor.beginTask(ResourceHandler.getString("FileDocumentProvider.task.saving"), 2000); //$NON-NLS-1$
+ progressMonitor.beginTask(SSEUIPlugin.getResourceString("%FileDocumentProvider.task.saving"), 2000); //$NON-NLS-1$
ContainerGenerator generator = new ContainerGenerator(resource.getParent().getFullPath());
generator.generateContainer(new SubProgressMonitor(progressMonitor, 1000));
}
@@ -674,17 +672,17 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
progressMonitor.setCanceled(true);
// inform about failure
fireElementStateChangeFailed(element);
- throw new SourceEditingRuntimeException(ResourceHandler.getString("Unable_to_save_the_documen_ERROR_")); //$NON-NLS-1$ = "Unable to save the document. Output file not found."
+ throw new SourceEditingRuntimeException(SSEUIPlugin.getResourceString("%Unable_to_save_the_documen_ERROR_")); //$NON-NLS-1$ = "Unable to save the document. Output file not found."
} catch (UnsupportedEncodingException exception) {
progressMonitor.setCanceled(true);
// inform about failure
fireElementStateChangeFailed(element);
- throw new SourceEditingRuntimeException(ResourceHandler.getString("Unable_to_save_the_documen1_ERROR_")); //$NON-NLS-1$ = "Unable to save the document. Unsupported encoding."
+ throw new SourceEditingRuntimeException(SSEUIPlugin.getResourceString("%Unable_to_save_the_documen1_ERROR_")); //$NON-NLS-1$ = "Unable to save the document. Unsupported encoding."
} catch (java.io.IOException exception) {
progressMonitor.setCanceled(true);
// inform about failure
fireElementStateChangeFailed(element);
- throw new SourceEditingRuntimeException(ResourceHandler.getString("Unable_to_save_the_documen2_ERROR_")); //$NON-NLS-1$
+ throw new SourceEditingRuntimeException(SSEUIPlugin.getResourceString("%Unable_to_save_the_documen2_ERROR_")); //$NON-NLS-1$
//$NON-NLS-1$ = "Unable to save the document. An I/O error occurred while saving the document."
} catch (OperationCanceledException exception) {
Logger.log(Logger.INFO, "Save Operation Canceled at user's request"); //$NON-NLS-1$
@@ -883,7 +881,7 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
getModel(fileEditorInput).reload(inStream);
reloaded = true;
} catch (IOException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FileModelProvider.0"), new String[]{fileEditorInput.getName()}); //$NON-NLS-1$
+ String message = MessageFormat.format(SSEUIPlugin.getResourceString("%FileModelProvider.0"), new String[]{fileEditorInput.getName()}); //$NON-NLS-1$
info.fStatus = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e);
} catch (CoreException e) {
info.fStatus = e.getStatus();
@@ -938,7 +936,7 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
private boolean openUnconvertableCharactersWarningForSave(CharConversionErrorWithDetail outputException, Shell topshell) {
// open message dialog
final String title = UNSUPPORTED_ENCODING_WARNING_TITLE;
- String userMessage = ResourceHandler.getString("cannot_convert_some_characters2"); //$NON-NLS-1$
+ String userMessage = SSEUIPlugin.getResourceString("%cannot_convert_some_characters2"); //$NON-NLS-1$
MessageFormat form = new MessageFormat(userMessage);
Object[] args = {outputException.getCharsetName()};
final String msg = form.format(args);
@@ -952,7 +950,7 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
protected boolean openUnconvertableCharactersWarningForSave(MalformedOutputExceptionWithDetail outputException, Shell topshell) {
// open message dialog
final String title = UNSUPPORTED_ENCODING_WARNING_TITLE;
- String userMessage = ResourceHandler.getString("cannot_convert_some_characters"); //$NON-NLS-1$
+ String userMessage = SSEUIPlugin.getResourceString("%cannot_convert_some_characters"); //$NON-NLS-1$
MessageFormat form = new MessageFormat(userMessage);
Object[] args = {outputException.getAttemptedIANAEncoding(), Integer.toString(outputException.getCharPosition())};
final String msg = form.format(args);
@@ -965,16 +963,16 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
protected void openUndecodableCharacterError(MalformedInputExceptionWithDetail e) {
// checked and coordinated among all editors.
- String title = ResourceHandler.getString("Error_opening_file_UI_"); //$NON-NLS-1$ = "Error opening file"
+ String title = SSEUIPlugin.getResourceString("%Error_opening_file_UI_"); //$NON-NLS-1$ = "Error opening file"
String msg = e.toString();
// if the exception char position < 0, perhaps we exceeded the max
// buffer when detecting pos of error
// if that is the case, display a different error message
IStatus status;
if ((e.getCharPosition() < 0) && (e.isExceededMax()))
- status = new Status(IStatus.ERROR, SSEUIPlugin.ID, 0, ResourceHandler.getString("8concat_ERROR_", (new Object[]{Integer.toString(e.getMaxBuffer()), e.getAttemptedIANAEncoding()})), e); //$NON-NLS-1$
+ status = new Status(IStatus.ERROR, SSEUIPlugin.ID, 0, SSEUIPlugin.getResourceString("%8concat_ERROR_", (new Object[]{Integer.toString(e.getMaxBuffer()), e.getAttemptedIANAEncoding()})), e); //$NON-NLS-1$
else
- status = new Status(IStatus.ERROR, SSEUIPlugin.ID, 0, ResourceHandler.getString("7concat_ERROR_", (new Object[]{(Integer.toString(e.getCharPosition())), e.getAttemptedIANAEncoding()})), e); //$NON-NLS-1$
+ status = new Status(IStatus.ERROR, SSEUIPlugin.ID, 0, SSEUIPlugin.getResourceString("%7concat_ERROR_", (new Object[]{(Integer.toString(e.getCharPosition())), e.getAttemptedIANAEncoding()})), e); //$NON-NLS-1$
//$NON-NLS-1$ = "Could not be decoded character (at position {0}) according to the encoding parameter {1}"
ErrorDialog.openError(getActiveShell(), title, msg, status);
}
@@ -982,7 +980,7 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
protected void openUnsupportedEncodingWarningForLoad(String encoding, String defaultToUse) {
// open message dialog
final String title = UNSUPPORTED_ENCODING_WARNING_TITLE;
- MessageFormat form = new MessageFormat(ResourceHandler.getString("This_encoding_({0})_is_not_supported._The_default_encoding_({1})_will_be_used_instead._1")); //$NON-NLS-1$
+ MessageFormat form = new MessageFormat(SSEUIPlugin.getResourceString("%This_encoding_({0})_is_not_supported._The_default_encoding_({1})_will_be_used_instead._1")); //$NON-NLS-1$
Object[] args = {encoding, defaultToUse};
final String msg = form.format(args);
Shell shell = getActiveShell();
@@ -997,7 +995,7 @@ public class FileModelProvider extends FileDocumentProvider implements IModelPro
// MessageFormat form = new
// MessageFormat(ResourceHandler.getString("This_encoding({0})_is_not__WARN_"));
// //$NON-NLS-1$ = "This encoding({0}) is not supported. Continue ?"
- MessageFormat form = new MessageFormat(ResourceHandler.getString("This_encoding_({0})_is_not_supported._Continue_the_save_using_the_default_({1})__2")); //$NON-NLS-1$
+ MessageFormat form = new MessageFormat(SSEUIPlugin.getResourceString("%This_encoding_({0})_is_not_supported._Continue_the_save_using_the_default_({1})__2")); //$NON-NLS-1$
Object[] args = {foundEncoding, defaultEncodingToUse};
final String msg = form.format(args);
MessageDialog warning = new MessageDialog(topshell, dialogTitle, null, msg, MessageDialog.QUESTION, new String[]{IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/GotoAnnotationAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/GotoAnnotationAction.java
index a3525af9ff..fb2a7c78ee 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/GotoAnnotationAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/GotoAnnotationAction.java
@@ -43,8 +43,7 @@ import org.eclipse.ui.texteditor.IEditorStatusLine;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.ui.texteditor.TextEditorAction;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
/**
* Based on org.eclipse.jdt.internal.ui.javaeditor.GotoAnnotationAction and
@@ -86,10 +85,10 @@ public class GotoAnnotationAction extends TextEditorAction {
* @param editor
*/
public GotoAnnotationAction(String prefix, boolean forward) {
- super(ResourceHandler.getResourceBundle(), prefix, null);
+ super(SSEUIPlugin.getDefault().getResourceBundle(), prefix, null);
fForward = forward;
fPrefix = prefix;
- fLabel = ResourceHandler.getResourceBundle().getString(fPrefix);
+ fLabel = SSEUIPlugin.getResourceString("%" + fPrefix);
}
/*
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/SpellCheckActionWrapper.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/SpellCheckActionWrapper.java
index 59f08d8185..f1f092170a 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/SpellCheckActionWrapper.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/SpellCheckActionWrapper.java
@@ -30,12 +30,11 @@ import org.eclipse.wst.sse.ui.extensions.ISelfValidateEditAction;
import org.eclipse.wst.sse.ui.extensions.spellcheck.SpellCheckAction;
import org.eclipse.wst.sse.ui.extensions.spellcheck.SpellCheckProvider;
import org.eclipse.wst.sse.ui.extensions.spellcheck.SpellCheckTarget;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.osgi.framework.Bundle;
-
/**
* Spell Check action
*/
@@ -165,8 +164,8 @@ public class SpellCheckActionWrapper extends Action implements IExtendedEditorAc
if (action == null)
initializeSpellCheckProviderAction();
if (action == null || !isEnabled()) {
- MessageDialog.openInformation(getDisplay().getActiveShell(), ResourceHandler.getString("Information"), //$NON-NLS-1$
- ResourceHandler.getString("PluginAction.operationNotAvailableMessage")); //$NON-NLS-1$
+ MessageDialog.openInformation(getDisplay().getActiveShell(), SSEUIPlugin.getResourceString("%Information"), //$NON-NLS-1$
+ SSEUIPlugin.getResourceString("%PluginAction.operationNotAvailableMessage")); //$NON-NLS-1$
setEnabled(false);
return;
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StorageModelProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StorageModelProvider.java
index cc4356dd94..3d76e7631b 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StorageModelProvider.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StorageModelProvider.java
@@ -42,16 +42,14 @@ import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.util.Utilities;
import org.eclipse.wst.sse.ui.extensions.breakpoint.IExtendedStorageEditorInput;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.debug.BreakpointRulerAction;
import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistry;
import org.eclipse.wst.sse.ui.util.Assert;
-
/**
* A StorageDocumentProvider that is IStructuredModel aware
*/
@@ -635,7 +633,7 @@ public class StorageModelProvider extends StorageDocumentProvider implements IMo
contents = input.getStorage().getContents();
} catch (CoreException noStorageExc) {
if (logExceptions)
- Logger.logException(ResourceHandler.getString("32concat_EXC_", new Object[]{input.getName()}), noStorageExc); //$NON-NLS-1$
+ Logger.logException(SSEUIPlugin.getResourceString("%32concat_EXC_", new Object[]{input.getName()}), noStorageExc); //$NON-NLS-1$
}
IStructuredModel model = null;
@@ -645,7 +643,7 @@ public class StorageModelProvider extends StorageDocumentProvider implements IMo
model.setBaseLocation(input.getName());
} catch (IOException e) {
if (logExceptions)
- Logger.logException(ResourceHandler.getString("32concat_EXC_", new Object[]{input}), e); //$NON-NLS-1$
+ Logger.logException(SSEUIPlugin.getResourceString("%32concat_EXC_", new Object[]{input}), e); //$NON-NLS-1$
} finally {
if (contents != null) {
try {
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextAnnotationHover.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextAnnotationHover.java
index 380f16d4ee..835bbe3000 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextAnnotationHover.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextAnnotationHover.java
@@ -39,8 +39,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public class StructuredTextAnnotationHover implements IAnnotationHover, IReleasable {
@@ -213,7 +212,7 @@ public class StructuredTextAnnotationHover implements IAnnotationHover, IReleasa
StringBuffer buffer = new StringBuffer();
printer.addPageProlog(buffer);
- printer.addParagraph(buffer, ResourceHandler.getString("Multiple_errors")); //$NON-NLS-1$
+ printer.addParagraph(buffer, SSEUIPlugin.getResourceString("%Multiple_errors")); //$NON-NLS-1$
printer.startBulletList(buffer);
Iterator e = messages.iterator();
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
index 00e72145d6..2bb934e90c 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
@@ -144,8 +144,8 @@ import org.eclipse.wst.sse.ui.extensions.ConfigurationPointCalculator;
import org.eclipse.wst.sse.ui.extensions.breakpoint.NullSourceEditingTextTools;
import org.eclipse.wst.sse.ui.extensions.breakpoint.SourceEditingTextTools;
import org.eclipse.wst.sse.ui.extensions.spellcheck.SpellCheckTarget;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.debug.BreakpointRulerAction;
import org.eclipse.wst.sse.ui.internal.debug.EditBreakpointAction;
import org.eclipse.wst.sse.ui.internal.debug.ManageBreakpointAction;
@@ -163,7 +163,6 @@ import org.eclipse.wst.sse.ui.internal.selection.StructureSelectEnclosingAction;
import org.eclipse.wst.sse.ui.internal.selection.StructureSelectHistoryAction;
import org.eclipse.wst.sse.ui.internal.selection.StructureSelectNextAction;
import org.eclipse.wst.sse.ui.internal.selection.StructureSelectPreviousAction;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.text.DocumentRegionEdgeMatcher;
import org.eclipse.wst.sse.ui.util.Assert;
@@ -177,7 +176,6 @@ import org.eclipse.wst.sse.ui.views.properties.StructuredPropertySheetConfigurat
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-
public class StructuredTextEditor extends TextEditor implements IExtendedMarkupEditor, IExtendedMarkupEditorExtension, IDocumentListener, IShowInTargetList {
class InternalElementStateListener implements IElementStateListener {
@@ -414,10 +412,10 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
public static final String GROUP_NAME_ADDITIONS = "additions"; //$NON-NLS-1$
public static final String GROUP_NAME_FORMAT = "Format"; //$NON-NLS-1$
public static final String GROUP_NAME_FORMAT_EXT = "Format.ext"; //$NON-NLS-1$
- private static final String REDO_ACTION_DESC = ResourceHandler.getString("Redo__{0}._UI_"); //$NON-NLS-1$ = "Redo: {0}."
- private static final String REDO_ACTION_DESC_DEFAULT = ResourceHandler.getString("Redo_Text_Change._UI_"); //$NON-NLS-1$ = "Redo Text Change."
- private static final String REDO_ACTION_TEXT = ResourceHandler.getString("&Redo_{0}_@Ctrl+Y_UI_"); //$NON-NLS-1$ = "&Redo {0} @Ctrl+Y"
- private static final String REDO_ACTION_TEXT_DEFAULT = ResourceHandler.getString("&Redo_Text_Change_@Ctrl+Y_UI_"); //$NON-NLS-1$ = "&Redo Text Change @Ctrl+Y"
+ private static final String REDO_ACTION_DESC = SSEUIPlugin.getResourceString("%Redo__{0}._UI_"); //$NON-NLS-1$ = "Redo: {0}."
+ private static final String REDO_ACTION_DESC_DEFAULT = SSEUIPlugin.getResourceString("%Redo_Text_Change._UI_"); //$NON-NLS-1$ = "Redo Text Change."
+ private static final String REDO_ACTION_TEXT = SSEUIPlugin.getResourceString("%&Redo_{0}_@Ctrl+Y_UI_"); //$NON-NLS-1$ = "&Redo {0} @Ctrl+Y"
+ private static final String REDO_ACTION_TEXT_DEFAULT = SSEUIPlugin.getResourceString("%&Redo_Text_Change_@Ctrl+Y_UI_"); //$NON-NLS-1$ = "&Redo Text Change @Ctrl+Y"
protected static final String SSE_MODEL_ID = "org.eclipse.wst.sse.core"; //$NON-NLS-1$
/**
* Constant for representing an error status. This is considered a value
@@ -431,10 +429,10 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
static final protected IStatus STATUS_OK = new Status(IStatus.OK, SSEUIPlugin.ID, IStatus.OK, "OK", null); //$NON-NLS-1$
/** Translatable strings */
- private static final String UNDO_ACTION_DESC = ResourceHandler.getString("Undo__{0}._UI_"); //$NON-NLS-1$ = "Undo: {0}."
- private static final String UNDO_ACTION_DESC_DEFAULT = ResourceHandler.getString("Undo_Text_Change._UI_"); //$NON-NLS-1$ = "Undo Text Change."
- private static final String UNDO_ACTION_TEXT = ResourceHandler.getString("&Undo_{0}_@Ctrl+Z_UI_"); //$NON-NLS-1$ = "&Undo {0} @Ctrl+Z"
- private static final String UNDO_ACTION_TEXT_DEFAULT = ResourceHandler.getString("&Undo_Text_Change_@Ctrl+Z_UI_"); //$NON-NLS-1$ = "&Undo Text Change @Ctrl+Z"
+ private static final String UNDO_ACTION_DESC = SSEUIPlugin.getResourceString("%Undo__{0}._UI_"); //$NON-NLS-1$ = "Undo: {0}."
+ private static final String UNDO_ACTION_DESC_DEFAULT = SSEUIPlugin.getResourceString("%Undo_Text_Change._UI_"); //$NON-NLS-1$ = "Undo Text Change."
+ private static final String UNDO_ACTION_TEXT = SSEUIPlugin.getResourceString("%&Undo_{0}_@Ctrl+Z_UI_"); //$NON-NLS-1$ = "&Undo {0} @Ctrl+Z"
+ private static final String UNDO_ACTION_TEXT_DEFAULT = SSEUIPlugin.getResourceString("%&Undo_Text_Change_@Ctrl+Z_UI_"); //$NON-NLS-1$ = "&Undo Text Change @Ctrl+Z"
/**
* @param args
@@ -536,7 +534,7 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
boolean enableFormatMenu = (formatAll != null && formatAll.isEnabled()) || (formatSelection != null && formatSelection.isEnabled()) || (cleanupAll != null && cleanupAll.isEnabled());
if (getSourceViewer().isEditable() && enableFormatMenu) {
- String label = ResourceHandler.getString("FormatMenu.label"); //$NON-NLS-1$ = "Format"
+ String label = SSEUIPlugin.getResourceString("%FormatMenu.label"); //$NON-NLS-1$ = "Format"
MenuManager subMenu = new MenuManager(label, GROUP_NAME_FORMAT);
subMenu.add(new GroupMarker(GROUP_NAME_FORMAT_EXT));
addAction(subMenu, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT);
@@ -685,7 +683,7 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
protected void createActions() {
super.createActions();
- ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
+ ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
// TextView Action - moving the selected text to
// the clipboard
// override the cut/paste/delete action to make
@@ -719,7 +717,7 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
// SourceView Action - requesting information at
// the current insertion
// position
- action = new TextOperationAction(ResourceHandler.getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION + DOT, this, ISourceViewer.INFORMATION, true);
+ action = new TextOperationAction(SSEUIPlugin.getDefault().getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION + DOT, this, ISourceViewer.INFORMATION, true);
action.setActionDefinitionId(ActionDefinitionIds.INFORMATION);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION, action);
markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION, true);
@@ -734,7 +732,7 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
// SourceView Action - requesting content assist to
// show the content
// information for the current insert position
- action = new TextOperationAction(ResourceHandler.getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION + DOT, this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
+ action = new TextOperationAction(SSEUIPlugin.getDefault().getResourceBundle(), StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION + DOT, this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, action);
markAsStateDependentAction(StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_INFORMATION, true);
@@ -2641,7 +2639,7 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
IEditorInput input = getEditorInput();
if (input instanceof IFileEditorInput) {
if (input == null) {
- String msg = ResourceHandler.getString("Error_opening_file_UI_"); //$NON-NLS-1$
+ String msg = SSEUIPlugin.getResourceString("%Error_opening_file_UI_"); //$NON-NLS-1$
status = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.INFO, msg, null);
} else {
validateState(input);
@@ -2667,7 +2665,7 @@ public class StructuredTextEditor extends TextEditor implements IExtendedMarkupE
// exception.
}
}
- String msg = ResourceHandler.getString("_UI_File_is_read_only", new Object[]{fname}); //$NON-NLS-1$ = "File {0}is read-only."
+ String msg = SSEUIPlugin.getResourceString("%_UI_File_is_read_only", new Object[]{fname}); //$NON-NLS-1$ = "File {0}is read-only."
status = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.INFO, msg, null);
}
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewer.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewer.java
index 2e26464e0a..9f3bdc6651 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewer.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewer.java
@@ -67,7 +67,7 @@ import org.eclipse.wst.sse.core.undo.IDocumentSelectionMediator;
import org.eclipse.wst.sse.core.undo.UndoDocumentEvent;
import org.eclipse.wst.sse.ui.extension.IExtendedSimpleEditor;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.style.IHighlighter;
import org.eclipse.wst.sse.ui.util.PlatformStatusLineUtil;
import org.eclipse.wst.sse.ui.view.events.INodeSelectionListener;
@@ -75,7 +75,6 @@ import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
-
public class StructuredTextViewer extends SourceViewer implements INodeSelectionListener, IDoubleClickListener, IDocumentSelectionMediator {
/**
@@ -114,15 +113,15 @@ public class StructuredTextViewer extends SourceViewer implements INodeSelection
/** Text operation codes */
public static final int CLEANUP_DOCUMENT = ISourceViewer.INFORMATION + 1;
public static final int FORMAT_ACTIVE_ELEMENTS = ISourceViewer.INFORMATION + 3;
- private static final String FORMAT_ACTIVE_ELEMENTS_TEXT = ResourceHandler.getString("Format_Active_Elements_UI_"); //$NON-NLS-1$
+ private static final String FORMAT_ACTIVE_ELEMENTS_TEXT = SSEUIPlugin.getResourceString("%Format_Active_Elements_UI_"); //$NON-NLS-1$
public static final int FORMAT_DOCUMENT = ISourceViewer.INFORMATION + 2;
- private static final String FORMAT_DOCUMENT_TEXT = ResourceHandler.getString("Format_Document_UI_"); //$NON-NLS-1$
+ private static final String FORMAT_DOCUMENT_TEXT = SSEUIPlugin.getResourceString("%Format_Document_UI_"); //$NON-NLS-1$
public static final int QUICK_FIX = ISourceViewer.INFORMATION + 4;
- private static final String TEXT_CUT = ResourceHandler.getString("Text_Cut_UI_"); //$NON-NLS-1$
- private static final String TEXT_PASTE = ResourceHandler.getString("Text_Paste_UI_"); //$NON-NLS-1$
- private static final String TEXT_SHIFT_LEFT = ResourceHandler.getString("Text_Shift_Left_UI_"); //$NON-NLS-1$ = "Text Shift Left"
- private static final String TEXT_SHIFT_RIGHT = ResourceHandler.getString("Text_Shift_Right_UI_"); //$NON-NLS-1$ = "Text Shift Right"
+ private static final String TEXT_CUT = SSEUIPlugin.getResourceString("%Text_Cut_UI_"); //$NON-NLS-1$
+ private static final String TEXT_PASTE = SSEUIPlugin.getResourceString("%Text_Paste_UI_"); //$NON-NLS-1$
+ private static final String TEXT_SHIFT_LEFT = SSEUIPlugin.getResourceString("%Text_Shift_Left_UI_"); //$NON-NLS-1$ = "Text Shift Left"
+ private static final String TEXT_SHIFT_RIGHT = SSEUIPlugin.getResourceString("%Text_Shift_Right_UI_"); //$NON-NLS-1$ = "Text Shift Right"
private boolean fBackgroundupdateInProgress;
protected StructuredContentCleanupHandler fContentCleanupHandler = null;
protected IContentAssistant fCorrectionAssistant;
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentproperties/ui/ContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentproperties/ui/ContentSettingsPropertyPage.java
index ae348577bf..87c01a6881 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentproperties/ui/ContentSettingsPropertyPage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentproperties/ui/ContentSettingsPropertyPage.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.sse.ui.contentproperties.ui;
-
-
import java.util.Hashtable;
import java.util.Map;
@@ -40,9 +38,6 @@ import org.eclipse.wst.sse.ui.contentproperties.ContentSettings;
import org.eclipse.wst.sse.ui.contentproperties.ContentSettingsCreator;
import org.eclipse.wst.sse.ui.contentproperties.IContentSettings;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
-
public abstract class ContentSettingsPropertyPage extends PropertyPage {
private static final IStatus STATUS_ERROR = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.INFO, "ERROR", null); //$NON-NLS-1$
@@ -108,10 +103,10 @@ public abstract class ContentSettingsPropertyPage extends PropertyPage {
protected Composite composite;
protected IContentSettings contentSettings;
- protected final String CSS_LABEL = ResourceHandler.getString("UI_CSS_profile___2"); //$NON-NLS-1$
- protected final String DEVICE_LABEL = ResourceHandler.getString("UI_Target_Device___3"); //$NON-NLS-1$
+ protected final String CSS_LABEL = SSEUIPlugin.getResourceString("%UI_CSS_profile___2"); //$NON-NLS-1$
+ protected final String DEVICE_LABEL = SSEUIPlugin.getResourceString("%UI_Target_Device___3"); //$NON-NLS-1$
- protected final String DOCUMENT_LABEL = ResourceHandler.getString("UI_Default_HTML_DOCTYPE_ID___1"); //$NON-NLS-1$
+ protected final String DOCUMENT_LABEL = SSEUIPlugin.getResourceString("%UI_Default_HTML_DOCTYPE_ID___1"); //$NON-NLS-1$
protected int numberOfCombo;
protected int numCols = 1;
protected int numRows = 1;
@@ -133,7 +128,7 @@ public abstract class ContentSettingsPropertyPage extends PropertyPage {
Label label = new Label(propertyPage, SWT.LEFT);
label.setText(title);
- if (title != null && title.startsWith(ResourceHandler.getString("UI_Default_HTML_DOCTYPE_ID___1"))) { //$NON-NLS-1$
+ if (title != null && title.startsWith(SSEUIPlugin.getResourceString("%UI_Default_HTML_DOCTYPE_ID___1"))) { //$NON-NLS-1$
GridData data = new GridData();
data.horizontalIndent = 10;
label.setLayoutData(data);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ActionContributor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ActionContributor.java
index 214c98cee1..3d8278c182 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ActionContributor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ActionContributor.java
@@ -36,8 +36,7 @@ import org.eclipse.wst.sse.ui.GotoAnnotationAction;
import org.eclipse.wst.sse.ui.ISourceViewerActionBarContributor;
import org.eclipse.wst.sse.ui.extension.ExtendedEditorActionBuilder;
import org.eclipse.wst.sse.ui.extension.IExtendedContributor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
/**
* XMLEditorActionContributor
@@ -79,7 +78,7 @@ public class ActionContributor extends BasicTextEditorActionContributor implemen
public ActionContributor() {
super();
- ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
+ ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
fCommandsSeparator = new Separator();
@@ -96,7 +95,7 @@ public class ActionContributor extends BasicTextEditorActionContributor implemen
fStructureSelectHistoryAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_HISTORY + StructuredTextEditorActionConstants.DOT);
fStructureSelectHistoryAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_HISTORY);
- fExpandSelectionToMenu = new MenuManager(ResourceHandler.getString("ExpandSelectionToMenu.label")); //$NON-NLS-1$
+ fExpandSelectionToMenu = new MenuManager(SSEUIPlugin.getResourceString("%ExpandSelectionToMenu.label")); //$NON-NLS-1$
fExpandSelectionToMenu.add(fStructureSelectEnclosingAction);
fExpandSelectionToMenu.add(fStructureSelectNextAction);
fExpandSelectionToMenu.add(fStructureSelectPreviousAction);
@@ -151,7 +150,7 @@ public class ActionContributor extends BasicTextEditorActionContributor implemen
}
// 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.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/CleanupAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/CleanupAction.java
index 46c747b2a0..202741822a 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/CleanupAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/CleanupAction.java
@@ -23,8 +23,7 @@ import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.TextEditorAction;
import org.eclipse.wst.sse.core.cleanup.IStructuredCleanupProcessor;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public abstract class CleanupAction extends TextEditorAction {
protected Dialog fCleanupDialog;
@@ -55,7 +54,7 @@ public abstract class CleanupAction extends TextEditorAction {
try {
// begin recording
ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
- editor.getModel().beginRecording(this, ResourceHandler.getString("Cleanup_Document_UI_"), ResourceHandler.getString("Cleanup_Document_UI_"), selection.getOffset(), selection.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
+ editor.getModel().beginRecording(this, SSEUIPlugin.getResourceString("%Cleanup_Document_UI_"), SSEUIPlugin.getResourceString("%Cleanup_Document_UI_"), selection.getOffset(), selection.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
// tell the model that we are about to make a big
// model change
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ConvertLineDelimitersToCRLFActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ConvertLineDelimitersToCRLFActionDelegate.java
index 12ec44150e..397da69f72 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ConvertLineDelimitersToCRLFActionDelegate.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/ConvertLineDelimitersToCRLFActionDelegate.java
@@ -35,10 +35,8 @@ import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.TextFileDocumentProvider;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDelegate {
@@ -108,7 +106,7 @@ public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDel
if (fErrorStatus.getChildren().length > 0) {
status = fErrorStatus;
- fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
+ fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
}
return status;
@@ -116,7 +114,7 @@ public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDel
}
- private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
+ private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
protected String fLineDelimiter = "\r\n"; //$NON-NLS-1$
protected void convert(IProgressMonitor monitor, IFile file) {
@@ -129,7 +127,7 @@ public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDel
IContentType contentType = contentDescription.getContentType();
if (contentType.isKindOf(Platform.getContentTypeManager().getContentType("org.eclipse.core.runtime.text"))) { //$NON-NLS-1$
if (monitor == null || !monitor.isCanceled()) {
- String message = MessageFormat.format(ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.3"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = MessageFormat.format(SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.3"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
monitor.subTask(message);
IFileEditorInput input = new FileEditorInput(file);
@@ -153,10 +151,10 @@ public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDel
}
}
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
+ String message = MessageFormat.format(SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
} catch (BadLocationException e) {
- String message = MessageFormat.format(ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
+ String message = MessageFormat.format(SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}
@@ -177,14 +175,14 @@ public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDel
convert(monitor, members[i]);
}
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
+ String message = MessageFormat.format(SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}
}
protected Job getJob() {
- return new ConvertLineDelimitersJob(ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.jobName")); //$NON-NLS-1$
+ return new ConvertLineDelimitersJob(SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.jobName")); //$NON-NLS-1$
}
/*
@@ -199,7 +197,7 @@ public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDel
try {
resource.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
- monitor.setTaskName(ResourceHandler.getString("ActionDelegate.0") + resource.getName()); //$NON-NLS-1$
+ monitor.setTaskName(SSEUIPlugin.getResourceString("%ActionDelegate.0") + resource.getName()); //$NON-NLS-1$
}
}
@@ -255,10 +253,10 @@ public class ConvertLineDelimitersToCRLFActionDelegate extends ResourceActionDel
outputStream = new FileOutputStream(file.getLocation().toString());
outputStream.write(outputString.getBytes(file.getCharset()));
} catch (IOException e) {
- String message = MessageFormat.format(ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
+ String message = MessageFormat.format(SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
+ String message = MessageFormat.format(SSEUIPlugin.getResourceString("%ConvertLineDelimitersToCRLFActionDelegate.4"), new String[]{file.getName()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
} finally {
try {
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java
index 742f7c0e1e..52a01d2bee 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/edit/util/FormatActionDelegate.java
@@ -13,7 +13,6 @@
package org.eclipse.wst.sse.ui.edit.util;
import java.io.IOException;
-import java.text.MessageFormat;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
@@ -29,10 +28,8 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.wst.common.encoding.exceptions.MalformedInputExceptionWithDetail;
import org.eclipse.wst.sse.core.format.IStructuredFormatProcessor;
import org.eclipse.wst.sse.ui.extension.FormatProcessorsExtensionReader;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public class FormatActionDelegate extends ResourceActionDelegate {
@@ -102,7 +99,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
if (fErrorStatus.getChildren().length > 0) {
status = fErrorStatus;
- fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, ResourceHandler.getString("FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
+ fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIPlugin.getResourceString("%FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
}
return status;
@@ -110,7 +107,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
}
- private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, ResourceHandler.getString("FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
+ private MultiStatus fErrorStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.ERROR, SSEUIPlugin.getResourceString("%FormatActionDelegate.errorStatusMessage"), null); //$NON-NLS-1$
protected void format(IProgressMonitor monitor, IFile file) {
try {
@@ -122,19 +119,19 @@ public class FormatActionDelegate extends ResourceActionDelegate {
IContentType contentType = contentDescription.getContentType();
IStructuredFormatProcessor formatProcessor = getFormatProcessor(contentType.getId());
if (formatProcessor != null && (monitor == null || !monitor.isCanceled())) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.3"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.3", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
monitor.subTask(message);
formatProcessor.setProgressMonitor(monitor);
formatProcessor.formatFile(file);
}
} catch (MalformedInputExceptionWithDetail e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.5"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.5", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
} catch (IOException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{file.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}
@@ -155,7 +152,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
format(monitor, members[i]);
}
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}
@@ -166,7 +163,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
}
protected Job getJob() {
- return new FormatJob(ResourceHandler.getString("FormatActionDelegate.jobName")); //$NON-NLS-1$
+ return new FormatJob(SSEUIPlugin.getResourceString("%FormatActionDelegate.jobName")); //$NON-NLS-1$
}
/*
@@ -181,7 +178,7 @@ public class FormatActionDelegate extends ResourceActionDelegate {
try {
resource.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
- String message = MessageFormat.format(ResourceHandler.getString("FormatActionDelegate.4"), new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%FormatActionDelegate.4", new String[]{resource.getFullPath().toString()}); //$NON-NLS-1$
fErrorStatus.add(new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.ERROR, message, e));
}
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java
index 6e0ec451d5..11f37eca78 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java
@@ -14,6 +14,10 @@ package org.eclipse.wst.sse.ui.internal;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryRegistry;
@@ -27,6 +31,10 @@ public class SSEUIPlugin extends AbstractUIPlugin {
public final static String ID = "org.eclipse.wst.sse.ui"; //$NON-NLS-1$
static SSEUIPlugin instance = null;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+ private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
+ private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
public static SSEUIPlugin getDefault() {
return instance;
@@ -80,4 +88,49 @@ public class SSEUIPlugin extends AbstractUIPlugin {
protected void initializeDefaultPreferences(IPreferenceStore store) {
initializeDefaultEditorPreferences(store);
}
+
+ /**
+ * 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.sse.ui.internal.SSEUIPluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/Editing.properties b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties
index ff24538f2b..3531e3fc02 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/Editing.properties
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties
@@ -10,8 +10,39 @@
# Jens Lukowski/Innoopract - initial renaming/restructuring
#
###############################################################################
-Macro_must_have_a_name_INFO_=IWAK0003I Macro must have a name
-Macro_name_can_not_start_w_INFO_=IWAK0004I Macro name can not start with whitespace
+Encoding_warning_UI_=Encoding warning
+FileDocumentProvider.task.saving=Saving
+Unable_to_save_the_documen_ERROR_=Unable to save the document. Output file not found.
+Unable_to_save_the_documen1_ERROR_=Unable to save the document. Unsupported encoding.
+Unable_to_save_the_documen2_ERROR_=Unable to save the document. An I/O error occurred while saving the document.
+cannot_convert_some_characters=The encoding ({0}) cannot convert some characters (such as the one in position {1}). Press ''OK'' to save anyway (and some characters will be converted to ''?'' in the saved file), or press ''Cancel'' to return to the editor.
+cannot_convert_some_characters2=The encoding ({0}) cannot convert some characters. Press ''OK'' to save anyway (and some characters will be converted to ''?'' in the saved file), or press ''Cancel'' to return to the editor.
+Error_opening_file_UI_=Error opening file
+_UI_File_is_read_only=File {0} is read-only.
+7concat_ERROR_=One or more characters could not be decoded according to the encoding parameter {1}. Position of first invalid character is {0}.
+8concat_ERROR_=One or more characters could not be decoded according to the encoding parameter {1}. Position of first invalid character is greater than {0}.
+This_encoding_({0})_is_not_supported._The_default_encoding_({1})_will_be_used_instead._1=This encoding ({0}) is not supported. The default encoding ({1}) will be used instead.
+This_encoding_({0})_is_not_supported._Continue_the_save_using_the_default_({1})__2=This encoding ({0}) is not supported. Continue the save using the default ({1})?
+Information=Information
+PluginAction.operationNotAvailableMessage=The chosen operation is not currently available.
+32concat_EXC_=Editor could not be open on {0}
+Multiple_errors=Multiple annotations found at this line:
+&Undo_Text_Change_@Ctrl+Z_UI_=&Undo Text Change @Ctrl+Z
+Undo_Text_Change._UI_=Undo Text Change.
+&Undo_{0}_@Ctrl+Z_UI_=&Undo {0} @Ctrl+Z
+Undo__{0}._UI_=Undo: {0}.
+&Redo_Text_Change_@Ctrl+Y_UI_=&Redo Text Change @Ctrl+Y
+Redo_Text_Change._UI_=Redo Text Change.
+&Redo_{0}_@Ctrl+Y_UI_=&Redo {0} @Ctrl+Y
+Redo__{0}._UI_=Redo: {0}.
+FormatMenu.label=F&ormat
+Format_Document_UI_=Format Document
+Format_Active_Elements_UI_=Format Active Elements
+Text_Cut_UI_=Text Cut
+Text_Paste_UI_=Text Paste
+###############################################################################
+Macro_must_have_a_name_INFO_=Macro must have a name
+Macro_name_can_not_start_w_INFO_=Macro name can not start with whitespace
Rename_Macro_UI_=Rename Macro
Copy_Macro_UI_=Copy Macro
New_Macro_UI_=New Macro
@@ -21,8 +52,8 @@ Only_whitespace_characters_UI_=Only whitespace characters are allowed in the ind
The_number_of_spaces_must__UI_=The number of spaces must be an integer
Alphabetically_sort_the_li_UI_=Alphabetically sort the list of proposals
Prompt_when_these_characte_UI_=Prompt when these characters are inserted:
-This_encoding({0})_is_not__WARN_=IWAK0005W This encoding({0}) is not supported. Continue ?
-The_encoding_of_Preference_WARN_=IWAK0006W The encoding of Preference({0}) and the encoding in the document({1}) are different. {1} will be used. Continue ?
+This_encoding({0})_is_not__WARN_=This encoding({0}) is not supported. Continue ?
+The_encoding_of_Preference_WARN_=The encoding of Preference({0}) and the encoding in the document({1}) are different. {1} will be used. Continue ?
Begin/End_Comment_UI_=Begin/End Comment
Commented_Text_UI_=Commented Text
Begin/End_CDATA_UI_=Begin/End CDATA
@@ -38,33 +69,17 @@ DOCTYPE_SYSTEM/PUBLIC_keyw_UI_=DOCTYPE SYSTEM/PUBLIC keyword
## on the following line solely translate: End
End_DOCTYPE_UI_=End DOCTYPE
Click_on_the_sample_text_w_UI_=Click on the sample text whose style you want to customize:
-1This_encoding({0})_is_not__WARN_=IWAK0007W This encoding({0}) is not supported. The default encoding will be used instead.
-Encoding_warning_UI_=Encoding warning
-A_temporary_backup_version_WARN_=IWAK0008W A temporary backup version of the file {0} was found in {1}.\n\nThis indicates a previous editing session with this file did not end normally and the file you are trying to edit might have been damaged. Would you like to use the backup version?
+1This_encoding({0})_is_not__WARN_=This encoding({0}) is not supported. The default encoding will be used instead.
+A_temporary_backup_version_WARN_=A temporary backup version of the file {0} was found in {1}.\n\nThis indicates a previous editing session with this file did not end normally and the file you are trying to edit might have been damaged. Would you like to use the backup version?
Improper_shutdown_warning_UI_=Improper shutdown warning
-Editing_canceled_at_users__INFO_=IWAK0009I Editing canceled at users request
-Unable_to_save_the_documen_ERROR_=IWAK0010E Unable to save the document. Output file not found.
-Unable_to_save_the_documen1_ERROR_=IWAK0011E Unable to save the document. Unsupported encoding.
-Unable_to_save_the_documen2_ERROR_=IWAK0012E Unable to save the document. An I/O error occurred while saving the document.
-Unable_to_save_the_documen3_ERROR_=IWAK0013E Unable to save the document. An severe I/O error occurred while saving the document.
-An_I/O_error_while_creatin_ERROR_=IWAK0014E An I/O error while creating temporary backup copy
-An_severe_I/O_error_while__ERROR_=IWAK0015E An severe I/O error while creating temporary backup copy
-&Undo_Text_Change_@Ctrl+Z_UI_=&Undo Text Change @Ctrl+Z
-Undo_Text_Change._UI_=Undo Text Change.
-&Undo_{0}_@Ctrl+Z_UI_=&Undo {0} @Ctrl+Z
-Undo__{0}._UI_=Undo: {0}.
-&Redo_Text_Change_@Ctrl+Y_UI_=&Redo Text Change @Ctrl+Y
-Redo_Text_Change._UI_=Redo Text Change.
-&Redo_{0}_@Ctrl+Y_UI_=&Redo {0} @Ctrl+Y
-Redo__{0}._UI_=Redo: {0}.
+Editing_canceled_at_users__INFO_=Editing canceled at users request
+Unable_to_save_the_documen3_ERROR_=Unable to save the document. An severe I/O error occurred while saving the document.
+An_I/O_error_while_creatin_ERROR_=An I/O error while creating temporary backup copy
+An_severe_I/O_error_while__ERROR_=An severe I/O error while creating temporary backup copy
Cleanup_Document_UI_=Cleanup Document
-Format_Document_UI_=Format Document
-Format_Active_Elements_UI_=Format Active Elements
-Text_Cut_UI_=Text Cut
-Text_Paste_UI_=Text Paste
Source_UI_=Source
-Invalid_Input__Must_be_IFi_ERROR_=IWAK0016E Invalid Input: Must be IFileEditorInput
-An_error_has_occurred_when1_ERROR_=IWAK0017E An error has occurred when initializing the input for the the editor's source page.
+Invalid_Input__Must_be_IFi_ERROR_=Invalid Input: Must be IFileEditorInput
+An_error_has_occurred_when1_ERROR_=An error has occurred when initializing the input for the the editor's source page.
No_known_attribute__UI_=No known attribute
Content_Assist_not_availab_UI_=Content Assist not available at the current location
SEVERE_internal_error_occu_UI_=SEVERE internal error occurred
@@ -131,7 +146,7 @@ StructureSelectHistory.label=&Restore Last Selection
StructureSelectHistory.tooltip=Restore last selection
StructureSelectHistory.description=Restore last selection
Save.label=&Save
-An_error_has_occurred_when_ERROR_=IWAK0018E An error has occurred when retrieving resources for the source editor. The Eclipse Workbench installation may have been corrupted.
+An_error_has_occurred_when_ERROR_=An error has occurred when retrieving resources for the source editor. The Eclipse Workbench installation may have been corrupted.
No_content_model_found_UI_=No content model found
## save as problems (next two) should match what is in workbench
Problems_During_Save_As_UI_=Problems During Save As...
@@ -165,9 +180,9 @@ new_File_was_null_after_mo_UI_=new File was null after move ... should be imposs
Property_value_case__UI_=Property value case:
Selector_tag_name_case__UI_=Selector tag name case:
Quote_values_UI_=Quote values
-The_line_width_must_be_an__EXC_=IWAK0019E The line width must be an integer
+The_line_width_must_be_an__EXC_=The line width must be an integer
Incorrect_call_UI_=Incorrect call
-1concat_ERROR_=IWAK0020E {0} has no available child tags.
+1concat_ERROR_={0} has no available child tags.
Edit_Document_Type_UI_=Edit Document Type
DocumentType_name__UI_=DocumentType name:
Public_identifier__UI_=Public identifier:
@@ -179,16 +194,12 @@ Attribute_Value_UI_=Attribute Value
1concat={0} has no available child tags.
Text_Shift_Right_UI_=Text Shift Right
Text_Shift_Left_UI_=Text Shift Left
-4concat_EXC_=IWAK0021E {0} is in use.
-7concat_ERROR_=IWAK0022E One or more characters could not be decoded according to the encoding parameter {1}. Position of first invalid character is {0}.
-8concat_ERROR_=IWAK0023E One or more characters could not be decoded according to the encoding parameter {1}. Position of first invalid character is greater than {0}.
-12concat_ERROR_=IWAK0024E {0} was in use or open in an editor.
-23concat_EXC_=IWAK0025E Resource {0} does not exist.
-32concat_EXC_=IWAK0026E Editor could not be open on {0}
+4concat_EXC_={0} is in use.
+12concat_ERROR_={0} was in use or open in an editor.
+23concat_EXC_=Resource {0} does not exist.
Add..._UI_=Add...
-Error_opening_file_UI_=Error opening file
Error_during_save_UI_=Error during save
-Operation_could_not_be_com_ERROR_=IWAK0027E Operation could not be completed. Be sure to save your work in any open editors.
+Operation_could_not_be_com_ERROR_=Operation could not be completed. Be sure to save your work in any open editors.
Java_Content_Assist_is_not_UI_=Java Content Assist is not available for the current cursor location
End_with=End with
Close_with=Close with
@@ -380,17 +391,11 @@ _UI_Description_J2EE_Project_=The properties for J2EE Web projects act as "proje
_UI_Description_JSPF_File_=The properties are used instead of the page directive that cannot be specified in JSP fragment files. The project setting is used if you specify "none".
#
-_UI_File_is_read_only=File {0} is read-only.
-This_encoding_({0})_is_not_supported._The_default_encoding_({1})_will_be_used_instead._1=This encoding ({0}) is not supported. The default encoding ({1}) will be used instead.
-This_encoding_({0})_is_not_supported._Continue_the_save_using_the_default_({1})__2=This encoding ({0}) is not supported. Continue the save using the default ({1})?
#
-cannot_convert_some_characters=The encoding ({0}) cannot convert some characters (such as the one in position {1}). Press ''OK'' to save anyway (and some characters will be converted to ''?'' in the saved file), or press ''Cancel'' to return to the editor.
-cannot_convert_some_characters2=The encoding ({0}) cannot convert some characters. Press ''OK'' to save anyway (and some characters will be converted to ''?'' in the saved file), or press ''Cancel'' to return to the editor.
# The following lines copied from org\eclipse\ui\editors\text\TextEditorMessages.properties in org.eclipse.ui plugin
Editor.error.save.message=Save could not be completed. {0}
Editor.error.save.title=Problems During Save As...
Editor.warning.save.delete=The original file ''{0}'' has been deleted.
-FileDocumentProvider.task.saving=Saving
Set_color_and_visibilty_of_editor_annotations=Set color and visibilty of editor annotations:
Analyze_annotations_while_typing=Analyze syntax &while typing
Analyze_validity_while_typing=Analyze &validity while typing
@@ -400,7 +405,6 @@ Show_in_overview_ruler=Show in overview &ruler
Color=C&olor
Show_hover_help=Show hov&er help
#
-Multiple_errors=Multiple annotations found at this line:
Ill-formed_syntax=Ill-formed syntax:
Style_Rule_declares_nothing=Style Rule declares nothing
Style_Declaration_declares_nothing=Style Declaration declares nothing
@@ -450,7 +454,6 @@ EditPreferences.description=Display preferences for this editor
##########################################################################
ExpandSelectionToMenu.label=E&xpand Selection To
SourceMenu.label=&Source
-FormatMenu.label=F&ormat
ConvertLineDelimitersMenu.label=Co&nvert Line Delimiters to
FindOccurrences.label=O&ccurrences in File
#
@@ -586,6 +589,4 @@ EOL_Mac=Mac
EOL_NoTranslation=No translation
FileModelProvider.0=Error reloading {0}
JFaceNodeAdapter.0=Update Outline
-Information=Information
-PluginAction.operationNotAvailableMessage=The chosen operation is not currently available.
ShowView.errorTitle=Problems Showing View
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java
index 2c9734f461..8989d94059 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java
@@ -17,8 +17,7 @@ import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public class NoModificationCompletionProposal implements ICompletionProposal {
@@ -54,7 +53,7 @@ public class NoModificationCompletionProposal implements ICompletionProposal {
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return ResourceHandler.getString("NoModificationCompletionProposal.0"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%NoModificationCompletionProposal.0"); //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java
index 5b56177ac0..0a80c6371a 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java
@@ -20,8 +20,7 @@ import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.dialogs.PropertyDialogAction;
import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
public class EditBreakpointAction extends BreakpointRulerAction {
protected IBreakpoint[] breakpoints = null;
@@ -32,7 +31,7 @@ public class EditBreakpointAction extends BreakpointRulerAction {
*/
public EditBreakpointAction(ITextEditor editor, IVerticalRuler rulerInfo) {
super(editor, rulerInfo);
- setText(ResourceHandler.getString("EditBreakpointAction.0")); //$NON-NLS-1$
+ setText(SSEUIPlugin.getResourceString("%EditBreakpointAction.0")); //$NON-NLS-1$
}
public void run() {
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java
index 3416698569..f3b928380c 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java
@@ -17,8 +17,7 @@ import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
/**
* ManageBreakpointAction - Enables and Disables
@@ -85,9 +84,9 @@ public class ManageBreakpointAction extends BreakpointRulerAction {
}
setEnabled(breakpoints != null && breakpoints.length > 0);
if (doEnable)
- setText(ResourceHandler.getString("ManageBreakpointAction.0")); //$NON-NLS-1$
+ setText(SSEUIPlugin.getResourceString("%ManageBreakpointAction.0")); //$NON-NLS-1$
else
- setText(ResourceHandler.getString("ManageBreakpointAction.1")); //$NON-NLS-1$
+ setText(SSEUIPlugin.getResourceString("%ManageBreakpointAction.1")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
index 4dae48fb38..74da74372a 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java
@@ -34,14 +34,12 @@ import org.eclipse.wst.sse.core.util.Debug;
import org.eclipse.wst.sse.ui.extension.IExtendedMarkupEditor;
import org.eclipse.wst.sse.ui.extension.IExtendedSimpleEditor;
import org.eclipse.wst.sse.ui.extensions.breakpoint.IBreakpointProvider;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-
/**
* ToggleBreakpointAction
*/
@@ -52,7 +50,7 @@ public class ToggleBreakpointAction extends BreakpointRulerAction {
*/
public ToggleBreakpointAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
super(editor, rulerInfo);
- setText(ResourceHandler.getString("ToggleBreakpointAction.0")); //$NON-NLS-1$
+ setText(SSEUIPlugin.getResourceString("%ToggleBreakpointAction.0")); //$NON-NLS-1$
}
protected boolean createBreakpoints(int lineNumber) {
@@ -102,11 +100,11 @@ public class ToggleBreakpointAction extends BreakpointRulerAction {
if (errors.size() > 0) {
Shell shell = editor.getSite().getShell();
- MultiStatus allStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.INFO, (IStatus[]) errors.toArray(new IStatus[0]), ResourceHandler.getResourceBundle().getString("ManageBreakpoints.error.adding.message1"), null); //$NON-NLS-1$
+ MultiStatus allStatus = new MultiStatus(SSEUIPlugin.ID, IStatus.INFO, (IStatus[]) errors.toArray(new IStatus[0]), SSEUIPlugin.getResourceString("%ManageBreakpoints.error.adding.message1"), null); //$NON-NLS-1$
// show for conditions more severe than INFO or when no
// breakpoints were created
if (allStatus.getSeverity() > IStatus.INFO || getBreakpoints(getMarkers()).length < 1) {
- ErrorDialog.openError(shell, ResourceHandler.getResourceBundle().getString("ManageBreakpoints.error.adding.title1"), ResourceHandler.getResourceBundle().getString("ManageBreakpoints.error.adding.message1"), allStatus); //$NON-NLS-1$ //$NON-NLS-2$
+ ErrorDialog.openError(shell, SSEUIPlugin.getResourceString("%ManageBreakpoints.error.adding.title1"), SSEUIPlugin.getResourceString("%ManageBreakpoints.error.adding.message1"), allStatus); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionProvider.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionProvider.java
index cc2253f69b..ce9aeeb648 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionProvider.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionProvider.java
@@ -25,11 +25,9 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.search.ui.NewSearchUI;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.TextEditorAction;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.util.PlatformStatusLineUtil;
-
-
/**
* Performs the appropriate FindOccurrences action call based on selection.
* Clients can add actions for different partitions via
@@ -115,7 +113,7 @@ public class FindOccurrencesActionProvider extends TextEditorAction {
public void run() {
BasicFindOccurrencesAction action = getActionForCurrentSelection();
- String errorMessage = ResourceHandler.getString("FindOccurrencesActionProvider.0"); //$NON-NLS-1$
+ String errorMessage = SSEUIPlugin.getResourceString("%FindOccurrencesActionProvider.0"); //$NON-NLS-1$
if (action != null) {
action.update();
if (action.isEnabled()) {
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java
index b94eaee9e3..54275bb291 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java
@@ -26,10 +26,8 @@ import org.eclipse.wst.sse.core.text.IStructuredDocument;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
/**
* Basic ISearchQuery that finds matches of region type and region text.
@@ -149,14 +147,14 @@ public class OccurrencesSearchQuery extends BasicSearchQuery {
}
private String getFilename() {
- String filename = ResourceHandler.getString("OccurrencesSearchQuery.2"); //$NON-NLS-1$ "file"
+ String filename = SSEUIPlugin.getResourceString("%OccurrencesSearchQuery.2"); //$NON-NLS-1$ "file"
if (getFile() != null)
filename = getFile().getName().toString();
return filename;
}
public String getLabel() {
- String label = ResourceHandler.getString("OccurrencesSearchQuery.0"); //$NON-NLS-1$
+ String label = SSEUIPlugin.getResourceString("%OccurrencesSearchQuery.0"); //$NON-NLS-1$
String[] args = {getSearchText(), getOccurrencesCountText(), getFilename()};
return MessageFormat.format(label, args);
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectEnclosingAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectEnclosingAction.java
index 6eefc26085..4d30150b6a 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectEnclosingAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectEnclosingAction.java
@@ -15,16 +15,15 @@ package org.eclipse.wst.sse.ui.internal.selection;
import org.eclipse.jface.text.Region;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.w3c.dom.Node;
-
public class StructureSelectEnclosingAction extends StructureSelectAction {
public StructureSelectEnclosingAction(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.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java
index e889fd4586..08c7266e04 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java
@@ -17,16 +17,15 @@ import org.eclipse.jface.text.Region;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.w3c.dom.Node;
-
public class StructureSelectHistoryAction extends StructureSelectAction implements IUpdate {
public StructureSelectHistoryAction(StructuredTextEditor editor, SelectionHistory history) {
super(editor, history);
- setText(ResourceHandler.getString("StructureSelectHistory.label")); //$NON-NLS-1$
- setToolTipText(ResourceHandler.getString("StructureSelectHistory.tooltip")); //$NON-NLS-1$
- setDescription(ResourceHandler.getString("StructureSelectHistory.description")); //$NON-NLS-1$
+ setText(SSEUIPlugin.getResourceString("%StructureSelectHistory.label")); //$NON-NLS-1$
+ setToolTipText(SSEUIPlugin.getResourceString("%StructureSelectHistory.tooltip")); //$NON-NLS-1$
+ setDescription(SSEUIPlugin.getResourceString("%StructureSelectHistory.description")); //$NON-NLS-1$
update();
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectNextAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectNextAction.java
index f4e7c5cba1..8b8c343ef2 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectNextAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectNextAction.java
@@ -15,16 +15,15 @@ package org.eclipse.wst.sse.ui.internal.selection;
import org.eclipse.jface.text.Region;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.w3c.dom.Node;
-
public class StructureSelectNextAction extends StructureSelectAction {
public StructureSelectNextAction(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.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectPreviousAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectPreviousAction.java
index fb01a9cca8..bcd9381883 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectPreviousAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectPreviousAction.java
@@ -15,16 +15,15 @@ package org.eclipse.wst.sse.ui.internal.selection;
import org.eclipse.jface.text.Region;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.w3c.dom.Node;
-
public class StructureSelectPreviousAction extends StructureSelectAction {
public StructureSelectPreviousAction(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.sse.ui/src/org/eclipse/wst/sse/ui/nls/ResourceHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/nls/ResourceHandler.java
deleted file mode 100644
index e3f4a0e1b6..0000000000
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/nls/ResourceHandler.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.ui.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("Editing");//$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);
- }
-}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/openon/AbstractOpenOn.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/openon/AbstractOpenOn.java
index 59f7ee8786..363bd0e806 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/openon/AbstractOpenOn.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/openon/AbstractOpenOn.java
@@ -34,17 +34,16 @@ import org.eclipse.wst.sse.core.IModelManager;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.ui.extensions.openon.IOpenOn;
import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.openon.ExternalFileEditorInput;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.util.PlatformStatusLineUtil;
-
/**
* This action class retrieves the link/file selected by the cursor and
* attempts to open the link/file in the default editor or web browser
*/
abstract public class AbstractOpenOn implements IOpenOn {
- protected final String CANNOT_OPEN = ResourceHandler.getString("AbstractOpenOn.0"); //$NON-NLS-1$
+ protected final String CANNOT_OPEN = SSEUIPlugin.getResourceString("%AbstractOpenOn.0"); //$NON-NLS-1$
private IDocument fDocument; // document currention associated with open
protected final String FILE_PROTOCOL = "file:/";//$NON-NLS-1$
private final String HTTP_PROTOCOL = "http://";//$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/PreferenceManager.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/PreferenceManager.java
index 00f246a1c2..1c9f963ea7 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/PreferenceManager.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/PreferenceManager.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.sse.ui.preferences;
-
-
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
@@ -40,7 +38,7 @@ import javax.xml.transform.stream.StreamResult;
import org.eclipse.wst.sse.core.preferences.PreferenceChangeListener;
import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -48,7 +46,6 @@ import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
-
/**
* @deprecated no longer need a special PreferenceManager for our component.
* All preferences should be accessible using the base preference
@@ -103,7 +100,7 @@ public abstract class PreferenceManager {
embeddedMessage = originalException.getClass().getName() + ": " + originalException.getMessage(); //$NON-NLS-1$
// not all exceptions have messages (e.g. many
// NullPointerException)
- String originalError = ResourceHandler.getString("PreferenceManager.0"); //$NON-NLS-1$
+ String originalError = SSEUIPlugin.getResourceString("%PreferenceManager.0"); //$NON-NLS-1$
if (result == null)
result = ""; //$NON-NLS-1$
if (embeddedMessage != null)
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractColorPage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractColorPage.java
index 04bcddc24a..e60a295687 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractColorPage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractColorPage.java
@@ -24,10 +24,8 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
-
public abstract class AbstractColorPage extends org.eclipse.jface.preference.PreferencePage implements org.eclipse.ui.IWorkbenchPreferencePage {
private OverlayPreferenceStore fOverlayStore;
@@ -70,7 +68,7 @@ public abstract class AbstractColorPage extends org.eclipse.jface.preference.Pre
Composite pageComponent = createComposite(sc1, 1);
sc1.setContent(pageComponent);
- Label descLabel = createDescriptionLabel(pageComponent, ResourceHandler.getString("AbstractColorPageDescription")); //$NON-NLS-1$
+ Label descLabel = createDescriptionLabel(pageComponent, SSEUIPlugin.getResourceString("%AbstractColorPageDescription")); //$NON-NLS-1$
Composite coloringComposite = createColoringComposite(pageComponent);
createContentsForPicker(coloringComposite);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferencePage.java
index 115908b2a5..d37829f622 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferencePage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferencePage.java
@@ -35,8 +35,6 @@ import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.wst.sse.core.ModelPlugin;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
/**
* (pa) why is this class abstract if there are no abstract methods?
@@ -237,7 +235,7 @@ public abstract class AbstractPreferencePage extends PreferencePage implements M
}
protected void setInvalidInputMessage(String widthText) {
- String msg = ResourceHandler.getString("4concat", (new Object[]{widthText})); //$NON-NLS-1$ = "''{0}'' is not a valid input"
+ String msg = SSEUIPlugin.getResourceString("%4concat", (new Object[]{widthText})); //$NON-NLS-1$ = "''{0}'' is not a valid input"
setErrorMessage(msg);
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferenceTab.java
index 033dc79acd..3837e98734 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferenceTab.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/AbstractPreferenceTab.java
@@ -35,9 +35,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
/**
* Generic preference tab page that contains helpful methods
@@ -252,14 +251,14 @@ abstract public class AbstractPreferenceTab implements IPreferenceTab {
private IStatus validatePositiveNumber(String number) {
StatusInfo status = new StatusInfo();
if (number.length() == 0) {
- status.setError(ResourceHandler.getString("StructuredTextEditorPreferencePage.37")); //$NON-NLS-1$
+ status.setError(SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.37")); //$NON-NLS-1$
} else {
try {
int value = Integer.parseInt(number);
if (value < 0)
- status.setError(number + ResourceHandler.getString("StructuredTextEditorPreferencePage.38")); //$NON-NLS-1$
+ status.setError(number + SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.38")); //$NON-NLS-1$
} catch (NumberFormatException e) {
- status.setError(number + ResourceHandler.getString("StructuredTextEditorPreferencePage.39")); //$NON-NLS-1$
+ status.setError(number + SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.39")); //$NON-NLS-1$
}
}
return status;
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/EditStructuredTextEditorPreferencesAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/EditStructuredTextEditorPreferencesAction.java
index b2ff0b7f83..6e1e1d718e 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/EditStructuredTextEditorPreferencesAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/EditStructuredTextEditorPreferencesAction.java
@@ -39,11 +39,10 @@ import org.eclipse.wst.sse.ui.extension.ExtendedConfigurationBuilder;
import org.eclipse.wst.sse.ui.extension.IExtendedEditorAction;
import org.eclipse.wst.sse.ui.extension.IExtendedSimpleEditor;
import org.eclipse.wst.sse.ui.extensions.ConfigurationPointCalculator;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
/**
* This action displays the preferences relative to the current editor
@@ -56,7 +55,7 @@ public class EditStructuredTextEditorPreferencesAction extends Action implements
private IExtendedSimpleEditor fEditor;
public EditStructuredTextEditorPreferencesAction() {
- super(ResourceHandler.getString("EditPreferences.label"), EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_PREFERENCES)); //$NON-NLS-1$
+ super(SSEUIPlugin.getResourceString("%EditPreferences.label"), EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_PREFERENCES)); //$NON-NLS-1$
WorkbenchHelp.setHelp(this, IHelpContextIds.CONTMNU_PREFERENCES_HELPID);
}
@@ -212,7 +211,7 @@ public class EditStructuredTextEditorPreferencesAction extends Action implements
BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
public void run() {
dialog.create();
- dialog.setMessage(ResourceHandler.getString("EditStructuredTextEditorPreferencesAction.0")); //$NON-NLS-1$
+ dialog.setMessage(SSEUIPlugin.getResourceString("%EditStructuredTextEditorPreferencesAction.0")); //$NON-NLS-1$
result[0] = (dialog.open() == Window.OK);
}
});
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/FilePreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/FilePreferencePage.java
index a5cab5cf48..8dfa93d4c6 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/FilePreferencePage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/FilePreferencePage.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.sse.ui.preferences.ui;
-
-
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -26,9 +24,8 @@ import org.eclipse.swt.widgets.TabItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.wst.sse.core.ModelPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.preferences.TabFolderLayout;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
public class FilePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
@@ -55,7 +52,7 @@ public class FilePreferencePage extends PreferencePage implements IWorkbenchPref
protected Control createContents(Composite parent) {
Composite composite = createComposite(parent, 1);
- String description = ResourceHandler.getString("FilePreferencePage.0"); //$NON-NLS-1$
+ String description = SSEUIPlugin.getResourceString("%FilePreferencePage.0"); //$NON-NLS-1$
createLabel(composite, description);
createLabel(composite, ""); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/NavigationPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/NavigationPreferenceTab.java
index 3035c38dc4..56238d5e58 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/NavigationPreferenceTab.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/NavigationPreferenceTab.java
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.sse.ui.preferences.ui;
-import java.text.MessageFormat;
import java.util.ArrayList;
import org.eclipse.core.runtime.IStatus;
@@ -33,13 +32,12 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.util.EditorUtility;
-
/**
* Preference page tab that contains Navigation preferences
*
@@ -70,7 +68,7 @@ public class NavigationPreferenceTab extends AbstractPreferenceTab {
layout.numColumns = 2;
composite.setLayout(layout);
- String text = ResourceHandler.getString("StructuredTextEditorPreferencePage.7"); //$NON-NLS-1$
+ String text = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.7"); //$NON-NLS-1$
fBrowserLikeLinksCheckBox = addCheckBox(composite, text, CommonEditorPreferenceNames.BROWSER_LIKE_LINKS, 0);
fBrowserLikeLinksCheckBox.addSelectionListener(new SelectionListener() {
@@ -85,7 +83,7 @@ public class NavigationPreferenceTab extends AbstractPreferenceTab {
});
// Text field for modifier string
- text = ResourceHandler.getString("StructuredTextEditorPreferencePage.8"); //$NON-NLS-1$
+ text = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.8"); //$NON-NLS-1$
fBrowserLikeLinksKeyModifierText = addTextField(composite, text, CommonEditorPreferenceNames.BROWSER_LIKE_LINKS_KEY_MODIFIER, 20, 0, false);
fBrowserLikeLinksKeyModifierText.setTextLimit(Text.LIMIT);
@@ -167,7 +165,7 @@ public class NavigationPreferenceTab extends AbstractPreferenceTab {
* @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#getTitle()
*/
public String getTitle() {
- return ResourceHandler.getString("StructuredTextEditorPreferencePage.34"); //$NON-NLS-1$;
+ return SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.34"); //$NON-NLS-1$;
}
void handleBrowserLikeLinksKeyModifierModified() {
@@ -178,12 +176,11 @@ public class NavigationPreferenceTab extends AbstractPreferenceTab {
if (fBrowserLikeLinksCheckBox.getSelection() && (stateMask == -1 || (stateMask & SWT.SHIFT) != 0)) {
if (stateMask == -1) {
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("NavigationPreferenceTab.0")); //$NON-NLS-1$
Object[] args = {modifiers};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%NavigationPreferenceTab.0", args);
status = new StatusInfo(IStatus.ERROR, message);
} else
- status = new StatusInfo(IStatus.ERROR, ResourceHandler.getString("StructuredTextEditorPreferencePage.15")); //$NON-NLS-1$
+ status = new StatusInfo(IStatus.ERROR, SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.15")); //$NON-NLS-1$
}
updateStatus(status);
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StructuredTextEditorPreferencePage.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StructuredTextEditorPreferencePage.java
index 04d03650e3..c985e1308a 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StructuredTextEditorPreferencePage.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StructuredTextEditorPreferencePage.java
@@ -52,10 +52,8 @@ import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
import org.eclipse.wst.sse.ui.internal.preferences.TabFolderLayout;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
-
/**
* Gutted version of JavaEditorPreferencePage
*
@@ -70,7 +68,7 @@ public class StructuredTextEditorPreferencePage extends PreferencePage implement
private ColorEditor fAppearanceColorEditor;
private List fAppearanceColorList;
- private final String[][] fAppearanceColorListModel = new String[][]{{ResourceHandler.getString("StructuredTextEditorPreferencePage.1"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR}, {ResourceHandler.getString("StructuredTextEditorPreferencePage.2"), CommonEditorPreferenceNames.MATCHING_BRACKETS_COLOR}, {ResourceHandler.getString("StructuredTextEditorPreferencePage.3"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR}, {ResourceHandler.getString("StructuredTextEditorPreferencePage.4"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR}, {ResourceHandler.getString("StructuredTextEditorPreferencePage.5"), CommonEditorPreferenceNames.LINK_COLOR},}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ private final String[][] fAppearanceColorListModel = new String[][]{{SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.1"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR}, {SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.2"), CommonEditorPreferenceNames.MATCHING_BRACKETS_COLOR}, {SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.3"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR}, {SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.4"), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR}, {SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.5"), CommonEditorPreferenceNames.LINK_COLOR},}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
private Map fCheckBoxes = new HashMap();
private SelectionListener fCheckBoxListener = new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
@@ -105,7 +103,7 @@ public class StructuredTextEditorPreferencePage extends PreferencePage implement
private Map fTextFields = new HashMap();
public StructuredTextEditorPreferencePage() {
- setDescription(ResourceHandler.getString("StructuredTextEditorPreferencePage.6")); //$NON-NLS-1$
+ setDescription(SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.6")); //$NON-NLS-1$
setPreferenceStore(SSEUIPlugin.getDefault().getPreferenceStore());
fOverlayStore = new OverlayPreferenceStore(getPreferenceStore(), createOverlayStoreKeys());
@@ -194,31 +192,31 @@ public class StructuredTextEditorPreferencePage extends PreferencePage implement
layout.numColumns = 2;
appearanceComposite.setLayout(layout);
- String label = ResourceHandler.getString("StructuredTextEditorPreferencePage.16"); //$NON-NLS-1$
+ String label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.16"); //$NON-NLS-1$
addTextField(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.17"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.17"); //$NON-NLS-1$
addTextField(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 3, 0, true);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.18"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.18"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, 0);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.19"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.19"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, 0);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.20"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.20"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label, CommonEditorPreferenceNames.MATCHING_BRACKETS, 0);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.21"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.21"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.22"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.22"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.31"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.31"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label, CommonEditorPreferenceNames.SHOW_QUICK_FIXABLES, 0);
- label = ResourceHandler.getString("StructuredTextEditorPreferencePage.30"); //$NON-NLS-1$
+ label = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.30"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label, CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS, 0);
Label l = new Label(appearanceComposite, SWT.LEFT);
@@ -228,7 +226,7 @@ public class StructuredTextEditorPreferencePage extends PreferencePage implement
l.setLayoutData(gd);
l = new Label(appearanceComposite, SWT.LEFT);
- l.setText(ResourceHandler.getString("StructuredTextEditorPreferencePage.23")); //$NON-NLS-1$
+ l.setText(SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.23")); //$NON-NLS-1$
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan = 2;
l.setLayoutData(gd);
@@ -259,7 +257,7 @@ public class StructuredTextEditorPreferencePage extends PreferencePage implement
l = new Label(stylesComposite, SWT.LEFT);
// needs to be made final so label can be set in
// foregroundcolorbutton's acc listener
- final String buttonLabel = ResourceHandler.getString("StructuredTextEditorPreferencePage.24"); //$NON-NLS-1$
+ final String buttonLabel = SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.24"); //$NON-NLS-1$
l.setText(buttonLabel);
gd = new GridData();
gd.horizontalAlignment = GridData.BEGINNING;
@@ -322,7 +320,7 @@ public class StructuredTextEditorPreferencePage extends PreferencePage implement
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem item = new TabItem(folder, SWT.NONE);
- item.setText(ResourceHandler.getString("StructuredTextEditorPreferencePage.0")); //$NON-NLS-1$
+ item.setText(SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.0")); //$NON-NLS-1$
item.setControl(createAppearancePage(folder));
item = new TabItem(folder, SWT.NONE);
@@ -518,14 +516,14 @@ public class StructuredTextEditorPreferencePage extends PreferencePage implement
private IStatus validatePositiveNumber(String number) {
StatusInfo status = new StatusInfo();
if (number.length() == 0) {
- status.setError(ResourceHandler.getString("StructuredTextEditorPreferencePage.37")); //$NON-NLS-1$
+ status.setError(SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.37")); //$NON-NLS-1$
} else {
try {
int value = Integer.parseInt(number);
if (value < 0)
- status.setError(number + ResourceHandler.getString("StructuredTextEditorPreferencePage.38")); //$NON-NLS-1$
+ status.setError(number + SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.38")); //$NON-NLS-1$
} catch (NumberFormatException e) {
- status.setError(number + ResourceHandler.getString("StructuredTextEditorPreferencePage.39")); //$NON-NLS-1$
+ status.setError(number + SSEUIPlugin.getResourceString("%StructuredTextEditorPreferencePage.39")); //$NON-NLS-1$
}
}
return status;
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StyledTextColorPicker.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StyledTextColorPicker.java
index fe1b7673ea..aa8aa684ed 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StyledTextColorPicker.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/StyledTextColorPicker.java
@@ -58,12 +58,11 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.core.util.Debug;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.util.EditorUtility;
import org.w3c.dom.Node;
-
/**
* This class is configurable by setting 3 properties: 1) an array of Strings
* as the styleNames; one unique entry for every style type meant to be
@@ -420,10 +419,10 @@ public class StyledTextColorPicker extends Composite {
protected void createControls(Composite parent) {
Composite styleRow = createComposite(parent, 3);
// row 1 - content type label, combo box, restore defaults
- createLabel(styleRow, ResourceHandler.getString("Content_type__UI_")); //$NON-NLS-1$ = "Content type:"
+ createLabel(styleRow, SSEUIPlugin.getResourceString("%Content_type__UI_")); //$NON-NLS-1$ = "Content type:"
// Contexts combo box
fStyleCombo = createCombo(styleRow, new String[0], -1);
- fClearStyle = createPushButton(styleRow, ResourceHandler.getString("Restore_Default_UI_")); //$NON-NLS-1$ = "Restore Default"
+ fClearStyle = createPushButton(styleRow, SSEUIPlugin.getResourceString("%Restore_Default_UI_")); //$NON-NLS-1$ = "Restore Default"
Composite styleRow2;
if (showItalic)
styleRow2 = createComposite(parent, 7);
@@ -431,7 +430,7 @@ public class StyledTextColorPicker extends Composite {
styleRow2 = createComposite(parent, 6);
// row 2 - foreground label, button, background label, button, bold,
// italics?
- fForegroundLabel = createLabel(styleRow2, ResourceHandler.getString("Foreground_UI_")); //$NON-NLS-1$ = "Foreground"
+ fForegroundLabel = createLabel(styleRow2, SSEUIPlugin.getResourceString("%Foreground_UI_")); //$NON-NLS-1$ = "Foreground"
fForeground = createPushButton(styleRow2, ""); //$NON-NLS-1$
setAccessible(fForeground, fForegroundLabel.getText());
fForeground.getAccessible().addAccessibleControlListener(foregroundAccListener); // defect
@@ -445,7 +444,7 @@ public class StyledTextColorPicker extends Composite {
Point buttonSize = computeImageSize(parent);
((GridData) fForeground.getLayoutData()).widthHint = buttonSize.x;
((GridData) fForeground.getLayoutData()).heightHint = buttonSize.y;
- fBackgroundLabel = createLabel(styleRow2, ResourceHandler.getString("Background_UI_")); //$NON-NLS-1$ = "Background"
+ fBackgroundLabel = createLabel(styleRow2, SSEUIPlugin.getResourceString("%Background_UI_")); //$NON-NLS-1$ = "Background"
fBackground = createPushButton(styleRow2, ""); //$NON-NLS-1$
setAccessible(fBackground, fBackgroundLabel.getText());
fBackground.getAccessible().addAccessibleControlListener(backgroundAccListener); // defect
@@ -459,9 +458,9 @@ public class StyledTextColorPicker extends Composite {
((GridData) fBackground.getLayoutData()).widthHint = buttonSize.x;
((GridData) fBackground.getLayoutData()).heightHint = buttonSize.y;
createLabel(styleRow2, ""); //$NON-NLS-1$
- fBold = createCheckBox(styleRow2, ResourceHandler.getString("Bold_UI_")); //$NON-NLS-1$ = "Bold"
+ fBold = createCheckBox(styleRow2, SSEUIPlugin.getResourceString("%Bold_UI_")); //$NON-NLS-1$ = "Bold"
if (showItalic)
- fItalic = createCheckBox(styleRow2, ResourceHandler.getString("Italic")); //$NON-NLS-1$
+ fItalic = createCheckBox(styleRow2, SSEUIPlugin.getResourceString("%Italic")); //$NON-NLS-1$
// // Defaults checkbox
fForeground.setEnabled(false);
fBackground.setEnabled(false);
@@ -472,7 +471,7 @@ public class StyledTextColorPicker extends Composite {
fForegroundLabel.setEnabled(false);
fBackgroundLabel.setEnabled(false);
Composite sample = createComposite(parent, 1);
- createLabel(sample, ResourceHandler.getString("Sample_text__UI_")); //$NON-NLS-1$ = "&Sample text:"
+ createLabel(sample, SSEUIPlugin.getResourceString("%Sample_text__UI_")); //$NON-NLS-1$ = "&Sample text:"
fText = new StyledText(sample, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.READ_ONLY);
GridData data = new GridData(GridData.FILL_BOTH);
fText.setLayoutData(data);
@@ -486,7 +485,7 @@ public class StyledTextColorPicker extends Composite {
// Provide tab
// traversal for
// fText widget
- setAccessible(fText, ResourceHandler.getString("Sample_text__UI_")); //$NON-NLS-1$ = "&Sample text:"
+ setAccessible(fText, SSEUIPlugin.getResourceString("%Sample_text__UI_")); //$NON-NLS-1$ = "&Sample text:"
fForeground.addSelectionListener(buttonListener);
fBackground.addSelectionListener(buttonListener);
fClearStyle.addSelectionListener(buttonListener);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TaskTagPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TaskTagPreferenceTab.java
index 078cd57a5c..b83d617bd4 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TaskTagPreferenceTab.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TaskTagPreferenceTab.java
@@ -63,11 +63,9 @@ import org.eclipse.wst.sse.core.ModelPlugin;
import org.eclipse.wst.sse.core.participants.TaskTagSeeker;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.sse.core.util.StringUtils;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
public class TaskTagPreferenceTab implements IPreferenceTab {
@@ -86,17 +84,17 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
for (int i = 0; i < fTags.length; i++) {
if (fTags[i].equals(element)) {
if (fPriorities[i].intValue() == IMarker.PRIORITY_HIGH) {
- return ResourceHandler.getString("TaskTagPreferenceTab.0"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.0"); //$NON-NLS-1$
}
else if (fPriorities[i].intValue() == IMarker.PRIORITY_LOW) {
- return ResourceHandler.getString("TaskTagPreferenceTab.1"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.1"); //$NON-NLS-1$
}
else {
- return ResourceHandler.getString("TaskTagPreferenceTab.2"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.2"); //$NON-NLS-1$
}
}
}
- return ResourceHandler.getString("TaskTagPreferenceTab.3"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.3"); //$NON-NLS-1$
}
}
@@ -113,7 +111,7 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
- newShell.setText(ResourceHandler.getString("TaskTagPreferenceTab.5")); //$NON-NLS-1$
+ newShell.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.5")); //$NON-NLS-1$
}
protected Control createButtonBar(Composite parent) {
@@ -127,7 +125,7 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
composite.setLayout(new GridLayout(2, false));
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
Label label = new Label(composite, SWT.NONE);
- label.setText(ResourceHandler.getString("TaskTagPreferenceTab.6")); //$NON-NLS-1$
+ label.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.6")); //$NON-NLS-1$
label.setLayoutData(new GridData());
tagText = new Text(composite, SWT.BORDER);
tagText.setText(text);
@@ -139,10 +137,10 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
});
label = new Label(composite, SWT.NONE);
- label.setText(ResourceHandler.getString("TaskTagPreferenceTab.7")); //$NON-NLS-1$
+ label.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.7")); //$NON-NLS-1$
label.setLayoutData(new GridData());
priorityCombo = new Combo(composite, SWT.READ_ONLY | SWT.SINGLE);
- priorityCombo.setItems(new String[]{ResourceHandler.getString("TaskTagPreferenceTab.8"), ResourceHandler.getString("TaskTagPreferenceTab.9"), ResourceHandler.getString("TaskTagPreferenceTab.10")}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ priorityCombo.setItems(new String[]{SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.8"), SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.9"), SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.10")}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
priorityCombo.select(2 - priority);
priorityCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
priorityCombo.addSelectionListener(new SelectionAdapter() {
@@ -218,15 +216,15 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
fEnableCheckbox = new Button(composite, SWT.CHECK);
fEnableCheckbox.setSelection(fEnableTaskTags);
- fEnableCheckbox.setText(ResourceHandler.getString("TaskTagPreferenceTab.31"));
+ fEnableCheckbox.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.31"));
fEnableCheckbox.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER, GridData.HORIZONTAL_ALIGN_BEGINNING, false, false, 2, 1));
valueTable = new TableViewer(composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
valueTable.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
TableColumn textColumn = new TableColumn(valueTable.getTable(), SWT.NONE, 0);
- textColumn.setText(ResourceHandler.getString("TaskTagPreferenceTab.12")); //$NON-NLS-1$
+ textColumn.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.12")); //$NON-NLS-1$
TableColumn priorityColumn = new TableColumn(valueTable.getTable(), SWT.NONE, 1);
- priorityColumn.setText(ResourceHandler.getString("TaskTagPreferenceTab.13")); //$NON-NLS-1$
+ priorityColumn.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.13")); //$NON-NLS-1$
valueTable.setContentProvider(new ArrayContentProvider());
valueTable.setLabelProvider(new InternalTableLabelProvider());
valueTable.getTable().setLinesVisible(true);
@@ -241,22 +239,22 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
final Button addButton = new Button(buttons, SWT.PUSH);
- addButton.setText(ResourceHandler.getString("TaskTagPreferenceTab.14")); //$NON-NLS-1$
+ addButton.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.14")); //$NON-NLS-1$
addButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
final Button editButton = new Button(buttons, SWT.PUSH);
- editButton.setText(ResourceHandler.getString("TaskTagPreferenceTab.15")); //$NON-NLS-1$
+ editButton.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.15")); //$NON-NLS-1$
editButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
final Button removeButton = new Button(buttons, SWT.PUSH);
- removeButton.setText(ResourceHandler.getString("TaskTagPreferenceTab.16")); //$NON-NLS-1$
+ removeButton.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.16")); //$NON-NLS-1$
removeButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
Label spacer = new Label(buttons, SWT.NONE);
spacer.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
final Button upButton = new Button(buttons, SWT.PUSH);
- upButton.setText(ResourceHandler.getString("TaskTagPreferenceTab.17")); //$NON-NLS-1$
+ upButton.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.17")); //$NON-NLS-1$
upButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
final Button downButton = new Button(buttons, SWT.PUSH);
- downButton.setText(ResourceHandler.getString("TaskTagPreferenceTab.18")); //$NON-NLS-1$
+ downButton.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.18")); //$NON-NLS-1$
downButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
editButton.setEnabled(false);
@@ -266,7 +264,7 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
Label warning = new Label(composite, SWT.NONE);
warning.setLayoutData(new GridData());
- warning.setText(ResourceHandler.getString("TaskTagPreferenceTab.19")); //$NON-NLS-1$
+ warning.setText(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.19")); //$NON-NLS-1$
valueTable.addPostSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
@@ -354,7 +352,7 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
}
public String getTitle() {
- return ResourceHandler.getString("TaskTagPreferenceTab.20"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.20"); //$NON-NLS-1$
}
private void loadPreferenceValues() {
@@ -429,10 +427,10 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
}
}
else if (isDirty) {
- MessageDialog dialog = new MessageDialog(fControl.getShell(), ResourceHandler.getString("TaskTagPreferenceTab.22"), fControl.getShell().getImage(), ResourceHandler.getString("TaskTagPreferenceTab.23"), MessageDialog.QUESTION, new String[]{ResourceHandler.getString("TaskTagPreferenceTab.24"), ResourceHandler.getString("TaskTagPreferenceTab.25"), ResourceHandler.getString("TaskTagPreferenceTab.26")}, 2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ MessageDialog dialog = new MessageDialog(fControl.getShell(), SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.22"), fControl.getShell().getImage(), SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.23"), MessageDialog.QUESTION, new String[]{SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.24"), SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.25"), SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.26")}, 2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
int button = dialog.open();
if (button == 0) {
- Job buildJob = new Job(ResourceHandler.getString("TaskTagPreferenceTab.27")) { //$NON-NLS-1$
+ Job buildJob = new Job(SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.27")) { //$NON-NLS-1$
public Object getAdapter(Class adapter) {
return null;
}
@@ -451,13 +449,13 @@ public class TaskTagPreferenceTab implements IPreferenceTab {
}
}
if (monitor.isCanceled()) {
- status = new Status(IStatus.CANCEL, SSEUIPlugin.ID, IStatus.OK, ResourceHandler.getString("TaskTagPreferenceTab.28"), null); //$NON-NLS-1$
+ status = new Status(IStatus.CANCEL, SSEUIPlugin.ID, IStatus.OK, SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.28"), null); //$NON-NLS-1$
}
else if (errorCount == 0) {
- status = new Status(IStatus.OK, SSEUIPlugin.ID, IStatus.OK, ResourceHandler.getString("TaskTagPreferenceTab.29"), null); //$NON-NLS-1$
+ status = new Status(IStatus.OK, SSEUIPlugin.ID, IStatus.OK, SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.29"), null); //$NON-NLS-1$
}
else {
- status = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.OK, ResourceHandler.getString("TaskTagPreferenceTab.30"), null); //$NON-NLS-1$
+ status = new Status(IStatus.ERROR, SSEUIPlugin.ID, IStatus.OK, SSEUIPlugin.getResourceString("%TaskTagPreferenceTab.30"), null); //$NON-NLS-1$
}
return status;
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TextHoverPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TextHoverPreferenceTab.java
index 76e896029f..e3a7784f06 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TextHoverPreferenceTab.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TextHoverPreferenceTab.java
@@ -51,13 +51,11 @@ import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.taginfo.TextHoverManager;
import org.eclipse.wst.sse.ui.taginfo.TextHoverManager.TextHoverDescriptor;
import org.eclipse.wst.sse.ui.util.EditorUtility;
-
/**
* Preference tab for Structured text editor hover help preferences
*
@@ -90,7 +88,7 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
}
}
- private static final String DELIMITER = ResourceHandler.getString("TextHoverPreferenceTab.delimiter"); //$NON-NLS-1$
+ private static final String DELIMITER = SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.delimiter"); //$NON-NLS-1$
private Text fDescription;
private Table fHoverTable;
private TableViewer fHoverTableViewer;
@@ -138,7 +136,7 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
// CommonEditorPreferenceNames.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE, 0);
Label label = new Label(hoverComposite, SWT.NONE);
- label.setText(ResourceHandler.getString("TextHoverPreferenceTab.hoverPreferences")); //$NON-NLS-1$
+ label.setText(SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.hoverPreferences")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment = GridData.BEGINNING;
gd.horizontalSpan = 2;
@@ -170,11 +168,11 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
});
fNameColumn = new TableColumn(fHoverTable, SWT.NONE);
- fNameColumn.setText(ResourceHandler.getString("TextHoverPreferenceTab.nameColumnTitle")); //$NON-NLS-1$
+ fNameColumn.setText(SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.nameColumnTitle")); //$NON-NLS-1$
fNameColumn.setResizable(true);
fModifierColumn = new TableColumn(fHoverTable, SWT.NONE);
- fModifierColumn.setText(ResourceHandler.getString("TextHoverPreferenceTab.modifierColumnTitle")); //$NON-NLS-1$
+ fModifierColumn.setText(SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.modifierColumnTitle")); //$NON-NLS-1$
fModifierColumn.setResizable(true);
fHoverTableViewer.setUseHashlookup(true);
@@ -209,7 +207,7 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
// Text field for modifier string
label = new Label(hoverComposite, SWT.LEFT);
- label.setText(ResourceHandler.getString("TextHoverPreferenceTab.keyModifier")); //$NON-NLS-1$
+ label.setText(SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.keyModifier")); //$NON-NLS-1$
fModifierEditor = new Text(hoverComposite, SWT.BORDER);
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
fModifierEditor.setLayoutData(gd);
@@ -245,11 +243,11 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
String insertString;
if (needsPrefixDelimiter && needsPostfixDelimiter)
- insertString = ResourceHandler.getString("JavaEditorHoverConfigurationBlock.insertDelimiterAndModifierAndDelimiter", new String[]{Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
+ insertString = SSEUIPlugin.getResourceString("%JavaEditorHoverConfigurationBlock.insertDelimiterAndModifierAndDelimiter", new String[]{Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
else if (needsPrefixDelimiter)
- insertString = ResourceHandler.getString("JavaEditorHoverConfigurationBlock.insertDelimiterAndModifier", new String[]{Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
+ insertString = SSEUIPlugin.getResourceString("%JavaEditorHoverConfigurationBlock.insertDelimiterAndModifier", new String[]{Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
else if (needsPostfixDelimiter)
- insertString = ResourceHandler.getString("JavaEditorHoverConfigurationBlock.insertModifierAndDelimiter", new String[]{Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
+ insertString = SSEUIPlugin.getResourceString("%JavaEditorHoverConfigurationBlock.insertModifierAndDelimiter", new String[]{Action.findModifierString(e.stateMask)}); //$NON-NLS-1$
else
insertString = Action.findModifierString(e.stateMask);
@@ -267,7 +265,7 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
// Description
Label descriptionLabel = new Label(hoverComposite, SWT.LEFT);
- descriptionLabel.setText(ResourceHandler.getString("TextHoverPreferenceTab.description")); //$NON-NLS-1$
+ descriptionLabel.setText(SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.description")); //$NON-NLS-1$
gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
gd.horizontalSpan = 2;
descriptionLabel.setLayoutData(gd);
@@ -323,7 +321,7 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
* @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#getTitle()
*/
public String getTitle() {
- return ResourceHandler.getString("TextHoverPreferenceTab.title"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.title"); //$NON-NLS-1$
}
void handleHoverListSelection() {
@@ -424,7 +422,7 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
IStatus status = new StatusInfo();
if (hoverConfig != null && hoverConfig.isEnabled() && EditorUtility.computeStateMask(hoverConfig.getModifierString()) == -1)
- status = new StatusInfo(IStatus.ERROR, ResourceHandler.getString("TextHoverPreferenceTab.modifierIsNotValid", new String[]{hoverConfig.getModifierString()})); //$NON-NLS-1$
+ status = new StatusInfo(IStatus.ERROR, SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.modifierIsNotValid", new String[]{hoverConfig.getModifierString()})); //$NON-NLS-1$
int i = 0;
HashMap stateMasks = new HashMap(fTextHovers.length);
@@ -433,9 +431,9 @@ public class TextHoverPreferenceTab extends AbstractPreferenceTab {
String label = fTextHovers[i].getLabel();
Integer stateMask = new Integer(EditorUtility.computeStateMask(fTextHovers[i].getModifierString()));
if (stateMask.intValue() == -1)
- status = new StatusInfo(IStatus.ERROR, ResourceHandler.getString("TextHoverPreferenceTab.modifierIsNotValidForHover", new String[]{fTextHovers[i].getModifierString(), label})); //$NON-NLS-1$
+ status = new StatusInfo(IStatus.ERROR, SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.modifierIsNotValidForHover", new String[]{fTextHovers[i].getModifierString(), label})); //$NON-NLS-1$
else if (stateMasks.containsKey(stateMask))
- status = new StatusInfo(IStatus.ERROR, ResourceHandler.getString("TextHoverPreferenceTab.duplicateModifier", new String[]{label, (String) stateMasks.get(stateMask)})); //$NON-NLS-1$
+ status = new StatusInfo(IStatus.ERROR, SSEUIPlugin.getResourceString("%TextHoverPreferenceTab.duplicateModifier", new String[]{label, (String) stateMasks.get(stateMask)})); //$NON-NLS-1$
else
stateMasks.put(stateMask, label);
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TranslucencyPreferenceTab.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TranslucencyPreferenceTab.java
index cb7226c6aa..2d42aadcdf 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TranslucencyPreferenceTab.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ui/TranslucencyPreferenceTab.java
@@ -28,10 +28,8 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
-
public class TranslucencyPreferenceTab implements IPreferenceTab {
private PreferencePage fMainPreferencePage;
@@ -69,7 +67,7 @@ public class TranslucencyPreferenceTab implements IPreferenceTab {
layout.numColumns = 2;
composite.setLayout(layout);
- String text = ResourceHandler.getString("TranslucencyPreferenceTab.1"); //$NON-NLS-1$
+ String text = SSEUIPlugin.getResourceString("%TranslucencyPreferenceTab.1"); //$NON-NLS-1$
fTranslucencyScale = new IntegerFieldEditor(CommonEditorPreferenceNames.READ_ONLY_FOREGROUND_SCALE, text, composite);
fTranslucencyScale.setErrorMessage(JFaceResources.getString("StringFieldEditor.errorMessage"));//$NON-NLS-1$
@@ -105,7 +103,7 @@ public class TranslucencyPreferenceTab implements IPreferenceTab {
* @see org.eclipse.wst.sse.ui.preferences.ui.IPreferenceTab#getTitle()
*/
public String getTitle() {
- return ResourceHandler.getString("TranslucencyPreferenceTab.0"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%TranslucencyPreferenceTab.0"); //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/AnnotationHoverProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/AnnotationHoverProcessor.java
index 36305ccfff..78e19acb84 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/AnnotationHoverProcessor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/AnnotationHoverProcessor.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.sse.ui.taginfo;
-
-
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -33,8 +31,6 @@ import org.eclipse.ui.texteditor.ChainedPreferenceStore;
import org.eclipse.wst.sse.core.util.StringUtils;
import org.eclipse.wst.sse.ui.ITemporaryAnnotation;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
/**
* Hover help that displays annotations shown in text of editor. Currently,
@@ -81,7 +77,7 @@ public class AnnotationHoverProcessor implements ITextHover {
protected String formatMessages(List messages) {
StringBuffer buffer = new StringBuffer();
buffer.append(PARAGRAPH_START);
- buffer.append(ResourceHandler.getString("Multiple_errors")); //$NON-NLS-1$
+ buffer.append(SSEUIPlugin.getResourceString("%Multiple_errors")); //$NON-NLS-1$
buffer.append(LIST_BEGIN);
Iterator e = messages.iterator();
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/TextHoverManager.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/TextHoverManager.java
index be0f058fab..dc83dd3bef 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/TextHoverManager.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/taginfo/TextHoverManager.java
@@ -17,11 +17,8 @@ import java.util.StringTokenizer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
-
-
/**
* Manages text hovers for Structured Text editors
*
@@ -165,7 +162,7 @@ public class TextHoverManager {
if (modifierString.equals(NO_MODIFIER))
modifierString = ""; //$NON-NLS-1$
- TextHoverDescriptor descriptor = new TextHoverDescriptor(id, ResourceHandler.getString(id + LABEL_KEY), ResourceHandler.getString(id + DESCRIPTION_KEY), enabled, modifierString);
+ TextHoverDescriptor descriptor = new TextHoverDescriptor(id, SSEUIPlugin.getResourceString("%" + id + LABEL_KEY), SSEUIPlugin.getResourceString("%" + id + DESCRIPTION_KEY), enabled, modifierString);
// should check to see if ids appear more than once
idToModifier.put(id, descriptor);
}
@@ -178,7 +175,7 @@ public class TextHoverManager {
if (desc != null) {
descriptors[i] = desc;
} else {
- descriptors[i] = new TextHoverDescriptor(TEXT_HOVER_IDS[i], ResourceHandler.getString(TEXT_HOVER_IDS[i] + LABEL_KEY), ResourceHandler.getString(TEXT_HOVER_IDS + DESCRIPTION_KEY));
+ descriptors[i] = new TextHoverDescriptor(TEXT_HOVER_IDS[i], SSEUIPlugin.getResourceString("%" + TEXT_HOVER_IDS[i] + LABEL_KEY), SSEUIPlugin.getResourceString("%" + TEXT_HOVER_IDS + DESCRIPTION_KEY));
}
}
return descriptors;
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/util/ShowViewAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/util/ShowViewAction.java
index 83903416f5..0a6210ca87 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/util/ShowViewAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/util/ShowViewAction.java
@@ -20,8 +20,6 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
/**
* Surfaces a View.
@@ -94,7 +92,7 @@ public abstract class ShowViewAction extends Action {
try {
page.showView(getViewID());
} catch (PartInitException e) {
- ErrorDialog.openError(window.getShell(), ResourceHandler.getString("ShowView.errorTitle"), //$NON-NLS-1$
+ ErrorDialog.openError(window.getShell(), SSEUIPlugin.getResourceString("%ShowView.errorTitle"), //$NON-NLS-1$
e.getMessage(), e.getStatus());
}
}
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/RefreshOutlineJob.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/RefreshOutlineJob.java
index d5cd2eb629..5a6d4d6a06 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/RefreshOutlineJob.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/RefreshOutlineJob.java
@@ -25,7 +25,7 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -53,7 +53,7 @@ public class RefreshOutlineJob extends Job {
public RefreshOutlineJob(StructuredViewer viewer) {
// might need a different label, like "Refreshing Outline"
- super(ResourceHandler.getString("JFaceNodeAdapter.0"));
+ super(SSEUIPlugin.getResourceString("%JFaceNodeAdapter.0"));
setPriority(Job.LONG);
setSystem(true);
fRequests = new ArrayList(1);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/StructuredContentOutlineConfiguration.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/StructuredContentOutlineConfiguration.java
index 86924a0c81..1ebbbc6793 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/StructuredContentOutlineConfiguration.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/StructuredContentOutlineConfiguration.java
@@ -29,15 +29,13 @@ import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.ShowInContext;
import org.eclipse.wst.sse.core.IFactoryRegistry;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.Logger;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
-
public class StructuredContentOutlineConfiguration extends ContentOutlineConfiguration {
/**
* Structured source files tend to have large/long tree structures. Add a
@@ -47,7 +45,7 @@ public class StructuredContentOutlineConfiguration extends ContentOutlineConfigu
private TreeViewer fTreeViewer = null;
public CollapseTreeAction(TreeViewer viewer) {
- super(ResourceHandler.getString("StructuredContentOutlineConfiguration.0"), AS_PUSH_BUTTON); //$NON-NLS-1$
+ super(SSEUIPlugin.getResourceString("%StructuredContentOutlineConfiguration.0"), AS_PUSH_BUTTON); //$NON-NLS-1$
setImageDescriptor(COLLAPSE_E);
setDisabledImageDescriptor(COLLAPSE_D);
setToolTipText(getText());
@@ -63,7 +61,7 @@ public class StructuredContentOutlineConfiguration extends ContentOutlineConfigu
protected class ToggleLinkAction extends PropertyChangeUpdateAction {
public ToggleLinkAction(IPreferenceStore store, String preference) {
- super(ResourceHandler.getString("StructuredContentOutlineConfiguration.1"), store, preference, true); //$NON-NLS-1$
+ super(SSEUIPlugin.getResourceString("%StructuredContentOutlineConfiguration.1"), store, preference, true); //$NON-NLS-1$
setToolTipText(getText());
setDisabledImageDescriptor(SYNCED_D);
setImageDescriptor(SYNCED_E);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/RemoveAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/RemoveAction.java
index c7261e3771..a206710ba8 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/RemoveAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/RemoveAction.java
@@ -13,10 +13,9 @@
package org.eclipse.wst.sse.ui.views.properties;
import org.eclipse.jface.action.Action;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
public class RemoveAction extends Action {
private ConfigurablePropertySheetPage fPage;
@@ -34,7 +33,7 @@ public class RemoveAction extends Action {
* @see org.eclipse.jface.action.Action#getText()
*/
public String getText() {
- return ResourceHandler.getString("RemoveAction.0"); //$NON-NLS-1$
+ return SSEUIPlugin.getResourceString("%RemoveAction.0"); //$NON-NLS-1$
}
/**
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/ShowPropertiesAction.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/ShowPropertiesAction.java
index 0b117cdf2f..5de1768e08 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/ShowPropertiesAction.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/ShowPropertiesAction.java
@@ -13,13 +13,12 @@
package org.eclipse.wst.sse.ui.views.properties;
import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
import org.eclipse.wst.sse.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.util.ShowViewAction;
-
/**
* Surfaces the Properties view
*
@@ -29,7 +28,7 @@ public class ShowPropertiesAction extends ShowViewAction {
private final static String VIEW_ID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
public ShowPropertiesAction() {
- super(ResourceHandler.getString("ShowPropertiesAction.0"), EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_PROP_PS)); //$NON-NLS-1$
+ super(SSEUIPlugin.getResourceString("%ShowPropertiesAction.0"), EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_PROP_PS)); //$NON-NLS-1$
WorkbenchHelp.setHelp(this, IHelpContextIds.CONTMNU_PROPERTIES_HELPID);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/XMLCleanupPreferencesImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/XMLCleanupPreferencesImpl.java
index c8dbb06213..f09292c065 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/XMLCleanupPreferencesImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/cleanup/XMLCleanupPreferencesImpl.java
@@ -13,10 +13,9 @@
package org.eclipse.wst.xml.core.cleanup;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.sse.core.ModelPlugin;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.xml.core.XMLPreferenceNames;
-
/**
* @deprecated renamed to StructuredCleanupPreferences
*
@@ -73,7 +72,7 @@ public class XMLCleanupPreferencesImpl implements XMLCleanupPreferences {
public Preferences getPreferences() {
if (fPreferences == null) {
- fPreferences = ModelPlugin.getDefault().getPluginPreferences();
+ fPreferences = SSECorePlugin.getDefault().getPluginPreferences();
}
return fPreferences;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/FormatProcessorXML.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/FormatProcessorXML.java
index 3f1f02f68a..292bde58c4 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/FormatProcessorXML.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/FormatProcessorXML.java
@@ -13,16 +13,15 @@
package org.eclipse.wst.xml.core.format;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.sse.core.ModelPlugin;
import org.eclipse.wst.sse.core.format.AbstractStructuredFormatProcessor;
import org.eclipse.wst.sse.core.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.format.IStructuredFormatter;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.eclipse.wst.xml.core.internal.document.CDATASectionImpl;
import org.w3c.dom.Node;
-
public class FormatProcessorXML extends AbstractStructuredFormatProcessor {
protected IStructuredFormatPreferences fFormatPreferences = null;
@@ -43,7 +42,7 @@ public class FormatProcessorXML extends AbstractStructuredFormatProcessor {
if (preferences.getBoolean(CommonModelPreferenceNames.INDENT_USING_TABS))
fFormatPreferences.setIndent("\t"); //$NON-NLS-1$
else {
- int tabWidth = ModelPlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
+ int tabWidth = SSECorePlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
String indent = ""; //$NON-NLS-1$
for (int i = 0; i < tabWidth; i++) {
indent += " "; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java
index 07635f8285..73d7afcf91 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/format/NodeFormatter.java
@@ -15,12 +15,12 @@ package org.eclipse.wst.xml.core.format;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.sse.core.ModelPlugin;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.core.format.IStructuredFormatContraints;
import org.eclipse.wst.sse.core.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.format.IStructuredFormatter;
import org.eclipse.wst.sse.core.format.StructuredFormatContraints;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.internal.parser.ContextRegion;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
import org.eclipse.wst.sse.core.text.IStructuredDocument;
@@ -37,7 +37,6 @@ import org.eclipse.wst.xml.core.jsp.model.parser.temp.XMLJSPRegionContexts;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
import org.w3c.dom.Node;
-
public class NodeFormatter implements IStructuredFormatter {
static protected final String CR = "\r"; //$NON-NLS-1$
static protected final String CRLF = "\r\n"; //$NON-NLS-1$
@@ -423,7 +422,7 @@ public class NodeFormatter implements IStructuredFormatter {
if (preferences.getBoolean(CommonModelPreferenceNames.INDENT_USING_TABS))
fFormatPreferences.setIndent("\t"); //$NON-NLS-1$
else {
- int tabWidth = ModelPlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
+ int tabWidth = SSECorePlugin.getDefault().getPluginPreferences().getInt(CommonModelPreferenceNames.TAB_WIDTH);
String indent = ""; //$NON-NLS-1$
for (int i = 0; i < tabWidth; i++) {
indent += " "; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java
index a2dfc32e52..57992c1177 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java
@@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.wst.xml.core.internal;
+import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -29,6 +30,10 @@ import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
public class XMLCorePlugin extends Plugin {
//The shared instance.
private static XMLCorePlugin 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$
/**
* Returns the shared instance.
@@ -38,45 +43,18 @@ public class XMLCorePlugin extends Plugin {
}
/**
- * @deprecated use Platform.getResourceString(Platform.getBundle("org.eclipse.wst.xml.core"), key);
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = XMLCorePlugin.getDefault().getResourceBundle();
- try {
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
* @deprecated use ResourcesPlugin.getWorkspace();
*/
public static IWorkspace getWorkspace() {
return ResourcesPlugin.getWorkspace();
}
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
/**
* The constructor.
*/
public XMLCorePlugin() {
super();
plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.core.XmlPluginResources"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * @deprecated use Platform.getResourceBundle(Platform.getBundle("org.eclipse.wst.xml.core"));
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
}
/*
@@ -112,4 +90,49 @@ public class XMLCorePlugin extends Plugin {
prefs.setDefault(CommonModelPreferenceNames.TAG_NAME_CASE, CommonModelPreferenceNames.LOWER);
prefs.setDefault(CommonModelPreferenceNames.ATTR_NAME_CASE, CommonModelPreferenceNames.LOWER);
}
+
+ /**
+ * 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.xml.core.internal.XMLCorePluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties
new file mode 100644
index 0000000000..49a18aacb9
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2001, 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
+# Jens Lukowski/Innoopract - initial renaming/restructuring
+#
+###############################################################################
+Invalid_character_('<')_fo_ERROR_=Invalid character ('<') found
+Invalid_character_('>')_fo_ERROR_=Invalid character ('>') found
+Invalid_character_('&')_fo_ERROR_=Invalid character ('&') found
+Invalid_character_('__')_f_EXC_=Invalid character ('\"') found
+###############################################################################
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
index 3b3d941c6c..a7d89a3dcf 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
@@ -12,17 +12,14 @@
*******************************************************************************/
package org.eclipse.wst.xml.core.internal.document;
-
-
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler1;
import org.eclipse.wst.xml.core.document.InvalidCharacterException;
import org.eclipse.wst.xml.core.document.JSPTag;
import org.eclipse.wst.xml.core.document.XMLCharEntity;
import org.eclipse.wst.xml.core.document.XMLDocument;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
-
/**
*/
public class SourceValidator {
@@ -273,7 +270,7 @@ public class SourceValidator {
int index = source.indexOf(JSPTag.TAG_CLOSE);
if (index < 0)
return true;
- message = ResourceHandler1.getString("Invalid_character_('>')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('>') found"
+ message = XMLCorePlugin.getResourceString("%Invalid_character_('>')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('>') found"
throw new InvalidCharacterException(message, '>', index + 1);
} else if (text.isCDATAContent()) {
endTagName = text.getParentNode().getNodeName();
@@ -312,12 +309,12 @@ public class SourceValidator {
}
// invalid tag
}
- message = ResourceHandler1.getString("Invalid_character_('<')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('<') found"
+ message = XMLCorePlugin.getResourceString("%Invalid_character_('<')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('<') found"
break;
case '>' :
if (acceptClose)
continue;
- message = ResourceHandler1.getString("Invalid_character_('>')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('>') found"
+ message = XMLCorePlugin.getResourceString("%Invalid_character_('>')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('>') found"
break;
case '&' :
if (acceptEntityRef) {
@@ -330,12 +327,12 @@ public class SourceValidator {
}
// invalid entity reference
}
- message = ResourceHandler1.getString("Invalid_character_('&')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('&') found"
+ message = XMLCorePlugin.getResourceString("%Invalid_character_('&')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('&') found"
break;
case '"' :
if (acceptQuote)
continue;
- message = ResourceHandler1.getString("Invalid_character_('__')_f_EXC_"); //$NON-NLS-1$ = "Invalid character ('\"') found"
+ message = XMLCorePlugin.getResourceString("%Invalid_character_('__')_f_EXC_"); //$NON-NLS-1$ = "Invalid character ('\"') found"
break;
default :
continue;
diff --git a/bundles/org.eclipse.wst.xml.ui/plugin.properties b/bundles/org.eclipse.wst.xml.ui/plugin.properties
index 0a409e8bf6..bc5ae35326 100644
--- a/bundles/org.eclipse.wst.xml.ui/plugin.properties
+++ b/bundles/org.eclipse.wst.xml.ui/plugin.properties
@@ -18,12 +18,7 @@ XML_Files.name=XML Files
XML_Source.name=XML Source
XML_Templates.name=XML Templates
XML_Styles.name=XML Styles
-XML_Annotations.name=XML Annotations
-###############################################################################
-SSE_XML_Editor.name=SSE XML Editor
-SSE_XML_Editor_NL_Support.name=SSE XML Editor NL Support
XML_Editor.name=XML Editor
-###############################################################################
XMLTableTreeViewer.0=Design
XMLMultiPageEditorPart.0=Source
XMLTreeExtension.0=Structure
@@ -41,12 +36,9 @@ XMLTableTreeActionBarContributor.7=Reload Dependencies
XMLTableTreeActionBarContributor.8=&Reload Dependencies
###############################################################################
_UI_WIZARD_NEW_XML=XML
-_UI_CREATE_NEW_XML_FILE=Create a new XML file.
genMenuLabel=&Generate
_UI_ACTION_CREATE_XML=&XML File...
XMLExample.name=Editing and validating XML files
-XMLExampleProjectCreationWizard.name=XML Examples
-XMLExampleProjectCreationWizard.description=Create a project containing XML sample files
XMLExampleProjectCreationWizard.projectname=XMLExamples
XMLExampleProjectCreationWizard.pagetitle=XML sample files for editing and validating
XMLExampleProjectCreationWizard.pagedescription=Create a project containing XML sample files.
@@ -56,4 +48,10 @@ All_XML_context_type_Extension_Element.name=All XML context type
XML_Tag_context_type_Extension_Element.name=XML Tag context type
XML_Attribute_context_type_Extension_Element.name=XML Attribute context type
XML_Attribute_value_context_type_Extension_Element.name=XML Attribute value context type
-XML_Extension_Element.name=XML \ No newline at end of file
+###############################################################################
+# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
+#XMLExampleProjectCreationWizard.name=XML Examples
+#XMLExampleProjectCreationWizard.description=Create a project containing XML sample files
+#XML_Annotations.name=XML Annotations
+#XML_Extension_Element.name=XML
+#_UI_CREATE_NEW_XML_FILE=Create a new XML file.
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResourceHandler.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResourceHandler.java
new file mode 100644
index 0000000000..1c5ae81ec9
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResourceHandler.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * 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.xml.internal.ui;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class XMLEditorResourceHandler {
+ //Resource bundle.
+ private static ResourceBundle resourceBundle;
+ private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
+ private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
+
+ /**
+ * 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 = 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 static ResourceBundle getResourceBundle() {
+ try {
+ if (resourceBundle == null)
+ resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.internal.ui.XMLEditorResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/xmleditor.properties b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResources.properties
index 6fcd774694..6fcd774694 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/xmleditor.properties
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResources.properties
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java
index 9a046ba023..9021fe5831 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java
@@ -48,7 +48,7 @@ import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.xml.core.XMLPreferenceNames;
import org.eclipse.wst.xml.ui.StructuredTextEditorXML;
import org.eclipse.wst.xml.ui.internal.Logger;
@@ -58,7 +58,6 @@ import org.eclipse.wst.xml.ui.internal.tabletree.XMLTableTreeViewer;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-
public class XMLMultiPageEditorPart extends MultiPageEditorPart implements IPropertyListener {
/**
@@ -168,7 +167,7 @@ public class XMLMultiPageEditorPart extends MultiPageEditorPart implements IProp
protected void addSourcePage() throws PartInitException {
try {
fSourcePageIndex = addPage(fTextEditor, getEditorInput());
- setPageText(fSourcePageIndex, org.eclipse.wst.xml.ui.nls2.ResourceHandler.getString("XMLMultiPageEditorPart.0")); //$NON-NLS-1$
+ setPageText(fSourcePageIndex, XMLEditorResourceHandler.getResourceString("%XMLMultiPageEditorPart.0")); //$NON-NLS-1$
// the update's critical, to get viewer selection manager and
// highlighting to work
fTextEditor.update();
@@ -183,7 +182,7 @@ public class XMLMultiPageEditorPart extends MultiPageEditorPart implements IProp
// dispose editor
dispose();
Logger.logException(exception);
- throw new SourceEditingRuntimeException(exception, ResourceHandler.getString("An_error_has_occurred_when1_ERROR_")); //$NON-NLS-1$
+ throw new SourceEditingRuntimeException(exception, SSEUIPlugin.getResourceString("%An_error_has_occurred_when1_ERROR_")); //$NON-NLS-1$
}
}
@@ -375,10 +374,10 @@ public class XMLMultiPageEditorPart extends MultiPageEditorPart implements IProp
// very unlikely
Logger.logException(ce);
}
- throw new PartInitException(ResourceHandler.getString("23concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
+ throw new PartInitException(SSEUIPlugin.getResourceString("%23concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
//$NON-NLS-1$ = "Resource {0} does not exist."
} else {
- throw new PartInitException(ResourceHandler.getString("32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
+ throw new PartInitException(SSEUIPlugin.getResourceString("%32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
//$NON-NLS-1$ = "Editor could not be open on {0}"
}
}
@@ -389,7 +388,7 @@ public class XMLMultiPageEditorPart extends MultiPageEditorPart implements IProp
} catch (CoreException noStorageExc) {
}
if (contents == null) {
- throw new PartInitException(ResourceHandler.getString("32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
+ throw new PartInitException(SSEUIPlugin.getResourceString("%32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
} else {
try {
contents.close();
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
index 956c7dee2c..9d37f78fc8 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
@@ -6,8 +6,6 @@
*
* Contributors: IBM Corporation - initial API and implementation
****************************************************************************/
-
-
package org.eclipse.wst.xml.ui.internal.tabletree;
import org.eclipse.jface.action.Action;
@@ -15,9 +13,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.wst.xml.internal.ui.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.internal.ui.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
-
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class ViewerExpandCollapseAction extends Action {
@@ -32,14 +28,14 @@ public class ViewerExpandCollapseAction extends Action {
setImageDescriptor(e_imageDescriptor);
setDisabledImageDescriptor(d_imageDescriptor);
- setToolTipText(XMLCommonResources.getInstance().getString("_UI_INFO_EXPAND_ALL")); //$NON-NLS-1$
+ setToolTipText(XMLUIPlugin.getResourceString("%_UI_INFO_EXPAND_ALL")); //$NON-NLS-1$
} else {
ImageDescriptor e_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_ETOOL_COLLAPSEALL);
ImageDescriptor d_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_DTOOL_COLLAPSEALL);
setImageDescriptor(e_imageDescriptor);
setDisabledImageDescriptor(d_imageDescriptor);
- setToolTipText(XMLCommonResources.getInstance().getString("_UI_INFO_COLLAPSE_ALL")); //$NON-NLS-1$
+ setToolTipText(XMLUIPlugin.getResourceString("%_UI_INFO_COLLAPSE_ALL")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
index a520562b48..252d0b00a1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
@@ -35,12 +35,11 @@ import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.internal.ui.IDesignViewer;
import org.eclipse.wst.xml.internal.ui.IDesignViewerActionBarContributor;
+import org.eclipse.wst.xml.internal.ui.XMLEditorResourceHandler;
import org.eclipse.wst.xml.internal.ui.XMLMultiPageEditorPart;
-import org.eclipse.wst.xml.ui.nls2.ResourceHandler;
import org.eclipse.wst.xml.ui.util.SharedXMLEditorPluginImageHelper;
import org.w3c.dom.Document;
-
/**
*
*/
@@ -98,7 +97,7 @@ public class XMLTableTreeActionBarContributor implements IDesignViewerActionBarC
IMenuManager xmlMenu = bars.getMenuManager().findMenuUsingPath("com.ibm.etools.sed.editor.xmlmenu"); //$NON-NLS-1$
if (xmlMenu == null) {
- xmlMenu = new MenuManager(ResourceHandler.getString("XMLTableTreeActionBarContributor.0"), "com.ibm.etools.sed.editor.xmlmenu"); //$NON-NLS-1$ //$NON-NLS-2$
+ xmlMenu = new MenuManager(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.0"), "com.ibm.etools.sed.editor.xmlmenu"); //$NON-NLS-1$ //$NON-NLS-2$
bars.getMenuManager().insertBefore(IWorkbenchActionConstants.M_WINDOW, xmlMenu);
} else {
removeContributions(xmlMenu);
@@ -139,13 +138,13 @@ public class XMLTableTreeActionBarContributor implements IDesignViewerActionBarC
//
xmlMenuExpandAction = new ViewerExpandCollapseAction(true);
xmlMenuExpandAction.setId(EXPAND_ALL_ID);
- xmlMenuExpandAction.setText(ResourceHandler.getString("XMLTableTreeActionBarContributor.1")); //$NON-NLS-1$
+ xmlMenuExpandAction.setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.1")); //$NON-NLS-1$
xmlMenu.add(xmlMenuExpandAction);
xmlMenuCollapseAction = new ViewerExpandCollapseAction(false);
xmlMenuCollapseAction.setId(COLLAPSE_ALL_ID);
xmlMenuCollapseAction.setId(EXPAND_ALL_ID);
- xmlMenuCollapseAction.setText(ResourceHandler.getString("XMLTableTreeActionBarContributor.2")); //$NON-NLS-1$
+ xmlMenuCollapseAction.setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.2")); //$NON-NLS-1$
xmlMenu.add(xmlMenuCollapseAction);
}
@@ -262,12 +261,12 @@ public class XMLTableTreeActionBarContributor implements IDesignViewerActionBarC
public void setAppearanceForEditMode(int editMode) {
if (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) {
- setToolTipText(ResourceHandler.getString("XMLTableTreeActionBarContributor.3")); //$NON-NLS-1$
- setText(ResourceHandler.getString("XMLTableTreeActionBarContributor.4")); //$NON-NLS-1$
+ setToolTipText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.3")); //$NON-NLS-1$
+ setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.4")); //$NON-NLS-1$
setImageDescriptor(onImage);
} else {
- setToolTipText(ResourceHandler.getString("XMLTableTreeActionBarContributor.5")); //$NON-NLS-1$
- setText(ResourceHandler.getString("XMLTableTreeActionBarContributor.6")); //$NON-NLS-1$
+ setToolTipText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.5")); //$NON-NLS-1$
+ setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.6")); //$NON-NLS-1$
setImageDescriptor(offImage);
}
}
@@ -292,8 +291,8 @@ public class XMLTableTreeActionBarContributor implements IDesignViewerActionBarC
public ReloadGrammarAction() {
setDisabledImageDescriptor(SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_DTOOL_RLDGRMR));
setImageDescriptor(SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_ETOOL_RLDGRMR));
- setToolTipText(ResourceHandler.getString("XMLTableTreeActionBarContributor.7")); //$NON-NLS-1$
- setText(ResourceHandler.getString("XMLTableTreeActionBarContributor.8")); //$NON-NLS-1$
+ setToolTipText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.7")); //$NON-NLS-1$
+ setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.8")); //$NON-NLS-1$
}
public void setModel(IStructuredModel newModel) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
index 6892a84ce8..34bb4e7af7 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
@@ -34,13 +34,12 @@ import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.internal.ui.IDesignViewer;
+import org.eclipse.wst.xml.internal.ui.XMLEditorResourceHandler;
import org.eclipse.wst.xml.ui.actions.NodeAction;
import org.eclipse.wst.xml.ui.dnd.XMLDragAndDropManager;
-import org.eclipse.wst.xml.ui.nls2.ResourceHandler;
import org.eclipse.wst.xml.ui.views.contentoutline.XMLNodeActionManager;
import org.w3c.dom.Document;
-
public class XMLTableTreeViewer extends TreeViewer implements IDesignViewer {
/**
@@ -246,7 +245,7 @@ public class XMLTableTreeViewer extends TreeViewer implements IDesignViewer {
}
public String getTitle() {
- return ResourceHandler.getString("XMLTableTreeViewer.0"); //$NON-NLS-1$
+ return XMLEditorResourceHandler.getResourceString("%XMLTableTreeViewer.0"); //$NON-NLS-1$
}
protected void handleDispose(DisposeEvent event) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
index 5166eba447..44a0373dfc 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
@@ -6,8 +6,6 @@
*
* Contributors: IBM Corporation - initial API and implementation
****************************************************************************/
-
-
package org.eclipse.wst.xml.ui.internal.tabletree;
import org.eclipse.jface.viewers.CellEditor;
@@ -24,15 +22,14 @@ import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.common.contentmodel.util.CMDescriptionBuilder;
-import org.eclipse.wst.xml.ui.nls2.ResourceHandler;
+import org.eclipse.wst.xml.internal.ui.XMLEditorResourceHandler;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
public class XMLTreeExtension extends TreeExtension {
- public final static String STRUCTURE_PROPERTY = ResourceHandler.getString("XMLTreeExtension.0"); //$NON-NLS-1$
- public final static String VALUE_PROPERTY = ResourceHandler.getString("XMLTreeExtension.1"); //$NON-NLS-1$
+ public final static String STRUCTURE_PROPERTY = XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.0"); //$NON-NLS-1$
+ public final static String VALUE_PROPERTY = XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.1"); //$NON-NLS-1$
protected Composite control;
protected MyCellModifier modifier;
@@ -112,8 +109,8 @@ public class XMLTreeExtension extends TreeExtension {
// so that they know how to proceed to edit the blank view
gc.setForeground(tree.getDisplay().getSystemColor(SWT.COLOR_BLACK));
gc.setBackground(tree.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- gc.drawString(ResourceHandler.getString("XMLTreeExtension.3"), 10, 10); //$NON-NLS-1$
- gc.drawString(ResourceHandler.getString("XMLTreeExtension.4"), 10, 10 + gc.getFontMetrics().getHeight()); //$NON-NLS-1$
+ gc.drawString(XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.3"), 10, 10); //$NON-NLS-1$
+ gc.drawString(XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.4"), 10, 10 + gc.getFontMetrics().getHeight()); //$NON-NLS-1$
}
public String getElementValueHelper(Element element) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/nls2/ResourceHandler.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/nls2/ResourceHandler.java
deleted file mode 100644
index 1eae6c1f6e..0000000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/nls2/ResourceHandler.java
+++ /dev/null
@@ -1,64 +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.xml.ui.nls2;
-
-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("xmleditor");//$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.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
index 56fdd8fc52..6ad0dd44d2 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
@@ -34,7 +34,7 @@ import org.eclipse.wst.common.contentmodel.util.DOMContentBuilderImpl;
import org.eclipse.wst.common.contentmodel.util.DOMWriter;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.xml.core.XMLModelPlugin;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.eclipse.wst.xml.uriresolver.XMLCatalog;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
import org.eclipse.wst.xml.uriresolver.XMLCatalogPlugin;
@@ -131,7 +131,7 @@ public class NewXMLGenerator
public void createEmptyXMLDocument(IFile newFile) throws Exception
{
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- Preferences preference = XMLModelPlugin.getDefault().getPluginPreferences();
+ Preferences preference = XMLCorePlugin.getDefault().getPluginPreferences();
String charSet = preference.getString(CommonModelPreferenceNames.OUTPUT_CODESET);
PrintWriter writer = new PrintWriter(new OutputStreamWriter(outputStream, charSet));
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties b/bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties
index 4333b04172..b1cdb33a11 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties
@@ -141,12 +141,6 @@ _UI_LABEL_EXPORT_DIALOG_TITLE = Export XML Catalog Settings
_UI_LABEL_EXPORT_DIALOG_HEADING = Specify XML Catalog File
_UI_LABEL_EXPORT_DIALOG_MESSAGE = Specify the file that will used to save the XML Catalog setting.
-!======================================================================================
-!
-! Here is the list of Error string that have message IDs - make sure they are unique
-! Range for XMLBuilder messageIDs: IWAX1601E - IWAX1800E
-!
-!======================================================================================
!NewModelWizard
_ERROR_NO_FILENAME = Enter a file name.
_ERROR_FILE_DOESNT_EXIST = File does not exist.
@@ -154,7 +148,7 @@ _ERROR_INVALID_FILENAME = Invalid file name.
_ERROR_BAD_FILENAME_EXTENSION = The specified file name must have a recognized extension (e.g. '.xml').
_ERROR_FILE_ALREADY_EXISTS = The same file already exists.
_ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED = A root element must be specified.
-_ERROR_XML_REQUIRES_NS_PREFIX = IWAX1607E The schema instance requires a namespace prefix.
+_ERROR_XML_REQUIRES_NS_PREFIX = The schema instance requires a namespace prefix.
_UI_LABEL_ERROR_SCHEMA_INVALID_INFO = The schema file contains errors. Open it in the XML schema editor for details.
_UI_LABEL_ERROR_DTD_INVALID_INFO = The DTD file contains errors. Open it in the DTD editor for details.
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java
index 76836f9152..1cf8a6048d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java
@@ -18,8 +18,8 @@ import org.eclipse.jface.action.Action;
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.search.FindOccurrencesActionProvider;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.ui.actions.AddBlockCommentActionXML;
import org.eclipse.wst.xml.ui.actions.CleanupActionXML;
import org.eclipse.wst.xml.ui.actions.RemoveBlockCommentActionXML;
@@ -27,12 +27,11 @@ import org.eclipse.wst.xml.ui.actions.ToggleCommentActionXML;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.xml.ui.internal.search.XMLFindOccurrencesAction;
-
public class StructuredTextEditorXML extends StructuredTextEditor {
protected void createActions() {
super.createActions();
- ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
+ ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
Action action = new CleanupActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + DOT, this);
action.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java
index 81af097c42..d86870db3e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java
@@ -36,11 +36,11 @@ import org.eclipse.wst.sse.core.IModelManager;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.sse.ui.EditorPlugin;
import org.eclipse.wst.sse.ui.StructuredTextReconciler;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
import org.eclipse.wst.sse.ui.format.StructuredFormattingStrategy;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.style.IHighlighter;
@@ -63,7 +63,6 @@ import org.eclipse.wst.xml.ui.taginfo.XMLBestMatchHoverProcessor;
import org.eclipse.wst.xml.ui.taginfo.XMLInformationProvider;
import org.eclipse.wst.xml.ui.taginfo.XMLTagInfoHoverProcessor;
-
public class StructuredTextViewerConfigurationXML extends StructuredTextViewerConfiguration {
InformationPresenter fInformationPresenter = null;
private boolean reconcilerStrategiesAreSet;
@@ -202,7 +201,7 @@ public class StructuredTextViewerConfigurationXML extends StructuredTextViewerCo
//fReconciler.setEditor(editorPart);
}
- IPreferenceStore store = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
boolean reconcilingEnabled = store.getBoolean(CommonEditorPreferenceNames.EVALUATE_TEMPORARY_PROBLEMS);
// the second time through, the strategies are set
@@ -219,7 +218,7 @@ public class StructuredTextViewerConfigurationXML extends StructuredTextViewerCo
// check language (ContentTypeID)....
String contentTypeId = sModel.getModelHandler().getAssociatedContentTypeId();
String generatedKey = PreferenceKeyGenerator.generateKey(CommonEditorPreferenceNames.EDITOR_VALIDATION_METHOD, contentTypeId);
- String validationMethodPref = EditorPlugin.getInstance().getPreferenceStore().getString(generatedKey);
+ String validationMethodPref = SSEUIPlugin.getInstance().getPreferenceStore().getString(generatedKey);
IReconcilingStrategy defaultStrategy = null;
// pref set to no validation, so return
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
index 493b4b3437..d1f023f126 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.actions;
import java.util.ArrayList;
@@ -37,9 +35,9 @@ import org.eclipse.wst.common.contentmodel.util.DOMContentBuilder;
import org.eclipse.wst.common.contentmodel.util.DOMContentBuilderImpl;
import org.eclipse.wst.common.contentmodel.util.DOMNamespaceHelper;
import org.eclipse.wst.sse.core.IStructuredModel;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
@@ -48,8 +46,6 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.ProcessingInstruction;
-
-
public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
@@ -73,7 +69,7 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
String text = getLabel(parent, cmnode);
setText(text);
description = text;
- undoDescription = XMLCommonResources.getInstance().getString("_UI_MENU_ADD") + " " + text; //$NON-NLS-1$ //$NON-NLS-2$
+ undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD") + " " + text; //$NON-NLS-1$ //$NON-NLS-2$
setImageDescriptor(imageDescriptorCache.getImageDescriptor(cmnode));
}
@@ -85,23 +81,23 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
switch (nodeType) {
case Node.COMMENT_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_COMMENT"); //$NON-NLS-1$
- undoDescription = XMLCommonResources.getInstance().getString("_UI_MENU_ADD_COMMENT"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_COMMENT"); //$NON-NLS-1$
+ undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_COMMENT"); //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
- undoDescription = XMLCommonResources.getInstance().getString("_UI_MENU_ADD_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
+ undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
break;
}
case Node.CDATA_SECTION_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_CDATA_SECTION"); //$NON-NLS-1$
- undoDescription = XMLCommonResources.getInstance().getString("_UI_MENU_ADD_CDATA_SECTION"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_CDATA_SECTION"); //$NON-NLS-1$
+ undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_CDATA_SECTION"); //$NON-NLS-1$
break;
}
case Node.TEXT_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_PCDATA"); //$NON-NLS-1$
- undoDescription = XMLCommonResources.getInstance().getString("_UI_MENU_ADD_PCDATA"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_PCDATA"); //$NON-NLS-1$
+ undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_PCDATA"); //$NON-NLS-1$
break;
}
}
@@ -123,11 +119,11 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
boolean format = true;
switch (nodeType) {
case Node.COMMENT_NODE : {
- newChildNode = document.createComment(XMLCommonResources.getInstance().getString("_UI_COMMENT_VALUE")); //$NON-NLS-1$
+ newChildNode = document.createComment(XMLUIPlugin.getResourceString("%_UI_COMMENT_VALUE")); //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- newChildNode = document.createProcessingInstruction(XMLCommonResources.getInstance().getString("_UI_PI_TARGET_VALUE"), XMLCommonResources.getInstance().getString("_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
+ newChildNode = document.createProcessingInstruction(XMLUIPlugin.getResourceString("%_UI_PI_TARGET_VALUE"), XMLUIPlugin.getResourceString("%_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
break;
}
case Node.CDATA_SECTION_NODE : {
@@ -173,18 +169,18 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
protected List list;
public DeleteAction(List list) {
- setText(XMLCommonResources.getInstance().getString("_UI_MENU_REMOVE")); //$NON-NLS-1$
+ setText(XMLUIPlugin.getResourceString("%_UI_MENU_REMOVE")); //$NON-NLS-1$
this.list = list;
}
public DeleteAction(Node node) {
- setText(XMLCommonResources.getInstance().getString("_UI_MENU_REMOVE")); //$NON-NLS-1$
+ setText(XMLUIPlugin.getResourceString("%_UI_MENU_REMOVE")); //$NON-NLS-1$
list = new Vector();
list.add(node);
}
public String getUndoDescription() {
- return XMLCommonResources.getInstance().getString("DELETE"); //$NON-NLS-1$
+ return XMLUIPlugin.getResourceString("%DELETE"); //$NON-NLS-1$
}
public void run() {
@@ -284,19 +280,19 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
this.parent = parent;
switch (nodeType) {
case Node.COMMENT_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_COMMENT"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_COMMENT"); //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
break;
}
case Node.CDATA_SECTION_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_CDATA_SECTION"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_CDATA_SECTION"); //$NON-NLS-1$
break;
}
case Node.TEXT_NODE : {
- description = XMLCommonResources.getInstance().getString("_UI_MENU_PCDATA"); //$NON-NLS-1$
+ description = XMLUIPlugin.getResourceString("%_UI_MENU_PCDATA"); //$NON-NLS-1$
break;
}
}
@@ -314,7 +310,7 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
}
public String getUndoDescription() {
- return XMLCommonResources.getInstance().getString("_UI_MENU_ADD") + " " + description; //$NON-NLS-1$ //$NON-NLS-2$
+ return XMLUIPlugin.getResourceString("%_UI_MENU_ADD") + " " + description; //$NON-NLS-1$ //$NON-NLS-2$
}
public void run() {
@@ -325,11 +321,11 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
boolean format = true;
switch (nodeType) {
case Node.COMMENT_NODE : {
- newChildNode = document.createComment(XMLCommonResources.getInstance().getString("_UI_COMMENT_VALUE")); //$NON-NLS-1$
+ newChildNode = document.createComment(XMLUIPlugin.getResourceString("%_UI_COMMENT_VALUE")); //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- newChildNode = document.createProcessingInstruction(XMLCommonResources.getInstance().getString("_UI_PI_TARGET_VALUE"), XMLCommonResources.getInstance().getString("_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
+ newChildNode = document.createProcessingInstruction(XMLUIPlugin.getResourceString("%_UI_PI_TARGET_VALUE"), XMLUIPlugin.getResourceString("%_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
break;
}
case Node.CDATA_SECTION_NODE : {
@@ -376,7 +372,7 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
}
public String getUndoDescription() {
- String result = XMLCommonResources.getInstance().getString("_UI_LABEL_UNDO_REPLACE_DESCRIPTION"); //$NON-NLS-1$
+ String result = XMLUIPlugin.getResourceString("%_UI_LABEL_UNDO_REPLACE_DESCRIPTION"); //$NON-NLS-1$
result += " " + getLabel(parent, cmnode); //$NON-NLS-1$
return result;
}
@@ -409,7 +405,7 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
protected Action createAddAttributeAction(Element parent, CMAttributeDeclaration ad) {
Action action = null;
if (ad == null) {
- action = new EditAttributeAction(this, parent, null, XMLCommonResources.getInstance().getString("_UI_MENU_NEW_ATTRIBUTE"), XMLCommonResources.getInstance().getString("_UI_MENU_NEW_ATTRIBUTE_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ action = new EditAttributeAction(this, parent, null, XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ATTRIBUTE"), XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ATTRIBUTE_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
} else {
action = new AddNodeAction(ad, parent, -1);
}
@@ -428,14 +424,14 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
protected Action createAddDoctypeAction(Document document, int index) {
- return new EditDoctypeAction(model, document, model.getBaseLocation(), XMLCommonResources.getInstance().getString("_UI_MENU_ADD_DTD_INFORMATION")); //$NON-NLS-1$
+ return new EditDoctypeAction(model, document, model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_ADD_DTD_INFORMATION")); //$NON-NLS-1$
}
protected Action createAddElementAction(Node parent, CMElementDeclaration ed, int index) {
Action action = null;
if (ed == null) {
- action = new EditElementAction(this, parent, index, XMLCommonResources.getInstance().getString("_UI_MENU_NEW_ELEMENT"), XMLCommonResources.getInstance().getString("_UI_MENU_NEW_ELEMENT_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ action = new EditElementAction(this, parent, index, XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ELEMENT"), XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ELEMENT_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
} else {
action = new AddNodeAction(ed, parent, index);
}
@@ -456,14 +452,14 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
protected Action createAddProcessingInstructionAction(Node parent, int index) {
Node refChild = getRefChildNodeAtIndex(parent, index);
- Action action = new EditProcessingInstructionAction(this, parent, refChild, XMLCommonResources.getInstance().getString("_UI_MENU_ADD_PROCESSING_INSTRUCTION"), XMLCommonResources.getInstance().getString("ADD_PROCESSING_INSTRUCTION")); //$NON-NLS-1$ //$NON-NLS-2$
+ Action action = new EditProcessingInstructionAction(this, parent, refChild, XMLUIPlugin.getResourceString("%_UI_MENU_ADD_PROCESSING_INSTRUCTION"), XMLUIPlugin.getResourceString("%ADD_PROCESSING_INSTRUCTION")); //$NON-NLS-1$ //$NON-NLS-2$
action.setImageDescriptor(imageDescriptorCache.getImageDescriptor(new Integer(Node.PROCESSING_INSTRUCTION_NODE)));
return action;
}
protected Action createAddSchemaInfoAction(Element element) {
- return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLCommonResources.getInstance().getString("_UI_MENU_ADD_SCHEMA_INFORMATION")); //$NON-NLS-1$
+ return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_ADD_SCHEMA_INFORMATION")); //$NON-NLS-1$
}
@@ -481,29 +477,29 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
protected Action createEditAttributeAction(Attr attr, CMAttributeDeclaration ad) {
- return new EditAttributeAction(this, attr.getOwnerElement(), attr, XMLCommonResources.getInstance().getString("_UI_MENU_EDIT_ATTRIBUTE"), XMLCommonResources.getInstance().getString("_UI_MENU_EDIT_ATTRIBUTE_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ return new EditAttributeAction(this, attr.getOwnerElement(), attr, XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_ATTRIBUTE"), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_ATTRIBUTE_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
}
protected Action createEditDoctypeAction(DocumentType doctype) {
- return new EditDoctypeAction(model, doctype, model.getBaseLocation(), XMLCommonResources.getInstance().getString("_UI_MENU_EDIT_DOCTYPE")); //$NON-NLS-1$
+ return new EditDoctypeAction(model, doctype, model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_DOCTYPE")); //$NON-NLS-1$
}
protected Action createEditProcessingInstructionAction(ProcessingInstruction pi) {
- return new EditProcessingInstructionAction(this, pi, XMLCommonResources.getInstance().getString("_UI_MENU_EDIT_PROCESSING_INSTRUCTION"), XMLCommonResources.getInstance().getString("_UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ return new EditProcessingInstructionAction(this, pi, XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_PROCESSING_INSTRUCTION"), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
}
protected Action createEditSchemaInfoAction(Element element) {
- return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLCommonResources.getInstance().getString("_UI_MENU_EDIT_NAMESPACES")); //$NON-NLS-1$
+ return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_NAMESPACES")); //$NON-NLS-1$
}
protected Action createRenameAction(Node node) {
Action result = null;
if (node instanceof Element) {
- result = new EditElementAction(this, (Element) node, XMLCommonResources.getInstance().getString("_UI_MENU_RENAME"), XMLCommonResources.getInstance().getString("_UI_MENU_RENAME_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ result = new EditElementAction(this, (Element) node, XMLUIPlugin.getResourceString("%_UI_MENU_RENAME"), XMLUIPlugin.getResourceString("%_UI_MENU_RENAME_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
}
return result;
}
@@ -561,7 +557,7 @@ public abstract class AbstractNodeActionManager extends BaseNodeActionManager {
public Shell getWorkbenchWindowShell() {
- return XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ return XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java
index c846e249b1..34812cabfd 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java
@@ -26,8 +26,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;
/**
* XMLEditorActionContributor
@@ -63,7 +62,7 @@ public class ActionContributorXML extends ActionContributor {
public ActionContributorXML() {
super();
- ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
+ ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
// edit commands
fShowTooltipAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION + StructuredTextEditorActionConstants.DOT);
@@ -85,7 +84,7 @@ public class ActionContributorXML extends ActionContributor {
fFormatActiveElements = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS + StructuredTextEditorActionConstants.DOT);
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);
@@ -113,7 +112,7 @@ public class ActionContributorXML 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.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java
index 5b30e11881..d39d2a7a44 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java
@@ -19,10 +19,9 @@ import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
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;
import org.eclipse.wst.xml.core.internal.document.CommentImpl;
-
public class AddBlockCommentActionXML extends CommentActionXML {
protected int fCloseCommentOffset;
protected int fOpenCommentOffset;
@@ -50,7 +49,7 @@ public class AddBlockCommentActionXML extends CommentActionXML {
if (fSelection.getLength() == 0 && fSelectionStartIndexedRegion instanceof CommentImpl)
return;
- fModel.beginRecording(this, ResourceHandler.getString(StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + ".tooltip")); //$NON-NLS-1$
fModel.aboutToChangeModel();
try {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
index fc587b374e..38b50f17e4 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.actions;
import java.util.ArrayList;
@@ -32,7 +30,7 @@ import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.common.contentmodel.modelquery.ModelQueryAction;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.xml.core.document.XMLModel;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
@@ -41,8 +39,6 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.ProcessingInstruction;
-
-
public abstract class BaseNodeActionManager {
@@ -163,8 +159,8 @@ public abstract class BaseNodeActionManager {
//
Element element = (Element) node;
- IMenuManager addAttributeMenu = new MyMenuManager(XMLCommonResources.getInstance().getString("_UI_MENU_ADD_ATTRIBUTE")); //$NON-NLS-1$
- IMenuManager addChildMenu = new MyMenuManager(XMLCommonResources.getInstance().getString("_UI_MENU_ADD_CHILD")); //$NON-NLS-1$
+ IMenuManager addAttributeMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_ATTRIBUTE")); //$NON-NLS-1$
+ IMenuManager addChildMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_CHILD")); //$NON-NLS-1$
menu.add(addAttributeMenu);
menu.add(addChildMenu);
@@ -199,7 +195,7 @@ public abstract class BaseNodeActionManager {
protected void contributeAddDocumentChildActions(IMenuManager menu, Document document, int ic, int vc) {
- IMenuManager addChildMenu = new MyMenuManager(XMLCommonResources.getInstance().getString("_UI_MENU_ADD_CHILD")); //$NON-NLS-1$
+ IMenuManager addChildMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_CHILD")); //$NON-NLS-1$
menu.add(addChildMenu);
// add PI and COMMENT
@@ -211,8 +207,8 @@ public abstract class BaseNodeActionManager {
protected void contributeAddSiblingActions(IMenuManager menu, Node node, int ic, int vc) {
- IMenuManager addBeforeMenu = new MyMenuManager(XMLCommonResources.getInstance().getString("_UI_MENU_ADD_BEFORE")); //$NON-NLS-1$
- IMenuManager addAfterMenu = new MyMenuManager(XMLCommonResources.getInstance().getString("_UI_MENU_ADD_AFTER")); //$NON-NLS-1$
+ IMenuManager addBeforeMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_BEFORE")); //$NON-NLS-1$
+ IMenuManager addAfterMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_AFTER")); //$NON-NLS-1$
menu.add(addBeforeMenu);
menu.add(addAfterMenu);
@@ -330,7 +326,7 @@ public abstract class BaseNodeActionManager {
protected void contributeReplaceActions(IMenuManager menu, List selectedNodeList, int ic, int vc) {
// 'Replace With...' actions
//
- IMenuManager replaceWithMenu = new MyMenuManager(XMLCommonResources.getInstance().getString("_UI_MENU_REPLACE_WITH")); //$NON-NLS-1$
+ IMenuManager replaceWithMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_REPLACE_WITH")); //$NON-NLS-1$
menu.add(replaceWithMenu);
if (modelQuery.getEditMode() == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT && selectedNodeList.size() > 0) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java
index 4e059c8592..9c55962b4d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java
@@ -26,11 +26,10 @@ import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.CommonEncodingPreferenceNames;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-import org.eclipse.wst.xml.core.XMLModelPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-
public class CleanupDialogXML extends Dialog implements SelectionListener {
protected Button fCheckBoxCompressEmptyElementTags;
protected Button fCheckBoxConvertEOLCodes;
@@ -58,7 +57,7 @@ public class CleanupDialogXML extends Dialog implements SelectionListener {
public Control createDialogArea(Composite parent) {
- getShell().setText(ResourceHandler.getString("Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup"
+ getShell().setText(SSEUIPlugin.getResourceString("%Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup"
Composite composite = new Composite(parent, SWT.NULL);
createDialogAreaInComposite(composite);
initializeOptions();
@@ -79,45 +78,45 @@ public class CleanupDialogXML extends Dialog implements SelectionListener {
// Compress empty element tags
fCheckBoxCompressEmptyElementTags = new Button(composite, SWT.CHECK);
- fCheckBoxCompressEmptyElementTags.setText(ResourceHandler.getString("Compress_empty_element_tags_UI_")); //$NON-NLS-1$
+ fCheckBoxCompressEmptyElementTags.setText(SSEUIPlugin.getResourceString("%Compress_empty_element_tags_UI_")); //$NON-NLS-1$
fCheckBoxCompressEmptyElementTags.addSelectionListener(this);
// Insert missing required attrs
fCheckBoxInsertRequiredAttrs = new Button(composite, SWT.CHECK);
- fCheckBoxInsertRequiredAttrs.setText(ResourceHandler.getString("Insert_required_attributes_UI_")); //$NON-NLS-1$
+ fCheckBoxInsertRequiredAttrs.setText(SSEUIPlugin.getResourceString("%Insert_required_attributes_UI_")); //$NON-NLS-1$
fCheckBoxInsertRequiredAttrs.addSelectionListener(this);
// Insert missing begin/end tags
fCheckBoxInsertMissingTags = new Button(composite, SWT.CHECK);
- fCheckBoxInsertMissingTags.setText(ResourceHandler.getString("Insert_missing_tags_UI_")); //$NON-NLS-1$ = "Insert missing tags"
+ fCheckBoxInsertMissingTags.setText(SSEUIPlugin.getResourceString("%Insert_missing_tags_UI_")); //$NON-NLS-1$ = "Insert missing tags"
fCheckBoxInsertMissingTags.addSelectionListener(this);
// Quote attribute values
fCheckBoxQuoteAttrValues = new Button(composite, SWT.CHECK);
- fCheckBoxQuoteAttrValues.setText(ResourceHandler.getString("Quote_attribute_values_UI_")); //$NON-NLS-1$ = "Quote attribute values"
+ fCheckBoxQuoteAttrValues.setText(SSEUIPlugin.getResourceString("%Quote_attribute_values_UI_")); //$NON-NLS-1$ = "Quote attribute values"
fCheckBoxQuoteAttrValues.addSelectionListener(this);
// Format source
fCheckBoxFormatSource = new Button(composite, 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"
fCheckBoxFormatSource.addSelectionListener(this);
// Convert EOL code
fCheckBoxConvertEOLCodes = new Button(composite, SWT.CHECK);
- fCheckBoxConvertEOLCodes.setText(ResourceHandler.getString("Convert_EOL_codes_UI_")); //$NON-NLS-1$ = "Convert end-of-line codes"
+ fCheckBoxConvertEOLCodes.setText(SSEUIPlugin.getResourceString("%Convert_EOL_codes_UI_")); //$NON-NLS-1$ = "Convert end-of-line codes"
fCheckBoxConvertEOLCodes.addSelectionListener(this);
Composite EOLCodes = new Composite(composite, SWT.NULL);
GridLayout hLayout = new GridLayout();
hLayout.numColumns = 3;
EOLCodes.setLayout(hLayout);
fRadioButtonConvertEOLWindows = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLWindows.setText(ResourceHandler.getString("EOL_Windows_UI")); //$NON-NLS-1$ = "Windows"
+ fRadioButtonConvertEOLWindows.setText(SSEUIPlugin.getResourceString("%EOL_Windows_UI")); //$NON-NLS-1$ = "Windows"
fRadioButtonConvertEOLWindows.addSelectionListener(this);
fRadioButtonConvertEOLUnix = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLUnix.setText(ResourceHandler.getString("EOL_Unix_UI")); //$NON-NLS-1$ = "Unix"
+ fRadioButtonConvertEOLUnix.setText(SSEUIPlugin.getResourceString("%EOL_Unix_UI")); //$NON-NLS-1$ = "Unix"
fRadioButtonConvertEOLUnix.addSelectionListener(this);
fRadioButtonConvertEOLMac = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLMac.setText(ResourceHandler.getString("EOL_Mac_UI")); //$NON-NLS-1$ = "Mac"
+ fRadioButtonConvertEOLMac.setText(SSEUIPlugin.getResourceString("%EOL_Mac_UI")); //$NON-NLS-1$ = "Mac"
fRadioButtonConvertEOLMac.addSelectionListener(this);
}
@@ -133,7 +132,7 @@ public class CleanupDialogXML extends Dialog implements SelectionListener {
}
protected Preferences getModelPreferences() {
- return XMLModelPlugin.getDefault().getPluginPreferences();
+ return XMLCorePlugin.getDefault().getPluginPreferences();
}
protected void initializeOptions() {
@@ -181,7 +180,7 @@ public class CleanupDialogXML extends Dialog implements SelectionListener {
getModelPreferences().setValue(CommonModelPreferenceNames.CLEANUP_EOL_CODE, CommonEncodingPreferenceNames.CRLF);
}
// explicitly save plugin preferences so values are stored
- XMLModelPlugin.getDefault().savePluginPreferences();
+ XMLCorePlugin.getDefault().savePluginPreferences();
}
public void widgetDefaultSelected(SelectionEvent e) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java
index 146c2c8410..1f6d59b690 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java
@@ -31,8 +31,7 @@ import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
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;
public class CommentActionXML extends TextEditorAction {
protected static final String CLOSE_COMMENT = "-->"; //$NON-NLS-1$
@@ -160,7 +159,7 @@ public class CommentActionXML extends TextEditorAction {
}
protected void processAction() {
- fModel.beginRecording(this, ResourceHandler.getString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
fModel.aboutToChangeModel();
for (int i = fSelectionStartLine; i <= fSelectionEndLine; i++) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditAttributeAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditAttributeAction.java
index 63ab5c228b..ffc4d88c31 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditAttributeAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditAttributeAction.java
@@ -10,23 +10,19 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.actions;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.xml.ui.dialogs.EditAttributeDialog;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-
-
public class EditAttributeAction extends NodeAction {
protected static ImageDescriptor imageDescriptor;
@@ -61,7 +57,7 @@ public class EditAttributeAction extends NodeAction {
public void run() {
manager.beginNodeAction(this);
- Shell shell = XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
EditAttributeDialog dialog = new EditAttributeDialog(shell, ownerElement, attr);
dialog.create();
dialog.getShell().setText(title);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
index dabe610434..2c669c5e0c 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.actions;
import org.eclipse.core.runtime.Path;
@@ -25,15 +23,13 @@ import org.eclipse.wst.xml.core.document.XMLDocument;
import org.eclipse.wst.xml.core.document.XMLDocumentType;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xml.ui.dialogs.EditDoctypeDialog;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
-
/**
* EditDoctypeAction
*/
@@ -96,7 +92,7 @@ public class EditDoctypeAction extends Action {
break;
}
}
- return rootElement != null ? rootElement.getNodeName() : XMLCommonResources.getInstance().getString("_UI_LABEL_ROOT_ELEMENT_VALUE"); //$NON-NLS-1$
+ return rootElement != null ? rootElement.getNodeName() : XMLUIPlugin.getResourceString("%_UI_LABEL_ROOT_ELEMENT_VALUE"); //$NON-NLS-1$
}
public String getUndoDescription() {
@@ -148,13 +144,13 @@ public class EditDoctypeAction extends Action {
if (doctype != null) {
dialog = new EditDoctypeDialog(shell, doctype);
if (title == null) {
- title = XMLCommonResources.getInstance().getString("_UI_LABEL_EDIT_DOCTYPE"); //$NON-NLS-1$
+ title = XMLUIPlugin.getResourceString("%_UI_LABEL_EDIT_DOCTYPE"); //$NON-NLS-1$
}
} else if (document != null) {
String rootElementName = getRootElementName(document);
dialog = new EditDoctypeDialog(shell, rootElementName, "", rootElementName + ".dtd"); //$NON-NLS-1$ //$NON-NLS-2$
if (title == null) {
- title = XMLCommonResources.getInstance().getString("_UI_MENU_ADD_DTD_INFORMATION_TITLE"); //$NON-NLS-1$
+ title = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_DTD_INFORMATION_TITLE"); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java
index 081be78958..a3507d8f6a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditElementAction.java
@@ -19,16 +19,14 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.ui.dialogs.EditElementDialog;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
-
public class EditElementAction extends NodeAction {
protected static ImageDescriptor imageDescriptor;
@@ -72,7 +70,7 @@ public class EditElementAction extends NodeAction {
public void run() {
manager.beginNodeAction(this);
- Shell shell = XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
EditElementDialog dialog = new EditElementDialog(shell, element);
dialog.create();
dialog.getShell().setText(title);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java
index f4b8f46bac..b8c118b21b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java
@@ -15,13 +15,11 @@ package org.eclipse.wst.xml.ui.actions;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.xml.ui.dialogs.EditProcessingInstructionDialog;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.ProcessingInstruction;
-
-
/**
* EditProcessingInstructionAction
*/
@@ -60,13 +58,13 @@ public class EditProcessingInstructionAction extends NodeAction {
public void run() {
manager.beginNodeAction(this);
- Shell shell = XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
EditProcessingInstructionDialog dialog = null;
if (pi != null) {
dialog = new EditProcessingInstructionDialog(shell, pi);
} else {
- dialog = new EditProcessingInstructionDialog(shell, XMLCommonResources.getInstance().getString("_UI_PI_TARGET_VALUE"), XMLCommonResources.getInstance().getString("_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
+ dialog = new EditProcessingInstructionDialog(shell, XMLUIPlugin.getResourceString("%_UI_PI_TARGET_VALUE"), XMLUIPlugin.getResourceString("%_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
}
dialog.create();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
index 5b2c3e2a7b..db9d410c1b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
@@ -23,16 +23,12 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.common.contentmodel.util.DOMNamespaceInfoManager;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditSchemaInfoDialog;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
-//import com.ibm.etools.xml.common.ui.dialogs.EditSchemaInfoDialog;
-
-
/**
* EditDoctypeAction
*/
@@ -121,7 +117,7 @@ public class EditSchemaInfoAction extends NodeAction {
// todo... change constructor to take an element
Element element = getElement(node);
if (element != null) {
- Shell shell = XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
EditSchemaInfoDialog dialog = new EditSchemaInfoDialog(shell, new Path(resourceLocation));
List namespaceInfoList = namespaceInfoManager.getNamespaceInfoList(element);
@@ -140,7 +136,7 @@ public class EditSchemaInfoAction extends NodeAction {
dialog.setNamespaceInfoList(namespaceInfoList);
dialog.create();
//dialog.getShell().setSize(500, 300);
- dialog.getShell().setText(XMLCommonResources.getInstance().getString("_UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE")); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java
index a5a5acb981..1030cdcf0e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java
@@ -18,10 +18,9 @@ import org.eclipse.jface.text.BadLocationException;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
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;
import org.eclipse.wst.xml.core.internal.document.CommentImpl;
-
public class RemoveBlockCommentActionXML extends AddBlockCommentActionXML {
public RemoveBlockCommentActionXML(ResourceBundle bundle, String prefix, ITextEditor editor) {
super(bundle, prefix, editor);
@@ -34,7 +33,7 @@ public class RemoveBlockCommentActionXML extends AddBlockCommentActionXML {
}
protected void processAction() {
- fModel.beginRecording(this, ResourceHandler.getString(StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + ".tooltip")); //$NON-NLS-1$
fModel.aboutToChangeModel();
if (fSelection.getLength() == 0) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java
index 02b7d66268..451d4ed51a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java
@@ -19,8 +19,7 @@ import org.eclipse.jface.text.IRegion;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
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;
public class ToggleCommentActionXML extends UncommentActionXML {
public ToggleCommentActionXML(ResourceBundle bundle, String prefix, ITextEditor editor) {
@@ -28,7 +27,7 @@ public class ToggleCommentActionXML extends UncommentActionXML {
}
protected void processAction() {
- fModel.beginRecording(this, ResourceHandler.getString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
fModel.aboutToChangeModel();
for (int i = fSelectionStartLine; i <= fSelectionEndLine; i++) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java
index 2dac342048..02e440bf6b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java
@@ -19,8 +19,7 @@ import org.eclipse.jface.text.IRegion;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
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;
public class UncommentActionXML extends CommentActionXML {
public UncommentActionXML(ResourceBundle bundle, String prefix, ITextEditor editor) {
@@ -28,7 +27,7 @@ public class UncommentActionXML extends CommentActionXML {
}
protected void processAction() {
- fModel.beginRecording(this, ResourceHandler.getString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
fModel.aboutToChangeModel();
for (int i = fSelectionStartLine; i <= fSelectionEndLine; i++) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
index adbf4e0a30..867961e94e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
@@ -51,9 +51,9 @@ import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.core.util.Debug;
import org.eclipse.wst.sse.ui.IReleasable;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.core.document.XMLDocument;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.core.document.XMLModel;
@@ -75,11 +75,10 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
abstract public class AbstractContentAssistProcessor implements IContentAssistProcessor, IReleasable {
- protected static final String INTERNALERROR = ResourceHandler.getString("SEVERE_internal_error_occu_UI_"); //$NON-NLS-1$ = "SEVERE internal error occurred "
- protected static final String UNKNOWN_ATTR = ResourceHandler.getString("No_known_attribute__UI_"); //$NON-NLS-1$ = "No known attribute "
- protected static final String UNKNOWN_CONTEXT = ResourceHandler.getString("Content_Assist_not_availab_UI_"); //$NON-NLS-1$ = "Content Assist not available at the current location "
+ protected static final String INTERNALERROR = SSEUIPlugin.getResourceString("%SEVERE_internal_error_occu_UI_"); //$NON-NLS-1$ = "SEVERE internal error occurred "
+ protected static final String UNKNOWN_ATTR = SSEUIPlugin.getResourceString("%No_known_attribute__UI_"); //$NON-NLS-1$ = "No known attribute "
+ protected static final String UNKNOWN_CONTEXT = SSEUIPlugin.getResourceString("%Content_Assist_not_availab_UI_"); //$NON-NLS-1$ = "Content Assist not available at the current location "
protected char completionProposalAutoActivationCharacters[] = null;
protected char contextInformationAutoActivationCharacters[] = null;
private AttributeContextInformationProvider fAttributeInfoProvider = null;
@@ -181,7 +180,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
}
}
} else {
- setErrorMessage(ResourceHandler.getString("25concat", (new Object[]{node.getNodeName()}))); //+
+ setErrorMessage(SSEUIPlugin.getResourceString("%25concat", (new Object[]{node.getNodeName()}))); //+
// node.getNodeName()
// + ">
// is
@@ -302,7 +301,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
protected void addCommentProposal(ContentAssistRequest contentAssistRequest) {
contentAssistRequest.addProposal(new CustomCompletionProposal("<!-- -->", //$NON-NLS-1$
- contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 5, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_COMMENT), ResourceHandler.getString("6concat", (new Object[]{" <!-- -->"})), //$NON-NLS-1$ = "comment {0}"//$NON-NLS-2$
+ contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 5, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_COMMENT), SSEUIPlugin.getResourceString("%6concat", (new Object[]{" <!-- -->"})), //$NON-NLS-1$ = "comment {0}"//$NON-NLS-2$
null, null, XMLRelevanceConstants.R_COMMENT));
}
@@ -366,7 +365,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
if (contentAssistRequest.getStartOffset() + contentAssistRequest.getRegion().getTextLength() < contentAssistRequest.getReplacementBeginPosition()) {
CustomCompletionProposal proposal = new CustomCompletionProposal(">", //$NON-NLS-1$
- contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), ResourceHandler.getString("9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
null, null, XMLRelevanceConstants.R_END_TAG_NAME);
contentAssistRequest.addProposal(proposal);
} else {
@@ -392,7 +391,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
if (contentAssistRequest.getRegion().getType() == XMLRegionContext.XML_TAG_NAME) {
proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getStartOffset(), contentAssistRequest.getRegion().getTextLength(), proposedText.length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), proposedText, null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
} else {
- proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), ResourceHandler.getString("9concat", (new Object[]{"'" + proposedText + "'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$ //$NON-NLS-3$
+ proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%9concat", (new Object[]{"'" + proposedText + "'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$ //$NON-NLS-3$
null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
}
contentAssistRequest.addProposal(proposal);
@@ -468,7 +467,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
//replaceText = "</" + node.getNodeName() + ">";
// //$NON-NLS-1$ $NON-NLS-2$
cursorOffset = tagName.length() + 3;
- displayString = ResourceHandler.getString("17concat", (new Object[]{tagName})); //$NON-NLS-1$
+ displayString = SSEUIPlugin.getResourceString("%17concat", (new Object[]{tagName})); //$NON-NLS-1$
addProposal = true;
}
} else if (type == XMLRegionContext.XML_END_TAG_OPEN) {
@@ -479,7 +478,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
replaceText = node.getNodeName() + ">"; //$NON-NLS-1$
cursorOffset = replaceText.length();
replaceBegin = xmlEndTagOpen.getTextEndOffset();
- displayString = ResourceHandler.getString("15concat", (new Object[]{node.getNodeName()})); //$NON-NLS-1$
+ displayString = SSEUIPlugin.getResourceString("%15concat", (new Object[]{node.getNodeName()})); //$NON-NLS-1$
addProposal = true;
} else if (type == XMLRegionContext.XML_TAG_OPEN) {
// this is the case for: <tag> < |
@@ -490,7 +489,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// should only be replacing white space...
replaceLength = (replaceBegin > xmlEndTagOpen.getTextEndOffset()) ? replaceBegin - xmlEndTagOpen.getTextEndOffset() : 0;
replaceBegin = xmlEndTagOpen.getTextEndOffset();
- displayString = ResourceHandler.getString("15concat", (new Object[]{"/" + node.getNodeName()})); //$NON-NLS-1$ //$NON-NLS-2$
+ displayString = SSEUIPlugin.getResourceString("%15concat", (new Object[]{"/" + node.getNodeName()})); //$NON-NLS-1$ //$NON-NLS-2$
addProposal = true;
}
}
@@ -506,7 +505,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
if (parent != null && parent.getNodeType() != Node.DOCUMENT_NODE) {
replaceText = parent.getNodeName() + ">"; //$NON-NLS-1$
cursorOffset = replaceText.length();
- displayString = ResourceHandler.getString("17concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
+ displayString = SSEUIPlugin.getResourceString("%17concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
setErrorMessage(null);
addProposal = true;
}
@@ -640,7 +639,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// this is one of the few times to ignore the length --
// always insert
// contentAssistRequest.getReplacementLength(),
- 0, getContentGenerator().getStartTagClose(node, elementDecl).length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), ResourceHandler.getString("3concat", (new Object[]{getContentGenerator().getStartTagClose(node, elementDecl)})), //$NON-NLS-1$ = "Close with '{0}'"
+ 0, getContentGenerator().getStartTagClose(node, elementDecl).length(), XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%3concat", (new Object[]{getContentGenerator().getStartTagClose(node, elementDecl)})), //$NON-NLS-1$ = "Close with '{0}'"
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
} else {
@@ -650,7 +649,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// this is one of the few times to ignore the
// length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), ResourceHandler.getString("9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ 0, 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
@@ -668,7 +667,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// this is one of the few times to
// ignore the length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), ResourceHandler.getString("5concat", (new Object[]{node.getNodeName()})), //$NON-NLS-1$ = "Close with '></{0}>'"
+ 0, 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%5concat", (new Object[]{node.getNodeName()})), //$NON-NLS-1$ = "Close with '></{0}>'"
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
}
@@ -681,7 +680,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// this is one of the few times to ignore
// the length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 2, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), ResourceHandler.getString("9concat", (new Object[]{" \"/>\""})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ 0, 2, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%9concat", (new Object[]{" \"/>\""})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG + 1); // +1
// to
// bring
@@ -700,7 +699,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
// this is one of the few times to ignore the
// length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), ResourceHandler.getString("9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ 0, 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
}
@@ -774,9 +773,9 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
Iterator nodeIterator = cmnodes.iterator();
if (!nodeIterator.hasNext()) {
if (getCMElementDeclaration(parent) != null)
- error = ResourceHandler.getString("1concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$ = "{0} has no available child tags."
+ error = SSEUIPlugin.getResourceString("%1concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$ = "{0} has no available child tags."
else
- error = ResourceHandler.getString("31concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
+ error = SSEUIPlugin.getResourceString("%31concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
}
String matchString = contentAssistRequest.getMatchString();
// chop off any leading <'s and whitespace from the
@@ -808,10 +807,10 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
if (error != null)
setErrorMessage(error);
else if (contentAssistRequest.getMatchString() != null && contentAssistRequest.getMatchString().length() > 0)
- setErrorMessage(ResourceHandler.getString("11concat", (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()}))); //$NON-NLS-1$
+ setErrorMessage(SSEUIPlugin.getResourceString("%11concat", (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()}))); //$NON-NLS-1$
//$NON-NLS-1$ = "No known child tag names of <{0}> begin with \"{1}\"."
else
- setErrorMessage(ResourceHandler.getString("14concat", (new Object[]{parent.getNodeName()}))); //$NON-NLS-1$
+ setErrorMessage(SSEUIPlugin.getResourceString("%14concat", (new Object[]{parent.getNodeName()}))); //$NON-NLS-1$
}
}
} else if (parent.getNodeType() == Node.DOCUMENT_NODE) {
@@ -871,7 +870,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
//$NON-NLS-1$
matchString = matchString.substring(1);
if (!nodeIterator.hasNext())
- error = ResourceHandler.getString("8concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
+ error = SSEUIPlugin.getResourceString("%8concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
while (nodeIterator.hasNext()) {
CMNode elementDecl = (CMNode) nodeIterator.next();
if (elementDecl != null) {
@@ -911,10 +910,10 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
if (error != null)
setErrorMessage(error);
else if (contentAssistRequest.getMatchString() != null && contentAssistRequest.getMatchString().length() > 0)
- setErrorMessage(ResourceHandler.getString("27concat", (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()}))); //$NON-NLS-1$
+ setErrorMessage(SSEUIPlugin.getResourceString("%27concat", (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()}))); //$NON-NLS-1$
//$NON-NLS-1$ = "No known child tag names of <{0}> begin with \"{1}\""
else
- setErrorMessage(ResourceHandler.getString("28concat", (new Object[]{parent.getNodeName()}))); //$NON-NLS-1$
+ setErrorMessage(SSEUIPlugin.getResourceString("%28concat", (new Object[]{parent.getNodeName()}))); //$NON-NLS-1$
}
} else if (parent.getNodeType() == Node.DOCUMENT_NODE) {
List childElements = getAvailableRootChildren((Document) parent, childPosition);
@@ -1574,7 +1573,7 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
continue;
if (Debug.displayInfo)
System.out.println(rootName + " already present!"); //$NON-NLS-1$
- setErrorMessage(ResourceHandler.getString("18concat", (new Object[]{rootName}))); //$NON-NLS-1$ = "The document element <{0}> is already present."
+ setErrorMessage(SSEUIPlugin.getResourceString("%18concat", (new Object[]{rootName}))); //$NON-NLS-1$ = "The document element <{0}> is already present."
return new ArrayList(0);
}
}
@@ -1598,9 +1597,9 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
if (location.length() > 0)
- setErrorMessage(ResourceHandler.getString("29concat", (new Object[]{rootName, location}))); //$NON-NLS-1$ = "No definition was found for element <{0}> in {1}"
+ setErrorMessage(SSEUIPlugin.getResourceString("%29concat", (new Object[]{rootName, location}))); //$NON-NLS-1$ = "No definition was found for element <{0}> in {1}"
else
- setErrorMessage(ResourceHandler.getString("20concat", (new Object[]{rootName}))); //$NON-NLS-1$ = "No definition was found for element <{0}>"
+ setErrorMessage(SSEUIPlugin.getResourceString("%20concat", (new Object[]{rootName}))); //$NON-NLS-1$ = "No definition was found for element <{0}>"
}
}
} else {
@@ -1612,9 +1611,9 @@ abstract public class AbstractContentAssistProcessor implements IContentAssistPr
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
if (location.length() > 0)
- setErrorMessage(ResourceHandler.getString("24concat", (new Object[]{location}))); //$NON-NLS-1$ = "No content model found for {0}."
+ setErrorMessage(SSEUIPlugin.getResourceString("%24concat", (new Object[]{location}))); //$NON-NLS-1$ = "No content model found for {0}."
else
- setErrorMessage(ResourceHandler.getString("No_content_model_found_UI_")); //$NON-NLS-1$ = "No content model found"
+ setErrorMessage(SSEUIPlugin.getResourceString("%No_content_model_found_UI_")); //$NON-NLS-1$ = "No content model found"
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java
index 0a4b8dc155..b3f095c55e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistProcessor.java
@@ -12,18 +12,15 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.contentassist;
-
-
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.sse.ui.EditorPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
-
public class XMLContentAssistProcessor extends AbstractContentAssistProcessor implements IPropertyChangeListener {
protected IPreferenceStore fPreferenceStore = null;
@@ -36,7 +33,7 @@ public class XMLContentAssistProcessor extends AbstractContentAssistProcessor im
protected IPreferenceStore getPreferenceStore() {
if (fPreferenceStore == null)
- fPreferenceStore = EditorPlugin.getDefault().getPreferenceStore();
+ fPreferenceStore = SSEUIPlugin.getDefault().getPreferenceStore();
//fPreferenceStore =
// CommonPreferencesPlugin.getDefault().getPreferenceStore(ContentType.ContentTypeID_XML);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
index f72092bc19..3bac2eda6f 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
@@ -22,9 +22,9 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.util.ScriptLanguageKeys;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.jsp.model.parser.temp.XMLJSPRegionContexts;
@@ -34,7 +34,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-
/**
* @author pavery
*/
@@ -111,7 +110,7 @@ public class XMLContentAssistUtilities extends ContentAssistUtils {
// create proposal
p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), //$NON-NLS-1$
- ResourceHandler.getString("15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
+ SSEUIPlugin.getResourceString("%15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
null, null, XMLRelevanceConstants.R_END_TAG);
} else if (!hasEndTag && isJSPTag) {
@@ -138,7 +137,7 @@ public class XMLContentAssistUtilities extends ContentAssistUtils {
// create proposal
p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), //$NON-NLS-1$
- ResourceHandler.getString("15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
+ SSEUIPlugin.getResourceString("%15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
null, null, XMLRelevanceConstants.R_END_TAG);
}
@@ -207,7 +206,7 @@ public class XMLContentAssistUtilities extends ContentAssistUtils {
// create proposal
p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), //$NON-NLS-1$
- ResourceHandler.getString("15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
+ SSEUIPlugin.getResourceString("%15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
null, null, XMLRelevanceConstants.R_END_TAG);
}
return p;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java
index ed7a5f7b7f..8226a4fc9c 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import org.eclipse.jface.dialogs.Dialog;
@@ -29,14 +27,11 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
-
-
public class EditAttributeDialog extends Dialog implements ModifyListener {
protected Attr attribute;
protected String attributeName;
@@ -91,7 +86,7 @@ public class EditAttributeDialog extends Dialog implements ModifyListener {
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
Label attributeNameLabel = new Label(composite, SWT.NONE);
- attributeNameLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_NAME_COLON")); //$NON-NLS-1$
+ attributeNameLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_NAME_COLON")); //$NON-NLS-1$
attributeNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -101,7 +96,7 @@ public class EditAttributeDialog extends Dialog implements ModifyListener {
attributeNameField.addModifyListener(this);
Label attributeValueLabel = new Label(composite, SWT.NONE);
- attributeValueLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_VALUE_COLON")); //$NON-NLS-1$
+ attributeValueLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_VALUE_COLON")); //$NON-NLS-1$
String value = attribute != null ? attribute.getValue() : ""; //$NON-NLS-1$
int style = SWT.SINGLE | SWT.BORDER;
@@ -117,7 +112,7 @@ public class EditAttributeDialog extends Dialog implements ModifyListener {
// error message
errorMessageLabel = new Label(composite, SWT.WRAP);
- errorMessageLabel.setText(ResourceHandler.getString("error_message_goes_here")); //$NON-NLS-1$
+ errorMessageLabel.setText(XMLUIPlugin.getResourceString("%error_message_goes_here")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 200;
gd.heightHint = Math.max(30, errorMessageLabel.computeSize(0, 0, false).y * 2);
@@ -159,7 +154,7 @@ public class EditAttributeDialog extends Dialog implements ModifyListener {
if (name.length() > 0) {
Attr matchingAttribute = ownerElement.getAttributeNode(name);
if (matchingAttribute != null && matchingAttribute != attribute) {
- errorMessage = XMLCommonResources.getInstance().getString("_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS"); //$NON-NLS-1$
+ errorMessage = XMLUIPlugin.getResourceString("%_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS"); //$NON-NLS-1$
} else {
// TODO get checkName from Model
//errorMessage = ValidateHelper.checkXMLName(name);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java
index 6fd0ea01b4..443f85bc5c 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import org.eclipse.core.runtime.IPath;
@@ -33,12 +31,10 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.DocumentType;
-
-
public class EditDoctypeDialog extends Dialog {
protected boolean computeSystemId;
protected String[] doctypeData;
@@ -108,7 +104,7 @@ public class EditDoctypeDialog extends Dialog {
// row 1
//
Label rootElementNameLabel = new Label(composite, SWT.NONE);
- rootElementNameLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_ROOT_ELEMENT_NAME_COLON")); //$NON-NLS-1$
+ rootElementNameLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_ROOT_ELEMENT_NAME_COLON")); //$NON-NLS-1$
rootElementNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
WorkbenchHelp.setHelp(rootElementNameField, XMLCommonUIContextIds.XCUI_DOCTYPE_ROOT);
@@ -124,7 +120,7 @@ public class EditDoctypeDialog extends Dialog {
// row 2
//
Label publicIdLabel = new Label(composite, SWT.NONE);
- publicIdLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_PUBLIC_ID_COLON")); //$NON-NLS-1$
+ publicIdLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_PUBLIC_ID_COLON")); //$NON-NLS-1$
publicIdField = new Text(composite, SWT.SINGLE | SWT.BORDER);
WorkbenchHelp.setHelp(publicIdField, XMLCommonUIContextIds.XCUI_DOCTYPE_PUBLIC);
@@ -144,12 +140,12 @@ public class EditDoctypeDialog extends Dialog {
publicIdBrowseButton = new Button(composite, SWT.NONE);
WorkbenchHelp.setHelp(publicIdBrowseButton, XMLCommonUIContextIds.XCUI_DOCTYPE_PUBLIC_BROWSE);
- publicIdBrowseButton.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ publicIdBrowseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
publicIdBrowseButton.addSelectionListener(selectionListener);
// row 3
Label systemIdLabel = new Label(composite, SWT.NONE);
- systemIdLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_SYSTEM_ID_COLON")); //$NON-NLS-1$
+ systemIdLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SYSTEM_ID_COLON")); //$NON-NLS-1$
systemIdField = new Text(composite, SWT.SINGLE | SWT.BORDER);
WorkbenchHelp.setHelp(systemIdField, XMLCommonUIContextIds.XCUI_DOCTYPE_SYSTEM);
@@ -160,7 +156,7 @@ public class EditDoctypeDialog extends Dialog {
systemIdBrowseButton = new Button(composite, SWT.NONE);
WorkbenchHelp.setHelp(systemIdBrowseButton, XMLCommonUIContextIds.XCUI_DOCTYPE_SYSTEM_BROWSE);
- systemIdBrowseButton.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ systemIdBrowseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
systemIdBrowseButton.addSelectionListener(selectionListener);
// error message
@@ -226,9 +222,9 @@ public class EditDoctypeDialog extends Dialog {
if (errorChecking) {
String errorMessage = null;
if (getModelValue(systemIdField.getText()) == null) {
- errorMessage = XMLCommonResources.getInstance().getString("_UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED"); //$NON-NLS-1$
+ errorMessage = XMLUIPlugin.getResourceString("%_UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED"); //$NON-NLS-1$
} else if (getModelValue(rootElementNameField.getText()) == null) {
- errorMessage = XMLCommonResources.getInstance().getString("_UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED"); //$NON-NLS-1$
+ errorMessage = XMLUIPlugin.getResourceString("%_UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED"); //$NON-NLS-1$
}
errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java
index 82e2bf8ba0..d196e129ac 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import org.eclipse.jface.dialogs.Dialog;
@@ -30,13 +28,10 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.xml.core.NameValidator;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.Element;
-
-
public class EditElementDialog extends Dialog implements ModifyListener {
protected Element element;
protected String elementName;
@@ -84,7 +79,7 @@ public class EditElementDialog extends Dialog implements ModifyListener {
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
Label elementNameLabel = new Label(composite, SWT.NONE);
- elementNameLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_ELEMENT_NAME")); //$NON-NLS-1$
+ elementNameLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_ELEMENT_NAME")); //$NON-NLS-1$
elementNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -95,7 +90,7 @@ public class EditElementDialog extends Dialog implements ModifyListener {
// error message
errorMessageLabel = new Label(composite, SWT.NONE);
- errorMessageLabel.setText(ResourceHandler.getString("error_message_goes_here")); //$NON-NLS-1$
+ errorMessageLabel.setText(XMLUIPlugin.getResourceString("%error_message_goes_here")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
errorMessageLabel.setLayoutData(gd);
@@ -133,7 +128,7 @@ public class EditElementDialog extends Dialog implements ModifyListener {
// TODO use checkName from model level
//errorMessage = ValidateHelper.checkXMLName(name);
if (!NameValidator.isValid(name)) {
- errorMessage = XMLCommonResources.getInstance().getString("_UI_INVALID_NAME");
+ errorMessage = XMLUIPlugin.getResourceString("%_UI_INVALID_NAME");
}
} else {
errorMessage = ""; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java
index 8e61d1dde8..8b05e2492e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import org.eclipse.core.resources.IFile;
@@ -19,12 +17,10 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
-
-
public class EditEntityHelper {
public void performBrowseForPublicId(Shell parentShell, Text publicIdField) {
@@ -35,7 +31,7 @@ public class EditEntityHelper {
String[] extensions = {"dtd", "txt"}; //$NON-NLS-1$ //$NON-NLS-2$
SelectXMLCatalogIdDialog dialog = new SelectXMLCatalogIdDialog(parentShell, extensions);
dialog.create();
- dialog.getShell().setText(XMLCommonResources.getInstance().getString("_UI_LABEL_SELECT_XML_CATALOG_ENTRY")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SELECT_XML_CATALOG_ENTRY")); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
if (dialog.getReturnCode() == Window.OK) {
@@ -53,7 +49,7 @@ public class EditEntityHelper {
String[] extensions = {"dtd"}; //$NON-NLS-1$
SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(parentShell, extensions, XMLCatalogEntry.SYSTEM);
dialog.create();
- dialog.getShell().setText(XMLCommonResources.getInstance().getString("_UI_LABEL_SPECIFY_SYSTEM_ID")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SPECIFY_SYSTEM_ID")); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
if (dialog.getReturnCode() == Window.OK) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
index 400a186efa..db03c67d03 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import java.util.List;
@@ -39,14 +37,11 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.common.contentmodel.CMDocument;
import org.eclipse.wst.common.contentmodel.CMPlugin;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.IdResolverImpl;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
-
-
public class EditNamespaceInfoDialog extends Dialog {
public static EditNamespaceInfoDialog invokeDialog(Shell shell, String title, NamespaceInfo info, IPath resourceLocation) {
@@ -123,7 +118,7 @@ public class EditNamespaceInfoDialog extends Dialog {
// row 1
//
Label uriLabel = new Label(composite, SWT.NONE);
- uriLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_NAMESPACE_NAME_COLON")); //$NON-NLS-1$
+ uriLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME_COLON")); //$NON-NLS-1$
uriField = new Text(composite, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -138,7 +133,7 @@ public class EditNamespaceInfoDialog extends Dialog {
// row 2
//
Label prefixLabel = new Label(composite, SWT.NONE);
- prefixLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_PREFIX_COLON")); //$NON-NLS-1$
+ prefixLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX_COLON")); //$NON-NLS-1$
prefixField = new Text(composite, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -152,7 +147,7 @@ public class EditNamespaceInfoDialog extends Dialog {
// row 3
//
Label locationHintLabel = new Label(composite, SWT.NONE);
- locationHintLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_LOCATION_HINT_COLON")); //$NON-NLS-1$
+ locationHintLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT_COLON")); //$NON-NLS-1$
locationHintField = new Text(composite, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -169,13 +164,13 @@ public class EditNamespaceInfoDialog extends Dialog {
};
browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ browseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
browseButton.addSelectionListener(selectionListener);
browseButton.setEnabled(locationHintField.getEnabled());
// error message
errorMessageLabel = new Label(dialogArea, SWT.NONE);
- errorMessageLabel.setText(ResourceHandler.getString("error_message_goes_here")); //$NON-NLS-1$
+ errorMessageLabel.setText(XMLUIPlugin.getResourceString("%error_message_goes_here")); //$NON-NLS-1$
errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Color color = new Color(errorMessageLabel.getDisplay(), 200, 0, 0);
errorMessageLabel.setForeground(color);
@@ -191,7 +186,7 @@ public class EditNamespaceInfoDialog extends Dialog {
String[] extensions = {".xsd"}; //$NON-NLS-1$
SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(getShell(), extensions);
dialog.create();
- dialog.getShell().setText(XMLCommonResources.getInstance().getString("_UI_LABEL_SELECT_FILE")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SELECT_FILE")); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java
index be3ae9f817..cda35f9309 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import org.eclipse.jface.dialogs.Dialog;
@@ -26,12 +24,10 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.ProcessingInstruction;
-
-
public class EditProcessingInstructionDialog extends Dialog {
protected String data;
protected Text dataField;
@@ -76,14 +72,14 @@ public class EditProcessingInstructionDialog extends Dialog {
gd.widthHint = 250;
Label targetLabel = new Label(composite, SWT.NONE);
- targetLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_TARGET_COLON")); //$NON-NLS-1$
+ targetLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_TARGET_COLON")); //$NON-NLS-1$
targetField = new Text(composite, SWT.SINGLE | SWT.BORDER);
targetField.setLayoutData(gd);
targetField.setText(getDisplayValue(target));
Label dataLabel = new Label(composite, SWT.NONE);
- dataLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_DATA_COLON")); //$NON-NLS-1$
+ dataLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_DATA_COLON")); //$NON-NLS-1$
dataField = new Text(composite, SWT.SINGLE | SWT.BORDER);
dataField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java
index 93f26c98ec..8f6096ef5d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java
@@ -23,9 +23,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.nsedit.CommonEditNamespacesDialog;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
-
public class EditSchemaInfoDialog extends Dialog implements UpdateListener {
// protected NamespaceInfoTable namespaceInfoTable;
@@ -46,7 +45,7 @@ public class EditSchemaInfoDialog extends Dialog implements UpdateListener {
protected Control createDialogArea(Composite parent) {
Composite dialogArea = (Composite) super.createDialogArea(parent);
- CommonEditNamespacesDialog editNamespacesControl = new CommonEditNamespacesDialog(dialogArea, resourceLocation, XMLCommonResources.getInstance().getString("_UI_NAMESPACE_DECLARATIONS"), false, true); //$NON-NLS-1$
+ CommonEditNamespacesDialog editNamespacesControl = new CommonEditNamespacesDialog(dialogArea, resourceLocation, XMLUIPlugin.getResourceString("%_UI_NAMESPACE_DECLARATIONS"), false, true); //$NON-NLS-1$
editNamespacesControl.setNamespaceInfoList(namespaceInfoList);
editNamespacesControl.updateErrorMessage(namespaceInfoList);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
index 1a5f7c8378..9101f2fd8b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
@@ -18,12 +18,10 @@ import java.util.List;
import org.eclipse.wst.common.contentmodel.util.DOMNamespaceInfoManager;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
-
-
public class NamespaceInfoErrorHelper {
protected List errorList;
@@ -43,9 +41,9 @@ public class NamespaceInfoErrorHelper {
NamespaceInfo nsInfo2 = null;
if ((nsInfo2 = (NamespaceInfo) uriTable.get(urikey)) != null) {
if (nsInfo.uri != null && nsInfo.uri.equals(nsInfo2.uri)) {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME") + "'" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME") + "'" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME"); //$NON-NLS-1$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME"); //$NON-NLS-1$
}
break;
} else {
@@ -56,10 +54,10 @@ public class NamespaceInfoErrorHelper {
String key = nsInfo.prefix != null ? nsInfo.prefix : ""; //$NON-NLS-1$
if (prefixTable.get(key) != null) {
if (nsInfo.prefix != null) {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX") + "'" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX") + "'" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
} else {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX"); //$NON-NLS-1$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX"); //$NON-NLS-1$
break;
}
} else {
@@ -69,17 +67,17 @@ public class NamespaceInfoErrorHelper {
if (nsInfo.locationHint != null && idResolver != null) {
String grammarURI = idResolver.resolveId(nsInfo.locationHint, nsInfo.locationHint);
if (!URIHelper.isReadableURI(grammarURI, false)) {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED") + " '" + nsInfo.locationHint + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED") + " '" + nsInfo.locationHint + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
}
if (idResolver != null && nsInfo.locationHint == null && !nsInfo.uri.equals(DOMNamespaceInfoManager.XSI_URI)) {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_LOCATION_HINT_NOT_SPECIFIED") + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_LOCATION_HINT_NOT_SPECIFIED") + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
} else {
if (nsInfo.prefix != null) {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED") + " '" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED") + " '" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
}
@@ -90,7 +88,7 @@ public class NamespaceInfoErrorHelper {
NamespaceInfo nsInfo = (NamespaceInfo) iterator.next();
nsInfo.normalize();
if (nsInfo.uri != null && nsInfo.isPrefixRequired && nsInfo.prefix == null) {
- result = XMLCommonResources.getInstance().getString("_UI_WARNING_PREFIX_NOT_SPECIFIED") + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIPlugin.getResourceString("%_UI_WARNING_PREFIX_NOT_SPECIFIED") + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
index 9a3c4aff15..bcd71517c5 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
@@ -49,8 +49,7 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class NamespaceInfoTable extends Composite {
@@ -90,11 +89,11 @@ public class NamespaceInfoTable extends Composite {
if (result.equals("")) { //$NON-NLS-1$
switch (column) {
case 0 : {
- result = XMLCommonResources.getInstance().getString("_UI_NO_NAMESPACE_NAME"); //$NON-NLS-1$
+ result = XMLUIPlugin.getResourceString("%_UI_NO_NAMESPACE_NAME"); //$NON-NLS-1$
break;
}
case 1 : {
- result = XMLCommonResources.getInstance().getString("_UI_NO_PREFIX"); //$NON-NLS-1$
+ result = XMLUIPlugin.getResourceString("%_UI_NO_PREFIX"); //$NON-NLS-1$
break;
}
}
@@ -145,9 +144,9 @@ public class NamespaceInfoTable extends Composite {
}
}
- protected static final String LOCATION_HINT = XMLCommonResources.getInstance().getString("_UI_LABEL_LOCATION_HINT"); //$NON-NLS-1$
- protected static final String NAMESPACE_URI = XMLCommonResources.getInstance().getString("_UI_LABEL_NAMESPACE_NAME"); //$NON-NLS-1$
- protected static final String PREFIX = XMLCommonResources.getInstance().getString("_UI_LABEL_PREFIX"); //$NON-NLS-1$
+ protected static final String LOCATION_HINT = XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT"); //$NON-NLS-1$
+ protected static final String NAMESPACE_URI = XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME"); //$NON-NLS-1$
+ protected static final String PREFIX = XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX"); //$NON-NLS-1$
protected Button deleteButton;
protected boolean dummyRowsRemoved = false;
protected Button editButton;
@@ -176,7 +175,7 @@ public class NamespaceInfoTable extends Composite {
setLayout(createGridLayout());
setLayoutData(new GridData(GridData.FILL_BOTH));
Group namespaceInfoGroup = new Group(this, SWT.NONE);
- namespaceInfoGroup.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_XML_SCHEMA_INFORMATION")); //$NON-NLS-1$
+ namespaceInfoGroup.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_XML_SCHEMA_INFORMATION")); //$NON-NLS-1$
namespaceInfoGroup.setLayout(new GridLayout());
GridData gd = new GridData(GridData.FILL_BOTH);
if (widthHint != -1) {
@@ -266,19 +265,19 @@ public class NamespaceInfoTable extends Composite {
// add the New button
//
newButton = new Button(buttonComposite, SWT.NONE);
- newButton.setText(XMLCommonResources.getInstance().getString("_UI_BUTTON_NEW")); //$NON-NLS-1$
+ newButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_NEW")); //$NON-NLS-1$
newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
newButton.addSelectionListener(selectionListener);
// add the Edit button
//
editButton = new Button(buttonComposite, SWT.NONE);
- editButton.setText(XMLCommonResources.getInstance().getString("_UI_BUTTON_EDIT")); //$NON-NLS-1$
+ editButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_EDIT")); //$NON-NLS-1$
editButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
editButton.addSelectionListener(selectionListener);
// add the Delete button
//
deleteButton = new Button(buttonComposite, SWT.NONE);
- deleteButton.setText(XMLCommonResources.getInstance().getString("_UI_BUTTON_DELETE")); //$NON-NLS-1$
+ deleteButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_DELETE")); //$NON-NLS-1$
deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
deleteButton.addSelectionListener(selectionListener);
}
@@ -299,7 +298,7 @@ public class NamespaceInfoTable extends Composite {
}
protected EditNamespaceInfoDialog invokeDialog(String title, NamespaceInfo info) {
- Shell shell = XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
EditNamespaceInfoDialog dialog = new EditNamespaceInfoDialog(shell, info);
dialog.create();
dialog.getShell().setText(title);
@@ -334,14 +333,14 @@ public class NamespaceInfoTable extends Composite {
ISelection selection = tableViewer.getSelection();
Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
if (selectedObject instanceof NamespaceInfo) {
- EditNamespaceInfoDialog dialog = invokeDialog(XMLCommonResources.getInstance().getString("_UI_LABEL_NEW_NAMESPACE_INFORMATION"), (NamespaceInfo) selectedObject); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), (NamespaceInfo) selectedObject); //$NON-NLS-1$
performDelayedUpdate();
}
}
public void performNew() {
NamespaceInfo info = new NamespaceInfo();
- EditNamespaceInfoDialog dialog = invokeDialog(XMLCommonResources.getInstance().getString("_UI_LABEL_NEW_NAMESPACE_INFORMATION"), info); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), info); //$NON-NLS-1$
if (dialog.getReturnCode() == Window.OK) {
namespaceInfoList.add(info);
performDelayedUpdate();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java
index e932604e18..ff786ab18c 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import org.eclipse.core.resources.IFile;
@@ -27,12 +25,11 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.part.PageBook;
import org.eclipse.wst.common.ui.viewers.SelectSingleFileView;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.XMLCatalog;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
import org.eclipse.wst.xml.uriresolver.XMLCatalogPlugin;
-
public class SelectFileOrXMLCatalogIdPanel extends Composite implements SelectionListener {
/**
@@ -86,13 +83,13 @@ public class SelectFileOrXMLCatalogIdPanel extends Composite implements Selectio
radioButton = new Button[2];
radioButton[0] = new Button(this, SWT.RADIO);
- radioButton[0].setText(XMLCommonResources.getInstance().getString("_UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE")); //$NON-NLS-1$
+ radioButton[0].setText(XMLUIPlugin.getResourceString("%_UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE")); //$NON-NLS-1$
radioButton[0].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[0].setSelection(true);
radioButton[0].addSelectionListener(this);
radioButton[1] = new Button(this, SWT.RADIO);
- radioButton[1].setText(XMLCommonResources.getInstance().getString("_UI_RADIO_BUTTON_SELECT_FROM_CATALOG")); //$NON-NLS-1$
+ radioButton[1].setText(XMLUIPlugin.getResourceString("%_UI_RADIO_BUTTON_SELECT_FROM_CATALOG")); //$NON-NLS-1$
radioButton[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[1].addSelectionListener(this);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java
index 19390cc0fa..082ebc7a65 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java
@@ -10,8 +10,6 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.dialogs;
import java.util.Collection;
@@ -26,11 +24,10 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.XMLCatalog;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
-
public class SelectXMLCatalogIdPanel extends Composite {
protected int catalogEntryType;
protected boolean doTableSizeHack = false;
@@ -50,7 +47,7 @@ public class SelectXMLCatalogIdPanel extends Composite {
this.setLayoutData(gd);
Label label = new Label(this, SWT.NONE);
- label.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_XML_CATALOG_COLON")); //$NON-NLS-1$
+ label.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_XML_CATALOG_COLON")); //$NON-NLS-1$
tableViewer = createTableViewer(this);
tableViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -59,8 +56,8 @@ public class SelectXMLCatalogIdPanel extends Composite {
protected XMLCatalogTableViewer createTableViewer(Composite parent) {
String headings[] = new String[2];
- headings[0] = XMLCommonResources.getInstance().getString("_UI_LABEL_KEY"); //$NON-NLS-1$
- headings[1] = XMLCommonResources.getInstance().getString("_UI_LABEL_URI"); //$NON-NLS-1$
+ headings[0] = XMLUIPlugin.getResourceString("%_UI_LABEL_KEY"); //$NON-NLS-1$
+ headings[1] = XMLUIPlugin.getResourceString("%_UI_LABEL_URI"); //$NON-NLS-1$
XMLCatalogTableViewer theTableViewer = new XMLCatalogTableViewer(parent, headings) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
index 251c2e3e35..93f194874f 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.dnd;
-
import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
@@ -23,7 +22,7 @@ import org.eclipse.swt.dnd.DND;
import org.eclipse.wst.common.ui.dnd.DefaultDragAndDropCommand;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.xml.core.document.XMLNode;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -36,7 +35,7 @@ public class DragNodeCommand extends DefaultDragAndDropCommand {
protected void beginModelChange(Node node, boolean batchUpdate) {
IStructuredModel structuredModel = getStructedModel(node);
if (structuredModel != null) {
- structuredModel.beginRecording(this, ResourceHandler.getString("DragNodeCommand.0")); //$NON-NLS-1$
+ structuredModel.beginRecording(this, XMLUIPlugin.getResourceString("%DragNodeCommand.0")); //$NON-NLS-1$
if (batchUpdate) {
// structuredModel.aboutToChangeModel();
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
index 33a54b56fb..7fc9649fe3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
@@ -13,6 +13,9 @@
package org.eclipse.wst.xml.ui.internal;
import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
@@ -21,7 +24,7 @@ import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
-import org.eclipse.wst.sse.ui.EditorPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.preferences.ui.ColorHelper;
@@ -35,13 +38,16 @@ import org.eclipse.wst.xml.ui.templates.TemplateContextTypeXMLAttribute;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeXMLAttributeValue;
import org.eclipse.wst.xml.ui.templates.TemplateContextTypeXMLTag;
-
/**
* The main plugin class to be used in the desktop.
*/
public class XMLUIPlugin extends AbstractUIPlugin {
public final static String ID = "org.eclipse.wst.xml.ui"; //$NON-NLS-1$
protected static XMLUIPlugin instance = null;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+ private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
+ private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
public static XMLUIPlugin getDefault() {
return instance;
@@ -72,7 +78,7 @@ public class XMLUIPlugin extends AbstractUIPlugin {
// Force a call to initialize default preferences since
// initializeDefaultPreferences is only called if *this* plugin's
// preference store is accessed
- initializeDefaultXMLPreferences(EditorPlugin.getDefault().getPreferenceStore());
+ initializeDefaultXMLPreferences(SSEUIPlugin.getDefault().getPreferenceStore());
JobStatusLineHelper.init();
}
@@ -132,7 +138,7 @@ public class XMLUIPlugin extends AbstractUIPlugin {
// ignore this preference store
// use EditorPlugin preference store
- IPreferenceStore editorStore = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore editorStore = SSEUIPlugin.getDefault().getPreferenceStore();
initializeDefaultXMLPreferences(editorStore);
}
@@ -219,4 +225,49 @@ public class XMLUIPlugin extends AbstractUIPlugin {
styleValue = ColorHelper.getColorString(0, 0, 0) + NOBACKGROUNDBOLD;
store.setDefault(PreferenceKeyGenerator.generateKey(IStyleConstantsXML.CDATA_TEXT, 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.xml.ui.internal.XMLUIPluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/EditingXML.properties b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
index 8371547a7e..9179545989 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/EditingXML.properties
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
@@ -58,8 +58,8 @@ _UI_MENU_VALIDATE_XML=Validate XML File
_UI_LABEL_UNDO_ADD_DESCRIPTION=Add
_UI_LABEL_UNDO_REPLACE_DESCRIPTION=Replace
_UI_LABEL_EDIT_DOCTYPE=Edit DOCTYPE
-_UI_INFO_EXPAND_ALL=IWAK0108I Expand All
-_UI_INFO_COLLAPSE_ALL=IWAK0109I Collapse All
+_UI_INFO_EXPAND_ALL=Expand All
+_UI_INFO_COLLAPSE_ALL=Collapse All
_UI_MENU_ADD_DTD_INFORMATION=Add DTD Information...
_UI_MENU_ADD_SCHEMA_INFORMATION=Add Schema Information...
@@ -181,15 +181,7 @@ _UI_ADD_NAMESPACE_DECLARATIONS=Add Namespace Declarations
_UI_NAMESPACE_DECLARATIONS=Namespace Declarations
_UI_TARGET_NAMESPACE=Target Namespace
-
-#======================================================================================
-#
-# Here is the list of Error string that have message IDs - make sure they are unique
-# Range for XMLBuilder messageIDs: IWAX1601E - IWAX1800E
-# Since we'll be combing these plugins at some later point we'll use the same range
-# and be carefull not to clobber those defined in xmlbuilder's plugin.properties
-#======================================================================================
-_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS=IWAK0110E The element already has an attribute with this name.
+_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS=The element already has an attribute with this name.
#
error_message_goes_here=error message goes here
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
index 1624d44452..02a593089c 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
@@ -33,10 +33,9 @@ import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-
public class InsertRequiredAttrsQuickAssistProposal implements ICompletionProposal, ICompletionProposalExtension2 {
private final List fRequiredAttrs;
@@ -106,7 +105,7 @@ public class InsertRequiredAttrsQuickAssistProposal implements ICompletionPropos
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
- return ResourceHandler.getString("InsertRequiredAttrsQuickAssistProposal.0"); //$NON-NLS-1$
+ return XMLUIPlugin.getResourceString("%InsertRequiredAttrsQuickAssistProposal.0"); //$NON-NLS-1$
}
/*
@@ -124,7 +123,7 @@ public class InsertRequiredAttrsQuickAssistProposal implements ICompletionPropos
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return ResourceHandler.getString("InsertRequiredAttrsQuickAssistProposal.1"); //$NON-NLS-1$
+ return XMLUIPlugin.getResourceString("%InsertRequiredAttrsQuickAssistProposal.1"); //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
index 27444d8067..8f9410ecd8 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
@@ -21,10 +21,9 @@ import org.eclipse.jface.text.source.Annotation;
import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.sse.ui.internal.correction.IQuickFixProcessor;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-
public class QuickFixProcessorXML implements IQuickFixProcessor {
@@ -80,7 +79,7 @@ public class QuickFixProcessorXML implements IQuickFixProcessor {
int problemID = tempAnnotation.getProblemID();
switch (problemID) {
case ProblemIDsXML.EmptyTag :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.0"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.0"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.MissingEndTag :
String tagName = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
@@ -89,56 +88,56 @@ public class QuickFixProcessorXML implements IQuickFixProcessor {
int startTagEndOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[3]).intValue();
int firstChildStartOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[4]).intValue();
int endOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[5]).intValue();
- proposals.add(new CompletionProposal(tagClose, tagCloseOffset, 0, 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.1"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), startTagEndOffset - tempAnnotation.getPosition().getOffset(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.2"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- proposals.add(new CompletionProposal("</" + tagName + ">", firstChildStartOffset, 0, 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.3"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- proposals.add(new CompletionProposal("</" + tagName + ">", endOffset, 0, 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.4"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal(tagClose, tagCloseOffset, 0, 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.1"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), startTagEndOffset - tempAnnotation.getPosition().getOffset(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.2"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("</" + tagName + ">", firstChildStartOffset, 0, 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.3"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("</" + tagName + ">", endOffset, 0, 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.4"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
break;
case ProblemIDsXML.AttrsInEndTag :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.5"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.5"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.MissingAttrValue :
String defaultAttrValue = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
int insertOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[1]).intValue();
- proposals.add(new CompletionProposal("\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength() + insertOffset, 0, defaultAttrValue.length() + 2, getImage(), ResourceHandler.getString("QuickFixProcessorXML.6"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength() + insertOffset, 0, defaultAttrValue.length() + 2, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.6"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.NoAttrValue :
defaultAttrValue = (String) tempAnnotation.getAdditionalFixInfo();
- proposals.add(new CompletionProposal("=\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, defaultAttrValue.length() + 3, getImage(), ResourceHandler.getString("QuickFixProcessorXML.6"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("=\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, defaultAttrValue.length() + 3, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.6"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.SpacesBeforeTagName :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.8"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.8"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.SpacesBeforePI :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.9"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.9"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.NamespaceInPI :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.10"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.10"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.UnknownElement :
- proposals.add(new RemoveUnknownElementQuickFixProposal(tempAnnotation.getAdditionalFixInfo(), getImage(), ResourceHandler.getString("QuickFixProcessorXML.11"))); //$NON-NLS-1$
+ proposals.add(new RemoveUnknownElementQuickFixProposal(tempAnnotation.getAdditionalFixInfo(), getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.11"))); //$NON-NLS-1$
proposals.add(new RenameInFileQuickAssistProposal());
break;
case ProblemIDsXML.UnknownAttr :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
proposals.add(new RenameInFileQuickAssistProposal());
break;
case ProblemIDsXML.InvalidAttrValue :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), ResourceHandler.getString("QuickFixProcessorXML.12"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.12"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.MissingRequiredAttr :
String requiredAttr = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
insertOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[1]).intValue();
- proposals.add(new CompletionProposal(requiredAttr, tempAnnotation.getPosition().getOffset() + insertOffset, 0, requiredAttr.length(), getImage(), ResourceHandler.getString("QuickFixProcessorXML.13"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$
+ proposals.add(new CompletionProposal(requiredAttr, tempAnnotation.getPosition().getOffset() + insertOffset, 0, requiredAttr.length(), getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.13"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$
break;
case ProblemIDsXML.AttrValueNotQuoted :
String attrValue = (String) tempAnnotation.getAdditionalFixInfo();
- proposals.add(new CompletionProposal("\"" + attrValue + "\"", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), attrValue.length() + 2, getImage(), ResourceHandler.getString("QuickFixProcessorXML.14"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("\"" + attrValue + "\"", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), attrValue.length() + 2, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.14"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
break;
case ProblemIDsXML.MissingClosingBracket :
- proposals.add(new CompletionProposal(">", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, 1, getImage(), ResourceHandler.getString("QuickFixProcessorXML.15"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal(">", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, 1, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.15"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
break;
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
index 0424a792f0..6af8773915 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
@@ -25,8 +25,7 @@ import org.eclipse.text.edits.DeleteEdit;
import org.eclipse.text.edits.MalformedTreeException;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class RemoveUnknownElementQuickFixProposal implements ICompletionProposal, ICompletionProposalExtension2 {
private Object fAdditionalFixInfo = null;
@@ -104,7 +103,7 @@ public class RemoveUnknownElementQuickFixProposal implements ICompletionProposal
*/
public String getDisplayString() {
if (fDisplayString == null)
- fDisplayString = ResourceHandler.getString("QuickFixProcessorXML.11"); //$NON-NLS-1$
+ fDisplayString = XMLUIPlugin.getResourceString("%QuickFixProcessorXML.11"); //$NON-NLS-1$
return fDisplayString;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
index c1e655f9f5..711678b1cb 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
@@ -34,10 +34,9 @@ import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-
public class RenameInFileQuickAssistProposal implements ICompletionProposal, ICompletionProposalExtension2 {
protected IRegion fSelectedRegion; // initialized by apply()
@@ -113,7 +112,7 @@ public class RenameInFileQuickAssistProposal implements ICompletionProposal, ICo
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
- return ResourceHandler.getString("RenameInFileQuickAssistProposal.0"); //$NON-NLS-1$
+ return XMLUIPlugin.getResourceString("%RenameInFileQuickAssistProposal.0"); //$NON-NLS-1$
}
/*
@@ -131,7 +130,7 @@ public class RenameInFileQuickAssistProposal implements ICompletionProposal, ICo
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return ResourceHandler.getString("RenameInFileQuickAssistProposal.1"); //$NON-NLS-1$
+ return XMLUIPlugin.getResourceString("%RenameInFileQuickAssistProposal.1"); //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
index 07dca4d9ef..afad911401 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
@@ -24,12 +24,11 @@ import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.format.FormatProcessorXML;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
import org.w3c.dom.Node;
-
public class SurroundWithNewElementQuickAssistProposal extends RenameInFileQuickAssistProposal {
/*
@@ -84,7 +83,7 @@ public class SurroundWithNewElementQuickAssistProposal extends RenameInFileQuick
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
- return ResourceHandler.getString("SurroundWithNewElementQuickAssistProposal.0"); //$NON-NLS-1$
+ return XMLUIPlugin.getResourceString("%SurroundWithNewElementQuickAssistProposal.0"); //$NON-NLS-1$
}
/*
@@ -93,7 +92,7 @@ public class SurroundWithNewElementQuickAssistProposal extends RenameInFileQuick
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return ResourceHandler.getString("SurroundWithNewElementQuickAssistProposal.1"); //$NON-NLS-1$
+ return XMLUIPlugin.getResourceString("%SurroundWithNewElementQuickAssistProposal.1"); //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nls/ResourceHandler.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nls/ResourceHandler.java
deleted file mode 100644
index a34ab91a25..0000000000
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nls/ResourceHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.xml.ui.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("EditingXML");//$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);
- }
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
index 2f6802a576..03cf2de5fe 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
@@ -32,13 +32,11 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.PageBook;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.SelectFileOrXMLCatalogIdDialog;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.IdResolverImpl;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
-
-
public class CommonAddNamespacesControl extends Composite implements SelectionListener {
class EditNamespaceControl extends Composite {
@@ -55,7 +53,7 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
setLayoutData(new GridData(GridData.FILL_BOTH));
Label label = new Label(this, SWT.NONE);
- label.setText(XMLCommonResources.getInstance().getString("_UI_ENTER_REQ_PREFIX_AND_NAMESPACE")); //$NON-NLS-1$
+ label.setText(XMLUIPlugin.getResourceString("%_UI_ENTER_REQ_PREFIX_AND_NAMESPACE")); //$NON-NLS-1$
Composite composite = new Composite(this, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -71,7 +69,7 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
// row 1
//
Label prefixLabel = new Label(composite, SWT.NONE);
- prefixLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_PREFIX_COLON")); //$NON-NLS-1$
+ prefixLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX_COLON")); //$NON-NLS-1$
prefixField = new Text(composite, SWT.SINGLE | SWT.BORDER);
prefixField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -84,7 +82,7 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
// row 2
//
Label uriLabel = new Label(composite, SWT.NONE);
- uriLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_NAMESPACE_NAME_COLON")); //$NON-NLS-1$
+ uriLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME_COLON")); //$NON-NLS-1$
uriField = new Text(composite, SWT.SINGLE | SWT.BORDER);
uriField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -97,7 +95,7 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
// row 3
//
Label locationHintLabel = new Label(composite, SWT.NONE);
- locationHintLabel.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_LOCATION_HINT_COLON")); //$NON-NLS-1$
+ locationHintLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT_COLON")); //$NON-NLS-1$
locationHintField = new Text(composite, SWT.SINGLE | SWT.BORDER);
locationHintField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -113,7 +111,7 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
};
browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(XMLCommonResources.getInstance().getString("_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ browseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
browseButton.addSelectionListener(selectionListener);
browseButton.setEnabled(locationHintField.getEnabled());
}
@@ -122,7 +120,7 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
String[] extensions = {".xsd"}; //$NON-NLS-1$
SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(getShell(), extensions);
dialog.create();
- dialog.getShell().setText(XMLCommonResources.getInstance().getString("_UI_LABEL_SELECT_FILE")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SELECT_FILE")); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
@@ -198,11 +196,11 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
setLayout(new GridLayout());
radio1 = new Button(this, SWT.RADIO);
- radio1.setText(XMLCommonResources.getInstance().getString("_UI_SELECT_REGISTERED_NAMESPACES")); //$NON-NLS-1$
+ radio1.setText(XMLUIPlugin.getResourceString("%_UI_SELECT_REGISTERED_NAMESPACES")); //$NON-NLS-1$
radio1.addSelectionListener(this);
radio2 = new Button(this, SWT.RADIO);
- radio2.setText(XMLCommonResources.getInstance().getString("_UI_SPECIFY_NEW_NAMESPACE")); //$NON-NLS-1$
+ radio2.setText(XMLUIPlugin.getResourceString("%_UI_SPECIFY_NEW_NAMESPACE")); //$NON-NLS-1$
radio2.addSelectionListener(this);
Label separator = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
@@ -218,7 +216,7 @@ public class CommonAddNamespacesControl extends Composite implements SelectionLi
tableSection = new Composite(pageBook, SWT.NONE);
tableSection.setLayout(new GridLayout());
Label label = new Label(tableSection, SWT.NONE);
- label.setText(XMLCommonResources.getInstance().getString("_UI_SELECT_NAMESPACE_TO_ADD")); //$NON-NLS-1$
+ label.setText(XMLUIPlugin.getResourceString("%_UI_SELECT_NAMESPACE_TO_ADD")); //$NON-NLS-1$
tableViewer = new CommonNamespaceInfoTable(tableSection, SWT.CHECK, 6);
editNamespaceControl = new EditNamespaceControl(pageBook);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
index 179566735a..2ff3ee283e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
@@ -37,9 +37,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditNamespaceInfoDialog;
import org.eclipse.wst.xml.ui.dialogs.NamespaceInfoErrorHelper;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class CommonEditNamespacesDialog {
protected Composite commonComposite;
@@ -143,7 +141,7 @@ public class CommonEditNamespacesDialog {
newButton = new Button(buttonComposite, SWT.NONE);
//newButton.setText(" " +
// XMLCommonUIPlugin.getInstance().getString("_UI_BUTTON_NEW") + " ");
- newButton.setText(" " + ResourceHandler.getString("CommonEditNamespacesDialog.0") + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ newButton.setText(" " + XMLUIPlugin.getResourceString("%CommonEditNamespacesDialog.0") + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //ViewUtility.createHorizontalFill());
newButton.addSelectionListener(selectionListener);
@@ -154,7 +152,7 @@ public class CommonEditNamespacesDialog {
//gd.grabExcessHorizontalSpace = true;
editButton = new Button(buttonComposite, SWT.NONE);
- editButton.setText(XMLCommonResources.getInstance().getString("_UI_BUTTON_EDIT")); //$NON-NLS-1$
+ editButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_EDIT")); //$NON-NLS-1$
editButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //ViewUtility.createHorizontalFill());
editButton.addSelectionListener(selectionListener);
@@ -165,7 +163,7 @@ public class CommonEditNamespacesDialog {
//gd.grabExcessHorizontalSpace = true;
deleteButton = new Button(buttonComposite, SWT.NONE);
- deleteButton.setText(XMLCommonResources.getInstance().getString("_UI_BUTTON_DELETE")); //$NON-NLS-1$
+ deleteButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_DELETE")); //$NON-NLS-1$
deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //ViewUtility.createHorizontalFill());
deleteButton.addSelectionListener(selectionListener);
}
@@ -247,7 +245,7 @@ public class CommonEditNamespacesDialog {
}
protected EditNamespaceInfoDialog invokeDialog(String title, NamespaceInfo info) {
- Shell shell = XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
EditNamespaceInfoDialog dialog = new EditNamespaceInfoDialog(shell, info);
dialog.create();
dialog.getShell().setText(title);
@@ -283,15 +281,15 @@ public class CommonEditNamespacesDialog {
public void performEdit() {
Object selection = getSelection(tableViewer.getSelection());
if (selection != null) {
- EditNamespaceInfoDialog dialog = invokeDialog(XMLCommonResources.getInstance().getString("_UI_LABEL_NEW_NAMESPACE_INFORMATION"), (NamespaceInfo) selection); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), (NamespaceInfo) selection); //$NON-NLS-1$
updateErrorMessage(namespaceInfoList);
performDelayedUpdate();
}
}
public void performNew() {
- Shell shell = XMLCommonResources.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
- CommonAddNamespacesDialog dialog = new CommonAddNamespacesDialog(shell, XMLCommonResources.getInstance().getString("_UI_ADD_NAMESPACE_DECLARATIONS"), resourceLocation, namespaceInfoList); //$NON-NLS-1$
+ Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
+ CommonAddNamespacesDialog dialog = new CommonAddNamespacesDialog(shell, XMLUIPlugin.getResourceString("%_UI_ADD_NAMESPACE_DECLARATIONS"), resourceLocation, namespaceInfoList); //$NON-NLS-1$
dialog.createAndOpen();
if (dialog.getReturnCode() == Window.OK) {
namespaceInfoList.addAll(dialog.getNamespaceInfoList());
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
index 27546a5a6f..fb2506dc5d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
@@ -22,8 +22,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditNamespaceInfoDialog;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
/*
* This class is an extension of CommonEditNamespacesDialog. This class adds
@@ -43,7 +42,7 @@ public class CommonEditNamespacesTargetFieldDialog extends CommonEditNamespacesD
protected Text targetNamespaceField;
public CommonEditNamespacesTargetFieldDialog(Composite parent, IPath resourceLocation) {
- super(parent, resourceLocation, XMLCommonResources.getInstance().getString("_UI_NAMESPACE_DECLARATIONS")); //$NON-NLS-1$
+ super(parent, resourceLocation, XMLUIPlugin.getResourceString("%_UI_NAMESPACE_DECLARATIONS")); //$NON-NLS-1$
Composite targetComp = getTopComposite();
targetComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -51,7 +50,7 @@ public class CommonEditNamespacesTargetFieldDialog extends CommonEditNamespacesD
GridData gd = new GridData(GridData.FILL_BOTH);
Label targetNamespaceLabel = new Label(targetComp, SWT.NONE);
targetNamespaceLabel.setLayoutData(gd);
- targetNamespaceLabel.setText(XMLCommonResources.getInstance().getString("_UI_TARGET_NAMESPACE")); //$NON-NLS-1$
+ targetNamespaceLabel.setText(XMLUIPlugin.getResourceString("%_UI_TARGET_NAMESPACE")); //$NON-NLS-1$
targetNamespaceField = new Text(targetComp, SWT.BORDER);
targetNamespaceField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -73,7 +72,7 @@ public class CommonEditNamespacesTargetFieldDialog extends CommonEditNamespacesD
editTargetNamespace = true;
}
- EditNamespaceInfoDialog dialog = invokeDialog(XMLCommonResources.getInstance().getString("_UI_LABEL_NEW_NAMESPACE_INFORMATION"), nsInfo); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), nsInfo); //$NON-NLS-1$
updateErrorMessage(namespaceInfoList);
performDelayedUpdate();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
index ae58de57b4..7da1d32a5d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
@@ -33,8 +33,7 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.wst.common.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.util.XMLCommonResources;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class CommonNamespaceInfoTable extends TableViewer {
@@ -87,11 +86,11 @@ public class CommonNamespaceInfoTable extends TableViewer {
if (result.equals("")) { //$NON-NLS-1$
switch (columnCode) {
case COLUMN_PREFIX : {
- result = XMLCommonResources.getInstance().getString("_UI_NO_PREFIX"); //$NON-NLS-1$
+ result = XMLUIPlugin.getResourceString("%_UI_NO_PREFIX"); //$NON-NLS-1$
break;
}
case COLUMN_NAMESPACE_URI : {
- result = XMLCommonResources.getInstance().getString("_UI_NO_NAMESPACE_NAME"); //$NON-NLS-1$
+ result = XMLUIPlugin.getResourceString("%_UI_NO_NAMESPACE_NAME"); //$NON-NLS-1$
break;
}
}
@@ -142,9 +141,9 @@ public class CommonNamespaceInfoTable extends TableViewer {
protected static final int COLUMN_PREFIX = 3;
protected static final String LABEL_CHECKBOX = ""; //$NON-NLS-1$
- protected static final String LABEL_LOCATION_HINT = XMLCommonResources.getInstance().getString("_UI_LABEL_LOCATION_HINT"); //$NON-NLS-1$
- protected static final String LABEL_NAMESPACE_URI = XMLCommonResources.getInstance().getString("_UI_LABEL_NAMESPACE_NAME"); //$NON-NLS-1$
- protected static final String LABEL_PREFIX = XMLCommonResources.getInstance().getString("_UI_LABEL_PREFIX"); //$NON-NLS-1$
+ protected static final String LABEL_LOCATION_HINT = XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT"); //$NON-NLS-1$
+ protected static final String LABEL_NAMESPACE_URI = XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME"); //$NON-NLS-1$
+ protected static final String LABEL_PREFIX = XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX"); //$NON-NLS-1$
protected List checkedList = new ArrayList();
//protected List namespaceInfoList = new ArrayList();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java
index e26ec586f8..0cd9607563 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java
@@ -25,8 +25,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.common.encoding.CommonCharsetNames;
import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
/**
* EncodingSettings is a composite that can be used to display the set of
@@ -49,9 +48,9 @@ public class EncodingSettings extends Composite {
}
}
- private static String ENCODING_LABEL = ResourceHandler.getString("EncodingSettings.1"); //$NON-NLS-1$
+ private static String ENCODING_LABEL = XMLUIPlugin.getResourceString("%EncodingSettings.1"); //$NON-NLS-1$
- private static String IANA_LABEL = ResourceHandler.getString("EncodingSettings.0"); //$NON-NLS-1$
+ private static String IANA_LABEL = XMLUIPlugin.getResourceString("%EncodingSettings.0"); //$NON-NLS-1$
private ModifyListener comboListener = new ComboListener();
protected Combo encodingCombo;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java
index 7db9febb2c..6ee38dc2c6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java
@@ -22,8 +22,7 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.common.encoding.CommonCharsetNames;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
/**
* WorkbenchDefaultEncodingSettings is an extension of EncodingSettings. This
@@ -66,7 +65,7 @@ public class WorkbenchDefaultEncodingSettings extends Composite {
defaultEncodingComposite.setLayoutData(data);
fUseDefaultButton = new Button(defaultEncodingComposite, SWT.CHECK);
- fUseDefaultButton.setText(ResourceHandler.getString("WorkbenchDefaultEncodingSettings.0")); //$NON-NLS-1$
+ fUseDefaultButton.setText(XMLUIPlugin.getResourceString("%WorkbenchDefaultEncodingSettings.0")); //$NON-NLS-1$
fUseDefaultButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java
index 9c73ccc7de..f1527a5cd4 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.preferences;
-
-
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -27,19 +25,17 @@ import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
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;
import org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage;
import org.eclipse.wst.sse.ui.preferences.ui.StyledTextColorPicker;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.ui.style.IStyleConstantsXML;
-
-
public class XMLColorPage extends AbstractColorPage {
protected Control createContents(Composite parent) {
@@ -70,11 +66,11 @@ public class XMLColorPage extends AbstractColorPage {
}
protected IPreferenceStore doGetPreferenceStore() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
public String getSampleText() {
- return ResourceHandler.getString("Sample_XML_doc"); //$NON-NLS-1$ = "<?xml version=\"1.0\"?>\n<?customProcessingInstruction\n\tXML processor specific\n\tcontent ?>\n<!DOCTYPE colors\n\tPUBLIC \"//IBM/XML/COLORS/\" \"colors.dtd\">\n<colors>\n\t<!-- begin color definitions -->\n\t<color name=\"plaintext\" foreground=\"#000000\"\n\t\tbackground=\"#D4D0C8\"/>\n\t<color name=\"bold\" foreground=\"#000000\"\n\t\tbackground=\"#B3ACA0\">\n\t<![CDATA[<123456789>]]>\n\tNormal text content.\n\t<color name=\"inverse\" foreground=\"#F0F0F0\"\n\t\tbackground=\"#D4D0C8\"/>\n\n</colors>\n";
+ return XMLUIPlugin.getResourceString("%Sample_XML_doc"); //$NON-NLS-1$ = "<?xml version=\"1.0\"?>\n<?customProcessingInstruction\n\tXML processor specific\n\tcontent ?>\n<!DOCTYPE colors\n\tPUBLIC \"//IBM/XML/COLORS/\" \"colors.dtd\">\n<colors>\n\t<!-- begin color definitions -->\n\t<color name=\"plaintext\" foreground=\"#000000\"\n\t\tbackground=\"#D4D0C8\"/>\n\t<color name=\"bold\" foreground=\"#000000\"\n\t\tbackground=\"#B3ACA0\">\n\t<![CDATA[<123456789>]]>\n\tNormal text content.\n\t<color name=\"inverse\" foreground=\"#F0F0F0\"\n\t\tbackground=\"#D4D0C8\"/>\n\n</colors>\n";
}
protected void initCommonContextStyleMap(Dictionary contextStyleMap) {
@@ -102,14 +98,14 @@ public class XMLColorPage extends AbstractColorPage {
protected void initCommonDescriptions(Dictionary descriptions) {
// create descriptions for hilighting types
- descriptions.put(IStyleConstantsXML.COMMENT_BORDER, ResourceHandler.getString("Comment_Delimiters_UI_")); //$NON-NLS-1$ = "Comment Delimiters"
- descriptions.put(IStyleConstantsXML.COMMENT_TEXT, ResourceHandler.getString("Comment_Content_UI_")); //$NON-NLS-1$ = "Comment Content"
- descriptions.put(IStyleConstantsXML.TAG_BORDER, ResourceHandler.getString("Tag_Delimiters_UI_")); //$NON-NLS-1$ = "Tag Delimiters"
- descriptions.put(IStyleConstantsXML.TAG_NAME, ResourceHandler.getString("Tag_Names_UI_")); //$NON-NLS-1$ = "Tag Names"
- descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, ResourceHandler.getString("Attribute_Names_UI_")); //$NON-NLS-1$ = "Attribute Names"
- descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, ResourceHandler.getString("Attribute_Values_UI_")); //$NON-NLS-1$ = "Attribute Values"
- descriptions.put(IStyleConstantsXML.DECL_BORDER, ResourceHandler.getString("Declaration_Delimiters_UI_")); //$NON-NLS-1$ = "Declaration Delimiters"
- descriptions.put(IStyleConstantsXML.XML_CONTENT, ResourceHandler.getString("Content_UI_")); //$NON-NLS-1$ = "Content"
+ descriptions.put(IStyleConstantsXML.COMMENT_BORDER, XMLUIPlugin.getResourceString("%Comment_Delimiters_UI_")); //$NON-NLS-1$ = "Comment Delimiters"
+ descriptions.put(IStyleConstantsXML.COMMENT_TEXT, XMLUIPlugin.getResourceString("%Comment_Content_UI_")); //$NON-NLS-1$ = "Comment Content"
+ descriptions.put(IStyleConstantsXML.TAG_BORDER, XMLUIPlugin.getResourceString("%Tag_Delimiters_UI_")); //$NON-NLS-1$ = "Tag Delimiters"
+ descriptions.put(IStyleConstantsXML.TAG_NAME, XMLUIPlugin.getResourceString("%Tag_Names_UI_")); //$NON-NLS-1$ = "Tag Names"
+ descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, XMLUIPlugin.getResourceString("%Attribute_Names_UI_")); //$NON-NLS-1$ = "Attribute Names"
+ descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, XMLUIPlugin.getResourceString("%Attribute_Values_UI_")); //$NON-NLS-1$ = "Attribute Values"
+ descriptions.put(IStyleConstantsXML.DECL_BORDER, XMLUIPlugin.getResourceString("%Declaration_Delimiters_UI_")); //$NON-NLS-1$ = "Declaration Delimiters"
+ descriptions.put(IStyleConstantsXML.XML_CONTENT, XMLUIPlugin.getResourceString("%Content_UI_")); //$NON-NLS-1$ = "Content"
}
protected void initCommonStyleList(ArrayList list) {
@@ -147,10 +143,10 @@ public class XMLColorPage extends AbstractColorPage {
initCommonDescriptions(descriptions);
initDocTypeDescriptions(descriptions);
- descriptions.put(IStyleConstantsXML.CDATA_BORDER, ResourceHandler.getString("CDATA_Delimiters_UI_")); //$NON-NLS-1$ = "CDATA Delimiters"
- descriptions.put(IStyleConstantsXML.CDATA_TEXT, ResourceHandler.getString("CDATA_Content_UI_")); //$NON-NLS-1$ = "CDATA Content"
- descriptions.put(IStyleConstantsXML.PI_BORDER, ResourceHandler.getString("Processing_Instruction_Del_UI_")); //$NON-NLS-1$ = "Processing Instruction Delimiters"
- descriptions.put(IStyleConstantsXML.PI_CONTENT, ResourceHandler.getString("Processing_Instruction_Con_UI__UI_")); //$NON-NLS-1$ = "Processing Instruction Content"
+ descriptions.put(IStyleConstantsXML.CDATA_BORDER, XMLUIPlugin.getResourceString("%CDATA_Delimiters_UI_")); //$NON-NLS-1$ = "CDATA Delimiters"
+ descriptions.put(IStyleConstantsXML.CDATA_TEXT, XMLUIPlugin.getResourceString("%CDATA_Content_UI_")); //$NON-NLS-1$ = "CDATA Content"
+ descriptions.put(IStyleConstantsXML.PI_BORDER, XMLUIPlugin.getResourceString("%Processing_Instruction_Del_UI_")); //$NON-NLS-1$ = "Processing Instruction Delimiters"
+ descriptions.put(IStyleConstantsXML.PI_CONTENT, XMLUIPlugin.getResourceString("%Processing_Instruction_Con_UI__UI_")); //$NON-NLS-1$ = "Processing Instruction Content"
}
protected void initDocTypeContextStyleMap(Dictionary contextStyleMap) {
@@ -169,10 +165,10 @@ public class XMLColorPage extends AbstractColorPage {
protected void initDocTypeDescriptions(Dictionary descriptions) {
// create descriptions for hilighting types for DOCTYPE related items
- descriptions.put(IStyleConstantsXML.DOCTYPE_NAME, ResourceHandler.getString("DOCTYPE_Name_UI_")); //$NON-NLS-1$ = "DOCTYPE Name"
- descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, ResourceHandler.getString("DOCTYPE_SYSTEM/PUBLIC_Keyw_UI_")); //$NON-NLS-1$ = "DOCTYPE SYSTEM/PUBLIC Keyword"
- descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, ResourceHandler.getString("DOCTYPE_Public_Reference_UI_")); //$NON-NLS-1$ = "DOCTYPE Public Reference"
- descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, ResourceHandler.getString("DOCTYPE_System_Reference_UI_")); //$NON-NLS-1$ = "DOCTYPE System Reference"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_NAME, XMLUIPlugin.getResourceString("%DOCTYPE_Name_UI_")); //$NON-NLS-1$ = "DOCTYPE Name"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, XMLUIPlugin.getResourceString("%DOCTYPE_SYSTEM/PUBLIC_Keyw_UI_")); //$NON-NLS-1$ = "DOCTYPE SYSTEM/PUBLIC Keyword"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, XMLUIPlugin.getResourceString("%DOCTYPE_Public_Reference_UI_")); //$NON-NLS-1$ = "DOCTYPE Public Reference"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, XMLUIPlugin.getResourceString("%DOCTYPE_System_Reference_UI_")); //$NON-NLS-1$ = "DOCTYPE System Reference"
}
protected void initDocTypeStyleList(ArrayList list) {
@@ -197,7 +193,7 @@ public class XMLColorPage extends AbstractColorPage {
// saving its own
super.performOk();
- EditorPlugin.getDefault().savePluginPreferences();
+ SSEUIPlugin.getDefault().savePluginPreferences();
return true;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java
index 6cc95fa032..1ffffe4d89 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.preferences;
-
-
import java.util.Vector;
import org.eclipse.core.runtime.Preferences;
@@ -26,13 +24,11 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.ui.EditorPlugin;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage;
-import org.eclipse.wst.xml.core.XMLModelPlugin;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-
public class XMLFilesPreferencePage extends AbstractPreferencePage {
protected EncodingSettings fEncodingSettings = null;
@@ -53,32 +49,32 @@ public class XMLFilesPreferencePage extends AbstractPreferencePage {
protected void createContentsForCreatingGroup(Composite parent) {
Group creatingGroup = createGroup(parent, 1);
- creatingGroup.setText(ResourceHandler.getString("Creating_files")); //$NON-NLS-1$
+ creatingGroup.setText(SSEUIPlugin.getResourceString("%Creating_files")); //$NON-NLS-1$
- Label label = createLabel(creatingGroup, ResourceHandler.getString("Encoding_desc")); //$NON-NLS-1$
+ Label label = createLabel(creatingGroup, SSEUIPlugin.getResourceString("%Encoding_desc")); //$NON-NLS-1$
- fEncodingSettings = new EncodingSettings(creatingGroup, ResourceHandler.getString("Encoding")); //$NON-NLS-1$
+ fEncodingSettings = new EncodingSettings(creatingGroup, SSEUIPlugin.getResourceString("%Encoding")); //$NON-NLS-1$
}
protected void createContentsForCreatingOrSavingGroup(Composite parent) {
Group creatingOrSavingGroup = createGroup(parent, 2);
- creatingOrSavingGroup.setText(ResourceHandler.getString("Creating_or_saving_files")); //$NON-NLS-1$
+ creatingOrSavingGroup.setText(SSEUIPlugin.getResourceString("%Creating_or_saving_files")); //$NON-NLS-1$
- Label label = createLabel(creatingOrSavingGroup, ResourceHandler.getString("End-of-line_code_desc")); //$NON-NLS-1$
+ Label label = createLabel(creatingOrSavingGroup, SSEUIPlugin.getResourceString("%End-of-line_code_desc")); //$NON-NLS-1$
((GridData) label.getLayoutData()).horizontalSpan = 2;
((GridData) label.getLayoutData()).grabExcessHorizontalSpace = true;
- createLabel(creatingOrSavingGroup, ResourceHandler.getString("End-of-line_code")); //$NON-NLS-1$
+ createLabel(creatingOrSavingGroup, SSEUIPlugin.getResourceString("%End-of-line_code")); //$NON-NLS-1$
fEndOfLineCode = createDropDownBox(creatingOrSavingGroup);
populateLineDelimiters();
}
protected IPreferenceStore doGetPreferenceStore() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
protected void doSavePreferenceStore() {
- XMLModelPlugin.getDefault().savePluginPreferences(); // model
+ XMLCorePlugin.getDefault().savePluginPreferences(); // model
}
/**
@@ -100,7 +96,7 @@ public class XMLFilesPreferencePage extends AbstractPreferencePage {
* @see org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage#getModelPreferences()
*/
protected Preferences getModelPreferences() {
- return XMLModelPlugin.getDefault().getPluginPreferences();
+ return XMLCorePlugin.getDefault().getPluginPreferences();
}
protected void initializeValues() {
@@ -160,16 +156,16 @@ public class XMLFilesPreferencePage extends AbstractPreferencePage {
*/
private void populateLineDelimiters() {
fEOLCodes = new Vector();
- fEndOfLineCode.add(ResourceHandler.getString("EOL_Unix")); //$NON-NLS-1$
+ fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_Unix")); //$NON-NLS-1$
fEOLCodes.add(CommonEncodingPreferenceNames.LF);
- fEndOfLineCode.add(ResourceHandler.getString("EOL_Mac")); //$NON-NLS-1$
+ fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_Mac")); //$NON-NLS-1$
fEOLCodes.add(CommonEncodingPreferenceNames.CR);
- fEndOfLineCode.add(ResourceHandler.getString("EOL_Windows")); //$NON-NLS-1$
+ fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_Windows")); //$NON-NLS-1$
fEOLCodes.add(CommonEncodingPreferenceNames.CRLF);
- fEndOfLineCode.add(ResourceHandler.getString("EOL_NoTranslation")); //$NON-NLS-1$
+ fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_NoTranslation")); //$NON-NLS-1$
fEOLCodes.add(CommonEncodingPreferenceNames.NO_TRANSLATION);
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java
index 25689e1503..f2c303599a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.preferences;
-
-
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
@@ -30,15 +28,13 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.ui.EditorPlugin;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage;
-import org.eclipse.wst.xml.core.XMLModelPlugin;
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
-
public class XMLSourcePreferencePage extends AbstractPreferencePage implements ModifyListener, SelectionListener, IWorkbenchPreferencePage {
// Content Assist
protected Button fAutoPropose;
@@ -68,52 +64,52 @@ public class XMLSourcePreferencePage extends AbstractPreferencePage implements M
protected void createContentsForContentAssistGroup(Composite parent) {
Group contentAssistGroup = createGroup(parent, 2);
- contentAssistGroup.setText(ResourceHandler.getString("Content_assist_UI_")); //$NON-NLS-1$ = "Content assist"
+ contentAssistGroup.setText(SSEUIPlugin.getResourceString("%Content_assist_UI_")); //$NON-NLS-1$ = "Content assist"
- fAutoPropose = createCheckBox(contentAssistGroup, ResourceHandler.getString("Automatically_make_suggest_UI_")); //$NON-NLS-1$ = "Automatically make suggestions"
+ fAutoPropose = createCheckBox(contentAssistGroup, SSEUIPlugin.getResourceString("%Automatically_make_suggest_UI_")); //$NON-NLS-1$ = "Automatically make suggestions"
((GridData) fAutoPropose.getLayoutData()).horizontalSpan = 2;
fAutoPropose.addSelectionListener(this);
- fAutoProposeLabel = createLabel(contentAssistGroup, ResourceHandler.getString("Prompt_when_these_characte_UI_")); //$NON-NLS-1$ = "Prompt when these characters are inserted:"
+ fAutoProposeLabel = createLabel(contentAssistGroup, SSEUIPlugin.getResourceString("%Prompt_when_these_characte_UI_")); //$NON-NLS-1$ = "Prompt when these characters are inserted:"
fAutoProposeText = createTextField(contentAssistGroup);
}
protected void createContentsForFormattingGroup(Composite parent) {
Group formattingGroup = createGroup(parent, 2);
- formattingGroup.setText(ResourceHandler.getString("Formatting_UI_")); //$NON-NLS-1$ = "Formatting"
+ formattingGroup.setText(SSEUIPlugin.getResourceString("%Formatting_UI_")); //$NON-NLS-1$ = "Formatting"
- fLineWidthLabel = createLabel(formattingGroup, ResourceHandler.getString("Line_width__UI_")); //$NON-NLS-1$ = "Line width:"
+ fLineWidthLabel = createLabel(formattingGroup, SSEUIPlugin.getResourceString("%Line_width__UI_")); //$NON-NLS-1$ = "Line width:"
fLineWidthText = new Text(formattingGroup, SWT.SINGLE | SWT.BORDER);
GridData gData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.BEGINNING);
gData.widthHint = 25;
fLineWidthText.setLayoutData(gData);
fLineWidthText.addModifyListener(this);
- fSplitMultiAttrs = createCheckBox(formattingGroup, ResourceHandler.getString("Split_&multiple_attributes_2")); //$NON-NLS-1$
+ fSplitMultiAttrs = createCheckBox(formattingGroup, SSEUIPlugin.getResourceString("%Split_&multiple_attributes_2")); //$NON-NLS-1$
((GridData) fSplitMultiAttrs.getLayoutData()).horizontalSpan = 2;
- fIndentUsingTabs = createCheckBox(formattingGroup, ResourceHandler.getString("&Indent_using_tabs_3")); //$NON-NLS-1$
+ fIndentUsingTabs = createCheckBox(formattingGroup, SSEUIPlugin.getResourceString("%&Indent_using_tabs_3")); //$NON-NLS-1$
((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
- fClearAllBlankLines = createCheckBox(formattingGroup, ResourceHandler.getString("Clear_all_blank_lines_UI_")); //$NON-NLS-1$ = "Clear all blank lines"
+ fClearAllBlankLines = createCheckBox(formattingGroup, SSEUIPlugin.getResourceString("%Clear_all_blank_lines_UI_")); //$NON-NLS-1$ = "Clear all blank lines"
((GridData) fClearAllBlankLines.getLayoutData()).horizontalSpan = 2;
}
protected void createContentsForGrammarConstraintsGroup(Composite parent) {
Group grammarConstraintsGroup = createGroup(parent, 1);
- grammarConstraintsGroup.setText(ResourceHandler.getString("Grammar_Constraints")); //$NON-NLS-1$
+ grammarConstraintsGroup.setText(SSEUIPlugin.getResourceString("%Grammar_Constraints")); //$NON-NLS-1$
grammarConstraintsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
- fUseInferredGrammar = createCheckBox(grammarConstraintsGroup, ResourceHandler.getString("Use_inferred_grammar_in_absence_of_DTD/Schema")); //$NON-NLS-1$
+ fUseInferredGrammar = createCheckBox(grammarConstraintsGroup, SSEUIPlugin.getResourceString("%Use_inferred_grammar_in_absence_of_DTD/Schema")); //$NON-NLS-1$
}
protected IPreferenceStore doGetPreferenceStore() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
protected void doSavePreferenceStore() {
- EditorPlugin.getDefault().savePluginPreferences(); // editor
- XMLModelPlugin.getDefault().savePluginPreferences(); // model
+ SSEUIPlugin.getDefault().savePluginPreferences(); // editor
+ XMLCorePlugin.getDefault().savePluginPreferences(); // model
}
protected void enableValues() {
@@ -137,7 +133,7 @@ public class XMLSourcePreferencePage extends AbstractPreferencePage implements M
}
protected Preferences getModelPreferences() {
- return XMLModelPlugin.getDefault().getPluginPreferences();
+ return XMLCorePlugin.getDefault().getPluginPreferences();
}
protected void initializeValues() {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java
index a013239ccb..790efc3924 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepAdapterForXML.java
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.reconcile;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -36,9 +35,9 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.ui.IReleasable;
import org.eclipse.wst.sse.ui.StructuredTextReconciler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.reconcile.IReconcileAnnotationKey;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.core.document.XMLAttr;
import org.eclipse.wst.xml.core.document.XMLElement;
import org.eclipse.wst.xml.core.document.XMLNode;
@@ -53,7 +52,6 @@ import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-
public class ReconcileStepAdapterForXML extends AbstractReconcileStepAdapter implements CMDocumentCacheListener, IReleasable {
/**
@@ -558,9 +556,8 @@ public class ReconcileStepAdapterForXML extends AbstractReconcileStepAdapter imp
if (!found) {
int start = attr.getValueRegionStartOffset();
int length = attr.getValueRegion().getTextLength();
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("Invalid_value_{0}")); //$NON-NLS-1$
Object[] args = {currentValue.trim()};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%Invalid_value_{0}", args);
Position p = new Position(start, length);
IReconcileAnnotationKey key = createKey(elementNode.getFirstStructuredDocumentRegion(), IReconcileAnnotationKey.PARTIAL);
results.add(new TemporaryAnnotation(p, SEVERITY_UNKNOWN_ATTR, message, key));
@@ -568,9 +565,8 @@ public class ReconcileStepAdapterForXML extends AbstractReconcileStepAdapter imp
// remove from known required attribute list
reqAttrList.remove(attrDecl);
} else {
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("Unknown_attribute_{0}")); //$NON-NLS-1$
Object[] args = {attr.getName()};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%Unknown_attribute_{0}", args);
int start = attr.getNameRegionStartOffset();
int length = attr.getNameRegion().getTextLength();
Position p = new Position(start, length);
@@ -597,9 +593,8 @@ public class ReconcileStepAdapterForXML extends AbstractReconcileStepAdapter imp
start = (element.getFirstStructuredDocumentRegion() != null) ? element.getFirstStructuredDocumentRegion().getStartOffset() : element.getStartOffset();
length = (element.getFirstStructuredDocumentRegion() != null) ? element.getFirstStructuredDocumentRegion().getLength() : 1;
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("Missing_required_attribute_{0}")); //$NON-NLS-1$
Object[] args = {attr.getAttrName()};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%Missing_required_attribute_{0}", args);
Position p = new Position(start, length);
IReconcileAnnotationKey key = createKey(elementNode.getFirstStructuredDocumentRegion(), IReconcileAnnotationKey.PARTIAL);
@@ -635,9 +630,8 @@ public class ReconcileStepAdapterForXML extends AbstractReconcileStepAdapter imp
start = element.getStartStructuredDocumentRegion().getStartOffset(name);
length = name.getTextLength();
}
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("Unknown_element_{0}")); //$NON-NLS-1$
Object[] args = {element.getNodeName()};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%Unknown_element_{0}", args);
Position p = new Position(start, length);
IReconcileAnnotationKey key = createKey(elementNode.getFirstStructuredDocumentRegion(), IReconcileAnnotationKey.PARTIAL);
TemporaryAnnotation annotation = new TemporaryAnnotation(p, SEVERITY_UNKNOWN_ELEMENT, message, key, ProblemIDsXML.UnknownElement);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
index 6ae05bad79..38d96cf26a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.reconcile;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
@@ -26,10 +25,10 @@ import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.ui.StructuredTextReconciler;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.reconcile.IReconcileAnnotationKey;
import org.eclipse.wst.sse.ui.internal.reconcile.StructuredReconcileStep;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.core.document.XMLModel;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
@@ -37,7 +36,6 @@ import org.eclipse.wst.xml.ui.internal.Logger;
import org.eclipse.wst.xml.ui.internal.correction.ProblemIDsXML;
import org.w3c.dom.Node;
-
/**
* Basic XML syntax checking step.
*
@@ -89,7 +87,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
// create one error for all attributes in the end tag
if (errorCount > 0) {
Position p = new Position(start, end - start);
- String message = ResourceHandler.getString("End_tag_has_attributes"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%End_tag_has_attributes"); //$NON-NLS-1$
results.add(new TemporaryAnnotation(p, SEVERITY_GENERIC_ILLFORMED_SYNTAX, message, createKey(structuredDocumentRegion, getScope()), ProblemIDsXML.AttrsInEndTag));
}
}
@@ -110,7 +108,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
}
if (!closed) {
- String message = ResourceHandler.getString("ReconcileStepForMarkup.6"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.6"); //$NON-NLS-1$
int start = structuredDocumentRegion.getStartOffset();
int length = structuredDocumentRegion.getText().trim().length();
@@ -128,7 +126,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
if (regions.size() == 2) {
// missing name region
if (regions.get(0).getType() == XMLRegionContext.XML_TAG_OPEN && regions.get(1).getType() == XMLRegionContext.XML_TAG_CLOSE) {
- String message = ResourceHandler.getString("ReconcileStepForMarkup.3"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.3"); //$NON-NLS-1$
int start = structuredDocumentRegion.getStartOffset();
int length = structuredDocumentRegion.getLength();
Position p = new Position(start, length);
@@ -156,9 +154,8 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
if (attrState == 2 && i >= 2) {
// create annotation
ITextRegion nameRegion = textRegions.get(i - 2);
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("Attribute_{0}_is_missing_a_value")); //$NON-NLS-1$
Object[] args = {structuredDocumentRegion.getText(nameRegion)};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%Attribute_{0}_is_missing_a_value", args);
int start = structuredDocumentRegion.getStartOffset(nameRegion);
int end = structuredDocumentRegion.getTextEndOffset(nameRegion);
Position p = new Position(start, end - start);
@@ -177,9 +174,8 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
else if (attrState == 1 && i >= 1) {
// create annotation
ITextRegion previousRegion = textRegions.get(i - 1);
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("Attribute_{0}_has_no_value")); //$NON-NLS-1$
Object[] args = {structuredDocumentRegion.getText(previousRegion)};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%Attribute_{0}_has_no_value", args);
int start = structuredDocumentRegion.getStartOffset(previousRegion);
int end = structuredDocumentRegion.getTextEndOffset(previousRegion);
Position p = new Position(start, end - start);
@@ -209,7 +205,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
// this is possibly the case of "< tag"
if (prev.getRegions().size() == 1 && isStartTag(prev)) {
// add the error for preceding space in tag name
- String message = ResourceHandler.getString("ReconcileStepForMarkup.2"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.2"); //$NON-NLS-1$
int start = structuredDocumentRegion.getStartOffset();
// find length of whitespace
int length = sdRegionText.trim().equals("") ? sdRegionText.length() : sdRegionText.indexOf(sdRegionText.trim()); //$NON-NLS-1$
@@ -235,7 +231,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
String piText = structuredDocumentRegion.getText(r);
int index = piText.indexOf(":"); //$NON-NLS-1$
if (index != -1) {
- String message = ResourceHandler.getString("ReconcileStepForMarkup.4"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.4"); //$NON-NLS-1$
int start = structuredDocumentRegion.getStartOffset(r) + index;
int length = piText.trim().length() - index;
Position p = new Position(start, length);
@@ -286,19 +282,19 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
if (size == 1) {
if (one.equals(DQUOTE) || one.equals(SQUOTE)) {
// missing closing quote
- String message = ResourceHandler.getString("ReconcileStepForMarkup.0"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.0"); //$NON-NLS-1$
addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.Unclassified, structuredDocumentRegion, results);
errorCount++;
} else {
// missing both
- String message = ResourceHandler.getString("ReconcileStepForMarkup.1"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.1"); //$NON-NLS-1$
addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.AttrValueNotQuoted, structuredDocumentRegion, results);
errorCount++;
}
} else if (size == 2) {
if (one.equals(SQUOTE) && !two.equals(SQUOTE) || one.equals(DQUOTE) && !two.equals(DQUOTE)) {
// missing closing quote
- String message = ResourceHandler.getString("ReconcileStepForMarkup.0"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.0"); //$NON-NLS-1$
addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.Unclassified, structuredDocumentRegion, results);
errorCount++;
}
@@ -333,9 +329,8 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
}
if (!selfClosed && tagName != null) {
- MessageFormat messageFormat = new MessageFormat(ResourceHandler.getString("Missing_end_tag_{0}")); //$NON-NLS-1$
Object[] args = {tagName};
- String message = messageFormat.format(args);
+ String message = SSEUIPlugin.getResourceString("%Missing_end_tag_{0}", args);
int start = sdRegion.getStart();
Position p = new Position(start, length);
@@ -371,7 +366,7 @@ public class ReconcileStepForMarkup extends StructuredReconcileStep {
if (prev != null) {
String prevText = prev.getFullText();
if (prev.getType() == XMLRegionContext.XML_CONTENT && prevText.endsWith(" ")) { //$NON-NLS-1$
- String message = ResourceHandler.getString("ReconcileStepForMarkup.5"); //$NON-NLS-1$
+ String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.5"); //$NON-NLS-1$
int start = prev.getStartOffset();
int length = prev.getLength();
Position p = new Position(start, length);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java
index 104efc6f70..fee44961da 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/registry/AdapterFactoryProviderForXML.java
@@ -23,7 +23,7 @@ import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.PropagatingAdapter;
import org.eclipse.wst.sse.core.modelhandler.IDocumentTypeHandler;
import org.eclipse.wst.sse.core.util.Assert;
-import org.eclipse.wst.sse.ui.EditorPlugin;
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.CommonEditorPreferenceNames;
import org.eclipse.wst.sse.ui.preferences.PreferenceKeyGenerator;
import org.eclipse.wst.sse.ui.registry.AdapterFactoryProvider;
@@ -37,7 +37,6 @@ import org.eclipse.wst.xml.ui.reconcile.ReconcilerAdapterFactoryForXML;
import org.eclipse.wst.xml.ui.views.contentoutline.JFaceNodeAdapterFactory;
import org.eclipse.wst.xml.ui.views.properties.XMLPropertySourceAdapterFactory;
-
/**
*
*/
@@ -92,7 +91,7 @@ public class AdapterFactoryProviderForXML implements AdapterFactoryProvider {
if (modelQuery != null) {
CMDocumentManager documentManager = modelQuery.getCMDocumentManager();
if (documentManager != null) {
- IPreferenceStore store = EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
boolean useInferredGrammar = (store != null) ? store.getBoolean(PreferenceKeyGenerator.generateKey(CommonEditorPreferenceNames.EDITOR_USE_INFERRED_GRAMMAR, IContentTypeIdentifier.ContentTypeID_SSEXML)) : true;
documentManager.setPropertyEnabled(CMDocumentManager.PROPERTY_ASYNC_LOAD, true);
@@ -117,7 +116,7 @@ public class AdapterFactoryProviderForXML implements AdapterFactoryProvider {
// creating this factory
// to improve performance...
String contentTypeId = IContentTypeIdentifier.ContentTypeID_SSEXML;
- IPreferenceStore store =EditorPlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = SSEUIPlugin.getDefault().getPreferenceStore();
if (store.getString(PreferenceKeyGenerator.generateKey(CommonEditorPreferenceNames.EDITOR_VALIDATION_METHOD, contentTypeId)).equals(CommonEditorPreferenceNames.EDITOR_VALIDATION_CONTENT_MODEL)) {
factory = new ReconcilerAdapterFactoryForXML();
propagatingAdapter.addAdaptOnCreateFactory(factory);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/style/LineStyleProviderForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/style/LineStyleProviderForXML.java
index 96c2b15f64..036bf93e90 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/style/LineStyleProviderForXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/style/LineStyleProviderForXML.java
@@ -17,13 +17,12 @@ import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.wst.common.encoding.content.IContentTypeIdentifier;
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;
import org.eclipse.wst.xml.core.parser.XMLRegionContext;
-
public class LineStyleProviderForXML extends AbstractLineStyleProvider implements LineStyleProvider {
public LineStyleProviderForXML() {
super();
@@ -99,7 +98,7 @@ public class LineStyleProviderForXML extends AbstractLineStyleProvider implement
}
protected IPreferenceStore getColorPreferences() {
- return EditorPlugin.getDefault().getPreferenceStore();
+ return SSEUIPlugin.getDefault().getPreferenceStore();
}
protected String getPreferenceKey(String key) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
index 47331d0b50..d450fe07e1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.taginfo;
-
-
import org.eclipse.wst.common.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.common.contentmodel.CMDataType;
import org.eclipse.wst.common.contentmodel.CMDocumentation;
@@ -21,8 +19,7 @@ import org.eclipse.wst.common.contentmodel.CMElementDeclaration;
import org.eclipse.wst.common.contentmodel.CMNode;
import org.eclipse.wst.common.contentmodel.CMNodeList;
import org.eclipse.wst.common.contentmodel.util.CMDescriptionBuilder;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
/**
* Provides basic tag information such as element/attribute name, data type,
@@ -73,13 +70,13 @@ public class MarkupTagInfoProvider {
protected void printDataTypeInfo(StringBuffer sb, CMDataType dataType) {
String dataTypeName = dataType.getNodeName();
if ((dataTypeName != null) && (dataTypeName.length() > 0)) {
- sb.append(PARAGRAPH_START + BOLD_START + ResourceHandler.getString("Data_Type____4") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Data_Type____4") + SPACE + BOLD_END); //$NON-NLS-1$
sb.append(dataTypeName);
sb.append(PARAGRAPH_END);
}
String[] enumeratedValue = dataType.getEnumeratedValues();
if (enumeratedValue != null && enumeratedValue.length > 0) {
- sb.append(PARAGRAPH_START + BOLD_START + ResourceHandler.getString("Enumerated_Values____5") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Enumerated_Values____5") + SPACE + BOLD_END); //$NON-NLS-1$
sb.append(LIST_BEGIN);
for (int i = 0; i < enumeratedValue.length; i++) {
sb.append(LIST_ELEMENT + enumeratedValue[i]);
@@ -98,7 +95,7 @@ public class MarkupTagInfoProvider {
if (node.getNodeType() == CMNode.ELEMENT_DECLARATION) {
CMElementDeclaration ed = (CMElementDeclaration) node;
- sb.append(PARAGRAPH_START + BOLD_START + ResourceHandler.getString("Element____1") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Element____1") + SPACE + BOLD_END); //$NON-NLS-1$
sb.append(node.getNodeName());
sb.append(PARAGRAPH_END);
if (ed.getContentType() == CMElementDeclaration.PCDATA) {
@@ -110,14 +107,14 @@ public class MarkupTagInfoProvider {
CMDescriptionBuilder builder = new CMDescriptionBuilder();
String description = builder.buildDescription(node);
if ((description != null) && (description.length() > 0)) {
- sb.append(PARAGRAPH_START + BOLD_START + ResourceHandler.getString("Content_Model____2") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Content_Model____2") + SPACE + BOLD_END); //$NON-NLS-1$
sb.append(description + PARAGRAPH_END);
}
}
printDocumentation(sb, node);
} else if (node.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
CMAttributeDeclaration ad = (CMAttributeDeclaration) node;
- sb.append(PARAGRAPH_START + BOLD_START + ResourceHandler.getString("Attribute____3") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Attribute____3") + SPACE + BOLD_END); //$NON-NLS-1$
sb.append(node.getNodeName());
sb.append(PARAGRAPH_END);
CMDataType dataType = ad.getAttrType();
@@ -126,7 +123,7 @@ public class MarkupTagInfoProvider {
}
printDocumentation(sb, node);
} else if (node.getNodeType() == CMNode.DATA_TYPE) {
- sb.append(PARAGRAPH_START + BOLD_START + ResourceHandler.getString("Data_Type____4") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Data_Type____4") + SPACE + BOLD_END); //$NON-NLS-1$
sb.append(node.getNodeName());
sb.append(PARAGRAPH_END);
printDocumentation(sb, node);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXML.java
index 2174956774..03fe461c1e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXML.java
@@ -14,8 +14,7 @@ package org.eclipse.wst.xml.ui.templates;
import org.eclipse.jface.text.templates.GlobalTemplateVariables;
import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
-
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
/**
* Base class for XML template context types. Templates of this context type
@@ -35,7 +34,7 @@ public class TemplateContextTypeXML extends TemplateContextType {
}
public TemplateContextTypeXML() {
- this(generateContextTypeId(TemplateContextTypeIds.ALL), ResourceHandler.getString("TemplateContextTypeXML.0")); //$NON-NLS-1$
+ this(generateContextTypeId(TemplateContextTypeIds.ALL), XMLUIPlugin.getResourceString("%TemplateContextTypeXML.0")); //$NON-NLS-1$
}
/**
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttribute.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttribute.java
index faf4b6ef83..c82c1963b5 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttribute.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttribute.java
@@ -12,7 +12,7 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.templates;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
/**
* Templates of this context type apply to any attributes within XML content
@@ -21,6 +21,6 @@ import org.eclipse.wst.xml.ui.nls.ResourceHandler;
public class TemplateContextTypeXMLAttribute extends TemplateContextTypeXML {
public TemplateContextTypeXMLAttribute() {
- super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTE), ResourceHandler.getString("TemplateContextTypeXMLAttribute.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTE), XMLUIPlugin.getResourceString("%TemplateContextTypeXMLAttribute.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttributeValue.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttributeValue.java
index 05d0708358..faed70f0b9 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttributeValue.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLAttributeValue.java
@@ -12,7 +12,7 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.templates;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
/**
* Templates of this context type apply to any attribute values within XML
@@ -21,6 +21,6 @@ import org.eclipse.wst.xml.ui.nls.ResourceHandler;
public class TemplateContextTypeXMLAttributeValue extends TemplateContextTypeXML {
public TemplateContextTypeXMLAttributeValue() {
- super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTEVALUE), ResourceHandler.getString("TemplateContextTypeXMLAttributeValue.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.ATTRIBUTEVALUE), XMLUIPlugin.getResourceString("%TemplateContextTypeXMLAttributeValue.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLTag.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLTag.java
index 4f6dbb9698..b4c77545ec 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLTag.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/templates/TemplateContextTypeXMLTag.java
@@ -12,7 +12,7 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.templates;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
/**
* Templates of this context type apply to any tags within XML content type.
@@ -20,6 +20,6 @@ import org.eclipse.wst.xml.ui.nls.ResourceHandler;
public class TemplateContextTypeXMLTag extends TemplateContextTypeXML {
public TemplateContextTypeXMLTag() {
- super(generateContextTypeId(TemplateContextTypeIds.TAG), ResourceHandler.getString("TemplateContextTypeXMLTag.0")); //$NON-NLS-1$
+ super(generateContextTypeId(TemplateContextTypeIds.TAG), XMLUIPlugin.getResourceString("%TemplateContextTypeXMLTag.0")); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/util/XMLCommonResources.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/util/XMLCommonResources.java
index 3a4982c3b5..9bcad9b90a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/util/XMLCommonResources.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/util/XMLCommonResources.java
@@ -10,11 +10,8 @@
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
-
-
package org.eclipse.wst.xml.ui.util;
-
import java.text.MessageFormat;
import java.util.ResourceBundle;
@@ -24,8 +21,9 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.views.markers.internal.ImageFactory;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
-
-
+/**
+ * @deprecated use XMLUIPlugin.getResourceString() instead
+ */
/**
* This class exists temporarily until the properties files can be
* re-organized and the various resource references can be updated
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java
index b98a918459..ff3eeaf1bc 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/JFaceNodeAdapter.java
@@ -35,12 +35,11 @@ import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.ui.views.contentoutline.BufferedOutlineUpdater;
import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapter;
import org.eclipse.wst.sse.ui.views.contentoutline.IJFaceNodeAdapterFactory;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
import org.w3c.dom.Node;
-
/**
* Adapts a DOM node to a JFace viewer.
*/
@@ -336,7 +335,7 @@ public class JFaceNodeAdapter implements IJFaceNodeAdapter {
* &&
* !propertySheetPage.getControl().isDisposed()
*/) {
- RefreshPropertySheetJob refreshPropertySheetJob = new RefreshPropertySheetJob(getDisplay(), ResourceHandler.getString("JFaceNodeAdapter.1"), propertySheetPage); //$NON-NLS-1$
+ RefreshPropertySheetJob refreshPropertySheetJob = new RefreshPropertySheetJob(getDisplay(), XMLUIPlugin.getResourceString("%JFaceNodeAdapter.1"), propertySheetPage); //$NON-NLS-1$
refreshPropertySheetJob.schedule();
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java
index 30b8b2d6e3..c707663cbb 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySourceAdapter.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.views.properties;
-
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -38,7 +36,7 @@ import org.eclipse.wst.xml.core.document.DocumentTypeAdapter;
import org.eclipse.wst.xml.core.document.XMLNode;
import org.eclipse.wst.xml.core.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.nls.ResourceHandler;
+import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
@@ -46,14 +44,13 @@ import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-
/**
* An IPropertySource implementation for a JFace viewer used to display
* properties of DOM nodes. Requires an adapter factory to create JFace
* adapters for the nodes in the tree.
*/
public class XMLPropertySourceAdapter implements INodeAdapter, IPropertySource, IPropertySourceExtension {
- protected final static String CATEGORY_ATTRIBUTES = ResourceHandler.getString("XMLPropertySourceAdapter.0"); //$NON-NLS-1$
+ protected final static String CATEGORY_ATTRIBUTES = XMLUIPlugin.getResourceString("%XMLPropertySourceAdapter.0"); //$NON-NLS-1$
private static final boolean fSetExpertFilter = false;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
index 9f436f4673..6d2eeb189e 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDEditor.java
@@ -47,8 +47,7 @@ import org.eclipse.wst.sse.core.INodeAdapter;
import org.eclipse.wst.sse.core.INodeNotifier;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.core.internal.nls.ResourceHandler;
-import org.eclipse.wst.sse.core.internal.undo.StructuredTextUndoManager;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.core.undo.IStructuredTextUndoManager;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.eclipse.wst.xml.core.document.XMLModel;
@@ -140,7 +139,7 @@ public class XSDEditor extends XSDMultiPageEditorPart implements ITabbedProperty
}
catch (PartInitException exception)
{
- throw new SourceEditingRuntimeException(ResourceHandler.getString("An_error_has_occurred_when1_ERROR_")); //$NON-NLS-1$ = "An error has occurred when initializing the input for the the editor's source page."
+ throw new SourceEditingRuntimeException(SSECorePlugin.getResourceString("An_error_has_occurred_when1_ERROR_")); //$NON-NLS-1$ = "An error has occurred when initializing the input for the the editor's source page."
}
}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMultiPageEditorPart.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMultiPageEditorPart.java
index b11e09a305..0673533945 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMultiPageEditorPart.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDMultiPageEditorPart.java
@@ -48,8 +48,8 @@ import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.xml.core.XMLPreferenceNames;
import org.eclipse.wst.xml.ui.StructuredTextEditorXML;
import org.w3c.dom.Document;
@@ -175,7 +175,7 @@ public class XSDMultiPageEditorPart extends MultiPageEditorPart implements IProp
// dispose editor
dispose();
- throw new SourceEditingRuntimeException(ResourceHandler.getString("An_error_has_occurred_when1_ERROR_")); //$NON-NLS-1$
+ throw new SourceEditingRuntimeException(SSECorePlugin.getResourceString("An_error_has_occurred_when1_ERROR_")); //$NON-NLS-1$
}
}
@@ -322,11 +322,11 @@ public class XSDMultiPageEditorPart extends MultiPageEditorPart implements IProp
// very unlikely
// Logger.logException(ce);
}
- throw new PartInitException(ResourceHandler.getString("23concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
+ throw new PartInitException(SSECorePlugin.getResourceString("23concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
//$NON-NLS-1$ = "Resource {0} does not exist."
}
else {
- throw new PartInitException(ResourceHandler.getString("32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
+ throw new PartInitException(SSECorePlugin.getResourceString("32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
//$NON-NLS-1$ = "Editor could not be open on {0}"
}
}
@@ -339,7 +339,7 @@ public class XSDMultiPageEditorPart extends MultiPageEditorPart implements IProp
catch (CoreException noStorageExc) {
}
if (contents == null) {
- throw new PartInitException(ResourceHandler.getString("32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
+ throw new PartInitException(SSECorePlugin.getResourceString("32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
}
else {
try {
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
index 0c6773f4d6..7b7931e34a 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java
@@ -30,10 +30,10 @@ import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery;
+import org.eclipse.wst.sse.core.internal.SSECorePlugin;
import org.eclipse.wst.sse.ui.StructuredTextViewer;
import org.eclipse.wst.sse.ui.edit.util.StructuredTextEditorActionConstants;
import org.eclipse.wst.sse.ui.internal.openon.OpenOnAction;
-import org.eclipse.wst.sse.ui.nls.ResourceHandler;
import org.eclipse.wst.sse.ui.view.events.INodeSelectionListener;
import org.eclipse.wst.sse.ui.view.events.NodeSelectionChangedEvent;
import org.eclipse.wst.xml.core.document.XMLModel;
@@ -366,7 +366,7 @@ public class XSDTextEditor extends StructuredTextEditorXML implements INodeSelec
{
super.createActions();
addOpenOnSelectionListener();
- ResourceBundle resourceBundle = ResourceHandler.getResourceBundle(); //ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME);
+ ResourceBundle resourceBundle = SSECorePlugin.getDefault().getResourceBundle(); //ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME);
wrappedAction = new WrappedOpenFileAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE + DOT, this);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE, wrappedAction);

Back to the top