diff options
Diffstat (limited to 'bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui')
45 files changed, 855 insertions, 353 deletions
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/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties new file mode 100644 index 0000000000..3531e3fc02 --- /dev/null +++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties @@ -0,0 +1,592 @@ +############################################################################### +# 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 +# +############################################################################### +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 +Source__UI_=Source: +The_maximum_width_must_be__UI_=The maximum width must be an integer +Only_whitespace_characters_UI_=Only whitespace characters are allowed in the indentation +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_=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 +CDATA_UI_=CDATA +Begin/End_Processing_Instr_UI_=Begin/End Processing Instruction +Processing_Instruction_Con_UI_=Processing Instruction Content +Start/End_Markup_UI_=Start/End Markup +Names_UI_=Names +## on the following line solely translate: Begin +Begin_DOCTYPE_UI_=Begin DOCTYPE +## on the following line solely translate: keyword +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_=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_=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 +Source_UI_=Source +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 +Double_Quotes_UI_=Double Quotes +Single_Quotes_UI_=Single Quotes +ContentAssistProposals.label=Con&tent Assist +ContentAssistProposals.tooltip=Content Assist +ContentAssistProposals.image= +ContentAssistProposals.description=Content Assist +QuickFix.label=&Quick Fix +QuickFix.tooltip=Quick Fix +QuickFix.image= +QuickFix.description=Quick Fix +Comment.label=Co&mment +Comment.tooltip=Comment +Comment.image= +Comment.description=Comment +Uncomment.label=&Uncomment +Uncomment.tooltip=Uncomment +Uncomment.image= +Uncomment.description=Uncomment +ToggleComment.label=Togg&le Comment +ToggleComment.tooltip=Toggle Comment +ToggleComment.image= +ToggleComment.description=Toggle Comment +AddBlockComment.label=Add &Block Comment +AddBlockComment.tooltip=Add Block Comment +AddBlockComment.image= +AddBlockComment.description=Add Block Comment +RemoveBlockComment.label=Remove Bloc&k Comment +RemoveBlockComment.tooltip=Remove Block Comment +RemoveBlockComment.image= +RemoveBlockComment.description=Remove Block Comment +CleanupDocument.label=C&leanup Document... +CleanupDocument.tooltip=Cleanup Document +CleanupDocument.image= +CleanupDocument.description=Cleanup Document +FormatDocument.label=&Document +FormatDocument.tooltip=Format Document +FormatDocument.image= +FormatDocument.description=Format Document +FormatActiveElements.label=Act&ive Elements +FormatActiveElements.tooltip=Format Active Elements +FormatActiveElements.image= +FormatActiveElements.description=Format Active Elements +OpenFileFromSource.label=Op&en Selection +OpenFileFromSource.tooltip=Open an editor on the selected link +OpenFileFromSource.image= +OpenFileFromSource.description=Open an editor on the selected link +ShowTooltipDesc.label=Show &Tooltip Description +ShowTooltipDesc.tooltip=Displays the hover help for the selected element +ShowTooltipDesc.image= +ShowTooltipDesc.description=Displays the hover help for the selected element +StructureSelectEnclosing.label=&Enclosing Element +StructureSelectEnclosing.tooltip=Expand selection to include enclosing element +StructureSelectEnclosing.description=Expand selection to include enclosing element +StructureSelectNext.label=&Next Element +StructureSelectNext.tooltip=Expand selection to include next sibling +StructureSelectNext.description=Expand selection to include next sibling +StructureSelectPrevious.label=&Previous Element +StructureSelectPrevious.tooltip=Expand selection to include previous sibling +StructureSelectPrevious.description=Expand selection to include previous sibling +StructureSelectHistory.label=&Restore Last Selection +StructureSelectHistory.tooltip=Restore last selection +StructureSelectHistory.description=Restore last selection +Save.label=&Save +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... +Save_could_not_be_complete_UI_=Save could not be completed. +2concat=Macro name \"{0}\" is already in use +3concat=Close with \"{0}\" +5concat=Close with \"></{0}>\" +8concat=<{0}> has no known child tags +27concat=No known child tag names of <{0}> begin with \"{1}\" +28concat=<{0}> has no known child tags +15concat=End with {0}> +17concat=End with \"</{0}>\" +18concat=The document element <{0}> is already present. +29concat=No definition was found for element <{0}> in {1} +20concat=No definition was found for element <{0}> +24concat=No content model found for {0}. +25concat=Element <{0}> is unknown. +30concat=<{0}> has no known child tags. +31concat=Element <{0}> is unknown. +11concat=No known child tag names of <{0}> begin with \"{1}\". +14concat=<{0}> has no known child tags. +9concat=Close with {0} +6concat=comment {0} +Capitalization_style_of_pr_UI_=Capitalization style of proposals: +CSS_Cleanup_UI_=CSS Cleanup +Cleanup_UI_=Cleanup +Identifier_case__UI_=Identifier case: +Property_name_case__UI_=Property name case: +model_did_not_existing_dur_UI_=model did not existing during reload request in FileModelProvider +new_File_was_null_after_mo_UI_=new File was null after move ... should be impossible +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_=The line width must be an integer +Incorrect_call_UI_=Incorrect call +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: +System_reference__UI_=System reference: +All_UI_=All +Tag_UI_=Tag +Attribute_UI_=Attribute +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_={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_during_save_UI_=Error during save +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 +4concat=''{0}'' is not a valid input +## The following strings are for "XML->XML Source" Preferences and "Web Tools->Source" Preferences +Formatting_UI_=Formatting +Line_width__UI_=Line &width: +Clear_all_blank_lines_UI_=Clear all &blank lines +Source_page_UI_=Source page +Show_line_numbers_UI_=Show line &numbers +Show_overview_ruler_UI_=Show o&verview ruler +Tab_width__UI_=&Tab width: +Content_assist_UI_=Content assist +Automatically_make_suggest_UI_=Automatically ma&ke suggestions +Prompt_when_these_characte_UI_=P&rompt when these characters are inserted: +Preferred_markup_case_UI_=Preferred markup case for content assist, and code generation +Tag_names__UI_=Tag names: +Tag_names_Upper_case_UI_=&Uppercase +Tag_names_Lower_case_UI_=&Lowercase +Attribute_names__UI_=Attribute names: +Attribute_names_Upper_case_UI_=U&ppercase +Attribute_names_Lower_case_UI_=L&owercase +## The following strings are for "XML->XML Source->Macros" Preferences and "Web Tools->Source->Macros" Preferences +New..._UI_=Ne&w... +Copy..._UI_=&Copy... +Rename..._UI_=&Rename... +Remove_UI_=Re&move +Enabled_at_Location__UI_=&Enabled at Location: +Content__UI_=Co&ntent: +Set_Cursor_Position_UI_=&Set Cursor Position +Macro_name__UI_=&Macro name: +New_macro_name__UI_=New ¯o name: +## The following strings are for "XML->XML Source->XML Style" Preferences, "Web Tools->Source->HTML Style" Preferences, and "Web Tools->Source->JavaScript Style" Preferences +Content_type__UI_=Co&ntent type: +Foreground_UI_=&Foreground: +Background_UI_=&Background: +Bold_UI_=B&old +Restore_Default_UI_=&Restore Default +Sample_text__UI_=&Sample text: +## The following strings are for the XML/HTML Cleanup dialog +As-is_UI_=As-is +Lower_UI_=Lower +Upper_UI_=Upper +Tag_name_case_for_HTML_UI_=Tag name case for HTML: +Tag_name_case_As-is_UI_=&As-is +Tag_name_case_Lower_UI_=&Lower +Tag_name_case_Upper_UI_=&Upper +Attribute_name_case_for_HTML_UI_=Attribute name case for HTML: +Attribute_name_case_As-is_UI_=A&s-is +Attribute_name_case_Lower_UI_=L&ower +Attribute_name_case_Upper_UI_=U&pper +Compress_empty_element_tags_UI_=&Compress empty element tags +Insert_required_attributes_UI_=Insert &required attributes +Insert_missing_tags_UI_=&Insert missing tags +Quote_attribute_values_UI_=&Quote attribute values +Format_source_UI_=&Format source +Convert_EOL_codes_UI_=Convert line &delimiters to +EOL_Windows_UI=&Windows +EOL_Unix_UI=U&NIX +EOL_Mac_UI=&Mac +CSS_Cleanup_..._UI_=&CSS Cleanup ... +## +AddBreakpoint.label=Add &Breakpoint +AddBreakpoint.tooltip=Add Breakpoint +AddBreakpoint.description=Add Breakpoint +AddBreakpoint.error.dialog.title=Add Breakpoint +AddBreakpoint.error.dialog.message=Cannot add breakpoint +## +ToggleBreakpoint.label=Toggle Breakpoint +ToggleBreakpoint.tooltip=Toggle Breakpoint +ToggleBreakpoint.description=Toggle Breakpoint +## +EnableBreakpoint.label=Enable Breakpoint +EnableBreakpoint.tooltip=Enable Breakpoint +EnableBreakpoint.description=Enable Breakpoint +## +DisableBreakpoint.label=Disable Breakpoint +DisableBreakpoint.tooltip=Disable Breakpoint +DisableBreakpoint.description=Disable Breakpoint +## +ManageBreakpoints.add.label=Add &Breakpoint +ManageBreakpoints.remove.label=Remove Breakpoint +ManageBreakpoints.tooltip=Add/Remove Breakpoint +ManageBreakpoints.error.adding.title1=Add Breakpoint +ManageBreakpoints.error.adding.message1=Cannot add breakpoint +ManageBreakpoints.error.removing.title1=Remove Breakpoint +ManageBreakpoints.error.removing.message1=Cannot remove breakpoint +ManageBreakpoints.error.retrieving.message=Retrieving markers failed: +Hide_Hover_Help_1=Hide Hover Help +Show_Hover_Help_2=Show Hover Help +&Hover_Help_3=&Hover Help +AbstractColorPageDescription=Customize the syntax highlighting by selecting the type of text whose style you want to customize from either the combo box or the sample text area +JSPSourcePreferencePageDescription=Embedded content type\'s source preferences will be used. Select the file type for customization +Creating_or_saving_files=Creating or saving files +End-of-line_code_desc=The following line delimiter will apply: +End-of-line_code=&Line delimiter: +Creating_files=Creating files +Encoding_desc=The following encoding will apply: +Encoding=En&coding: +XMLMacroPageDescription=Create, remove or edit Macros +&Split_lines_1=&Split lines +Split_&multiple_attributes_2=Split &multiple attributes each on a new line +&Indent_using_tabs_3=&Indent using tabs +Bad_attribute_name_1=Bad attribute name +## tag info +Element____1=Element : +Content_Model____2=Content Model : +Attribute____3=Attribute : +Data_Type____4=Data Type : +Enumerated_Values____5=Enumerated Values : +## +Source_Menu_UI=&Source +Highlight_Current_Line=Hi&ghlight current line +Show_Attributes=Show Attributes +Grammar_Constraints=Grammar Constraints +Use_inferred_grammar_in_absence_of_DTD/Schema=Use inferred grammar in absence of DTD/Schema +Text_font=Text font: +C&hange...=C&hange... +NodeName_may_not_have_nested_content={0} may not have nested content +## +Editor.Cut.label=Cu&t@Ctrl+X +Editor.Cut.tooltip=Cut +Editor.Cut.image= +Editor.Cut.description=Cut + +Editor.Copy.label=&Copy@Ctrl+C +Editor.Copy.tooltip=Copy +Editor.Copy.image= +Editor.Copy.description=Copy + +Editor.Paste.label=&Paste@Ctrl+V +Editor.Paste.tooltip=Paste +Editor.Paste.image= +Editor.Paste.description=Paste + +Editor.Delete.label=&Delete@Delete +Editor.Delete.tooltip=Delete +Editor.Delete.image= +Editor.Delete.description=Delete +## These are copied from org.eclipse.ui.texteditor.EditorMessages.properties +## They are needed temporarily until CMVC defect 203158 / Bugzilla defect 20054 is fixed +Editor.ManageBookmarks.tooltip=Adds and Removes Bookmarks +Editor.ManageBookmarks.image= +Editor.ManageBookmarks.description=Adds and removes Bookmarks +Editor.ManageBookmarks.add.label=Add Boo&kmark... +Editor.ManageBookmarks.remove.label=Remove Boo&kmark +Editor.ManageBookmarks.add.dialog.title=Add Bookmark +Editor.ManageBookmarks.add.dialog.message=Enter Bookmark name +Editor.ManageBookmarks.error.dialog.title=Managing Bookmarks +Editor.ManageBookmarks.error.dialog.message=Problems managing bookmarks + +Editor.ManageTasks.tooltip=Adds and Removes Tasks +Editor.ManageTasks.image= +Editor.ManageTasks.description=Adds and removes Tasks +Editor.ManageTasks.add.label=Add &Task... +Editor.ManageTasks.remove.label=Remove &Task +Editor.ManageTasks.add.dialog.title=Add Task +Editor.ManageTasks.add.dialog.message=Enter Task description +Editor.ManageTasks.error.dialog.title=Managing Tasks +Editor.ManageTasks.error.dialog.message=Problems managing tasks + +# web content settings +UI_Description_of_role_of_following_DOCTYPE=Use the following default document type when no DOCTYPE is declared in a file: +UI_Default_HTML_DOCTYPE_ID___1=&Document type: +UI_CSS_profile___2=&CSS profile: +UI_Target_Device___3=&Target device: +UI_none=none +UI_Public_ID=Public ID: +UI_System_ID=System ID: +ERROR_CORE_CSSContentSettingsPropertyPage_is_instantiated_by_choosing_resource_except_any_file_1=CSSContentSettingsPropertyPage is instantiated by choosing resource except any file +ERROR_CORE_index_is_out_of_range_in_applySelectedPropertyValue()_in_class_CSSContentSettingsPropertyPage_2=index is out of range in applySelectedPropertyValue() in class CSSContentSettingsPropertyPage +ERROR_CORE_index_is_out_of_range_in_deleteNoneProperty()_in_class_CSSContentSettingsPropertyPage_3=index is out of range in deleteNoneProperty() in class CSSContentSettingsPropertyPage +ERROR_CORE_the_number_of_items_is_different_in_list_and_Combo__1=the number of items is different in list and Combo +# +ERROR_COREDEV_HTMLContentSettingsPropertyPage_is_instantiated_by_choosing_resource_except_any_file_1=HTMLContentSettingsPropertyPage is instantiated by choosing resource except any file +ERROR_COREDEV_index_is_out_of_range_in_applySelectedPropertyValue()_in_class_HTMLContentSettingsPropertyPage_2=index is out of range in applySelectedPropertyValue() in class HTMLContentSettingsPropertyPage +ERROR_COREDEV_index_is_out_of_range_in_deleteNoneProperty()_in_class_HTMLContentSettingsPropertyPage_3=index is out of range in deleteNoneProperty() in class HTMLContentSettingsPropertyPage +ERROR_COREDEV_ProjectContentSettingsPropertyPage_is_instantiated_by_choosing_resource_except_project_1=ProjectContentSettingsPropertyPage is instantiated by choosing resource except project +ERROR_COREDEV_index_is_out_of_range_in_applySelectedPropertyValue()_in_class_ProjectContentSettingsPropertyPage_2=index is out of range in applySelectedPropertyValue() in class ProjectContentSettingsPropertyPage +ERROR_COREDEV_index_is_out_of_range_in_deleteNoneProperty()_in_class_ProjectContentSettingsPropertyPage_3=index is out of range in deleteNoneProperty() in class ProjectContentSettingsPropertyPage +# jspf,jsf content settings +_UI_Content_Type_Label_=&Content type: +_UI_Language_Label_=&Language: +_UI_Character_Code_Label_=&Encoding: +_UI_IANA_=IANA: +_UI_Error_Msg_Content_Type_=Invalid Content Type +_UI_Error_Msg_Language_=Invalid Language +_UI_Description_J2EE_Project_=The properties for J2EE Web projects act as "project" default to be lookup when no properties are specified for a particular JSP fragment file. +_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". + +# +# +# 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. +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 +Annotation_Presentation=Annotation Presentation: +Show_in_text=Show in &text +Show_in_overview_ruler=Show in overview &ruler +Color=C&olor +Show_hover_help=Show hov&er help +# +Ill-formed_syntax=Ill-formed syntax: +Style_Rule_declares_nothing=Style Rule declares nothing +Style_Declaration_declares_nothing=Style Declaration declares nothing +Attribute_{0}_is_missing_a_value=Attribute \"{0}\" is missing a value +Attribute_{0}_has_no_value=Attribute \"{0}\" has no value +End_tag_has_attributes=End tag has attributes +Invalid_value_{0}=Invalid value \"{0}\" +Unknown_attribute_{0}=Unknown attribute \"{0}\" +Missing_required_attribute_{0}=Missing required attribute \"{0}\" +Unknown_element_{0}=Unknown element \"{0}\" +Missing_end_tag_{0}=Missing end tag \"{0}\" +Missing_start_tag_{0}=Missing start tag \"{0}\" + +# actions +Previous_error=Go to Previous Problem +Next_error=Go to Next Problem +# Annotation Types +AnnotationTypes.Errors=Errors +AnnotationTypes.Warnings=Warnings +AnnotationTypes.Tasks=Tasks +AnnotationTypes.SearchResults=Search Results +AnnotationTypes.Bookmarks=Bookmarks +AnnotationTypes.Others=Others + +Editor.ConvertToWindows.label=&Windows +Editor.ConvertToWindows.tooltip=Converts line delimiters to Windows +Editor.ConvertToWindows.image= +Editor.ConvertToWindows.description=Converts line delimiters to Windows + +Editor.ConvertToUNIX.label=&UNIX +Editor.ConvertToUNIX.tooltip=Converts line delimiters to UNIX +Editor.ConvertToUNIX.image= +Editor.ConvertToUNIX.description=Converts line delimiters to UNIX + +Editor.ConvertToMac.label=&Mac +Editor.ConvertToMac.tooltip=Converts line delimiters to Mac +Editor.ConvertToMac.image= +Editor.ConvertToMac.description=Converts line delimiters to Mac + +Editor.ToggleInsertMode.label=Sma&rt Insert Mode + +EditPreferences.label=Pre&ferences... +EditPreferences.tooltip=Display preferences for this editor +EditPreferences.description=Display preferences for this editor +########################################################################## +# These strings are used in Workbench menu bar +########################################################################## +ExpandSelectionToMenu.label=E&xpand Selection To +SourceMenu.label=&Source +ConvertLineDelimitersMenu.label=Co&nvert Line Delimiters to +FindOccurrences.label=O&ccurrences in File +# +FindOccurrencesActionProvider.0=Current selection does not resolve to a searchable element +RemoveAction.0=Remove Property +ShowPropertiesAction.0=P&roperties +StructuredContentOutlineConfiguration.0=Collapse All +StructuredContentOutlineConfiguration.1=Link with Editor +AbstractOpenOn.0=Current text selection does not resolve to a file +FormatActionDelegate.jobName=Formatting documents +FormatActionDelegate.errorStatusMessage=Exceptions occurred while formatting documents +FormatActionDelegate.3=Formatting {0} +FormatActionDelegate.4=Exception occurred while formatting document {0} +FormatActionDelegate.5=MalformedInputException occurred while formatting document {0} +ConvertLineDelimitersToCRLFActionDelegate.jobName=Converting line delimiters +ConvertLineDelimitersToCRLFActionDelegate.errorStatusMessage=Exceptions occurred while converting line delimiters +ConvertLineDelimitersToCRLFActionDelegate.3=Converting line delimiters for {0} +ConvertLineDelimitersToCRLFActionDelegate.4=Exception occurred while converting line delimiters for document {0} +TranslucencyPreferenceTab.0=Read-Only text style +TranslucencyPreferenceTab.1=Read-Only contrast percentage: +StructuredTextEditorPreferencePage.1=Line number foreground +StructuredTextEditorPreferencePage.2=Matching brackets highlight +StructuredTextEditorPreferencePage.3=Current line highlight +StructuredTextEditorPreferencePage.4=Print margin +StructuredTextEditorPreferencePage.5=Link +StructuredTextEditorPreferencePage.6=The following preferences apply to the HTML, JSP, XML, and other source editors. +StructuredTextEditorPreferencePage.7=S&upport hyperlink style navigation for "Open Declaration" +StructuredTextEditorPreferencePage.8=Hyperlink style navigation key &modifier: +StructuredTextEditorPreferencePage.15=The modifier 'Shift' is not allowed because 'Shift' + click sets a new selection. +StructuredTextEditorPreferencePage.16=Displayed &tab width: +StructuredTextEditorPreferencePage.17=Print margin col&umn: +StructuredTextEditorPreferencePage.18=Show overview &ruler +StructuredTextEditorPreferencePage.19=Show lin&e numbers +StructuredTextEditorPreferencePage.20=Highlight &matching brackets +StructuredTextEditorPreferencePage.21=Hi&ghlight current line +StructuredTextEditorPreferencePage.22=Sho&w print margin +StructuredTextEditorPreferencePage.23=Appearance co&lor options: +StructuredTextEditorPreferencePage.24=C&olor: +StructuredTextEditorPreferencePage.25=Always &show Quick Diff coloring +StructuredTextEditorPreferencePage.26=Show changes using &characters instead of colors (on line number bar only) +StructuredTextEditorPreferencePage.27=Quickdiff &reference providers: +StructuredTextEditorPreferencePage.28=Make &Default +StructuredTextEditorPreferencePage.29=(default) +StructuredTextEditorPreferencePage.30=A&nalyze annotations while typing +StructuredTextEditorPreferencePage.31=Show &quick fixables +StructuredTextEditorPreferencePage.32=Annotation presentation options +StructuredTextEditorPreferencePage.33=Annotations +StructuredTextEditorPreferencePage.34=Nav&igation +StructuredTextEditorPreferencePage.35=&Quick Diff +StructuredTextEditorPreferencePage.36=(default) +StructuredTextEditorPreferencePage.37=Empty input +StructuredTextEditorPreferencePage.38=is not a valid input. +StructuredTextEditorPreferencePage.39=is not a valid input. +TaskTagPreferenceTab.0=High +TaskTagPreferenceTab.1=Low +TaskTagPreferenceTab.2=Normal +TaskTagPreferenceTab.3=N/A +TaskTagPreferenceTab.5=Task Tag +TaskTagPreferenceTab.6=Tag +TaskTagPreferenceTab.7=Priority +TaskTagPreferenceTab.8=High +TaskTagPreferenceTab.9=Normal +TaskTagPreferenceTab.10=Low +TaskTagPreferenceTab.12=Tag +TaskTagPreferenceTab.13=Priority +TaskTagPreferenceTab.14=New... +TaskTagPreferenceTab.15=Edit... +TaskTagPreferenceTab.16=Remove +TaskTagPreferenceTab.17=Move Up +TaskTagPreferenceTab.18=Move Down +TaskTagPreferenceTab.19=Note: changes may not be visible until the workspace is rebuilt +TaskTagPreferenceTab.20=Task Tags +TaskTagPreferenceTab.22=Task Tags Settings Changed +TaskTagPreferenceTab.23=The task tags settings have changed. A full rebuild is required to make changes effective. Do the full build now? +TaskTagPreferenceTab.24=Yes +TaskTagPreferenceTab.25=No +TaskTagPreferenceTab.26=Cancel +TaskTagPreferenceTab.27=Detecting tasks for task tags +TaskTagPreferenceTab.28=build aborted +TaskTagPreferenceTab.29=build completed +TaskTagPreferenceTab.30=build had errors +TaskTagPreferenceTab.31=Search for Task Tags +FilePreferencePage.0=Expand the tree to edit preferences for a specific content type. +NoModificationCompletionProposal.0=No corrections available +ToggleBreakpointAction.0=Toggle &Breakpoints +ManageBreakpointAction.0=&Enable Breakpoints +ManageBreakpointAction.1=&Disable Breakpoints +EditBreakpointAction.0=Breakpoint &Properties... +ReconcileStepForMarkup.0=Missing closing quote +ReconcileStepForMarkup.1=Missing quotes for attribute value +ReconcileStepForMarkup.2=A tagname cannot start with a space +ReconcileStepForMarkup.3=Empty tags are not allowed +ReconcileStepForMarkup.4=Namespaces are not allowed in a Processing Instruction target +ReconcileStepForMarkup.5=Spaces are not allowed before a Processing Instruction +ReconcileStepForMarkup.6=Tag missing closing bracket '>' +## Used in Structured Text Editor Preference Page / Hovers Tab +TextHoverPreferenceTab.title=Hovers +TextHoverPreferenceTab.annotationRollover=&Enable annotation roll-over (on new editors) +TextHoverPreferenceTab.showAffordance=&Show affordance in hover on how to make it sticky +TextHoverPreferenceTab.hoverPreferences=Text &Hover key modifier preferences: +TextHoverPreferenceTab.enabled=&Enabled +TextHoverPreferenceTab.keyModifier=Pressed key &modifier while hovering: +TextHoverPreferenceTab.description=Description: +TextHoverPreferenceTab.modifierIsNotValid=Modifier ''{0}'' is not valid. +TextHoverPreferenceTab.modifierIsNotValidForHover=Modifier ''{0}'' for ''{1}'' hover is not valid. +TextHoverPreferenceTab.duplicateModifier=''{0}'' hover uses the same modifier as ''{1}'' hover. +TextHoverPreferenceTab.nameColumnTitle=Text Hover Name +TextHoverPreferenceTab.modifierColumnTitle=Pressed Key Modifier While Hovering +TextHoverPreferenceTab.delimiter=+ +TextHoverPreferenceTab.insertDelimiterAndModifierAndDelimiter=\ + {0} + +TextHoverPreferenceTab.insertModifierAndDelimiter=\ {0} + +TextHoverPreferenceTab.insertDelimiterAndModifier=\ + {0} +combinationHover.label=Combined Hover +combinationHover.desc=Tries the hovers in the sequence listed in the table below this one and uses the one which fits best for the selected element and the current context. +problemHover.label=Problem Description +problemHover.desc=Shows the description of the selected problem. +documentationHover.label=Documentation Description +documentationHover.desc=Shows the documentation of the selected element. +annotationHover.label=Annotation Description +annotationHover.desc=Shows the description of the selected annotation. +EditStructuredTextEditorPreferencesAction.0=Editor Preferences +StructuredTextEditorPreferencePage.0=Appearance +BasicFindOccurrencesAction.0=region match: +BasicSearchLabelProvider.0=line +PreferenceManager.0=Original Error: +NavigationPreferenceTab.0=Modifier ''{0}'' is not valid. +OccurrencesSearchQuery.0={0} - {1} Occurrences in {2} +OccurrencesSearchQuery.1={0} - 1 Occurrence in {1} +OccurrencesSearchQuery.2=file +EOL_Windows=Windows +EOL_Unix=UNIX +EOL_Mac=Mac +EOL_NoTranslation=No translation +FileModelProvider.0=Error reloading {0} +JFaceNodeAdapter.0=Update Outline +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); } |