diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java index 5f60ef4017c..acaad96748c 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElementLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. + * Copyright (c) 2004, 2008 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 @@ -111,13 +111,13 @@ public class DiscoveredElementLabelProvider extends LabelProvider implements ICo DiscoveredElement elem = (DiscoveredElement) element; switch (elem.getEntryKind()) { case DiscoveredElement.PATHS_GROUP: - return CPathEntryMessages.getString("CPElementLabelProvider.Includes"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_Includes; case DiscoveredElement.SYMBOLS_GROUP: - return CPathEntryMessages.getString("CPElementLabelProvider.PreprocessorSymbols"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_PreprocessorSymbols; case DiscoveredElement.INCLUDE_FILE_GROUP: - return CPathEntryMessages.getString("CPElementLabelProvider.IncludeFiles"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_IncludeFiles; case DiscoveredElement.MACROS_FILE_GROUP: - return CPathEntryMessages.getString("CPElementLabelProvider.MacrosFiles"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_MacrosFiles; case DiscoveredElement.CONTAINER: case DiscoveredElement.INCLUDE_PATH: case DiscoveredElement.SYMBOL_DEFINITION: diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java index 7c15808525c..436e983f4d4 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java @@ -17,7 +17,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import org.eclipse.cdt.internal.ui.dialogs.cpaths.CPathEntryMessages; import org.eclipse.cdt.internal.ui.util.ExceptionHandler; import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2; import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager; @@ -372,8 +371,8 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage }); } catch (InvocationTargetException e) { - String title = CPathEntryMessages.getString(ERROR_TITLE); - String message = CPathEntryMessages.getString(ERROR_MESSAGE); + String title = MakeUIPlugin.getResourceString(ERROR_TITLE); + String message = MakeUIPlugin.getResourceString(ERROR_MESSAGE); ExceptionHandler.handle(e, getShell(), title, message); } catch (InterruptedException e) { // cancelled diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.java index d13df15c36b..08c307abba7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.java @@ -10,33 +10,22 @@ *******************************************************************************/ package org.eclipse.cdt.internal.corext; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +import org.eclipse.osgi.util.NLS; -public class CorextMessages { +public final class CorextMessages extends NLS { - private static final String BUNDLE_NAME= CorextMessages.class.getName(); - - private static final ResourceBundle RESOURCE_BUNDLE = - ResourceBundle.getBundle(BUNDLE_NAME); + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.corext.CorextMessages";//$NON-NLS-1$ private CorextMessages() { + // Do not instantiate } - public static String getString(String key) { - try { - return RESOURCE_BUNDLE.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } + public static String Resources_outOfSyncResources; + public static String Resources_outOfSync; + public static String Resources_modifiedResources; + public static String Resources_fileModified; + + static { + NLS.initializeMessages(BUNDLE_NAME, CorextMessages.class); } - - public static String getFormattedString(String key, Object arg) { - return getFormattedString(key, new Object[] { arg }); - } - - public static String getFormattedString(String key, Object[] args) { - return MessageFormat.format(getString(key), args); - } -} +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.properties index 53e95effd4d..2a976f12d88 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/CorextMessages.properties @@ -10,7 +10,7 @@ # Anton Leherbauer (Wind River Systems) ############################################################################### -Resources.outOfSyncResources= Some resources are out of sync -Resources.outOfSync= Resource ''{0}'' is out of sync with file system. -Resources.modifiedResources= There are modified resources -Resources.fileModified= File ''{0}'' has been modified since the beginning of the operation +Resources_outOfSyncResources= Some resources are out of sync +Resources_outOfSync= Resource ''{0}'' is out of sync with file system. +Resources_modifiedResources= There are modified resources +Resources_fileModified= File ''{0}'' has been modified since the beginning of the operation diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/AddIncludesOperation.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/AddIncludesOperation.java index 2f615ecde92..daa10190287 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/AddIncludesOperation.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/AddIncludesOperation.java @@ -95,7 +95,7 @@ public class AddIncludesOperation implements IWorkspaceRunnable { if (fTranslationUnit != null) { ArrayList toAdd = new ArrayList(); - monitor.beginTask(CEditorMessages.getString("AddIncludesOperation.description"), 2); //$NON-NLS-1$ + monitor.beginTask(CEditorMessages.AddIncludesOperation_description, 2); List elements = fTranslationUnit.getChildrenOfType(ICElement.C_INCLUDE); for (int i = 0; i < fIncludes.length; ++i) { @@ -149,7 +149,7 @@ public class AddIncludesOperation implements IWorkspaceRunnable { if (fTranslationUnit != null) { ArrayList toAdd = new ArrayList(); - monitor.beginTask(CEditorMessages.getString("AddIncludesOperation.description"), 2); //$NON-NLS-1$ + monitor.beginTask(CEditorMessages.AddIncludesOperation_description, 2); List elements = fTranslationUnit.getChildrenOfType(ICElement.C_USING); for (int i = 0; i < fUsings.length; ++i) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Resources.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Resources.java index 8d0bb327eba..9d50e36c73e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Resources.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Resources.java @@ -29,6 +29,7 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.osgi.util.NLS; public class Resources { @@ -140,7 +141,7 @@ public class Resources { private static IStatus addModified(IStatus status, IFile file) { IStatus entry= CUIStatus.createError( ICStatusConstants.VALIDATE_EDIT_CHANGED_CONTENT, - CorextMessages.getFormattedString("Resources.fileModified", file.getFullPath().toString()), //$NON-NLS-1$ + NLS.bind(CorextMessages.Resources_fileModified, file.getFullPath().toString()), null); if (status == null) { return entry; @@ -150,7 +151,7 @@ public class Resources { } else { MultiStatus result= new MultiStatus(CUIPlugin.getPluginId(), ICStatusConstants.VALIDATE_EDIT_CHANGED_CONTENT, - CorextMessages.getString("Resources.modifiedResources"), null); //$NON-NLS-1$ + CorextMessages.Resources_modifiedResources, null); result.add(status); result.add(entry); return result; @@ -162,7 +163,7 @@ public class Resources { IStatus.ERROR, ResourcesPlugin.getPlugin().getBundle().getSymbolicName(), IResourceStatus.OUT_OF_SYNC_LOCAL, - CorextMessages.getFormattedString("Resources.outOfSync", resource.getFullPath().toString()), //$NON-NLS-1$ + NLS.bind(CorextMessages.Resources_outOfSync, resource.getFullPath().toString()), null); if (status == null) { return entry; @@ -173,7 +174,7 @@ public class Resources { MultiStatus result= new MultiStatus( ResourcesPlugin.getPlugin().getBundle().getSymbolicName(), IResourceStatus.OUT_OF_SYNC_LOCAL, - CorextMessages.getString("Resources.outOfSyncResources"), null); //$NON-NLS-1$ + CorextMessages.Resources_outOfSyncResources, null); result.add(status); result.add(entry); return result; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java index e0b0b9cb77f..104504e0c63 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java @@ -11,41 +11,66 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +import org.eclipse.osgi.util.NLS; -public class CUIMessages { +public final class CUIMessages extends NLS { - private static final String RESOURCE_BUNDLE= "org.eclipse.cdt.internal.ui.CUIMessages";//$NON-NLS-1$ + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.CUIMessages";//$NON-NLS-1$ - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } - private CUIMessages() { + // Do not instantiate } - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } + public static String Drag_move_problem_title; + public static String Drag_move_problem_message; + public static String ExceptionDialog_seeErrorLogMessage; + public static String CAnnotationHover_multipleMarkers; + public static String TabFolderOptionBlock_error; + public static String TabFolderOptionBlock_error_settingOptions; + public static String TabFolderOptionBlock_error_message; + public static String BinaryParserBlock_binaryParser; + public static String BinaryParserBlock_button_up; + public static String BinaryParserBlock_button_down; + public static String BinaryParserBlock_binaryParserOptions; + public static String BinaryParserBlock_settingBinaryParser; + public static String ReferenceBlock_task_ReferenceProjects; + public static String BinaryParserPage_task_savingAttributes; + public static String BinaryParserPage_label_addr2lineCommand; + public static String BinaryParserPage_label_browse; + public static String BinaryParserPage_label_browse1; + public static String BinaryParserPage_label_browse2; + public static String BinaryParserPage_label_cppfiltCommand; + public static String BinaryParserPage_label_cygpathCommand; + public static String BinaryParserPage_label_nmCommand; + public static String AbstractErrorParserBlock_task_setErrorParser; + public static String ConvertProjectWizardPage_convertTo; + public static String ConvertProjectWizardPage_SelectAll; + public static String ConvertProjectWizardPage_CProject; + public static String ConvertProjectWizardPage_CppProject; + public static String ConvertProjectWizardPage_DeselectAll; + public static String AbstractErrorParserBlock_label_up; + public static String AbstractErrorParserBlock_label_down; + public static String AbstractErrorParserBlock_label_selectAll; + public static String AbstractErrorParserBlock_label_unselectAll; + public static String AbstractErrorParserBlock_label_errorParsers; + public static String ICElementPropertyConstants_catagory; + public static String StatusBarUpdater_num_elements_selected; + public static String CHelpConfigurationPropertyPage_buttonLabels_CheckAll; + public static String CHelpConfigurationPropertyPage_buttonLabels_UncheckAll; + public static String CHelpConfigurationPropertyPage_HelpBooks; + public static String AsyncTreeContentProvider_JobName; + public static String AsyncTreeContentProvider_TaskName; + public static String TextEditorDropAdapter_error_title; + public static String TextEditorDropAdapter_error_message; + public static String TextEditorDropAdapter_unreadableFile; + public static String TextEditorDropAdapter_noFile; + public static String OptionalMessageDialog_dontShowAgain; + public static String CStructureCreatorVisitor_translationUnitName; + public static String FileTransferDragAdapter_refreshing; + public static String FileTransferDragAdapter_problem; + public static String FileTransferDragAdapter_problemTitle; + + static { + NLS.initializeMessages(BUNDLE_NAME, CUIMessages.class); } - - public static String getFormattedString(String key, String arg) { - return getFormattedString(key, new String[] { arg }); - } - - public static String getFormattedString(String key, String[] args) { - return MessageFormat.format(getString(key), (Object[]) args); - } -} +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties index a6d24a56530..802223f2bde 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties @@ -11,63 +11,63 @@ # Anton Leherbauer (Wind River Systems) ############################################################################### -Drag.move.problem.title=Drag and Drop Problem -Drag.move.problem.message={0} is read only. Do you still wish to delete it? -ExceptionDialog.seeErrorLogMessage=See error log for more details. +Drag_move_problem_title=Drag and Drop Problem +Drag_move_problem_message={0} is read only. Do you still wish to delete it? +ExceptionDialog_seeErrorLogMessage=See error log for more details. -CAnnotationHover.multipleMarkers=Multiple markers at this line +CAnnotationHover_multipleMarkers=Multiple markers at this line -TabFolderOptionBlock.error=Error -TabFolderOptionBlock.error.settingOptions=Error setting options -TabFolderOptionBlock.error.message=Error in {0} tab +TabFolderOptionBlock_error=Error +TabFolderOptionBlock_error_settingOptions=Error setting options +TabFolderOptionBlock_error_message=Error in {0} tab -BinaryParserBlock.binaryParser=Binary Parser: -BinaryParserBlock.button.up=Up -BinaryParserBlock.button.down=Down -BinaryParserBlock.binaryParserOptions=Binary Parser Options -BinaryParserBlock.settingBinaryParser=Setting Binary Parser... +BinaryParserBlock_binaryParser=Binary Parser: +BinaryParserBlock_button_up=Up +BinaryParserBlock_button_down=Down +BinaryParserBlock_binaryParserOptions=Binary Parser Options +BinaryParserBlock_settingBinaryParser=Setting Binary Parser... -ReferenceBlock.task.ReferenceProjects=Reference Projects +ReferenceBlock_task_ReferenceProjects=Reference Projects -BinaryParserPage.task.savingAttributes=Saving Attributes -BinaryParserPage.label.addr2lineCommand=addr2line Command: -BinaryParserPage.label.browse=&Browse... -BinaryParserPage.label.browse1=B&rowse... -BinaryParserPage.label.browse2=Br&owse... -BinaryParserPage.label.cppfiltCommand=c++filt Command: -BinaryParserPage.label.cygpathCommand=cygpath Command: -BinaryParserPage.label.nmCommand=nm Command: +BinaryParserPage_task_savingAttributes=Saving Attributes +BinaryParserPage_label_addr2lineCommand=addr2line Command: +BinaryParserPage_label_browse=&Browse... +BinaryParserPage_label_browse1=B&rowse... +BinaryParserPage_label_browse2=Br&owse... +BinaryParserPage_label_cppfiltCommand=c++filt Command: +BinaryParserPage_label_cygpathCommand=cygpath Command: +BinaryParserPage_label_nmCommand=nm Command: -AbstractErrorParserBlock.task.setErrorParser=Setting Error Parsers... -ConvertProjectWizardPage.convertTo=Convert to C or C++ -ConvertProjectWizardPage.SelectAll=Select All -ConvertProjectWizardPage.CProject=C Project -ConvertProjectWizardPage.CppProject=C++ Project -ConvertProjectWizardPage.DeselectAll=Deselect All -AbstractErrorParserBlock.label.up=Up -AbstractErrorParserBlock.label.down=Down -AbstractErrorParserBlock.label.selectAll=Select All -AbstractErrorParserBlock.label.unselectAll=Unselect All -AbstractErrorParserBlock.label.errorParsers=Error Parsers +AbstractErrorParserBlock_task_setErrorParser=Setting Error Parsers... +ConvertProjectWizardPage_convertTo=Convert to C or C++ +ConvertProjectWizardPage_SelectAll=Select All +ConvertProjectWizardPage_CProject=C Project +ConvertProjectWizardPage_CppProject=C++ Project +ConvertProjectWizardPage_DeselectAll=Deselect All +AbstractErrorParserBlock_label_up=Up +AbstractErrorParserBlock_label_down=Down +AbstractErrorParserBlock_label_selectAll=Select All +AbstractErrorParserBlock_label_unselectAll=Unselect All +AbstractErrorParserBlock_label_errorParsers=Error Parsers -ICElementPropertyConstants.catagory=Binary Info +ICElementPropertyConstants_catagory=Binary Info -StatusBarUpdater.num_elements_selected={0} items selected +StatusBarUpdater_num_elements_selected={0} items selected -CHelpConfigurationPropertyPage.buttonLabels.CheckAll=Check All -CHelpConfigurationPropertyPage.buttonLabels.UncheckAll=Uncheck All -CHelpConfigurationPropertyPage.HelpBooks=Help books -AsyncTreeContentProvider.JobName=Child Node Computation -AsyncTreeContentProvider.TaskName=Compute child nodes +CHelpConfigurationPropertyPage_buttonLabels_CheckAll=Check All +CHelpConfigurationPropertyPage_buttonLabels_UncheckAll=Uncheck All +CHelpConfigurationPropertyPage_HelpBooks=Help books +AsyncTreeContentProvider_JobName=Child Node Computation +AsyncTreeContentProvider_TaskName=Compute child nodes -TextEditorDropAdapter.error.title=Drag and Drop -TextEditorDropAdapter.error.message=A problem occurred during drag and drop. -TextEditorDropAdapter.unreadableFile=Unreadable file: ''{0}'' -TextEditorDropAdapter.noFile=Not a file: ''{0}'' +TextEditorDropAdapter_error_title=Drag and Drop +TextEditorDropAdapter_error_message=A problem occurred during drag and drop. +TextEditorDropAdapter_unreadableFile=Unreadable file: ''{0}'' +TextEditorDropAdapter_noFile=Not a file: ''{0}'' OptionalMessageDialog_dontShowAgain= Do not show this &message again -CStructureCreatorVisitor.translationUnitName=Translation Unit +CStructureCreatorVisitor_translationUnitName=Translation Unit -FileTransferDragAdapter.refreshing=Refreshing... -FileTransferDragAdapter.problem=Problem while moving or copying files. -FileTransferDragAdapter.problemTitle=Drag & Drop +FileTransferDragAdapter_refreshing=Refreshing... +FileTransferDragAdapter_problem=Problem while moving or copying files. +FileTransferDragAdapter_problemTitle=Drag & Drop diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICElementPropertyConstants.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICElementPropertyConstants.java index bd514b5d7ed..17fa4c735fe 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICElementPropertyConstants.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICElementPropertyConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2006 QNX Software Systems and others. + * Copyright (c) 2003, 2008 QNX Software Systems 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 @@ -56,6 +56,6 @@ public interface ICElementPropertyConstants { */ public static final String P_ELF_NEEDED = "needed"; //$NON-NLS-1$ - public static final String P_BINARY_FILE_CATEGORY = CUIMessages.getString("ICElementPropertyConstants.catagory"); //$NON-NLS-1$ + public static final String P_BINARY_FILE_CATEGORY = CUIMessages.ICElementPropertyConstants_catagory; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java index f91935e768f..5268c409ad5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2007 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -268,21 +268,21 @@ public class BuildConsolePage extends Page // each action IActionBars actionBars = getSite().getActionBars(); TextViewerAction action = new TextViewerAction(getViewer(), ITextOperationTarget.COPY); - action.configureAction(ConsoleMessages.getString("BuildConsolePage.&Copy@Ctrl+C_6"), //$NON-NLS-1$ - ConsoleMessages.getString("BuildConsolePage.Copy_7"), ConsoleMessages.getString("BuildConsolePage.Copy_7")); //$NON-NLS-1$ //$NON-NLS-2$ + action.configureAction(ConsoleMessages.BuildConsolePage__Copy_Ctrl_C_6, + ConsoleMessages.BuildConsolePage_Copy_7, ConsoleMessages.BuildConsolePage_Copy_7); action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); action.setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor( ISharedImages.IMG_TOOL_COPY_DISABLED)); action.setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setGlobalAction(actionBars, ActionFactory.COPY.getId(), action); action = new TextViewerAction(getViewer(), ITextOperationTarget.SELECT_ALL); - action.configureAction(ConsoleMessages.getString("BuildConsolePage.Select_&All@Ctrl+A_12"), //$NON-NLS-1$ - ConsoleMessages.getString("BuildConsolePage.Select_All"), //$NON-NLS-1$ - ConsoleMessages.getString("BuildConsolePage.Select_All")); //$NON-NLS-1$ + action.configureAction(ConsoleMessages.BuildConsolePage_Select__All_Ctrl_A_12, + ConsoleMessages.BuildConsolePage_Select_All, + ConsoleMessages.BuildConsolePage_Select_All); setGlobalAction(actionBars, ActionFactory.SELECT_ALL.getId(), action); //XXX Still using "old" resource access ResourceBundle bundle = ResourceBundle.getBundle(ConsoleMessages.BUNDLE_NAME); - setGlobalAction(actionBars, ActionFactory.FIND.getId(), new FindReplaceAction(bundle, "find_replace_action.", //$NON-NLS-1$ + setGlobalAction(actionBars, ActionFactory.FIND.getId(), new FindReplaceAction(bundle, "find_replace_action_", //$NON-NLS-1$ getConsoleView())); action = new TextViewerGotoLineAction(getViewer()); setGlobalAction(actionBars, ITextEditorActionConstants.GOTO_LINE, action); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.java index 064a32b2ea8..0401acf5aab 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -10,23 +10,27 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.buildconsole; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +import org.eclipse.osgi.util.NLS; -public class ConsoleMessages { +public final class ConsoleMessages extends NLS { - public static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.buildconsole.ConsoleMessages";//$NON-NLS-1$ - - private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); + static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.buildconsole.ConsoleMessages";//$NON-NLS-1$ private ConsoleMessages() { + // Do not instantiate + } + public static String find_replace_action_label; + public static String find_replace_action_tooltip; + public static String find_replace_action_image; + public static String find_replace_action_description; + public static String BuildConsolePage__Copy_Ctrl_C_6; + public static String BuildConsolePage_Copy_7; + public static String BuildConsolePage_Select__All_Ctrl_A_12; + public static String BuildConsolePage_Select_All; + public static String ScrollLockAction_Scroll_Lock_1; + + static { + NLS.initializeMessages(BUNDLE_NAME, ConsoleMessages.class); } - public static String getString(String key) { - try { - return RESOURCE_BUNDLE.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } - } -} +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.properties index d8b079fbe43..7de670862d2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleMessages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2003, 2007 QNX Software Systems and others. +# Copyright (c) 2003, 2008 QNX Software Systems 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 @@ -9,14 +9,14 @@ # QNX Software Systems - Initial API and implementation ############################################################################### -find_replace_action.label=&Find/Replace...@Ctrl+F -find_replace_action.tooltip=Find/Replace -find_replace_action.image= -find_replace_action.description=Find/Replace +find_replace_action_label=&Find/Replace...@Ctrl+F +find_replace_action_tooltip=Find/Replace +find_replace_action_image= +find_replace_action_description=Find/Replace -BuildConsolePage.&Copy@Ctrl+C_6=&Copy@Ctrl+C -BuildConsolePage.Copy_7=Copy -BuildConsolePage.Select_&All@Ctrl+A_12=Select &All@Ctrl+A -BuildConsolePage.Select_All=Select All +BuildConsolePage__Copy_Ctrl_C_6=&Copy@Ctrl+C +BuildConsolePage_Copy_7=Copy +BuildConsolePage_Select__All_Ctrl_A_12=Select &All@Ctrl+A +BuildConsolePage_Select_All=Select All -ScrollLockAction.Scroll_Lock_1=Scroll Lock +ScrollLockAction_Scroll_Lock_1=Scroll Lock diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ScrollLockAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ScrollLockAction.java index 0f74d75d684..b0a821e634f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ScrollLockAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ScrollLockAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -22,9 +22,9 @@ public class ScrollLockAction extends Action { private BuildConsoleViewer fConsoleViewer; public ScrollLockAction(BuildConsoleViewer viewer) { - super(ConsoleMessages.getString("ScrollLockAction.Scroll_Lock_1")); //$NON-NLS-1$ + super(ConsoleMessages.ScrollLockAction_Scroll_Lock_1); fConsoleViewer = viewer; - setToolTipText(ConsoleMessages.getString("ScrollLockAction.Scroll_Lock_1")); //$NON-NLS-1$ + setToolTipText(ConsoleMessages.ScrollLockAction_Scroll_Lock_1); CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_SCROLL_LOCK); setChecked(false); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreatorVisitor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreatorVisitor.java index 951c9de0a04..f8ef9c5b089 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreatorVisitor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreatorVisitor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2008 Wind River Systems, Inc. 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 @@ -60,7 +60,7 @@ import org.eclipse.cdt.internal.ui.CUIMessages; */ class CStructureCreatorVisitor extends CPPASTVisitor { - private static final String TRANSLATION_UNIT_NAME = CUIMessages.getString("CStructureCreatorVisitor.translationUnitName"); //$NON-NLS-1$ + private static final String TRANSLATION_UNIT_NAME = CUIMessages.CStructureCreatorVisitor_translationUnitName; private static final String ANONYMOUS_NAME= CoreModelMessages.getString("CElementLabels.anonymous"); //$NON-NLS-1$ private Stack fStack = new Stack(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java index 8aab7c6e482..8e6183d7fbf 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java @@ -158,13 +158,13 @@ public class BuildGroup extends CViewActionGroup { final IWorkbenchPartSite site = getCView().getSite(); buildAction = new BuildAction(site, IncrementalProjectBuilder.INCREMENTAL_BUILD); - buildAction.setText(CViewMessages.getString("BuildAction.label")); //$NON-NLS-1$ + buildAction.setText(CViewMessages.BuildAction_label); cleanAction = new BuildAction(site, IncrementalProjectBuilder.CLEAN_BUILD); - cleanAction.setText(CViewMessages.getString("CleanAction.label")); //$NON-NLS-1$ + cleanAction.setText(CViewMessages.CleanAction_label); rebuildAction = new RebuildAction(site); - rebuildAction.setText(CViewMessages.getString("RebuildAction.label")); //$NON-NLS-1$ + rebuildAction.setText(CViewMessages.RebuildAction_label); } @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java index 37058af5b52..9e59f68e8f8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java @@ -40,6 +40,7 @@ import org.eclipse.jface.viewers.OpenEvent; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.FileTransfer; @@ -734,12 +735,12 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha if (celement instanceof IBinaryContainer) { ICProject cproj = celement.getCProject(); if (cproj != null) { - return cproj.getPath() + CViewMessages.getString("CView.binaries"); //$NON-NLS-1$ + return cproj.getPath() + CViewMessages.CView_binaries; } } else if (celement instanceof IArchiveContainer) { ICProject cproj = celement.getCProject(); if (cproj != null) { - return cproj.getPath() + CViewMessages.getString("CView.archives"); //$NON-NLS-1$ + return cproj.getPath() + CViewMessages.CView_archives; } } else if (celement instanceof IBinaryModule) { IBinary bin = ((IBinaryModule) celement).getBinary(); @@ -757,7 +758,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha } } if (selection.size() > 1) { - return CViewMessages.getFormattedString("CView.statusLine", //$NON-NLS-1$ + return NLS.bind(CViewMessages.CView_statusLine, new String[] { Integer.toString(selection.size())}); } return "";//$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.java index 9afd8d95607..e646d874fb3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.java @@ -11,58 +11,42 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.cview; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +import org.eclipse.osgi.util.NLS; -public class CViewMessages { +public final class CViewMessages extends NLS { - private static final String RESOURCE_BUNDLE= "org.eclipse.cdt.internal.ui.cview.CViewMessages";//$NON-NLS-1$ - - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.cview.CViewMessages";//$NON-NLS-1$ private CViewMessages() { + // Do not instantiate } - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object arg) { - String format= null; - try { - format= fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } - if (arg == null) - arg= ""; //$NON-NLS-1$ - return MessageFormat.format(format, new Object[] { arg }); - } + public static String OpenWithMenu_label; + public static String BuildAction_label; + public static String RebuildAction_label; + public static String CleanAction_label; + public static String CollapseAllAction_label; + public static String CollapseAllAction_tooltip; + public static String CollapseAllAction_description; + public static String CopyAction_title; + public static String CopyAction_toolTip; + public static String PasteAction_title; + public static String PasteAction_toolTip; + public static String NewWizardsActionGroup_new; + public static String DefaultAction_WIP; + public static String DefaultAction_workInProgress; + public static String CView_binaries; + public static String CView_archives; + public static String LibraryRefContainer_Libraries; + public static String IncludeRefContainer_Includes; + public static String CView_statusLine; + public static String CopyToClipboardProblemDialog_title; + public static String CopyToClipboardProblemDialog_message; + public static String SelectionTransferDropAdapter_error_title; + public static String SelectionTransferDropAdapter_error_message; + public static String SelectionTransferDropAdapter_error_exception; - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, String[] args) { - return MessageFormat.format(fgResourceBundle.getString(key), (Object[]) args); + static { + NLS.initializeMessages(BUNDLE_NAME, CViewMessages.class); } - -} +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.properties index 683c70f3b71..2f09ce65d2c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMessages.properties @@ -11,36 +11,36 @@ ############################################################################### -OpenWithMenu.label=Open Wit&h +OpenWithMenu_label=Open Wit&h -BuildAction.label=&Build Project -RebuildAction.label=Rebuild Pro&ject -CleanAction.label=Clean Project +BuildAction_label=&Build Project +RebuildAction_label=Rebuild Pro&ject +CleanAction_label=Clean Project -CollapseAllAction.label=Collapse All -CollapseAllAction.tooltip=Collapse All -CollapseAllAction.description=Collapse All +CollapseAllAction_label=Collapse All +CollapseAllAction_tooltip=Collapse All +CollapseAllAction_description=Collapse All -CopyAction.title = &Copy -CopyAction.toolTip = Copy - -PasteAction.title=&Paste -PasteAction.toolTip = Paste +CopyAction_title = &Copy +CopyAction_toolTip = Copy -NewWizardsActionGroup.new=Ne&w - -DefaultAction.WIP=WIP -DefaultAction.workInProgress=Work In Progress -CView.binaries=\ - binaries -CView.archives=\ - archives -LibraryRefContainer.Libraries=Libraries -IncludeRefContainer.Includes=Includes +PasteAction_title=&Paste +PasteAction_toolTip = Paste -CView.statusLine = {0} items selected +NewWizardsActionGroup_new=Ne&w + +DefaultAction_WIP=WIP +DefaultAction_workInProgress=Work In Progress +CView_binaries=\ - binaries +CView_archives=\ - archives +LibraryRefContainer_Libraries=Libraries +IncludeRefContainer_Includes=Includes + +CView_statusLine = {0} items selected CopyToClipboardProblemDialog_title=Problem Copying to Clipboard CopyToClipboardProblemDialog_message=There was a problem when accessing the system clipboard. Retry? -SelectionTransferDropAdapter.error.title=Drag and Drop Problem -SelectionTransferDropAdapter.error.message=A problem occurred during Drag and Drop. -SelectionTransferDropAdapter.error.exception=An unexpected exception occurred during Drag and Drop. +SelectionTransferDropAdapter_error_title=Drag and Drop Problem +SelectionTransferDropAdapter_error_message=A problem occurred during Drag and Drop. +SelectionTransferDropAdapter_error_exception=An unexpected exception occurred during Drag and Drop. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CollapseAllAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CollapseAllAction.java index d061b206aca..8f06d23d398 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CollapseAllAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CollapseAllAction.java @@ -23,9 +23,9 @@ class CollapseAllAction extends Action { private CView cview; CollapseAllAction(CView part) { - super(CViewMessages.getString("CollapseAllAction.label")); //$NON-NLS-1$ - setDescription(CViewMessages.getString("CollapseAllAction.description")); //$NON-NLS-1$ - setToolTipText(CViewMessages.getString("CollapseAllAction.tooltip")); //$NON-NLS-1$ + super(CViewMessages.CollapseAllAction_label); + setDescription(CViewMessages.CollapseAllAction_description); + setToolTipText(CViewMessages.CollapseAllAction_tooltip); CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_COLLAPSE_ALL); cview = part; PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.COLLAPSE_ALL_ACTION); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java index 048a76c3ccf..b9e08416049 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java @@ -70,12 +70,12 @@ public class CopyAction extends SelectionListenerAction { * @param clipboard a platform clipboard */ public CopyAction(Shell shell, Clipboard clipboard) { - super(CViewMessages.getString("CopyAction.title")); //$NON-NLS-1$ + super(CViewMessages.CopyAction_title); Assert.isNotNull(shell); Assert.isNotNull(clipboard); this.shell = shell; this.clipboard = clipboard; - setToolTipText(CViewMessages.getString("CopyAction.toolTip")); //$NON-NLS-1$ + setToolTipText(CViewMessages.CopyAction_toolTip); setId(CopyAction.ID); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.COPY_ACTION); @@ -153,7 +153,7 @@ public class CopyAction extends SelectionListenerAction { } catch (SWTError e) { if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) throw e; - if (MessageDialog.openQuestion(shell, CViewMessages.getString("CopyToClipboardProblemDialog_title"), CViewMessages.getString("CopyToClipboardProblemDialog_message"))) //$NON-NLS-1$ //$NON-NLS-2$ + if (MessageDialog.openQuestion(shell, CViewMessages.CopyToClipboardProblemDialog_title, CViewMessages.CopyToClipboardProblemDialog_message)) setClipboard(resources, fileNames, names); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/DefaultAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/DefaultAction.java index 0d0e8a6bd33..4c9035007b2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/DefaultAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/DefaultAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 QNX Software Systems and others. + * Copyright (c) 2000, 2008 QNX Software Systems 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 @@ -28,8 +28,8 @@ public class DefaultAction extends Action { @Override public void run() { MessageBox errorMsg = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); - errorMsg.setText(CViewMessages.getString("DefaultAction.WIP")); //$NON-NLS-1$ - errorMsg.setMessage (CViewMessages.getString("DefaultAction.workInProgress")); //$NON-NLS-1$ + errorMsg.setText(CViewMessages.DefaultAction_WIP); + errorMsg.setMessage (CViewMessages.DefaultAction_workInProgress); errorMsg.open(); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java index af974b94022..a5cf022b06b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeRefContainer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -82,7 +82,7 @@ public class IncludeRefContainer extends CElementGrouping { */ @Override public String getLabel(Object o) { - return CViewMessages.getString("IncludeRefContainer.Includes"); //$NON-NLS-1$ + return CViewMessages.IncludeRefContainer_Includes; } /* (non-Javadoc) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java index 767276be1e4..96c0ddf6859 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -90,7 +90,7 @@ public class LibraryRefContainer extends CElementGrouping { */ @Override public String getLabel(Object o) { - return CViewMessages.getString("LibraryRefContainer.Libraries"); //$NON-NLS-1$ + return CViewMessages.LibraryRefContainer_Libraries; } /* (non-Javadoc) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java index 4bb20d426d0..fbc24891a47 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java @@ -252,7 +252,7 @@ public class MainActionGroup extends CViewActionGroup { } void addNewMenu(IMenuManager menu, IStructuredSelection selection) { - MenuManager newMenu = new MenuManager(CViewMessages.getString("NewWizardsActionGroup.new")); //$NON-NLS-1$ + MenuManager newMenu = new MenuManager(CViewMessages.NewWizardsActionGroup_new); menu.add(newMenu); newMenu.add(newWizardMenu); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java index dad033532f8..d801589b2ab 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java @@ -85,7 +85,7 @@ public class OpenFileGroup extends CViewActionGroup { return; } - MenuManager submenu = new MenuManager(CViewMessages.getString("OpenWithMenu.label")); //$NON-NLS-1$ + MenuManager submenu = new MenuManager(CViewMessages.OpenWithMenu_label); submenu.add(new OpenWithMenu(getCView().getSite().getPage(), (IFile) element)); menu.add(submenu); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/PasteAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/PasteAction.java index 55c96e41632..90b2dbffc25 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/PasteAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/PasteAction.java @@ -62,12 +62,12 @@ public class PasteAction extends SelectionListenerAction { * @param shell the shell for any dialogs */ public PasteAction(Shell shell, Clipboard clipboard) { - super(CViewMessages.getString("PasteAction.title")); //$NON-NLS-1$ + super(CViewMessages.PasteAction_title); Assert.isNotNull(shell); Assert.isNotNull(clipboard); this.shell = shell; this.clipboard = clipboard; - setToolTipText(CViewMessages.getString("PasteAction.toolTip")); //$NON-NLS-1$ + setToolTipText(CViewMessages.PasteAction_toolTip); setId(PasteAction.ID); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.PASTE_ACTION); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/SelectionTransferDropAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/SelectionTransferDropAdapter.java index 231d2400b61..c411dc78a04 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/SelectionTransferDropAdapter.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/SelectionTransferDropAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -112,7 +112,7 @@ public class SelectionTransferDropAdapter extends CDTViewerDropAdapter implement break; } } catch (CModelException e){ - ExceptionHandler.handle(e, CViewMessages.getString("SelectionTransferDropAdapter.error.title"), CViewMessages.getString("SelectionTransferDropAdapter.error.message")); //$NON-NLS-1$ //$NON-NLS-2$ + ExceptionHandler.handle(e, CViewMessages.SelectionTransferDropAdapter_error_title, CViewMessages.SelectionTransferDropAdapter_error_message); event.detail= DND.DROP_NONE; } } @@ -147,9 +147,9 @@ public class SelectionTransferDropAdapter extends CDTViewerDropAdapter implement break; } } catch (CModelException e){ - ExceptionHandler.handle(e, CViewMessages.getString("SelectionTransferDropAdapter.error.title"), CViewMessages.getString("SelectionTransferDropAdapter.error.message")); //$NON-NLS-1$ //$NON-NLS-2$ + ExceptionHandler.handle(e, CViewMessages.SelectionTransferDropAdapter_error_title, CViewMessages.SelectionTransferDropAdapter_error_message); } catch(InvocationTargetException e) { - ExceptionHandler.handle(e, CViewMessages.getString("SelectionTransferDropAdapter.error.title"), CViewMessages.getString("SelectionTransferDropAdapter.error.exception")); //$NON-NLS-1$ //$NON-NLS-2$ + ExceptionHandler.handle(e, CViewMessages.SelectionTransferDropAdapter_error_title, CViewMessages.SelectionTransferDropAdapter_error_exception); } catch (InterruptedException e) { //ok } finally { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java index bafed2ef61e..209157f6e3b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java @@ -37,7 +37,7 @@ import org.eclipse.cdt.internal.ui.CUIMessages; public class OptionalMessageDialog extends MessageDialog { // String constants for widgets - private static final String CHECKBOX_TEXT= CUIMessages.getString("OptionalMessageDialog_dontShowAgain"); //$NON-NLS-1$ + private static final String CHECKBOX_TEXT= CUIMessages.OptionalMessageDialog_dontShowAgain; // Dialog store id constants private static final String STORE_ID= "OptionalMessageDialog.hide."; //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java index 9c731143cae..a66f36a0ebe 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -341,7 +341,7 @@ abstract public class AbstractPathOptionBlock extends TabFolderOptionBlock imple if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.setTaskName(CPathEntryMessages.getString("CPathsBlock.operationdesc_c")); //$NON-NLS-1$ + monitor.setTaskName(CPathEntryMessages.CPathsBlock_operationdesc_c); monitor.beginTask("", 10); //$NON-NLS-1$ try { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java index 5eeae3466a6..d87e75e4dc5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -526,14 +526,14 @@ public class CPElement { try { if ((CoreModel.getPathEntryContainer(fPath, fCProject) == null)) { fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, - CPathEntryMessages.getString("CPElement.status.pathContainerMissing"), null); //$NON-NLS-1$ + CPathEntryMessages.CPElement_status_pathContainerMissing, null); } } catch (CModelException e) { } break; case IPathEntry.CDT_LIBRARY : if (!((ILibraryEntry)entry).getFullLibraryPath().toFile().exists()) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.libraryPathNotFound"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_libraryPathNotFound, null); } break; case IPathEntry.CDT_SOURCE : @@ -543,7 +543,7 @@ public class CPElement { if (root.getWorkspace().validatePath(path.toString(), IResource.FOLDER).isOK()) { res = root.getFolder(path); } - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.sourcePathMissing"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_sourcePathMissing, null); } break; case IPathEntry.CDT_OUTPUT : @@ -553,7 +553,7 @@ public class CPElement { if (root.getWorkspace().validatePath(path.toString(), IResource.FOLDER).isOK()) { res = root.getFolder(path); } - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.outputPathMissing"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_outputPathMissing, null); } break; case IPathEntry.CDT_INCLUDE : @@ -566,11 +566,11 @@ public class CPElement { } if (res != null && res.getType() != IResource.ROOT && res.getType() != IResource.PROJECT && fCProject != null) { if (!fCProject.isOnSourceRoot(res)) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.notOnSourcePath"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_notOnSourcePath, null); } } if (!((IIncludeEntry)entry).getFullIncludePath().toFile().exists()) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.includePathNotFound"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_includePathNotFound, null); } break; case IPathEntry.CDT_INCLUDE_FILE : @@ -583,11 +583,11 @@ public class CPElement { } if (res != null && res.getType() != IResource.ROOT && res.getType() != IResource.PROJECT && fCProject != null) { if (!fCProject.isOnSourceRoot(res)) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.notOnSourcePath"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_notOnSourcePath, null); } } if (!((IIncludeFileEntry)entry).getFullIncludeFilePath().toFile().exists()) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.includeFilePathNotFound"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_includeFilePathNotFound, null); } break; case IPathEntry.CDT_MACRO : @@ -600,7 +600,7 @@ public class CPElement { } if (res != null && res.getType() != IResource.ROOT && res.getType() != IResource.PROJECT && fCProject != null) { if (!fCProject.isOnSourceRoot(res)) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.notOnSourcePath"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_notOnSourcePath, null); } } break; @@ -614,17 +614,17 @@ public class CPElement { } if (res != null && res.getType() != IResource.ROOT && res.getType() != IResource.PROJECT && fCProject != null) { if (!fCProject.isOnSourceRoot(res)) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.notOnSourcePath"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_notOnSourcePath, null); } } if (!((IMacroFileEntry)entry).getFullMacroFilePath().toFile().exists()) { - fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.macrosFilePathNotFound"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_macrosFilePathNotFound, null); } break; case IPathEntry.CDT_PROJECT : res = root.findMember(fPath); if (res == null) { - fStatus = new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getString("CPElement.status.missingProjectPath"), null); //$NON-NLS-1$ + fStatus = new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.CPElement_status_missingProjectPath, null); } break; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java index adc258a4f35..9f7151ea33c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -50,8 +50,8 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { } public CPElementLabelProvider(boolean showExported, boolean showParentInfo) { - fNewLabel = CPathEntryMessages.getString("CPElementLabelProvider.new"); //$NON-NLS-1$ - fCreateLabel = CPathEntryMessages.getString("CPElementLabelProvider.willbecreated"); //$NON-NLS-1$ + fNewLabel = CPathEntryMessages.CPElementLabelProvider_new; + fCreateLabel = CPathEntryMessages.CPElementLabelProvider_willbecreated; fRegistry = CUIPlugin.getImageDescriptorRegistry(); fLibIcon = CPluginImages.DESC_OBJS_ARCHIVE; @@ -99,15 +99,15 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { private String getCPContainerGroupText(CPElementGroup group) { switch (group.getEntryKind()) { case IPathEntry.CDT_INCLUDE : - return CPathEntryMessages.getString("CPElementLabelProvider.Includes"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_Includes; case IPathEntry.CDT_INCLUDE_FILE : - return CPathEntryMessages.getString("CPElementLabelProvider.IncludeFiles"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_IncludeFiles; case IPathEntry.CDT_MACRO : - return CPathEntryMessages.getString("CPElementLabelProvider.PreprocessorSymbols"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_PreprocessorSymbols; case IPathEntry.CDT_MACRO_FILE : - return CPathEntryMessages.getString("CPElementLabelProvider.MacrosFiles"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_MacrosFiles; case IPathEntry.CDT_LIBRARY : - return CPathEntryMessages.getString("CPElementLabelProvider.Libraries"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_Libraries; case -1 : if (group.getResource().getType() == IResource.PROJECT) { return group.getResource().getName(); @@ -122,11 +122,11 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { } public String getCPElementAttributeText(CPElementAttribute attrib) { - String notAvailable = CPathEntryMessages.getString("CPElementLabelProvider.none"); //$NON-NLS-1$ + String notAvailable = CPathEntryMessages.CPElementLabelProvider_none; StringBuffer buf = new StringBuffer(); String key = attrib.getKey(); if (key.equals(CPElement.SOURCEATTACHMENT)) { - buf.append(CPathEntryMessages.getString("CPElementLabelProvider.source_attachment.label")); //$NON-NLS-1$ + buf.append(CPathEntryMessages.CPElementLabelProvider_source_attachment_label); IPath path = (IPath)attrib.getValue(); if (path != null && !path.isEmpty()) { buf.append(getPathString(path, path.getDevice() != null)); @@ -134,7 +134,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { buf.append(notAvailable); } } else if (key.equals(CPElement.SOURCEATTACHMENTROOT)) { - buf.append(CPathEntryMessages.getString("CPElementLabelProvider.source_attachment_root.label")); //$NON-NLS-1$ + buf.append(CPathEntryMessages.CPElementLabelProvider_source_attachment_root_label); IPath path = (IPath)attrib.getValue(); if (path != null && !path.isEmpty()) { buf.append(path.toString()); @@ -143,12 +143,12 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { } } if (key.equals(CPElement.EXCLUSION)) { - buf.append(CPathEntryMessages.getString("CPElementLabelProvider.exclusion_filter.label")); //$NON-NLS-1$ + buf.append(CPathEntryMessages.CPElementLabelProvider_exclusion_filter_label); IPath[] patterns = (IPath[])attrib.getValue(); if (patterns != null && patterns.length > 0) { for (int i = 0; i < patterns.length; i++) { if (i > 0) { - buf.append(CPathEntryMessages.getString("CPElementLabelProvider.exclusion_filter_separator")); //$NON-NLS-1$ + buf.append(CPathEntryMessages.CPElementLabelProvider_exclusion_filter_separator); } buf.append(patterns[i].toString()); } @@ -234,7 +234,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { default : // pass } - return CPathEntryMessages.getString("CPElementLabelProvider.unknown_element.label"); //$NON-NLS-1$ + return CPathEntryMessages.CPElementLabelProvider_unknown_element_label; } /** * @param cpentry @@ -261,7 +261,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider { private void addExport(CPElement cpentry, StringBuffer str) { if (bShowExported && cpentry.isExported()) { str.append(' '); - str.append(CPathEntryMessages.getString("CPElementLabelProvider.export.label")); //$NON-NLS-1$ + str.append(CPathEntryMessages.CPElementLabelProvider_export_label); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerDefaultPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerDefaultPage.java index 4ba952deb67..8e981139ed6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerDefaultPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerDefaultPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -43,14 +43,14 @@ public class CPathContainerDefaultPage extends NewElementWizardPage implements I */ public CPathContainerDefaultPage() { super("CPathContainerDefaultPage"); //$NON-NLS-1$ - setTitle(CPathEntryMessages.getString("CPathContainerDefaultPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("CPathContainerDefaultPage.description")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.CPathContainerDefaultPage_title); + setDescription(CPathEntryMessages.CPathContainerDefaultPage_description); setImageDescriptor(CPluginImages.DESC_WIZBAN_ADD_LIBRARY); fUsedPaths= new ArrayList(); fEntryField= new StringDialogField(); - fEntryField.setLabelText(CPathEntryMessages.getString("CPathContainerDefaultPage.path.label")); //$NON-NLS-1$ + fEntryField.setLabelText(CPathEntryMessages.CPathContainerDefaultPage_path_label); fEntryField.setDialogFieldListener(new IDialogFieldListener() { public void dialogFieldChanged(DialogField field) { validatePath(); @@ -63,15 +63,15 @@ public class CPathContainerDefaultPage extends NewElementWizardPage implements I StatusInfo status= new StatusInfo(); String str= fEntryField.getText(); if (str.length() == 0) { - status.setError(CPathEntryMessages.getString("CPathContainerDefaultPage.path.error.enterpath")); //$NON-NLS-1$ + status.setError(CPathEntryMessages.CPathContainerDefaultPage_path_error_enterpath); } else if (!Path.ROOT.isValidPath(str)) { - status.setError(CPathEntryMessages.getString("CPathContainerDefaultPage.path.error.invalidpath")); //$NON-NLS-1$ + status.setError(CPathEntryMessages.CPathContainerDefaultPage_path_error_invalidpath); } else { IPath path= new Path(str); if (path.segmentCount() == 0) { - status.setError(CPathEntryMessages.getString("CPathContainerDefaultPage.path.error.needssegment")); //$NON-NLS-1$ + status.setError(CPathEntryMessages.CPathContainerDefaultPage_path_error_needssegment); } else if (fUsedPaths.contains(path)) { - status.setError(CPathEntryMessages.getString("CPathContainerDefaultPage.path.error.alreadyexists")); //$NON-NLS-1$ + status.setError(CPathEntryMessages.CPathContainerDefaultPage_path_error_alreadyexists); } } updateStatus(status); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java index cbe1e17712d..a4ae2aee2d0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -53,23 +53,23 @@ public class CPathContainerEntryPage extends CPathBasePage { private final int IDX_EXPORT = 5; public CPathContainerEntryPage(ListDialogField cPathList) { - super(CPathEntryMessages.getString("ContainerEntryPage.title")); //$NON-NLS-1$ + super(CPathEntryMessages.ContainerEntryPage_title); fCPathList = cPathList; String[] buttonLabels = new String[]{ - /* IDX_ADD */CPathEntryMessages.getString("ContainerEntryPage.add.button"), //$NON-NLS-1$ + CPathEntryMessages.ContainerEntryPage_add_button, /* */null, - /* IDX_EDIT */CPathEntryMessages.getString("ContainerEntryPage.edit.button"), //$NON-NLS-1$ - /* IDX_REMOVE */CPathEntryMessages.getString("ContainerEntryPage.remove.button"), //$NON-NLS-1$ + CPathEntryMessages.ContainerEntryPage_edit_button, + CPathEntryMessages.ContainerEntryPage_remove_button, null, - /* IDX_EXPORT */CPathEntryMessages.getString("ContainerEntryPage.export.button") //$NON-NLS-1$ + CPathEntryMessages.ContainerEntryPage_export_button }; ContainersAdapter adapter = new ContainersAdapter(); fContainersList = new TreeListDialogField(adapter, buttonLabels, new CPElementLabelProvider()); fContainersList.setDialogFieldListener(adapter); - fContainersList.setLabelText(CPathEntryMessages.getString("ContainerEntryPage.libraries.label")); //$NON-NLS-1$ + fContainersList.setLabelText(CPathEntryMessages.ContainerEntryPage_libraries_label); fContainersList.enableButton(IDX_REMOVE, false); fContainersList.enableButton(IDX_EDIT, false); @@ -408,9 +408,9 @@ public class CPathContainerEntryPage extends CPathBasePage { IContainerEntry elem = null; String title; if (existing == null) { - title = CPathEntryMessages.getString("ContainerEntryPage.ContainerDialog.new.title"); //$NON-NLS-1$ + title = CPathEntryMessages.ContainerEntryPage_ContainerDialog_new_title; } else { - title = CPathEntryMessages.getString("ContainerEntryPage.ContainerDialog.edit.title"); //$NON-NLS-1$ + title = CPathEntryMessages.ContainerEntryPage_ContainerDialog_edit_title; elem = (IContainerEntry)existing.getPathEntry(); } CPathContainerWizard wizard = new CPathContainerWizard(elem, fCurrCProject, getRawClasspath()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerSelectionPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerSelectionPage.java index 8e9aeb2e187..dd540000593 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerSelectionPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerSelectionPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -74,8 +74,8 @@ public class CPathContainerSelectionPage extends WizardPage { */ protected CPathContainerSelectionPage(IContainerDescriptor[] containerPages) { super("CPathContainerWizardPage"); //$NON-NLS-1$ - setTitle(CPathEntryMessages.getString("CPathContainerSelectionPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("CPathContainerSelectionPage.description")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.CPathContainerSelectionPage_title); + setDescription(CPathEntryMessages.CPathContainerSelectionPage_description); setImageDescriptor(CPluginImages.DESC_WIZBAN_ADD_LIBRARY); fContainers= containerPages; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerWizard.java index e55c5eb629a..0e0d4bdee9a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -197,8 +197,8 @@ public class CPathContainerWizard extends Wizard { } private void handlePageCreationFailed(CoreException e) { - String title = CPathEntryMessages.getString("CPathContainerWizard.pagecreationerror.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("CPathContainerWizard.pagecreationerror.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.CPathContainerWizard_pagecreationerror_title; + String message = CPathEntryMessages.CPathContainerWizard_pagecreationerror_message; ExceptionHandler.handle(e, getShell(), title, message); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.java index 0fb4ca7b06c..77bf3e9eede 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -10,51 +10,203 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.dialogs.cpaths; +import org.eclipse.osgi.util.NLS; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +public final class CPathEntryMessages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.dialogs.cpaths.CPathEntryMessages";//$NON-NLS-1$ -public class CPathEntryMessages { - - private static final String RESOURCE_BUNDLE= CPathEntryMessages.class.getName(); - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } - private CPathEntryMessages() { - } - - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(key), new Object[] { arg }); + // Do not instantiate } - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object[] args) { - return MessageFormat.format(getString(key), args); - } + public static String CPathsPropertyPage_no_C_project_message; + public static String CPathsPropertyPage_closed_project_message; + public static String CPathsPropertyPage_error_title; + public static String CPathsPropertyPage_error_message; + public static String CPathsPropertyPage_unsavedchanges_title; + public static String CPathsPropertyPage_unsavedchanges_message; + public static String CPathsPropertyPage_unsavedchanges_button_save; + public static String CPathsPropertyPage_unsavedchanges_button_discard; + public static String CPathFilterPage_title; + public static String CPathFilterPage_description; + public static String CPathFilterPage_label; + public static String CPathContainerSelectionPage_title; + public static String CPathContainerSelectionPage_description; + public static String CPathContainerWizard_pagecreationerror_title; + public static String CPathContainerWizard_pagecreationerror_message; + public static String CPathContainerDefaultPage_title; + public static String CPathContainerDefaultPage_description; + public static String CPathContainerDefaultPage_path_label; + public static String CPathContainerDefaultPage_path_error_enterpath; + public static String CPathContainerDefaultPage_path_error_invalidpath; + public static String CPathContainerDefaultPage_path_error_needssegment; + public static String CPathContainerDefaultPage_path_error_alreadyexists; + public static String ProjectContainer_label; + public static String ProjectContainerPage_title; + public static String ProjectContainerPage_description; + public static String ProjectContainerPage_label; + public static String IncludeSymbolEntryPage_title; + public static String IncludeSymbolEntryPage_label; + public static String IncludeSymbolEntryPage_addFolderFile; + public static String IncludeSymbolEntryPage_addUserSymbol; + public static String IncludeSymbolEntryPage_addExternalInclude; + public static String IncludeSymbolEntryPage_addFromWorkspace; + public static String IncludeSymbolEntryPage_addContributed; + public static String IncludeSymbolEntryPage_edit; + public static String IncludeSymbolEntryPage_remove; + public static String IncludeSymbolEntryPage_export; + public static String IncludeSymbolEntryPage_up; + public static String IncludeSymbolEntryPage_down; + public static String IncludeSymbolsEntryPage_show_inherited_check; + public static String IncludeSymbolEntryPage_addSymbol_title; + public static String IncludeSymbolEntryPage_addSymbol_message; + public static String IncludeSymbolEntryPage_editSymbol_title; + public static String IncludeSymbolEntryPage_editSymbol_message; + public static String IncludeSymbolEntryPage_addExternal_button_browse; + public static String IncludeSymbolEntryPage_addExternal_title; + public static String IncludeSymbolEntryPage_addExternal_message; + public static String IncludeSymbolEntryPage_editExternal_title; + public static String IncludeSymbolEntryPage_editExternal_message; + public static String IncludeSymbolEntryPage_ContainerDialog_new_title; + public static String IncludeSymbolEntryPage_ContainerDialog_edit_title; + public static String IncludeSymbolEntryPage_fromWorkspaceDialog_new_title; + public static String IncludeSymbolEntryPage_fromWorkspaceDialog_new_description; + public static String IncludeSymbolEntryPage_fromWorkspaceDialog_edit_title; + public static String IncludeSymbolEntryPage_fromWorkspaceDialog_edit_description; + public static String IncludeSymbolEntryPage_newResource_title; + public static String IncludeSymbolEntryPage_newResource_description; + public static String IncludeSymbolEntryPage_browseForFolder; + public static String ContainerEntryPage_title; + public static String ContainerEntryPage_add_button; + public static String ContainerEntryPage_edit_button; + public static String ContainerEntryPage_remove_button; + public static String ContainerEntryPage_export_button; + public static String ContainerEntryPage_libraries_label; + public static String ContainerEntryPage_ContainerDialog_new_title; + public static String ContainerEntryPage_ContainerDialog_edit_title; + public static String CPathsBlock_path_up_button; + public static String CPathsBlock_path_down_button; + public static String CPathsBlock_path_checkall_button; + public static String CPathsBlock_path_uncheckall_button; + public static String CPathsBlock_operationdesc_c; + public static String CPElement_status_multiplePathErrors; + public static String CPElement_status_pathContainerMissing; + public static String CPElement_status_libraryPathNotFound; + public static String CPElement_status_sourcePathMissing; + public static String CPElement_status_outputPathMissing; + public static String CPElement_status_notOnSourcePath; + public static String CPElement_status_includePathNotFound; + public static String CPElement_status_includeFilePathNotFound; + public static String CPElement_status_macrosFilePathNotFound; + public static String CPElement_status_missingProjectPath; + public static String SourcePathEntryPage_title; + public static String SourcePathEntryPage_description; + public static String SourcePathEntryPage_folders_label; + public static String SourcePathEntryPage_folders_remove_button; + public static String SourcePathEntryPage_folders_add_button; + public static String SourcePathEntryPath_folders_edit_button; + public static String SourcePathEntryPage_ExistingSourceFolderDialog_new_title; + public static String SourcePathEntryPage_ExistingSourceFolderDialog_new_description; + public static String SourcePathEntryPage_ExistingSourceFolderDialog_edit_title; + public static String SourcePathEntryPage_ExistingSourceFolderDialog_edit_description; + public static String SourcePathEntryPage_NewSourceFolderDialog_new_title; + public static String SourcePathEntryPage_NewSourceFolderDialog_edit_title; + public static String SourcePathEntryPage_NewSourceFolderDialog_description; + public static String SourcePathEntryPage_exclusion_added_title; + public static String SourcePathEntryPage_exclusion_added_message; + public static String OutputPathEntryPage_title; + public static String OutputPathEntryPage_description; + public static String OutputPathEntryPage_folders_label; + public static String OutputPathEntryPage_folders_remove_button; + public static String OutputPathEntryPage_folders_add_button; + public static String OutputPathEntryPage_folders_edit_button; + public static String OutputPathEntryPage_ExistingOutputFolderDialog_new_title; + public static String OutputPathEntryPage_ExistingOutputFolderDialog_new_description; + public static String OutputPathEntryPage_ExistingOutputFolderDialog_edit_title; + public static String OutputPathEntryPage_ExistingOutputFolderDialog_edit_description; + public static String OutputPathEntryPage_exclusion_added_title; + public static String OutputPathEntryPage_exclusion_added_message; + public static String ProjectsEntryPage_title; + public static String ProjectsEntryPage_description; + public static String ProjectsEntryPage_projects_label; + public static String ProjectsEntryPage_projects_checkall_button; + public static String ProjectsEntryWorkbookPage_projects_uncheckall_button; + public static String LibrariesEntryPage_title; + public static String LibrariesEntryPage_description; + public static String LibrariesEntryPage_libraries_label; + public static String LibrariesEntryPage_libraries_remove_button; + public static String LibrariesEntryPage_libraries_addextlib_button; + public static String LibrariesEntryPage_libraries_addcontriblib_button; + public static String LibrariesEntryPage_libraries_addworkspacelib_button; + public static String LibrariesEntryPage_libraries_edit_button; + public static String LibrariesEntryPage_libraries_export_button; + public static String LibrariesEntryPage_ContainerDialog_new_title; + public static String LibrariesEntryPage_ContainerDialog_edit_title; + public static String LibrariesEntryPage_ExtLibDialog_new_title; + public static String LibrariesEntryPage_ExtLibDialog_new_description; + public static String LibrariesEntryPage_ExtLibDialog_edit_title; + public static String LibrariesEntryPage_ExtLibDialog_edit_description; + public static String OrderExportsPage_title; + public static String OrderExportsPage_description; + public static String ExclusionPatternDialog_title; + public static String ExclusionPatternDialog_pattern_label; + public static String ExclusionPatternDialog_pattern_add; + public static String ExclusionPatternDialog_pattern_add_multiple; + public static String ExclusionPatternDialog_pattern_remove; + public static String ExclusionPatternDialog_pattern_edit; + public static String ExclusionPatternDialog_ChooseExclusionPattern_title; + public static String ExclusionPatternDialog_ChooseExclusionPattern_description; + public static String ExclusionPatternEntryDialog_add_title; + public static String ExclusionPatternEntryDialog_edit_title; + public static String ExclusionPatternEntryDialog_description; + public static String ExclusionPatternEntryDialog_pattern_label; + public static String ExclusionPatternEntryDialog_pattern_button; + public static String ExclusionPatternEntryDialog_error_empty; + public static String ExclusionPatternEntryDialog_error_notrelative; + public static String ExclusionPatternEntryDialog_error_exists; + public static String ExclusionPatternEntryDialog_ChooseExclusionPattern_title; + public static String ExclusionPatternEntryDialog_ChooseExclusionPattern_description; + public static String CPElementLabelProvider_new; + public static String CPElementLabelProvider_willbecreated; + public static String CPElementLabelProvider_none; + public static String CPElementLabelProvider_source_attachment_label; + public static String CPElementLabelProvider_source_attachment_root_label; + public static String CPElementLabelProvider_exclusion_filter_label; + public static String CPElementLabelProvider_exclusion_filter_separator; + public static String CPElementLabelProvider_unknown_element_label; + public static String CPElementLabelProvider_Includes; + public static String CPElementLabelProvider_IncludeFiles; + public static String CPElementLabelProvider_PreprocessorSymbols; + public static String CPElementLabelProvider_MacrosFiles; + public static String CPElementLabelProvider_Libraries; + public static String CPElementLabelProvider_export_label; + public static String NewSourceFolderDialog_useproject_button; + public static String NewSourceFolderDialog_usefolder_button; + public static String NewSourceFolderDialog_sourcefolder_label; + public static String NewSourceFolderDialog_error_invalidpath; + public static String NewSourceFolderDialog_error_enterpath; + public static String NewSourceFolderDialog_error_pathexists; + public static String FolderSelectionDialog_button; + public static String MultipleFolderSelectionDialog_button; + public static String SourceAttachmentBlock_message; + public static String SourceAttachmentBlock_filename_label; + public static String SourceAttachmentBlock_filename_externalfile_button; + public static String SourceAttachmentBlock_filename_externalfolder_button; + public static String SourceAttachmentBlock_filename_internal_button; + public static String SourceAttachmentBlock_filename_error_notvalid; + public static String SourceAttachmentBlock_filename_error_filenotexists; + public static String SourceAttachmentBlock_intjardialog_title; + public static String SourceAttachmentBlock_intjardialog_message; + public static String SourceAttachmentBlock_extjardialog_text; + public static String SourceAttachmentBlock_extfolderdialog_text; + public static String SourceAttachmentBlock_putoncpdialog_title; + public static String SourceAttachmentBlock_putoncpdialog_message; + public static String SourceAttachmentDialog_title; + public static String SourceAttachmentDialog_error_title; + public static String SourceAttachmentDialog_error_message; -} + static { + NLS.initializeMessages(BUNDLE_NAME, CPathEntryMessages.class); + } +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.properties index 5a0ca4fa169..8f7aa3ea006 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathEntryMessages.properties @@ -10,249 +10,249 @@ # Anton Leherbauer (Wind River Systems) ############################################################################### -CPathsPropertyPage.no_C_project.message=Not a C/C++ project. -CPathsPropertyPage.closed_project.message=Path information is not available for a closed project. -CPathsPropertyPage.error.title=Error Setting Project Paths -CPathsPropertyPage.error.message=An error occurred while setting the project path -CPathsPropertyPage.unsavedchanges.title=Setting C/C++ Project Path -CPathsPropertyPage.unsavedchanges.message=The C/C++ Project path property page contains unsaved modifications. Do you want to save changes so that other path related property pages can be updated? -CPathsPropertyPage.unsavedchanges.button.save=Apply -CPathsPropertyPage.unsavedchanges.button.discard=Discard +CPathsPropertyPage_no_C_project_message=Not a C/C++ project. +CPathsPropertyPage_closed_project_message=Path information is not available for a closed project. +CPathsPropertyPage_error_title=Error Setting Project Paths +CPathsPropertyPage_error_message=An error occurred while setting the project path +CPathsPropertyPage_unsavedchanges_title=Setting C/C++ Project Path +CPathsPropertyPage_unsavedchanges_message=The C/C++ Project path property page contains unsaved modifications. Do you want to save changes so that other path related property pages can be updated? +CPathsPropertyPage_unsavedchanges_button_save=Apply +CPathsPropertyPage_unsavedchanges_button_discard=Discard -# ------- CPathFilterPage------- +# ------- CPathFilterPage------- -CPathFilterPage.title=Container Paths -CPathFilterPage.description=Select path which are to be contributed to the project. -CPathFilterPage.label=C/C++ Container path: +CPathFilterPage_title=Container Paths +CPathFilterPage_description=Select path which are to be contributed to the project. +CPathFilterPage_label=C/C++ Container path: -# ------- CPathContainerSelectionPage------- +# ------- CPathContainerSelectionPage------- -CPathContainerSelectionPage.title=Add Contributed -CPathContainerSelectionPage.description=Select the library type to add. +CPathContainerSelectionPage_title=Add Contributed +CPathContainerSelectionPage_description=Select the library type to add. -# ------- CPathContainerWizard------- +# ------- CPathContainerWizard------- -CPathContainerWizard.pagecreationerror.title= Library Wizard -CPathContainerWizard.pagecreationerror.message=Wizard page creation failed. Check log for details. +CPathContainerWizard_pagecreationerror_title= Library Wizard +CPathContainerWizard_pagecreationerror_message=Wizard page creation failed. Check log for details. -# ------- CPathContainerDefaultPage------- +# ------- CPathContainerDefaultPage------- -CPathContainerDefaultPage.title=C/C++ Path Container -CPathContainerDefaultPage.description=Edit the C/C++ container path. First segment is the container type. -CPathContainerDefaultPage.path.label=&C/C++ path container path: -CPathContainerDefaultPage.path.error.enterpath=Enter path. -CPathContainerDefaultPage.path.error.invalidpath=Invalid path. -CPathContainerDefaultPage.path.error.needssegment=Path needs at least one segment. -CPathContainerDefaultPage.path.error.alreadyexists=Entry already exists. +CPathContainerDefaultPage_title=C/C++ Path Container +CPathContainerDefaultPage_description=Edit the C/C++ container path. First segment is the container type. +CPathContainerDefaultPage_path_label=&C/C++ path container path: +CPathContainerDefaultPage_path_error_enterpath=Enter path. +CPathContainerDefaultPage_path_error_invalidpath=Invalid path. +CPathContainerDefaultPage_path_error_needssegment=Path needs at least one segment. +CPathContainerDefaultPage_path_error_alreadyexists=Entry already exists. # -------- ProjectContainerPage --------- -ProjectContainer.label=C/C++ Project Path Entries -ProjectContainerPage.title=C/C++ Project Path Entries -ProjectContainerPage.description=Select the C/C++ Project which contains path entries to be contributed to this project. -ProjectContainerPage.label=C/C++ Projects: +ProjectContainer_label=C/C++ Project Path Entries +ProjectContainerPage_title=C/C++ Project Path Entries +ProjectContainerPage_description=Select the C/C++ Project which contains path entries to be contributed to this project. +ProjectContainerPage_label=C/C++ Projects: # -------- CPathIncludeSymbolEntryPage -------- -IncludeSymbolEntryPage.title=Include/Symbols -IncludeSymbolEntryPage.label=Include Paths and Preprocessor Symbols: -IncludeSymbolEntryPage.addFolderFile=Add Folder/File... -IncludeSymbolEntryPage.addUserSymbol=Add Preprocessor Symbol... -IncludeSymbolEntryPage.addExternalInclude=Add External Include Path... -IncludeSymbolEntryPage.addFromWorkspace=Add Include Path from Workspace... -IncludeSymbolEntryPage.addContributed=Add Contributed... -IncludeSymbolEntryPage.edit=Edit... -IncludeSymbolEntryPage.remove=Remove -IncludeSymbolEntryPage.export=Export -IncludeSymbolEntryPage.up=Up -IncludeSymbolEntryPage.down=Down -IncludeSymbolsEntryPage.show_inherited.check=Show Inherited Paths -IncludeSymbolEntryPage.addSymbol.title=Add Preprocessor Symbol -IncludeSymbolEntryPage.addSymbol.message=Symbol definition: -IncludeSymbolEntryPage.editSymbol.title=Edit Preprocessor Symbol -IncludeSymbolEntryPage.editSymbol.message=Symbol definition: -IncludeSymbolEntryPage.addExternal.button.browse=Browse... -IncludeSymbolEntryPage.addExternal.title=Add External Include Path -IncludeSymbolEntryPage.addExternal.message=Include path: -IncludeSymbolEntryPage.editExternal.title=Edit External Include Path -IncludeSymbolEntryPage.editExternal.message=Include path: -IncludeSymbolEntryPage.ContainerDialog.new.title=Contributed Include Path Selection -IncludeSymbolEntryPage.ContainerDialog.edit.title=Contributed Include Path Selection -IncludeSymbolEntryPage.fromWorkspaceDialog.new.title=New Include Path from Workspace -IncludeSymbolEntryPage.fromWorkspaceDialog.new.description=Select a folder as a include path from the workspace. -IncludeSymbolEntryPage.fromWorkspaceDialog.edit.title=Edit Include Path from Workspace -IncludeSymbolEntryPage.fromWorkspaceDialog.edit.description=Select a folder as a include path from the workspace. -IncludeSymbolEntryPage.newResource.title=Add File/Folder -IncludeSymbolEntryPage.newResource.description=Select a file or folder to add to the include/symbol list to add/remove paths or symbols on. -IncludeSymbolEntryPage.browseForFolder=Browse For Folder +IncludeSymbolEntryPage_title=Include/Symbols +IncludeSymbolEntryPage_label=Include Paths and Preprocessor Symbols: +IncludeSymbolEntryPage_addFolderFile=Add Folder/File... +IncludeSymbolEntryPage_addUserSymbol=Add Preprocessor Symbol... +IncludeSymbolEntryPage_addExternalInclude=Add External Include Path... +IncludeSymbolEntryPage_addFromWorkspace=Add Include Path from Workspace... +IncludeSymbolEntryPage_addContributed=Add Contributed... +IncludeSymbolEntryPage_edit=Edit... +IncludeSymbolEntryPage_remove=Remove +IncludeSymbolEntryPage_export=Export +IncludeSymbolEntryPage_up=Up +IncludeSymbolEntryPage_down=Down +IncludeSymbolsEntryPage_show_inherited_check=Show Inherited Paths +IncludeSymbolEntryPage_addSymbol_title=Add Preprocessor Symbol +IncludeSymbolEntryPage_addSymbol_message=Symbol definition: +IncludeSymbolEntryPage_editSymbol_title=Edit Preprocessor Symbol +IncludeSymbolEntryPage_editSymbol_message=Symbol definition: +IncludeSymbolEntryPage_addExternal_button_browse=Browse... +IncludeSymbolEntryPage_addExternal_title=Add External Include Path +IncludeSymbolEntryPage_addExternal_message=Include path: +IncludeSymbolEntryPage_editExternal_title=Edit External Include Path +IncludeSymbolEntryPage_editExternal_message=Include path: +IncludeSymbolEntryPage_ContainerDialog_new_title=Contributed Include Path Selection +IncludeSymbolEntryPage_ContainerDialog_edit_title=Contributed Include Path Selection +IncludeSymbolEntryPage_fromWorkspaceDialog_new_title=New Include Path from Workspace +IncludeSymbolEntryPage_fromWorkspaceDialog_new_description=Select a folder as a include path from the workspace. +IncludeSymbolEntryPage_fromWorkspaceDialog_edit_title=Edit Include Path from Workspace +IncludeSymbolEntryPage_fromWorkspaceDialog_edit_description=Select a folder as a include path from the workspace. +IncludeSymbolEntryPage_newResource_title=Add File/Folder +IncludeSymbolEntryPage_newResource_description=Select a file or folder to add to the include/symbol list to add/remove paths or symbols on. +IncludeSymbolEntryPage_browseForFolder=Browse For Folder # ------- CPathContainerEntryPage ------ -ContainerEntryPage.title=Path Containers -ContainerEntryPage.add.button=Add... -ContainerEntryPage.edit.button=Edit... -ContainerEntryPage.remove.button=Remove -ContainerEntryPage.export.button=Export -ContainerEntryPage.libraries.label=Containers: -ContainerEntryPage.ContainerDialog.new.title=Add New C/C++ Path Container -ContainerEntryPage.ContainerDialog.edit.title=Edit C/C++ Path Container +ContainerEntryPage_title=Path Containers +ContainerEntryPage_add_button=Add... +ContainerEntryPage_edit_button=Edit... +ContainerEntryPage_remove_button=Remove +ContainerEntryPage_export_button=Export +ContainerEntryPage_libraries_label=Containers: +ContainerEntryPage_ContainerDialog_new_title=Add New C/C++ Path Container +ContainerEntryPage_ContainerDialog_edit_title=Edit C/C++ Path Container -# ------- BuildPathsBlock ------- -CPathsBlock.path.up.button=&Up -CPathsBlock.path.down.button=&Down -CPathsBlock.path.checkall.button=Select &All -CPathsBlock.path.uncheckall.button=D&eselect All -CPathsBlock.operationdesc_c=Setting project paths... +# ------- BuildPathsBlock ------- +CPathsBlock_path_up_button=&Up +CPathsBlock_path_down_button=&Down +CPathsBlock_path_checkall_button=Select &All +CPathsBlock_path_uncheckall_button=D&eselect All +CPathsBlock_operationdesc_c=Setting project paths... -CPElement.status.multiplePathErrors={0} project path entries have errors. -CPElement.status.pathContainerMissing=Missing project path container. -CPElement.status.libraryPathNotFound=Library not found. -CPElement.status.sourcePathMissing=Source path does not exist. -CPElement.status.outputPathMissing=Output path does not exist. -CPElement.status.notOnSourcePath=Project path must exist on source path. -CPElement.status.includePathNotFound=Include path not found. -CPElement.status.includeFilePathNotFound=Include file path not found. -CPElement.status.macrosFilePathNotFound=Macros file path not found. -CPElement.status.missingProjectPath=Missing project path. +CPElement_status_multiplePathErrors={0} project path entries have errors. +CPElement_status_pathContainerMissing=Missing project path container. +CPElement_status_libraryPathNotFound=Library not found. +CPElement_status_sourcePathMissing=Source path does not exist. +CPElement_status_outputPathMissing=Output path does not exist. +CPElement_status_notOnSourcePath=Project path must exist on source path. +CPElement_status_includePathNotFound=Include path not found. +CPElement_status_includeFilePathNotFound=Include file path not found. +CPElement_status_macrosFilePathNotFound=Macros file path not found. +CPElement_status_missingProjectPath=Missing project path. -# ------- SourcePathEntryPage------- -SourcePathEntryPage.title=&Source -SourcePathEntryPage.description=Source Path for project -SourcePathEntryPage.folders.label=Source folders on build pat&h: -SourcePathEntryPage.folders.remove.button=&Remove -SourcePathEntryPage.folders.add.button=&Add Folder... -SourcePathEntryPath.folders.edit.button=&Edit... +# ------- SourcePathEntryPage------- +SourcePathEntryPage_title=&Source +SourcePathEntryPage_description=Source Path for project +SourcePathEntryPage_folders_label=Source folders on build pat&h: +SourcePathEntryPage_folders_remove_button=&Remove +SourcePathEntryPage_folders_add_button=&Add Folder... +SourcePathEntryPath_folders_edit_button=&Edit... -SourcePathEntryPage.ExistingSourceFolderDialog.new.title=Source Folder Selection -SourcePathEntryPage.ExistingSourceFolderDialog.new.description=&Choose source folders to be added to the build path: +SourcePathEntryPage_ExistingSourceFolderDialog_new_title=Source Folder Selection +SourcePathEntryPage_ExistingSourceFolderDialog_new_description=&Choose source folders to be added to the build path: -SourcePathEntryPage.ExistingSourceFolderDialog.edit.title=Source Folder Selection -SourcePathEntryPage.ExistingSourceFolderDialog.edit.description=&Select the source folder: +SourcePathEntryPage_ExistingSourceFolderDialog_edit_title=Source Folder Selection +SourcePathEntryPage_ExistingSourceFolderDialog_edit_description=&Select the source folder: -SourcePathEntryPage.NewSourceFolderDialog.new.title=New Source Folder -SourcePathEntryPage.NewSourceFolderDialog.edit.title=Edit Source Folder +SourcePathEntryPage_NewSourceFolderDialog_new_title=New Source Folder +SourcePathEntryPage_NewSourceFolderDialog_edit_title=Edit Source Folder -SourcePathEntryPage.NewSourceFolderDialog.description=&Enter a path relative to ''{0}'': +SourcePathEntryPage_NewSourceFolderDialog_description=&Enter a path relative to ''{0}'': -SourcePathEntryPage.exclusion_added.title=Source Folder Added -SourcePathEntryPage.exclusion_added.message=Exclusion filters have been added to nesting folders. +SourcePathEntryPage_exclusion_added_title=Source Folder Added +SourcePathEntryPage_exclusion_added_message=Exclusion filters have been added to nesting folders. -# ------- OutputPathEntryPage------- -OutputPathEntryPage.title=&Output -OutputPathEntryPage.description=Build Output locations -OutputPathEntryPage.folders.label=Output folders on build pat&h: -OutputPathEntryPage.folders.remove.button=&Remove -OutputPathEntryPage.folders.add.button=&Add Folder... -OutputPathEntryPage.folders.edit.button=&Edit... +# ------- OutputPathEntryPage------- +OutputPathEntryPage_title=&Output +OutputPathEntryPage_description=Build Output locations +OutputPathEntryPage_folders_label=Output folders on build pat&h: +OutputPathEntryPage_folders_remove_button=&Remove +OutputPathEntryPage_folders_add_button=&Add Folder... +OutputPathEntryPage_folders_edit_button=&Edit... -OutputPathEntryPage.ExistingOutputFolderDialog.new.title=Output Folder Selection -OutputPathEntryPage.ExistingOutputFolderDialog.new.description=&Choose Output folders to be added to the build path: +OutputPathEntryPage_ExistingOutputFolderDialog_new_title=Output Folder Selection +OutputPathEntryPage_ExistingOutputFolderDialog_new_description=&Choose Output folders to be added to the build path: -OutputPathEntryPage.ExistingOutputFolderDialog.edit.title=Output Folder Selection -OutputPathEntryPage.ExistingOutputFolderDialog.edit.description=&Select the Output folder: +OutputPathEntryPage_ExistingOutputFolderDialog_edit_title=Output Folder Selection +OutputPathEntryPage_ExistingOutputFolderDialog_edit_description=&Select the Output folder: -OutputPathEntryPage.exclusion_added.title=Output Folder Added -OutputPathEntryPage.exclusion_added.message=Exclusion filters have been added to nesting folders. +OutputPathEntryPage_exclusion_added_title=Output Folder Added +OutputPathEntryPage_exclusion_added_message=Exclusion filters have been added to nesting folders. -# ------- ProjectsWorkbookPage------- -ProjectsEntryPage.title=&Projects -ProjectsEntryPage.description= -ProjectsEntryPage.projects.label=&Required projects on the build path: -ProjectsEntryPage.projects.checkall.button=Select &All -ProjectsEntryWorkbookPage.projects.uncheckall.button=&Deselect All +# ------- ProjectsWorkbookPage------- +ProjectsEntryPage_title=&Projects +ProjectsEntryPage_description= +ProjectsEntryPage_projects_label=&Required projects on the build path: +ProjectsEntryPage_projects_checkall_button=Select &All +ProjectsEntryWorkbookPage_projects_uncheckall_button=&Deselect All -# ------- LibrariesWorkbookPage------- -LibrariesEntryPage.title=&Libraries -LibrariesEntryPage.description= -LibrariesEntryPage.libraries.label=Libraries on the build path: -LibrariesEntryPage.libraries.remove.button=&Remove - -LibrariesEntryPage.libraries.addextlib.button=Add E&xternal Library... -LibrariesEntryPage.libraries.addcontriblib.button=Add &Contributed... -LibrariesEntryPage.libraries.addworkspacelib.button=Add from Workspace... -LibrariesEntryPage.libraries.edit.button=&Edit... -LibrariesEntryPage.libraries.export.button=Export +# ------- LibrariesWorkbookPage------- +LibrariesEntryPage_title=&Libraries +LibrariesEntryPage_description= +LibrariesEntryPage_libraries_label=Libraries on the build path: +LibrariesEntryPage_libraries_remove_button=&Remove -LibrariesEntryPage.ContainerDialog.new.title=Contributed Library Path Selection -LibrariesEntryPage.ContainerDialog.edit.title=Contributed Library Path Selection +LibrariesEntryPage_libraries_addextlib_button=Add E&xternal Library... +LibrariesEntryPage_libraries_addcontriblib_button=Add &Contributed... +LibrariesEntryPage_libraries_addworkspacelib_button=Add from Workspace... +LibrariesEntryPage_libraries_edit_button=&Edit... +LibrariesEntryPage_libraries_export_button=Export -LibrariesEntryPage.ExtLibDialog.new.title=Library Selection -LibrariesEntryPage.ExtLibDialog.new.description=&Choose Library to be added to the project paths: +LibrariesEntryPage_ContainerDialog_new_title=Contributed Library Path Selection +LibrariesEntryPage_ContainerDialog_edit_title=Contributed Library Path Selection -LibrariesEntryPage.ExtLibDialog.edit.title=Edit Library -LibrariesEntryPage.ExtLibDialog.edit.description=&Select the library: +LibrariesEntryPage_ExtLibDialog_new_title=Library Selection +LibrariesEntryPage_ExtLibDialog_new_description=&Choose Library to be added to the project paths: + +LibrariesEntryPage_ExtLibDialog_edit_title=Edit Library +LibrariesEntryPage_ExtLibDialog_edit_description=&Select the library: # -------- OrderExportPage --------- -OrderExportsPage.title=&Order and Export -OrderExportsPage.description= +OrderExportsPage_title=&Order and Export +OrderExportsPage_description= -# ------- ExclusionPatternDialog ------- -ExclusionPatternDialog.title=Source Folder Exclusion Patterns -ExclusionPatternDialog.pattern.label=E&xclusion patterns for ''{0}'': -ExclusionPatternDialog.pattern.add=A&dd... -ExclusionPatternDialog.pattern.add.multiple=Add &Multiple... -ExclusionPatternDialog.pattern.remove=&Remove -ExclusionPatternDialog.pattern.edit=&Edit... -ExclusionPatternDialog.ChooseExclusionPattern.title=Exclusion Pattern Selection -ExclusionPatternDialog.ChooseExclusionPattern.description=&Choose folders or files to exclude: +# ------- ExclusionPatternDialog ------- +ExclusionPatternDialog_title=Source Folder Exclusion Patterns +ExclusionPatternDialog_pattern_label=E&xclusion patterns for ''{0}'': +ExclusionPatternDialog_pattern_add=A&dd... +ExclusionPatternDialog_pattern_add_multiple=Add &Multiple... +ExclusionPatternDialog_pattern_remove=&Remove +ExclusionPatternDialog_pattern_edit=&Edit... +ExclusionPatternDialog_ChooseExclusionPattern_title=Exclusion Pattern Selection +ExclusionPatternDialog_ChooseExclusionPattern_description=&Choose folders or files to exclude: -# ------- ExclusionPatternEntryDialog ------- -ExclusionPatternEntryDialog.add.title=Add Exclusion Pattern -ExclusionPatternEntryDialog.edit.title=Edit Exclusion Pattern -ExclusionPatternEntryDialog.description=Enter a pattern for excluding files from the source folder. Allowed wildcards are '*', '?' and '**'. Examples: 'util/A*.c', 'lib/util/', '**/Test*'. -ExclusionPatternEntryDialog.pattern.label=E&xclusion pattern (Path relative to ''{0}''): -ExclusionPatternEntryDialog.pattern.button=Bro&wse... -ExclusionPatternEntryDialog.error.empty=Enter a pattern. -ExclusionPatternEntryDialog.error.notrelative=Pattern must be a relative path. -ExclusionPatternEntryDialog.error.exists=Pattern already exists. -ExclusionPatternEntryDialog.ChooseExclusionPattern.title=Exclusion Pattern Selection -ExclusionPatternEntryDialog.ChooseExclusionPattern.description=&Choose a folder or file to exclude: +# ------- ExclusionPatternEntryDialog ------- +ExclusionPatternEntryDialog_add_title=Add Exclusion Pattern +ExclusionPatternEntryDialog_edit_title=Edit Exclusion Pattern +ExclusionPatternEntryDialog_description=Enter a pattern for excluding files from the source folder. Allowed wildcards are '*', '?' and '**'. Examples: 'util/A*.c', 'lib/util/', '**/Test*'. +ExclusionPatternEntryDialog_pattern_label=E&xclusion pattern (Path relative to ''{0}''): +ExclusionPatternEntryDialog_pattern_button=Bro&wse... +ExclusionPatternEntryDialog_error_empty=Enter a pattern. +ExclusionPatternEntryDialog_error_notrelative=Pattern must be a relative path. +ExclusionPatternEntryDialog_error_exists=Pattern already exists. +ExclusionPatternEntryDialog_ChooseExclusionPattern_title=Exclusion Pattern Selection +ExclusionPatternEntryDialog_ChooseExclusionPattern_description=&Choose a folder or file to exclude: -# ------- CPListLabelProvider ------- -CPElementLabelProvider.new=(new) -CPElementLabelProvider.willbecreated=(will be created) -CPElementLabelProvider.none=(None) -CPElementLabelProvider.source_attachment.label=Source attachment: -CPElementLabelProvider.source_attachment_root.label=Source attachment root: -CPElementLabelProvider.exclusion_filter.label=Exclusion filter: -CPElementLabelProvider.exclusion_filter_separator=; -CPElementLabelProvider.unknown_element.label=unknown element -CPElementLabelProvider.Includes=Include Paths -CPElementLabelProvider.IncludeFiles=Include Files -CPElementLabelProvider.PreprocessorSymbols=Preprocessor Symbols -CPElementLabelProvider.MacrosFiles=Symbol Definitions Files -CPElementLabelProvider.Libraries=Libraries -CPElementLabelProvider.export.label= (Exported) +# ------- CPListLabelProvider ------- +CPElementLabelProvider_new=(new) +CPElementLabelProvider_willbecreated=(will be created) +CPElementLabelProvider_none=(None) +CPElementLabelProvider_source_attachment_label=Source attachment: +CPElementLabelProvider_source_attachment_root_label=Source attachment root: +CPElementLabelProvider_exclusion_filter_label=Exclusion filter: +CPElementLabelProvider_exclusion_filter_separator=; +CPElementLabelProvider_unknown_element_label=unknown element +CPElementLabelProvider_Includes=Include Paths +CPElementLabelProvider_IncludeFiles=Include Files +CPElementLabelProvider_PreprocessorSymbols=Preprocessor Symbols +CPElementLabelProvider_MacrosFiles=Symbol Definitions Files +CPElementLabelProvider_Libraries=Libraries +CPElementLabelProvider_export_label= (Exported) -# ------- NewSourceFolderDialog------- -NewSourceFolderDialog.useproject.button=&Project as source folder -NewSourceFolderDialog.usefolder.button=&Folder as source folder -NewSourceFolderDialog.sourcefolder.label=&Source folder name: -NewSourceFolderDialog.error.invalidpath=Invalid folder path: ''{0}'' -NewSourceFolderDialog.error.enterpath=Folder name must be entered. -NewSourceFolderDialog.error.pathexists=The folder is already in the list. +# ------- NewSourceFolderDialog------- +NewSourceFolderDialog_useproject_button=&Project as source folder +NewSourceFolderDialog_usefolder_button=&Folder as source folder +NewSourceFolderDialog_sourcefolder_label=&Source folder name: +NewSourceFolderDialog_error_invalidpath=Invalid folder path: ''{0}'' +NewSourceFolderDialog_error_enterpath=Folder name must be entered. +NewSourceFolderDialog_error_pathexists=The folder is already in the list. -FolderSelectionDialog.button=Create &New Folder... -MultipleFolderSelectionDialog.button=Create &New Folder... +FolderSelectionDialog_button=Create &New Folder... +MultipleFolderSelectionDialog_button=Create &New Folder... -# ------- SourceAttachmentBlock------- +# ------- SourceAttachmentBlock------- -SourceAttachmentBlock.message=Select the location (folder, JAR or zip) containing the source for ''{0}'': +SourceAttachmentBlock_message=Select the location (folder, JAR or zip) containing the source for ''{0}'': -SourceAttachmentBlock.filename.label=Lo&cation path: -SourceAttachmentBlock.filename.externalfile.button=External &File... -SourceAttachmentBlock.filename.externalfolder.button=External F&older... -SourceAttachmentBlock.filename.internal.button=&Workspace... +SourceAttachmentBlock_filename_label=Lo&cation path: +SourceAttachmentBlock_filename_externalfile_button=External &File... +SourceAttachmentBlock_filename_externalfolder_button=External F&older... +SourceAttachmentBlock_filename_internal_button=&Workspace... -SourceAttachmentBlock.filename.error.notvalid= The archive path is not a valid path. -SourceAttachmentBlock.filename.error.filenotexists= The path ''{0}'' does not exist. +SourceAttachmentBlock_filename_error_notvalid= The archive path is not a valid path. +SourceAttachmentBlock_filename_error_filenotexists= The path ''{0}'' does not exist. -SourceAttachmentBlock.intjardialog.title=Source Location Selection -SourceAttachmentBlock.intjardialog.message=&Select folder or JAR/zip archive containing the source: +SourceAttachmentBlock_intjardialog_title=Source Location Selection +SourceAttachmentBlock_intjardialog_message=&Select folder or JAR/zip archive containing the source: -SourceAttachmentBlock.extjardialog.text=JAR/ZIP File Selection -SourceAttachmentBlock.extfolderdialog.text=Folder Selection +SourceAttachmentBlock_extjardialog_text=JAR/ZIP File Selection +SourceAttachmentBlock_extfolderdialog_text=Folder Selection -SourceAttachmentBlock.putoncpdialog.title=Setting Source Attachment -SourceAttachmentBlock.putoncpdialog.message=Source can only be attached to libraries on the build path.\nDo you want to add the library to the build path? +SourceAttachmentBlock_putoncpdialog_title=Setting Source Attachment +SourceAttachmentBlock_putoncpdialog_message=Source can only be attached to libraries on the build path.\nDo you want to add the library to the build path? -SourceAttachmentDialog.title=Source Attachment Configuration -SourceAttachmentDialog.error.title=Error Attaching Source -SourceAttachmentDialog.error.message=An error occurred while associating the source. +SourceAttachmentDialog_title=Source Attachment Configuration +SourceAttachmentDialog_error_title=Error Attaching Source +SourceAttachmentDialog_error_message=An error occurred while associating the source. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathFilterPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathFilterPage.java index 993e2c282f7..ae8df793bbe 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathFilterPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathFilterPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -50,8 +50,8 @@ public class CPathFilterPage extends WizardPage { protected CPathFilterPage(ICElement cElement, int[] filterType) { super("CPathFilterPage"); //$NON-NLS-1$ - setTitle(CPathEntryMessages.getString("CPathFilterPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("CPathFilterPage.description")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.CPathFilterPage_title); + setDescription(CPathEntryMessages.CPathFilterPage_description); setImageDescriptor(CPluginImages.DESC_WIZBAN_ADD_LIBRARY); fFilterType = filterType; fCElement = cElement; @@ -64,7 +64,7 @@ public class CPathFilterPage extends WizardPage { layout.numColumns = 2; container.setLayout(layout); Label label = new Label(container, SWT.NULL); - label.setText(CPathEntryMessages.getString("CPathFilterPage.label")); //$NON-NLS-1$ + label.setText(CPathEntryMessages.CPathFilterPage_label); GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java index f2240d2170e..0ed8c7ed08b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -28,6 +28,7 @@ import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.SelectionAdapter; @@ -88,22 +89,22 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage private static final String[] buttonLabel = new String[]{ - /* 0 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addFolderFile"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addFolderFile, null, - /* 2 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addUserSymbol"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addUserSymbol, null, - /* 4 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternalInclude"), //$NON-NLS-1$ - /* 5 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addFromWorkspace"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addExternalInclude, + CPathEntryMessages.IncludeSymbolEntryPage_addFromWorkspace, null, - /* 7 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addContributed"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addContributed, null, - /* 9 */CPathEntryMessages.getString("IncludeSymbolEntryPage.edit"), //$NON-NLS-1$ - /* 10 */CPathEntryMessages.getString("IncludeSymbolEntryPage.remove"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_edit, + CPathEntryMessages.IncludeSymbolEntryPage_remove, null, - /* 12 */CPathEntryMessages.getString("IncludeSymbolEntryPage.export"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_export, null, - /* 14 */CPathEntryMessages.getString("IncludeSymbolEntryPage.up"), //$NON-NLS-1$ - /* 15 */CPathEntryMessages.getString("IncludeSymbolEntryPage.down")}; //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_up, + CPathEntryMessages.IncludeSymbolEntryPage_down}; private CPElementGroup fTopGroup; private class IncludeSymbolAdapter implements IDialogFieldListener, ITreeListAdapter { @@ -164,7 +165,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage } public CPathIncludeSymbolEntryPage(IStatusChangeListener context) { - super(CPathEntryMessages.getString("IncludeSymbolEntryPage.title")); //$NON-NLS-1$ + super(CPathEntryMessages.IncludeSymbolEntryPage_title); fContext = context; IncludeSymbolAdapter adapter = new IncludeSymbolAdapter(); fIncludeSymPathsList = new TreeListDialogField(adapter, buttonLabel, new CPElementLabelProvider(true, false)) { @@ -174,7 +175,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage return super.getTreeStyle() & ~SWT.MULTI; } }; - fIncludeSymPathsList.setLabelText(CPathEntryMessages.getString("IncludeSymbolEntryPage.label")); //$NON-NLS-1$ + fIncludeSymPathsList.setLabelText(CPathEntryMessages.IncludeSymbolEntryPage_label); fIncludeSymPathsList.enableButton(IDX_REMOVE, false); fIncludeSymPathsList.enableButton(IDX_EDIT, false); fIncludeSymPathsList.enableButton(IDX_ADD_CONTRIBUTED, true); @@ -187,7 +188,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage fIncludeSymPathsList.setTreeExpansionLevel(2); fShowInheritedPaths = new SelectionButtonDialogField(SWT.CHECK); fShowInheritedPaths.setSelection(true); - fShowInheritedPaths.setLabelText(CPathEntryMessages.getString("IncludeSymbolsEntryPage.show_inherited.check")); //$NON-NLS-1$ + fShowInheritedPaths.setLabelText(CPathEntryMessages.IncludeSymbolsEntryPage_show_inherited_check); fShowInheritedPaths.setDialogFieldListener(adapter); fFilter = new CPElementFilter(new int[]{-1, IPathEntry.CDT_INCLUDE, IPathEntry.CDT_MACRO, IPathEntry.CDT_CONTAINER}, false, @@ -243,8 +244,8 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage if (nErrorEntries == 1 && entryError != null) { status = entryError.getStatus(); } else { - status = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getFormattedString( - "CPElement.status.multiplePathErrors", //$NON-NLS-1$ + status = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, NLS.bind( + CPathEntryMessages.CPElement_status_multiplePathErrors, //$NON-NLS-1$ String.valueOf(nErrorEntries)), null); } } @@ -785,8 +786,8 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage TypedElementSelectionValidator validator = new TypedElementSelectionValidator(acceptedClasses, false); ViewerFilter filter = new TypedViewerFilter(acceptedClasses); - String title = CPathEntryMessages.getString("IncludeSymbolEntryPage.newResource.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("IncludeSymbolEntryPage.newResource.description"); //$NON-NLS-1$ + String title = CPathEntryMessages.IncludeSymbolEntryPage_newResource_title; + String message = CPathEntryMessages.IncludeSymbolEntryPage_newResource_description; ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new CElementContentProvider()); @@ -834,16 +835,16 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage // Popup an entry dialog InputDialog dialog; if (existing == null) { - dialog = new InputDialog(getShell(), CPathEntryMessages.getString("IncludeSymbolEntryPage.addSymbol.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.addSymbol.message"), "", //$NON-NLS-1$ //$NON-NLS-2$ + dialog = new InputDialog(getShell(), CPathEntryMessages.IncludeSymbolEntryPage_addSymbol_title, + CPathEntryMessages.IncludeSymbolEntryPage_addSymbol_message, "", null); } else { StringBuffer initialValue = new StringBuffer(); initialValue.append((String)existing.getAttribute(CPElement.MACRO_NAME)); initialValue.append('='); initialValue.append((String)existing.getAttribute(CPElement.MACRO_VALUE)); - dialog = new InputDialog(getShell(), CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.message"), initialValue.toString(), //$NON-NLS-1$ + dialog = new InputDialog(getShell(), CPathEntryMessages.IncludeSymbolEntryPage_editSymbol_title, + CPathEntryMessages.IncludeSymbolEntryPage_editSymbol_message, initialValue.toString(), null); } @@ -885,13 +886,13 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage InputDialog dialog; if (existing == null) { dialog = new SelectPathInputDialog(getShell(), - CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternal.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternal.message"), null, null); //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addExternal_title, + CPathEntryMessages.IncludeSymbolEntryPage_addExternal_message, null, null); } else { dialog = new SelectPathInputDialog( getShell(), - CPathEntryMessages.getString("IncludeSymbolEntryPage.editExternal.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.editExternal.message"), ((IPath)existing.getAttribute(CPElement.INCLUDE)).toOSString(), null); //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_editExternal_title, + CPathEntryMessages.IncludeSymbolEntryPage_editExternal_message, ((IPath)existing.getAttribute(CPElement.INCLUDE)).toOSString(), null); } String newItem = null; if (dialog.open() == Window.OK) { @@ -958,11 +959,11 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage TypedElementSelectionValidator validator = new TypedElementSelectionValidator(acceptedClasses, existing == null); ViewerFilter filter = new TypedViewerFilter(acceptedClasses); - String title = (existing == null) ? CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.new.title") //$NON-NLS-1$ - : CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.edit.title"); //$NON-NLS-1$ + String title = (existing == null) ? CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_new_title + : CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_edit_title; String message = (existing == null) - ? CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.new.description") //$NON-NLS-1$ - : CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.edit.description"); //$NON-NLS-1$ + ? CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_new_description + : CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_edit_description; ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new CElementContentProvider()); @@ -1005,9 +1006,9 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage IContainerEntry elem = null; String title; if (existing == null) { - title = CPathEntryMessages.getString("IncludeSymbolEntryPage.ContainerDialog.new.title"); //$NON-NLS-1$ + title = CPathEntryMessages.IncludeSymbolEntryPage_ContainerDialog_new_title; } else { - title = CPathEntryMessages.getString("IncludeSymbolEntryPage.ContainerDialog.edit.title"); //$NON-NLS-1$ + title = CPathEntryMessages.IncludeSymbolEntryPage_ContainerDialog_edit_title; elem = (IContainerEntry)existing.getPathEntry(); } CPathContainerWizard wizard = new CPathContainerWizard(elem, null, fCurrCProject, getRawPathEntries(), new int[]{ @@ -1051,14 +1052,14 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Button browse = createButton(parent, 3, - CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternal.button.browse"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addExternal_button_browse, false); browse.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent ev) { DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN); - dialog.setText(CPathEntryMessages.getString("IncludeSymbolEntryPage.browseForFolder")); //$NON-NLS-1$ + dialog.setText(CPathEntryMessages.IncludeSymbolEntryPage_browseForFolder); String currentName = getText().getText(); if (currentName != null && currentName.trim().length() != 0) { dialog.setFilterPath(currentName); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java index b30ef4e5efb..f668cff455f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java @@ -29,6 +29,7 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.SelectionAdapter; @@ -91,22 +92,22 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB private static final String[] buttonLabel = new String[]{ - /* 0 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addFolderFile"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addFolderFile, null, - /* 2 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addUserSymbol"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addUserSymbol, null, - /* 4 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternalInclude"), //$NON-NLS-1$ - /* 5 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addFromWorkspace"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addExternalInclude, + CPathEntryMessages.IncludeSymbolEntryPage_addFromWorkspace, null, - /* 7 */CPathEntryMessages.getString("IncludeSymbolEntryPage.addContributed"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addContributed, null, - /* 9 */CPathEntryMessages.getString("IncludeSymbolEntryPage.edit"), //$NON-NLS-1$ - /* 10 */CPathEntryMessages.getString("IncludeSymbolEntryPage.remove"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_edit, + CPathEntryMessages.IncludeSymbolEntryPage_remove, null, - /* 12 */CPathEntryMessages.getString("IncludeSymbolEntryPage.export"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_export, null, - /* 14 */CPathEntryMessages.getString("IncludeSymbolEntryPage.up"), //$NON-NLS-1$ - /* 15 */CPathEntryMessages.getString("IncludeSymbolEntryPage.down")}; //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_up, + CPathEntryMessages.IncludeSymbolEntryPage_down}; private CPElementGroup fTopGroup; /** @@ -209,7 +210,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB } public CPathIncludeSymbolEntryPerFilePage(IStatusChangeListener context) { - super(CPathEntryMessages.getString("IncludeSymbolEntryPage.title")); //$NON-NLS-1$ + super(CPathEntryMessages.IncludeSymbolEntryPage_title); fContext = context; IncludeSymbolAdapter adapter = new IncludeSymbolAdapter(); fIncludeSymPathsList = new TreeListDialogField(adapter, buttonLabel, new CPElementLabelProvider(true, false)) { @@ -219,7 +220,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB return super.getTreeStyle() & ~SWT.MULTI; } }; - fIncludeSymPathsList.setLabelText(CPathEntryMessages.getString("IncludeSymbolEntryPage.label")); //$NON-NLS-1$ + fIncludeSymPathsList.setLabelText(CPathEntryMessages.IncludeSymbolEntryPage_label); fIncludeSymPathsList.enableButton(IDX_ADD_FOLDER_FILE, false); fIncludeSymPathsList.enableButton(IDX_REMOVE, false); fIncludeSymPathsList.enableButton(IDX_EDIT, false); @@ -233,7 +234,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB fIncludeSymPathsList.setTreeExpansionLevel(fTreeExpansionLevel); fShowInheritedPaths = new SelectionButtonDialogField(SWT.CHECK); fShowInheritedPaths.setSelection(true); - fShowInheritedPaths.setLabelText(CPathEntryMessages.getString("IncludeSymbolsEntryPage.show_inherited.check")); //$NON-NLS-1$ + fShowInheritedPaths.setLabelText(CPathEntryMessages.IncludeSymbolsEntryPage_show_inherited_check); fShowInheritedPaths.setDialogFieldListener(adapter); fFilter = new CPElementPerFileFilter(new int[]{-1, IPathEntry.CDT_INCLUDE, IPathEntry.CDT_INCLUDE_FILE, @@ -291,8 +292,8 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB if (nErrorEntries == 1 && entryError != null) { status = entryError.getStatus(); } else { - status = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, CPathEntryMessages.getFormattedString( - "CPElement.status.multiplePathErrors", //$NON-NLS-1$ + status = new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, -1, NLS.bind( + CPathEntryMessages.CPElement_status_multiplePathErrors, //$NON-NLS-1$ String.valueOf(nErrorEntries)), null); } } @@ -839,8 +840,8 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB TypedElementSelectionValidator validator = new TypedElementSelectionValidator(acceptedClasses, false); ViewerFilter filter = new TypedViewerFilter(acceptedClasses); - String title = CPathEntryMessages.getString("IncludeSymbolEntryPage.newResource.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("IncludeSymbolEntryPage.newResource.description"); //$NON-NLS-1$ + String title = CPathEntryMessages.IncludeSymbolEntryPage_newResource_title; + String message = CPathEntryMessages.IncludeSymbolEntryPage_newResource_description; ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new CElementContentProvider()); @@ -890,16 +891,16 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB // Popup an entry dialog InputDialog dialog; if (existing == null) { - dialog = new InputDialog(getShell(), CPathEntryMessages.getString("IncludeSymbolEntryPage.addSymbol.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.addSymbol.message"), "", //$NON-NLS-1$ //$NON-NLS-2$ + dialog = new InputDialog(getShell(), CPathEntryMessages.IncludeSymbolEntryPage_addSymbol_title, + CPathEntryMessages.IncludeSymbolEntryPage_addSymbol_message, "", null); } else { StringBuffer initialValue = new StringBuffer(); initialValue.append((String)existing.getAttribute(CPElement.MACRO_NAME)); initialValue.append('='); initialValue.append((String)existing.getAttribute(CPElement.MACRO_VALUE)); - dialog = new InputDialog(getShell(), CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.editSymbol.message"), initialValue.toString(), //$NON-NLS-1$ + dialog = new InputDialog(getShell(), CPathEntryMessages.IncludeSymbolEntryPage_editSymbol_title, + CPathEntryMessages.IncludeSymbolEntryPage_editSymbol_message, initialValue.toString(), null); } @@ -941,13 +942,13 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB InputDialog dialog; if (existing == null) { dialog = new SelectPathInputDialog(getShell(), - CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternal.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternal.message"), null, null); //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addExternal_title, + CPathEntryMessages.IncludeSymbolEntryPage_addExternal_message, null, null); } else { dialog = new SelectPathInputDialog( getShell(), - CPathEntryMessages.getString("IncludeSymbolEntryPage.editExternal.title"), //$NON-NLS-1$ - CPathEntryMessages.getString("IncludeSymbolEntryPage.editExternal.message"), ((IPath)existing.getAttribute(CPElement.INCLUDE)).toOSString(), null); //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_editExternal_title, + CPathEntryMessages.IncludeSymbolEntryPage_editExternal_message, ((IPath)existing.getAttribute(CPElement.INCLUDE)).toOSString(), null); } String newItem = null; if (dialog.open() == Window.OK) { @@ -1014,11 +1015,11 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB TypedElementSelectionValidator validator = new TypedElementSelectionValidator(acceptedClasses, existing == null); ViewerFilter filter = new TypedViewerFilter(acceptedClasses); - String title = (existing == null) ? CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.new.title") //$NON-NLS-1$ - : CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.edit.title"); //$NON-NLS-1$ + String title = (existing == null) ? CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_new_title + : CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_edit_title; String message = (existing == null) - ? CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.new.description") //$NON-NLS-1$ - : CPathEntryMessages.getString("IncludeSymbolEntryPage.fromWorkspaceDialog.edit.description"); //$NON-NLS-1$ + ? CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_new_description + : CPathEntryMessages.IncludeSymbolEntryPage_fromWorkspaceDialog_edit_description; ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new CElementContentProvider()); @@ -1061,9 +1062,9 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB IContainerEntry elem = null; String title; if (existing == null) { - title = CPathEntryMessages.getString("IncludeSymbolEntryPage.ContainerDialog.new.title"); //$NON-NLS-1$ + title = CPathEntryMessages.IncludeSymbolEntryPage_ContainerDialog_new_title; } else { - title = CPathEntryMessages.getString("IncludeSymbolEntryPage.ContainerDialog.edit.title"); //$NON-NLS-1$ + title = CPathEntryMessages.IncludeSymbolEntryPage_ContainerDialog_edit_title; elem = (IContainerEntry)existing.getPathEntry(); } CPathContainerWizard wizard = new CPathContainerWizard(elem, null, fCurrCProject, getRawPathEntries(), new int[]{ @@ -1107,14 +1108,14 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Button browse = createButton(parent, 3, - CPathEntryMessages.getString("IncludeSymbolEntryPage.addExternal.button.browse"), //$NON-NLS-1$ + CPathEntryMessages.IncludeSymbolEntryPage_addExternal_button_browse, false); browse.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent ev) { DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN); - dialog.setText(CPathEntryMessages.getString("IncludeSymbolEntryPage.browseForFolder")); //$NON-NLS-1$ + dialog.setText(CPathEntryMessages.IncludeSymbolEntryPage_browseForFolder); String currentName = getText().getText(); if (currentName != null && currentName.trim().length() != 0) { dialog.setFilterPath(currentName); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java index 04775c2316a..af0cc4544a1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2007 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -75,8 +75,8 @@ public class CPathLibraryEntryPage extends CPathBasePage { private final int IDX_EXPORT = 7; public CPathLibraryEntryPage(ListDialogField cPathList) { - super(CPathEntryMessages.getString("LibrariesEntryPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("LibrariesEntryPage.description")); //$NON-NLS-1$ + super(CPathEntryMessages.LibrariesEntryPage_title); + setDescription(CPathEntryMessages.LibrariesEntryPage_description); fWorkspaceRoot = CUIPlugin.getWorkspace().getRoot(); fCPathList = cPathList; @@ -84,19 +84,19 @@ public class CPathLibraryEntryPage extends CPathBasePage { LibrariesAdapter adapter = new LibrariesAdapter(); String[] buttonLabels= new String[] { - /* IDX_ADD_LIBEXT */ CPathEntryMessages.getString("LibrariesEntryPage.libraries.addextlib.button"), //$NON-NLS-1$ - /* IDX_ADD_LIB*/ CPathEntryMessages.getString("LibrariesEntryPage.libraries.addworkspacelib.button"), //$NON-NLS-1$ - /* IDX_ADD_CONTRIBUTED*/ CPathEntryMessages.getString("LibrariesEntryPage.libraries.addcontriblib.button"), //$NON-NLS-1$ + CPathEntryMessages.LibrariesEntryPage_libraries_addextlib_button, + CPathEntryMessages.LibrariesEntryPage_libraries_addworkspacelib_button, + CPathEntryMessages.LibrariesEntryPage_libraries_addcontriblib_button, /* */ null, - /* IDX_EDIT */ CPathEntryMessages.getString("LibrariesEntryPage.libraries.edit.button"), //$NON-NLS-1$ - /* IDX_REMOVE */ CPathEntryMessages.getString("LibrariesEntryPage.libraries.remove.button"), //$NON-NLS-1$ + CPathEntryMessages.LibrariesEntryPage_libraries_edit_button, + CPathEntryMessages.LibrariesEntryPage_libraries_remove_button, null, - /* IDX_EXPORT */ CPathEntryMessages.getString("LibrariesEntryPage.libraries.export.button") //$NON-NLS-1$ + CPathEntryMessages.LibrariesEntryPage_libraries_export_button }; fLibrariesList = new TreeListDialogField(adapter, buttonLabels, new CPElementLabelProvider()); fLibrariesList.setDialogFieldListener(adapter); - fLibrariesList.setLabelText(CPathEntryMessages.getString("LibrariesEntryPage.libraries.label")); //$NON-NLS-1$ + fLibrariesList.setLabelText(CPathEntryMessages.LibrariesEntryPage_libraries_label); fLibrariesList.setViewerComparator(new CPElementSorter()); fLibrariesList.enableButton(IDX_EDIT, false); @@ -439,7 +439,7 @@ public class CPathLibraryEntryPage extends CPathBasePage { } private CPElement[] openExtLibFileDialog(CPElement existing) { - String title= CPathEntryMessages.getString("LibrariesEntryPage.ExtLibDialog.new.title"); //$NON-NLS-1$ + String title= CPathEntryMessages.LibrariesEntryPage_ExtLibDialog_new_title; FileDialog dialog= new FileDialog(getShell(), existing == null ? SWT.MULTI : SWT.SINGLE); dialog.setText(title); @@ -475,8 +475,8 @@ public class CPathLibraryEntryPage extends CPathBasePage { ILabelProvider lp= new WorkbenchLabelProvider(); ITreeContentProvider cp= new WorkbenchContentProvider(); - String title= (existing == null) ? CPathEntryMessages.getString("LibrariesEntryPage.ExtLibDialog.new.title") : CPathEntryMessages.getString("LibrariesEntryPage.ExtLibDialog.edit.title"); //$NON-NLS-1$ //$NON-NLS-2$ - String message= (existing == null) ? CPathEntryMessages.getString("LibrariesEntryPage.ExtLibDialog.new.description") : CPathEntryMessages.getString("LibrariesEntryPage.ExtLibDialog.edit.description"); //$NON-NLS-1$ //$NON-NLS-2$ + String title= (existing == null) ? CPathEntryMessages.LibrariesEntryPage_ExtLibDialog_new_title : CPathEntryMessages.LibrariesEntryPage_ExtLibDialog_edit_title; + String message= (existing == null) ? CPathEntryMessages.LibrariesEntryPage_ExtLibDialog_new_description : CPathEntryMessages.LibrariesEntryPage_ExtLibDialog_edit_description; ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp); dialog.setValidator(validator); @@ -516,9 +516,9 @@ public class CPathLibraryEntryPage extends CPathBasePage { IContainerEntry elem = null; String title; if (existing == null) { - title = CPathEntryMessages.getString("LibrariesEntryPage.ContainerDialog.new.title"); //$NON-NLS-1$ + title = CPathEntryMessages.LibrariesEntryPage_ContainerDialog_new_title; } else { - title = CPathEntryMessages.getString("LibrariesEntryPage.ContainerDialog.edit.title"); //$NON-NLS-1$ + title = CPathEntryMessages.LibrariesEntryPage_ContainerDialog_edit_title; elem = (IContainerEntry)existing.getPathEntry(); } CPathContainerWizard wizard = new CPathContainerWizard(elem, null, fCurrCProject, getRawPathEntries(), diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java index a60e8538c0e..2b3f37e0516 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -30,8 +30,8 @@ public class CPathOrderExportPage extends CPathBasePage { private ListDialogField fCPathList; public CPathOrderExportPage(ListDialogField cPathList) { - super(CPathEntryMessages.getString("OrderExportsPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("OrderExportsPage.description")); //$NON-NLS-1$ + super(CPathEntryMessages.OrderExportsPage_title); + setDescription(CPathEntryMessages.OrderExportsPage_description); fCPathList = cPathList; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java index 6871ecb03b0..e14ba82a082 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -33,6 +33,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.graphics.Image; @@ -71,8 +72,8 @@ public class CPathOutputEntryPage extends CPathBasePage { private final int IDX_REMOVE = 3; public CPathOutputEntryPage(ListDialogField cPathList) { - super(CPathEntryMessages.getString("OutputPathEntryPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("OutputPathEntryPage.description")); //$NON-NLS-1$ + super(CPathEntryMessages.OutputPathEntryPage_title); + setDescription(CPathEntryMessages.OutputPathEntryPage_description); fWorkspaceRoot = CUIPlugin.getWorkspace().getRoot(); fCPathList = cPathList; @@ -82,14 +83,14 @@ public class CPathOutputEntryPage extends CPathBasePage { String[] buttonLabels; buttonLabels = new String[]{ - /* 0 = IDX_ADDEXIST */CPathEntryMessages.getString("OutputPathEntryPage.folders.add.button"), //$NON-NLS-1$ - /* 1 */null, /* 2 = IDX_EDIT */CPathEntryMessages.getString("OutputPathEntryPage.folders.edit.button"), //$NON-NLS-1$ - /* 3 = IDX_REMOVE */CPathEntryMessages.getString("OutputPathEntryPage.folders.remove.button") //$NON-NLS-1$ + CPathEntryMessages.OutputPathEntryPage_folders_add_button, + /* 1 */null, CPathEntryMessages.OutputPathEntryPage_folders_edit_button, + CPathEntryMessages.OutputPathEntryPage_folders_remove_button }; fOutputList = new TreeListDialogField(adapter, buttonLabels, new CPElementLabelProvider()); fOutputList.setDialogFieldListener(adapter); - fOutputList.setLabelText(CPathEntryMessages.getString("OutputPathEntryPage.folders.label")); //$NON-NLS-1$ + fOutputList.setLabelText(CPathEntryMessages.OutputPathEntryPage_folders_label); fOutputList.setViewerComparator(new CPElementSorter()); fOutputList.enableButton(IDX_EDIT, false); @@ -428,11 +429,11 @@ public class CPathOutputEntryPage extends CPathBasePage { } return null; } - String title = (existing == null) ? CPathEntryMessages.getString("SourcePathEntryPage.NewSourceFolderDialog.new.title") //$NON-NLS-1$ - : CPathEntryMessages.getString("SourcePathEntryPage.NewSourceFolderDialog.edit.title"); //$NON-NLS-1$ + String title = (existing == null) ? CPathEntryMessages.SourcePathEntryPage_NewSourceFolderDialog_new_title + : CPathEntryMessages.SourcePathEntryPage_NewSourceFolderDialog_edit_title; IProject proj = fCurrCProject.getProject(); NewSourceFolderDialog dialog = new NewSourceFolderDialog(getShell(), title, proj, getExistingContainers(existing), existing); - dialog.setMessage(CPathEntryMessages.getFormattedString("SourcePathEntryPage.NewSourceFolderDialog.description", //$NON-NLS-1$ + dialog.setMessage(NLS.bind(CPathEntryMessages.SourcePathEntryPage_NewSourceFolderDialog_description, fProjPath.toString())); if (dialog.open() == Window.OK) { IResource folder = dialog.getSourceFolder(); @@ -444,8 +445,8 @@ public class CPathOutputEntryPage extends CPathBasePage { private void askForAddingExclusionPatternsDialog(List newEntries, Set modifiedEntries) { fixNestingConflicts(newEntries, fOutputList.getElements(), modifiedEntries); if (!modifiedEntries.isEmpty()) { - String title = CPathEntryMessages.getString("OutputPathEntryPage.exclusion_added.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("OutputPathEntryPage.exclusion_added.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.OutputPathEntryPage_exclusion_added_title; + String message = CPathEntryMessages.OutputPathEntryPage_exclusion_added_message; MessageDialog.openInformation(getShell(), title, message); } } @@ -470,11 +471,11 @@ public class CPathOutputEntryPage extends CPathBasePage { ITreeContentProvider cp = new BaseWorkbenchContentProvider(); String title = (existing == null) - ? CPathEntryMessages.getString("OutputPathEntryPage.ExistingOutputFolderDialog.new.title") //$NON-NLS-1$ - : CPathEntryMessages.getString("OutputPathEntryPage.ExistingOutputFolderDialog.edit.title"); //$NON-NLS-1$ + ? CPathEntryMessages.OutputPathEntryPage_ExistingOutputFolderDialog_new_title + : CPathEntryMessages.OutputPathEntryPage_ExistingOutputFolderDialog_edit_title; String message = (existing == null) - ? CPathEntryMessages.getString("OutputPathEntryPage.ExistingOutputFolderDialog.new.description") //$NON-NLS-1$ - : CPathEntryMessages.getString("OutputPathEntryPage.ExistingOutputFolderDialog.edit.description"); //$NON-NLS-1$ + ? CPathEntryMessages.OutputPathEntryPage_ExistingOutputFolderDialog_new_description + : CPathEntryMessages.OutputPathEntryPage_ExistingOutputFolderDialog_edit_description; MultipleFolderSelectionDialog dialog = new MultipleFolderSelectionDialog(getShell(), lp, cp); dialog.setExisting(existingContainers.toArray()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathProjectsEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathProjectsEntryPage.java index a589fdb444a..01b0ec6a229 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathProjectsEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathProjectsEntryPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -45,16 +45,16 @@ public class CPathProjectsEntryPage extends CPathBasePage { private ListDialogField fCPathList; public CPathProjectsEntryPage(ListDialogField cPathList) { - super(CPathEntryMessages.getString("ProjectsEntryPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("ProjectsEntryPage.description")); //$NON-NLS-1$ + super(CPathEntryMessages.ProjectsEntryPage_title); + setDescription(CPathEntryMessages.ProjectsEntryPage_description); ProjectsListListener listener = new ProjectsListListener(); - String[] buttonLabels = new String[] { /* 0 */CPathEntryMessages.getString("ProjectsEntryPage.projects.checkall.button"), //$NON-NLS-1$ - /* 1 */CPathEntryMessages.getString("ProjectsEntryWorkbookPage.projects.uncheckall.button")}; //$NON-NLS-1$ + String[] buttonLabels = new String[] { CPathEntryMessages.ProjectsEntryPage_projects_checkall_button, + CPathEntryMessages.ProjectsEntryWorkbookPage_projects_uncheckall_button}; fProjectsList = new CheckedListDialogField(null, buttonLabels, new CPElementLabelProvider()); fProjectsList.setDialogFieldListener(listener); - fProjectsList.setLabelText(CPathEntryMessages.getString("ProjectsEntryPage.projects.label")); //$NON-NLS-1$ + fProjectsList.setLabelText(CPathEntryMessages.ProjectsEntryPage_projects_label); fProjectsList.setCheckAllButtonIndex(0); fProjectsList.setUncheckAllButtonIndex(1); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java index f665957cc2d..1ac9edb273a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -92,7 +92,7 @@ public class CPathPropertyPage extends PropertyPage implements IStatusChangeList */ private Control createWithoutCProject(Composite parent) { Label label = new Label(parent, SWT.LEFT); - label.setText(CPathEntryMessages.getString("CPathsPropertyPage.no_C_project.message")); //$NON-NLS-1$ + label.setText(CPathEntryMessages.CPathsPropertyPage_no_C_project_message); fCPathsBlock = null; setValid(true); @@ -104,7 +104,7 @@ public class CPathPropertyPage extends PropertyPage implements IStatusChangeList */ private Control createForClosedProject(Composite parent) { Label label = new Label(parent, SWT.LEFT); - label.setText(CPathEntryMessages.getString("CPathsPropertyPage.closed_project.message")); //$NON-NLS-1$ + label.setText(CPathEntryMessages.CPathsPropertyPage_closed_project_message); fCPathsBlock = null; setValid(true); @@ -116,11 +116,11 @@ public class CPathPropertyPage extends PropertyPage implements IStatusChangeList if (fCPathsBlock != null) { if (!visible) { if (fCPathsBlock.hasChangesInDialog()) { - String title = CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.CPathsPropertyPage_unsavedchanges_title; + String message = CPathEntryMessages.CPathsPropertyPage_unsavedchanges_message; String[] buttonLabels = new String[]{ - CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.button.save"), //$NON-NLS-1$ - CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.button.discard"), //$NON-NLS-1$ + CPathEntryMessages.CPathsPropertyPage_unsavedchanges_button_save, + CPathEntryMessages.CPathsPropertyPage_unsavedchanges_button_discard, }; MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.QUESTION, buttonLabels, 0); @@ -183,8 +183,8 @@ public class CPathPropertyPage extends PropertyPage implements IStatusChangeList try { new ProgressMonitorDialog(shell).run(true, true, op); } catch (InvocationTargetException e) { - String title = CPathEntryMessages.getString("CPathsPropertyPage.error.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("CPathsPropertyPage.error.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.CPathsPropertyPage_error_title; + String message = CPathEntryMessages.CPathsPropertyPage_error_message; ExceptionHandler.handle(e, shell, title, message); return false; } catch (InterruptedException e) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java index b3c184e563f..fbdd8f3c943 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -32,6 +32,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.graphics.Image; @@ -70,8 +71,8 @@ public class CPathSourceEntryPage extends CPathBasePage { private final int IDX_REMOVE = 3; public CPathSourceEntryPage(ListDialogField classPathList) { - super(CPathEntryMessages.getString("SourcePathEntryPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("SourcePathEntryPage.description")); //$NON-NLS-1$ + super(CPathEntryMessages.SourcePathEntryPage_title); + setDescription(CPathEntryMessages.SourcePathEntryPage_description); fWorkspaceRoot = CUIPlugin.getWorkspace().getRoot(); fCPathList = classPathList; @@ -81,14 +82,14 @@ public class CPathSourceEntryPage extends CPathBasePage { String[] buttonLabels; buttonLabels = new String[]{ - /* 0 = IDX_ADDEXIST */CPathEntryMessages.getString("SourcePathEntryPage.folders.add.button"), //$NON-NLS-1$ - /* 1 */null, /* 2 = IDX_EDIT */CPathEntryMessages.getString("SourcePathEntryPath.folders.edit.button"), //$NON-NLS-1$ - /* 3 = IDX_REMOVE */CPathEntryMessages.getString("SourcePathEntryPage.folders.remove.button") //$NON-NLS-1$ + CPathEntryMessages.SourcePathEntryPage_folders_add_button, + /* 1 */null, CPathEntryMessages.SourcePathEntryPath_folders_edit_button, + CPathEntryMessages.SourcePathEntryPage_folders_remove_button }; fFoldersList = new TreeListDialogField(adapter, buttonLabels, new CPElementLabelProvider()); fFoldersList.setDialogFieldListener(adapter); - fFoldersList.setLabelText(CPathEntryMessages.getString("SourcePathEntryPage.folders.label")); //$NON-NLS-1$ + fFoldersList.setLabelText(CPathEntryMessages.SourcePathEntryPage_folders_label); fFoldersList.setViewerComparator(new CPElementSorter()); fFoldersList.enableButton(IDX_EDIT, false); @@ -404,12 +405,12 @@ public class CPathSourceEntryPage extends CPathBasePage { } return null; } - String title = (existing == null) ? CPathEntryMessages.getString("SourcePathEntryPage.NewSourceFolderDialog.new.title") //$NON-NLS-1$ - : CPathEntryMessages.getString("SourcePathEntryPage.NewSourceFolderDialog.edit.title"); //$NON-NLS-1$ + String title = (existing == null) ? CPathEntryMessages.SourcePathEntryPage_NewSourceFolderDialog_new_title + : CPathEntryMessages.SourcePathEntryPage_NewSourceFolderDialog_edit_title; IProject proj = fCurrCProject.getProject(); NewSourceFolderDialog dialog = new NewSourceFolderDialog(getShell(), title, proj, getExistingContainers(existing), existing); - dialog.setMessage(CPathEntryMessages.getFormattedString("SourcePathEntryPage.NewSourceFolderDialog.description", //$NON-NLS-1$ + dialog.setMessage(NLS.bind(CPathEntryMessages.SourcePathEntryPage_NewSourceFolderDialog_description, fProjPath.toString())); if (dialog.open() == Window.OK) { IResource folder = dialog.getSourceFolder(); @@ -421,8 +422,8 @@ public class CPathSourceEntryPage extends CPathBasePage { private void askForAddingExclusionPatternsDialog(List newEntries, Set modifiedEntries) { fixNestingConflicts(newEntries, fFoldersList.getElements(), modifiedEntries); if (!modifiedEntries.isEmpty()) { - String title = CPathEntryMessages.getString("SourcePathEntryPage.exclusion_added.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("SourcePathEntryPage.exclusion_added.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.SourcePathEntryPage_exclusion_added_title; + String message = CPathEntryMessages.SourcePathEntryPage_exclusion_added_message; MessageDialog.openInformation(getShell(), title, message); } } @@ -447,11 +448,11 @@ public class CPathSourceEntryPage extends CPathBasePage { ITreeContentProvider cp = new BaseWorkbenchContentProvider(); String title = (existing == null) - ? CPathEntryMessages.getString("SourcePathEntryPage.ExistingSourceFolderDialog.new.title") //$NON-NLS-1$ - : CPathEntryMessages.getString("SourcePathEntryPage.ExistingSourceFolderDialog.edit.title"); //$NON-NLS-1$ + ? CPathEntryMessages.SourcePathEntryPage_ExistingSourceFolderDialog_new_title + : CPathEntryMessages.SourcePathEntryPage_ExistingSourceFolderDialog_edit_title; String message = (existing == null) - ? CPathEntryMessages.getString("SourcePathEntryPage.ExistingSourceFolderDialog.new.description") //$NON-NLS-1$ - : CPathEntryMessages.getString("SourcePathEntryPage.ExistingSourceFolderDialog.edit.description"); //$NON-NLS-1$ + ? CPathEntryMessages.SourcePathEntryPage_ExistingSourceFolderDialog_new_description + : CPathEntryMessages.SourcePathEntryPage_ExistingSourceFolderDialog_edit_description; MultipleFolderSelectionDialog dialog = new MultipleFolderSelectionDialog(getShell(), lp, cp); dialog.setExisting(existingContainers.toArray()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathTabBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathTabBlock.java index c35a8691b00..000fecfaebf 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathTabBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathTabBlock.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -14,6 +14,7 @@ import java.util.List; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -55,10 +56,10 @@ public class CPathTabBlock extends AbstractPathOptionBlock { public CPathTabBlock(IStatusChangeListener context, int pageToShow) { super(context, pageToShow); - String[] buttonLabels = new String[]{ /* 0 */CPathEntryMessages.getString("CPathsBlock.path.up.button"), //$NON-NLS-1$ - /* 1 */CPathEntryMessages.getString("CPathsBlock.path.down.button"), //$NON-NLS-1$ - /* 2 */null, /* 3 */CPathEntryMessages.getString("CPathsBlock.path.checkall.button"), //$NON-NLS-1$ - /* 4 */CPathEntryMessages.getString("CPathsBlock.path.uncheckall.button") //$NON-NLS-1$ + String[] buttonLabels = new String[]{ CPathEntryMessages.CPathsBlock_path_up_button, + CPathEntryMessages.CPathsBlock_path_down_button, + /* 2 */null, CPathEntryMessages.CPathsBlock_path_checkall_button, + CPathEntryMessages.CPathsBlock_path_uncheckall_button }; BuildPathAdapter adapter = new BuildPathAdapter(); @@ -159,7 +160,7 @@ public class CPathTabBlock extends AbstractPathOptionBlock { if (nErrorEntries == 1 && entryError != null) { getPathStatus().setWarning(entryError.getStatus().getMessage()); } else { - getPathStatus().setWarning(CPathEntryMessages.getFormattedString("CPElement.status.multiplePathErrors", //$NON-NLS-1$ + getPathStatus().setWarning(NLS.bind(CPathEntryMessages.CPElement_status_multiplePathErrors, String.valueOf(nErrorEntries))); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java index 17276664ebc..610961352a2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -26,6 +26,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridLayout; @@ -84,16 +85,16 @@ public class ExclusionPatternDialog extends StatusDialog { public ExclusionPatternDialog(Shell parent, CPElement entryToEdit) { super(parent); fCurrElement= entryToEdit; - setTitle(CPathEntryMessages.getString("ExclusionPatternDialog.title")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.ExclusionPatternDialog_title); - String label= CPathEntryMessages.getFormattedString("ExclusionPatternDialog.pattern.label", entryToEdit.getPath().makeRelative().toString()); //$NON-NLS-1$ + String label= NLS.bind(CPathEntryMessages.ExclusionPatternDialog_pattern_label, entryToEdit.getPath().makeRelative().toString()); String[] buttonLabels= new String[] { - /* IDX_ADD */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.add"), //$NON-NLS-1$ - /* IDX_ADD_MULTIPLE */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.add.multiple"), //$NON-NLS-1$ - /* IDX_EDIT */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.edit"), //$NON-NLS-1$ + CPathEntryMessages.ExclusionPatternDialog_pattern_add, + CPathEntryMessages.ExclusionPatternDialog_pattern_add_multiple, + CPathEntryMessages.ExclusionPatternDialog_pattern_edit, null, - /* IDX_REMOVE */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.remove") //$NON-NLS-1$ + CPathEntryMessages.ExclusionPatternDialog_pattern_remove }; ExclusionPatternAdapter adapter= new ExclusionPatternAdapter(); @@ -244,9 +245,9 @@ public class ExclusionPatternDialog extends StatusDialog { IResource initialElement= null; ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp); - dialog.setTitle(CPathEntryMessages.getString("ExclusionPatternDialog.ChooseExclusionPattern.title")); //$NON-NLS-1$ + dialog.setTitle(CPathEntryMessages.ExclusionPatternDialog_ChooseExclusionPattern_title); dialog.setValidator(validator); - dialog.setMessage(CPathEntryMessages.getString("ExclusionPatternDialog.ChooseExclusionPattern.description")); //$NON-NLS-1$ + dialog.setMessage(CPathEntryMessages.ExclusionPatternDialog_ChooseExclusionPattern_description); dialog.addFilter(filter); dialog.setInput(fCurrSourceFolder); dialog.setInitialSelection(initialElement); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternEntryDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternEntryDialog.java index 350dff36b17..ca5d3d66f1b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternEntryDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternEntryDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -23,6 +23,7 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; @@ -59,9 +60,9 @@ public class ExclusionPatternEntryDialog extends StatusDialog { super(parent); fExistingPatterns = existingPatterns; if (patternToEdit == null) { - setTitle(CPathEntryMessages.getString("ExclusionPatternEntryDialog.add.title")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.ExclusionPatternEntryDialog_add_title); } else { - setTitle(CPathEntryMessages.getString("ExclusionPatternEntryDialog.edit.title")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.ExclusionPatternEntryDialog_edit_title); fExistingPatterns.remove(patternToEdit); } @@ -73,13 +74,13 @@ public class ExclusionPatternEntryDialog extends StatusDialog { fExclusionPatternStatus = new StatusInfo(); - String label = CPathEntryMessages.getFormattedString("ExclusionPatternEntryDialog.pattern.label", //$NON-NLS-1$ + String label = NLS.bind(CPathEntryMessages.ExclusionPatternEntryDialog_pattern_label, entryToEdit.getPath().makeRelative().toString()); ExclusionPatternAdapter adapter = new ExclusionPatternAdapter(); fExclusionPatternDialog = new StringButtonDialogField(adapter); fExclusionPatternDialog.setLabelText(label); - fExclusionPatternDialog.setButtonLabel(CPathEntryMessages.getString("ExclusionPatternEntryDialog.pattern.button")); //$NON-NLS-1$ + fExclusionPatternDialog.setButtonLabel(CPathEntryMessages.ExclusionPatternEntryDialog_pattern_button); fExclusionPatternDialog.setDialogFieldListener(adapter); fExclusionPatternDialog.enableButton(fCurrSourceFolder != null); @@ -104,7 +105,7 @@ public class ExclusionPatternEntryDialog extends StatusDialog { inner.setLayout(layout); Label description = new Label(inner, SWT.WRAP); - description.setText(CPathEntryMessages.getString("ExclusionPatternEntryDialog.description")); //$NON-NLS-1$ + description.setText(CPathEntryMessages.ExclusionPatternEntryDialog_description); GridData gd = new GridData(); gd.horizontalSpan = 2; gd.widthHint = convertWidthInCharsToPixels(80); @@ -153,16 +154,16 @@ public class ExclusionPatternEntryDialog extends StatusDialog { protected void checkIfPatternValid() { String pattern = fExclusionPatternDialog.getText().trim(); if (pattern.length() == 0) { - fExclusionPatternStatus.setError(CPathEntryMessages.getString("ExclusionPatternEntryDialog.error.empty")); //$NON-NLS-1$ + fExclusionPatternStatus.setError(CPathEntryMessages.ExclusionPatternEntryDialog_error_empty); return; } IPath path = new Path(pattern); if (path.isAbsolute() || path.getDevice() != null) { - fExclusionPatternStatus.setError(CPathEntryMessages.getString("ExclusionPatternEntryDialog.error.notrelative")); //$NON-NLS-1$ + fExclusionPatternStatus.setError(CPathEntryMessages.ExclusionPatternEntryDialog_error_notrelative); return; } if (fExistingPatterns.contains(pattern)) { - fExclusionPatternStatus.setError(CPathEntryMessages.getString("ExclusionPatternEntryDialog.error.exists")); //$NON-NLS-1$ + fExclusionPatternStatus.setError(CPathEntryMessages.ExclusionPatternEntryDialog_error_exists); return; } @@ -211,9 +212,9 @@ public class ExclusionPatternEntryDialog extends StatusDialog { } ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), lp, cp); - dialog.setTitle(CPathEntryMessages.getString("ExclusionPatternEntryDialog.ChooseExclusionPattern.title")); //$NON-NLS-1$ + dialog.setTitle(CPathEntryMessages.ExclusionPatternEntryDialog_ChooseExclusionPattern_title); dialog.setValidator(validator); - dialog.setMessage(CPathEntryMessages.getString("ExclusionPatternEntryDialog.ChooseExclusionPattern.description")); //$NON-NLS-1$ + dialog.setMessage(CPathEntryMessages.ExclusionPatternEntryDialog_ChooseExclusionPattern_description); dialog.addFilter(filter); dialog.setInput(fCurrSourceFolder); dialog.setInitialSelection(initialElement); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/FolderSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/FolderSelectionDialog.java index 194386076be..98eb1165c8c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/FolderSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/FolderSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -57,7 +57,7 @@ public class FolderSelectionDialog extends ElementTreeSelectionDialog implements getTreeViewer().addSelectionChangedListener(this); Button button = new Button(result, SWT.PUSH); - button.setText(CPathEntryMessages.getString("FolderSelectionDialog.button")); //$NON-NLS-1$ + button.setText(CPathEntryMessages.FolderSelectionDialog_button); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java index 98fbaa74ca9..8a96f4865d3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -95,7 +95,7 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus */ private Control createWithoutCProject(Composite parent) { Label label = new Label(parent, SWT.LEFT); - label.setText(CPathEntryMessages.getString("CPathsPropertyPage.no_C_project.message")); //$NON-NLS-1$ + label.setText(CPathEntryMessages.CPathsPropertyPage_no_C_project_message); fIncludesSymbolsBlock = null; setValid(true); @@ -107,7 +107,7 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus */ private Control createForClosedProject(Composite parent) { Label label = new Label(parent, SWT.LEFT); - label.setText(CPathEntryMessages.getString("CPathsPropertyPage.closed_project.message")); //$NON-NLS-1$ + label.setText(CPathEntryMessages.CPathsPropertyPage_closed_project_message); fIncludesSymbolsBlock = null; setValid(true); @@ -131,11 +131,11 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus if (fIncludesSymbolsBlock != null) { if (!visible) { if (fIncludesSymbolsBlock.hasChangesInDialog()) { - String title = CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.CPathsPropertyPage_unsavedchanges_title; + String message = CPathEntryMessages.CPathsPropertyPage_unsavedchanges_message; String[] buttonLabels = new String[]{ - CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.button.save"), //$NON-NLS-1$ - CPathEntryMessages.getString("CPathsPropertyPage.unsavedchanges.button.discard"), //$NON-NLS-1$ + CPathEntryMessages.CPathsPropertyPage_unsavedchanges_button_save, + CPathEntryMessages.CPathsPropertyPage_unsavedchanges_button_discard, }; MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.QUESTION, buttonLabels, 0); @@ -205,8 +205,8 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus try { new ProgressMonitorDialog(shell).run(true, true, op); } catch (InvocationTargetException e) { - String title = CPathEntryMessages.getString("CPathsPropertyPage.error.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("CPathsPropertyPage.error.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.CPathsPropertyPage_error_title; + String message = CPathEntryMessages.CPathsPropertyPage_error_message; ExceptionHandler.handle(e, shell, title, message); return false; } catch (InterruptedException e) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/MultipleFolderSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/MultipleFolderSelectionDialog.java index 6a9941608e4..e691bc8af82 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/MultipleFolderSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/MultipleFolderSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -237,7 +237,7 @@ public class MultipleFolderSelectionDialog extends SelectionStatusDialog impleme treeWidget.setFont(composite.getFont()); Button button = new Button(composite, SWT.PUSH); - button.setText(CPathEntryMessages.getString("MultipleFolderSelectionDialog.button")); //$NON-NLS-1$ + button.setText(CPathEntryMessages.MultipleFolderSelectionDialog_button); button.addSelectionListener(new SelectionAdapter() { @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewSourceFolderDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewSourceFolderDialog.java index 457abf28ba6..9260fc37530 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewSourceFolderDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewSourceFolderDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -18,6 +18,7 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; @@ -53,16 +54,16 @@ public class NewSourceFolderDialog extends StatusDialog { SourceContainerAdapter adapter = new SourceContainerAdapter(); fUseProjectButton = new SelectionButtonDialogField(SWT.RADIO); - fUseProjectButton.setLabelText(CPathEntryMessages.getString("NewSourceFolderDialog.useproject.button")); //$NON-NLS-1$ + fUseProjectButton.setLabelText(CPathEntryMessages.NewSourceFolderDialog_useproject_button); fUseProjectButton.setDialogFieldListener(adapter); fUseFolderButton = new SelectionButtonDialogField(SWT.RADIO); - fUseFolderButton.setLabelText(CPathEntryMessages.getString("NewSourceFolderDialog.usefolder.button")); //$NON-NLS-1$ + fUseFolderButton.setLabelText(CPathEntryMessages.NewSourceFolderDialog_usefolder_button); fUseFolderButton.setDialogFieldListener(adapter); fContainerDialogField = new StringDialogField(); fContainerDialogField.setDialogFieldListener(adapter); - fContainerDialogField.setLabelText(CPathEntryMessages.getString("NewSourceFolderDialog.sourcefolder.label")); //$NON-NLS-1$ + fContainerDialogField.setLabelText(CPathEntryMessages.NewSourceFolderDialog_sourcefolder_label); fUseFolderButton.attachDialogField(fContainerDialogField); @@ -142,7 +143,7 @@ public class NewSourceFolderDialog extends StatusDialog { if (fUseFolderButton.isSelected()) { String pathStr = fContainerDialogField.getText(); if (pathStr.length() == 0) { - fContainerFieldStatus.setError(CPathEntryMessages.getString("NewSourceFolderDialog.error.enterpath")); //$NON-NLS-1$ + fContainerFieldStatus.setError(CPathEntryMessages.NewSourceFolderDialog_error_enterpath); return; } IPath path = fCurrProject.getFullPath().append(pathStr); @@ -150,7 +151,7 @@ public class NewSourceFolderDialog extends StatusDialog { IStatus pathValidation = workspace.validatePath(path.toString(), IResource.FOLDER); if (!pathValidation.isOK()) { - fContainerFieldStatus.setError(CPathEntryMessages.getFormattedString("NewSourceFolderDialog.error.invalidpath", //$NON-NLS-1$ + fContainerFieldStatus.setError(NLS.bind(CPathEntryMessages.NewSourceFolderDialog_error_invalidpath, pathValidation.getMessage())); return; } @@ -159,7 +160,7 @@ public class NewSourceFolderDialog extends StatusDialog { folder = fCurrProject; } if (isExisting(folder)) { - fContainerFieldStatus.setError(CPathEntryMessages.getString("NewSourceFolderDialog.error.pathexists")); //$NON-NLS-1$ + fContainerFieldStatus.setError(CPathEntryMessages.NewSourceFolderDialog_error_pathexists); return; } fContainerFieldStatus.setOK(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerDescriptor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerDescriptor.java index 6c3e3e0025a..b66ea3c4ca6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerDescriptor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerDescriptor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -29,7 +29,7 @@ public class ProjectContainerDescriptor implements IContainerDescriptor { } public String getName() { - return CPathEntryMessages.getString("ProjectContainer.label"); //$NON-NLS-1$ + return CPathEntryMessages.ProjectContainer_label; } public Image getImage() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerPage.java index 667e33e8bad..c853af74c24 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -49,8 +49,8 @@ public class ProjectContainerPage extends WizardPage implements IPathEntryContai protected ProjectContainerPage(int[] filterType) { super("projectContainerPage"); //$NON-NLS-1$ - setTitle(CPathEntryMessages.getString("ProjectContainerPage.title")); //$NON-NLS-1$ - setDescription(CPathEntryMessages.getString("ProjectContainerPage.description")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.ProjectContainerPage_title); + setDescription(CPathEntryMessages.ProjectContainerPage_description); setImageDescriptor(CPluginImages.DESC_WIZBAN_ADD_LIBRARY); fFilterType = filterType; validatePage(); @@ -98,7 +98,7 @@ public class ProjectContainerPage extends WizardPage implements IPathEntryContai layout.numColumns = 2; container.setLayout(layout); Label label = new Label(container, SWT.NULL); - label.setText(CPathEntryMessages.getString("ProjectContainerPage.label")); //$NON-NLS-1$ + label.setText(CPathEntryMessages.ProjectContainerPage_label); GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentBlock.java index 6d9e1badb3d..e54e70bdb23 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentBlock.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -33,6 +33,7 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.layout.GridData; @@ -122,16 +123,16 @@ public class SourceAttachmentBlock { fFileNameField = new StringButtonDialogField(adapter); fFileNameField.setDialogFieldListener(adapter); - fFileNameField.setLabelText(CPathEntryMessages.getString("SourceAttachmentBlock.filename.label")); //$NON-NLS-1$ - fFileNameField.setButtonLabel(CPathEntryMessages.getString("SourceAttachmentBlock.filename.externalfile.button")); //$NON-NLS-1$ + fFileNameField.setLabelText(CPathEntryMessages.SourceAttachmentBlock_filename_label); + fFileNameField.setButtonLabel(CPathEntryMessages.SourceAttachmentBlock_filename_externalfile_button); fWorkspaceButton = new SelectionButtonDialogField(SWT.PUSH); fWorkspaceButton.setDialogFieldListener(adapter); - fWorkspaceButton.setLabelText(CPathEntryMessages.getString("SourceAttachmentBlock.filename.internal.button")); //$NON-NLS-1$ + fWorkspaceButton.setLabelText(CPathEntryMessages.SourceAttachmentBlock_filename_internal_button); fExternalFolderButton = new SelectionButtonDialogField(SWT.PUSH); fExternalFolderButton.setDialogFieldListener(adapter); - fExternalFolderButton.setLabelText(CPathEntryMessages.getString("SourceAttachmentBlock.filename.externalfolder.button")); //$NON-NLS-1$ + fExternalFolderButton.setLabelText(CPathEntryMessages.SourceAttachmentBlock_filename_externalfolder_button); // set the old settings setDefaults(); @@ -192,8 +193,8 @@ public class SourceAttachmentBlock { Label message = new Label(composite, SWT.LEFT); message.setLayoutData(gd); - message.setText(CPathEntryMessages.getFormattedString( - "SourceAttachmentBlock.message", fEntry.getLibraryPath().lastSegment())); //$NON-NLS-1$ + message.setText(NLS.bind( + CPathEntryMessages.SourceAttachmentBlock_message, fEntry.getLibraryPath().lastSegment())); fWorkspaceButton.doFillIntoGrid(composite, 1); @@ -301,7 +302,7 @@ public class SourceAttachmentBlock { return status; } if (!Path.EMPTY.isValidPath(fileName)) { - status.setError(CPathEntryMessages.getString("SourceAttachmentBlock.filename.error.notvalid")); //$NON-NLS-1$ + status.setError(CPathEntryMessages.SourceAttachmentBlock_filename_error_notvalid); return status; } IPath filePath = new Path(fileName); @@ -311,8 +312,8 @@ public class SourceAttachmentBlock { file = res.getLocation().toFile(); } if (!file.exists()) { - String message = CPathEntryMessages.getFormattedString( - "SourceAttachmentBlock.filename.error.filenotexists", filePath.toString()); //$NON-NLS-1$ + String message = NLS.bind( + CPathEntryMessages.SourceAttachmentBlock_filename_error_filenotexists, filePath.toString()); status.setError(message); return status; } @@ -333,7 +334,7 @@ public class SourceAttachmentBlock { } FileDialog dialog = new FileDialog(getShell()); - dialog.setText(CPathEntryMessages.getString("SourceAttachmentBlock.extjardialog.text")); //$NON-NLS-1$ + dialog.setText(CPathEntryMessages.SourceAttachmentBlock_extjardialog_text); dialog.setFilterExtensions(new String[]{"*.jar;*.zip"}); //$NON-NLS-1$ dialog.setFilterPath(currPath.toOSString()); String res = dialog.open(); @@ -353,7 +354,7 @@ public class SourceAttachmentBlock { } DirectoryDialog dialog = new DirectoryDialog(getShell()); - dialog.setText(CPathEntryMessages.getString("SourceAttachmentBlock.extfolderdialog.text")); //$NON-NLS-1$ + dialog.setText(CPathEntryMessages.SourceAttachmentBlock_extfolderdialog_text); dialog.setFilterPath(currPath.toOSString()); String res = dialog.open(); if (res != null) { @@ -388,8 +389,8 @@ public class SourceAttachmentBlock { dialog.setAllowMultiple(false); dialog.setValidator(validator); dialog.addFilter(filter); - dialog.setTitle(CPathEntryMessages.getString("SourceAttachmentBlock.intjardialog.title")); //$NON-NLS-1$ - dialog.setMessage(CPathEntryMessages.getString("SourceAttachmentBlock.intjardialog.message")); //$NON-NLS-1$ + dialog.setTitle(CPathEntryMessages.SourceAttachmentBlock_intjardialog_title); + dialog.setMessage(CPathEntryMessages.SourceAttachmentBlock_intjardialog_message); dialog.setInput(fWorkspaceRoot); dialog.setInitialSelection(initSel); if (dialog.open() == Window.OK) { @@ -472,8 +473,8 @@ public class SourceAttachmentBlock { shell.getDisplay().syncExec(new Runnable() { public void run() { - String title = CPathEntryMessages.getString("SourceAttachmentBlock.putoncpdialog.title"); //$NON-NLS-1$ - String message = CPathEntryMessages.getString("SourceAttachmentBlock.putoncpdialog.message"); //$NON-NLS-1$ + String title = CPathEntryMessages.SourceAttachmentBlock_putoncpdialog_title; + String message = CPathEntryMessages.SourceAttachmentBlock_putoncpdialog_message; result[0] = MessageDialog.openQuestion(CUIPlugin.getActiveWorkbenchShell(), title, message); } }); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentDialog.java index 82f54e17656..aded3e5dd2e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2008 QNX Software Systems 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 @@ -65,7 +65,7 @@ public class SourceAttachmentDialog extends StatusDialog { }; fSourceAttachmentBlock= new SourceAttachmentBlock(listener, entry, project); - setTitle(CPathEntryMessages.getString("SourceAttachmentDialog.title")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.SourceAttachmentDialog_title); } /* (non-Javadoc) @@ -126,8 +126,8 @@ public class SourceAttachmentDialog extends StatusDialog { new ProgressMonitorDialog(getShell()).run(true, true, runnable); } catch (InvocationTargetException e) { - String title= CPathEntryMessages.getString("SourceAttachmentDialog.error.title"); //$NON-NLS-1$ - String message= CPathEntryMessages.getString("SourceAttachmentDialog.error.message"); //$NON-NLS-1$ + String title= CPathEntryMessages.SourceAttachmentDialog_error_title; + String message= CPathEntryMessages.SourceAttachmentDialog_error_message; ExceptionHandler.handle(e, getShell(), title, message); } catch (InterruptedException e) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java index 504b23314ba..74bd99cb855 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java @@ -95,8 +95,8 @@ public class FileTransferDragAdapter implements TransferDragSourceListener { @Override public void execute(IProgressMonitor monitor) throws CoreException { try { - monitor.beginTask(CUIMessages.getString("FileTransferDragAdapter.refreshing"), roots.size()); //$NON-NLS-1$ - MultiStatus status = new MultiStatus(CUIPlugin.getPluginId(), IStatus.OK, CUIMessages.getString("FileTransferDragAdapter.problem"), null); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.FileTransferDragAdapter_refreshing, roots.size()); + MultiStatus status = new MultiStatus(CUIPlugin.getPluginId(), IStatus.OK, CUIMessages.FileTransferDragAdapter_problem, null); for (IResource resource : roots) { try { @@ -178,8 +178,8 @@ public class FileTransferDragAdapter implements TransferDragSourceListener { } catch (InterruptedException e) { // Do nothing. Operation has been canceled by user. } catch (InvocationTargetException e) { - String message = CUIMessages.getString("FileTransferDragAdapter.problem"); //$NON-NLS-1$ - String title = CUIMessages.getString("FileTransferDragAdapter.problemTitle"); //$NON-NLS-1$ + String message = CUIMessages.FileTransferDragAdapter_problem; + String title = CUIMessages.FileTransferDragAdapter_problemTitle; ExceptionHandler.handle(e, title, message); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java index 74280f5bea1..8ff933aa8dd 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java @@ -76,8 +76,8 @@ public class ResourceTransferDragAdapter implements TransferDragSourceListener { DragSource dragSource = (DragSource) event.widget; Control control = dragSource.getControl(); Shell shell = control.getShell(); - String title = CUIMessages.getString("Drag.move.problem.title"); //$NON-NLS-1$ - String message = CUIMessages.getString("Drag.move.problem.message"); //$NON-NLS-1$ + String title = CUIMessages.Drag_move_problem_title; + String message = CUIMessages.Drag_move_problem_message; ReadOnlyStateChecker checker = new ReadOnlyStateChecker(shell, title, message); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java index b14349a3de7..8d3f4af976f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java @@ -108,9 +108,9 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate { } public AddIncludeOnSelectionAction(ITextEditor editor) { - super(CEditorMessages.getString("AddIncludeOnSelection.label")); //$NON-NLS-1$ - setToolTipText(CEditorMessages.getString("AddIncludeOnSelection.tooltip")); //$NON-NLS-1$ - setDescription(CEditorMessages.getString("AddIncludeOnSelection.description")); //$NON-NLS-1$ + super(CEditorMessages.AddIncludeOnSelection_label); + setToolTipText(CEditorMessages.AddIncludeOnSelection_tooltip); + setDescription(CEditorMessages.AddIncludeOnSelection_description); fEditor= editor; CUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.ADD_INCLUDE_ON_SELECTION_ACTION); @@ -123,7 +123,7 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate { PlatformUI.getWorkbench().getProgressService(), new WorkbenchRunnableAdapter(op), op.getScheduleRule()); } catch (InvocationTargetException e) { - ExceptionHandler.handle(e, getShell(), CEditorMessages.getString("AddIncludeOnSelection.error.message1"), null); //$NON-NLS-1$ + ExceptionHandler.handle(e, getShell(), CEditorMessages.AddIncludeOnSelection_error_message1, null); } catch (InterruptedException e) { // Do nothing. Operation has been canceled. } @@ -272,8 +272,8 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate { { ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_NAME_ONLY)); dialog.setElements(pdomNames.toArray()); - dialog.setTitle(CEditorMessages.getString("AddIncludeOnSelection.label")); //$NON-NLS-1$ - dialog.setMessage(CEditorMessages.getString("AddIncludeOnSelection.description")); //$NON-NLS-1$ + dialog.setTitle(CEditorMessages.AddIncludeOnSelection_label); + dialog.setMessage(CEditorMessages.AddIncludeOnSelection_description); if (dialog.open() == Window.OK) { //get selection Object[] selects = dialog.getResult(); @@ -332,7 +332,7 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate { if (fRequiredIncludes == null && fUsings == null) { } } catch (BadLocationException e) { - MessageDialog.openError(getShell(), CEditorMessages.getString("AddIncludeOnSelection.error.message3"), CEditorMessages.getString("AddIncludeOnSelection.error.message4") + e.getMessage()); //$NON-NLS-2$ //$NON-NLS-1$ + MessageDialog.openError(getShell(), CEditorMessages.AddIncludeOnSelection_error_message3, CEditorMessages.AddIncludeOnSelection_error_message4 + e.getMessage()); } } @@ -362,7 +362,7 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate { try { PlatformUI.getWorkbench().getProgressService().busyCursorWhile(op); } catch (InvocationTargetException e) { - ExceptionHandler.handle(e, getShell(), CEditorMessages.getString("AddIncludeOnSelection.error.message1"), null); //$NON-NLS-1$ + ExceptionHandler.handle(e, getShell(), CEditorMessages.AddIncludeOnSelection_error_message1, null); } catch (InterruptedException e) { // Do nothing. Operation has been canceled. } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java index c3d8c710cce..3f1cd591d95 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java @@ -73,7 +73,7 @@ public class CContentOutlinePage extends AbstractCModelOutlinePage { private Control createStatusPage(Composite parent) { Label label = new Label(parent, SWT.NONE); - label.setText(CEditorMessages.getString("Scalability.outlineDisabled")); //$NON-NLS-1$ + label.setText(CEditorMessages.Scalability_outlineDisabled); return label; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java index 0a96563cd92..bd504cb25ab 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java @@ -21,6 +21,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.ResourceBundle; import java.util.Set; import java.util.Stack; @@ -1342,12 +1343,12 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC if (getPreferenceStore().getBoolean(PreferenceConstants.SCALABILITY_ALERT)) { MessageDialogWithToggle dialog = new MessageDialogWithToggle( Display.getCurrent().getActiveShell(), - CEditorMessages.getString("Scalability.info"), //$NON-NLS-1$ + CEditorMessages.Scalability_info, null, - CEditorMessages.getString("Scalability.message"), //$NON-NLS-1$ + CEditorMessages.Scalability_message, MessageDialog.INFORMATION, new String[] {IDialogConstants.OK_LABEL}, 0, - CEditorMessages.getString("Scalability.reappear"), //$NON-NLS-1$ + CEditorMessages.Scalability_reappear, false) { @Override protected void buttonPressed(int buttonId) { @@ -2060,44 +2061,45 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC action.setActionDefinitionId(ICEditorActionDefinitionIds.GOTO_MATCHING_BRACKET); setAction(GotoMatchingBracketAction.GOTO_MATCHING_BRACKET, action); - action = new GotoNextBookmarkAction(CEditorMessages.getResourceBundle(), "GotoNextBookmark.", this); //$NON-NLS-1$ + final ResourceBundle bundle = ConstructedCEditorMessages.getResourceBundle(); + action = new GotoNextBookmarkAction(bundle, "GotoNextBookmark.", this); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.GOTO_NEXT_BOOKMARK); setAction(GotoNextBookmarkAction.NEXT_BOOKMARK, action); - action = new FindWordAction(CEditorMessages.getResourceBundle(), "FindWord.", this, getSourceViewer()); //$NON-NLS-1$ + action = new FindWordAction(bundle, "FindWord.", this, getSourceViewer()); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.FIND_WORD); setAction(FindWordAction.FIND_WORD, action); markAsStateDependentAction(FindWordAction.FIND_WORD, true); markAsSelectionDependentAction(FindWordAction.FIND_WORD, true); - action = new ToggleCommentAction(CEditorMessages.getResourceBundle(), "ToggleComment.", this); //$NON-NLS-1$ + action = new ToggleCommentAction(bundle, "ToggleComment.", this); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.TOGGLE_COMMENT); setAction("ToggleComment", action); //$NON-NLS-1$ markAsStateDependentAction("ToggleComment", true); //$NON-NLS-1$ configureToggleCommentAction(); - action = new AddBlockCommentAction(CEditorMessages.getResourceBundle(), "AddBlockComment.", this); //$NON-NLS-1$ + action = new AddBlockCommentAction(bundle, "AddBlockComment.", this); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_BLOCK_COMMENT); setAction("AddBlockComment", action); //$NON-NLS-1$ markAsStateDependentAction("AddBlockComment", true); //$NON-NLS-1$ markAsSelectionDependentAction("AddBlockComment", true); //$NON-NLS-1$ //WorkbenchHelp.setHelp(action, ICHelpContextIds.ADD_BLOCK_COMMENT_ACTION); - action = new RemoveBlockCommentAction(CEditorMessages.getResourceBundle(), "RemoveBlockComment.", this); //$NON-NLS-1$ + action = new RemoveBlockCommentAction(bundle, "RemoveBlockComment.", this); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.REMOVE_BLOCK_COMMENT); setAction("RemoveBlockComment", action); //$NON-NLS-1$ markAsStateDependentAction("RemoveBlockComment", true); //$NON-NLS-1$ markAsSelectionDependentAction("RemoveBlockComment", true); //$NON-NLS-1$ //WorkbenchHelp.setHelp(action, ICHelpContextIds.REMOVE_BLOCK_COMMENT_ACTION); - action = new IndentAction(CEditorMessages.getResourceBundle(), "Indent.", this, false); //$NON-NLS-1$ + action = new IndentAction(bundle, "Indent.", this, false); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.INDENT); setAction("Indent", action); //$NON-NLS-1$ markAsStateDependentAction("Indent", true); //$NON-NLS-1$ markAsSelectionDependentAction("Indent", true); //$NON-NLS-1$ // PlatformUI.getWorkbench().getHelpSystem().setHelp(action, ICHelpContextIds.INDENT_ACTION); - action = new IndentAction(CEditorMessages.getResourceBundle(), "Indent.", this, true); //$NON-NLS-1$ + action = new IndentAction(bundle, "Indent.", this, true); //$NON-NLS-1$ setAction("IndentOnTab", action); //$NON-NLS-1$ markAsStateDependentAction("IndentOnTab", true); //$NON-NLS-1$ markAsSelectionDependentAction("IndentOnTab", true); //$NON-NLS-1$ @@ -2106,42 +2108,42 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC setActionActivationCode("IndentOnTab", '\t', -1, SWT.NONE); //$NON-NLS-1$ } - action = new TextOperationAction(CEditorMessages.getResourceBundle(), "Format.", this, ISourceViewer.FORMAT); //$NON-NLS-1$ + action = new TextOperationAction(bundle, "Format.", this, ISourceViewer.FORMAT); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.FORMAT); setAction("Format", action); //$NON-NLS-1$ markAsStateDependentAction("Format", true); //$NON-NLS-1$ - action = new ContentAssistAction(CEditorMessages.getResourceBundle(), "ContentAssistProposal.", this); //$NON-NLS-1$ + action = new ContentAssistAction(bundle, "ContentAssistProposal.", this); //$NON-NLS-1$ action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); setAction("ContentAssistProposal", action); //$NON-NLS-1$ markAsStateDependentAction("ContentAssistProposal", true); //$NON-NLS-1$ - action= new TextOperationAction(CEditorMessages.getResourceBundle(), "ContentAssistContextInformation.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION); //$NON-NLS-1$ + action= new TextOperationAction(bundle, "ContentAssistContextInformation.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION); //$NON-NLS-1$ action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION); setAction("ContentAssistContextInformation", action); //$NON-NLS-1$ markAsStateDependentAction("ContentAssistContextInformation", true); //$NON-NLS-1$ - action = new TextOperationAction(CEditorMessages.getResourceBundle(), "OpenOutline.", this, CSourceViewer.SHOW_OUTLINE, true); //$NON-NLS-1$ + action = new TextOperationAction(bundle, "OpenOutline.", this, CSourceViewer.SHOW_OUTLINE, true); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_OUTLINE); setAction("OpenOutline", action); //$NON-NLS-1$*/ - action = new TextOperationAction(CEditorMessages.getResourceBundle(), "OpenHierarchy.", this, CSourceViewer.SHOW_HIERARCHY, true); //$NON-NLS-1$ + action = new TextOperationAction(bundle, "OpenHierarchy.", this, CSourceViewer.SHOW_HIERARCHY, true); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_QUICK_TYPE_HIERARCHY); setAction("OpenHierarchy", action); //$NON-NLS-1$*/ - action = new GoToNextPreviousMemberAction(CEditorMessages.getResourceBundle(), "GotoNextMember.", this, true); //$NON-NLS-1$ + action = new GoToNextPreviousMemberAction(bundle, "GotoNextMember.", this, true); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.GOTO_NEXT_MEMBER); setAction(GoToNextPreviousMemberAction.PREVIOUS_MEMBER, action); - action = new GoToNextPreviousMemberAction(CEditorMessages.getResourceBundle(), "GotoPreviousMember.", this, false); //$NON-NLS-1$ + action = new GoToNextPreviousMemberAction(bundle, "GotoPreviousMember.", this, false); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.GOTO_PREVIOUS_MEMBER); setAction(GoToNextPreviousMemberAction.NEXT_MEMBER, action); - action= new ToggleSourceAndHeaderAction(CEditorMessages.getResourceBundle(), "ToggleSourceHeader.", this); //$NON-NLS-1$ + action= new ToggleSourceAndHeaderAction(bundle, "ToggleSourceHeader.", this); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.TOGGLE_SOURCE_HEADER); setAction("ToggleSourceHeader", action); //$NON-NLS-1$ - action = new TextOperationAction(CEditorMessages.getResourceBundle(), "OpenMacroExplorer.", this, CSourceViewer.SHOW_MACRO_EXPLORER, true); //$NON-NLS-1$ + action = new TextOperationAction(bundle, "OpenMacroExplorer.", this, CSourceViewer.SHOW_MACRO_EXPLORER, true); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_QUICK_MACRO_EXPLORER); setAction("OpenMacroExplorer", action); //$NON-NLS-1$*/ @@ -2229,7 +2231,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC @Override protected void rulerContextMenuAboutToShow(IMenuManager menu) { super.rulerContextMenuAboutToShow(menu); - IMenuManager foldingMenu= new MenuManager(CEditorMessages.getString("CEditor.menu.folding"), "projection"); //$NON-NLS-1$ //$NON-NLS-2$ + IMenuManager foldingMenu= new MenuManager(CEditorMessages.CEditor_menu_folding, "projection"); //$NON-NLS-1$ menu.appendToGroup(ITextEditorActionConstants.GROUP_RULERS, foldingMenu); IAction action= getAction("FoldingToggle"); //$NON-NLS-1$ @@ -2358,7 +2360,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC int selectionLength = Math.abs(selection.getLength()); if (selectionLength > 1) { - setStatusLineErrorMessage(CEditorMessages.getString("GotoMatchingBracket.error.invalidSelection")); //$NON-NLS-1$ + setStatusLineErrorMessage(CEditorMessages.GotoMatchingBracket_error_invalidSelection); sourceViewer.getTextWidget().getDisplay().beep(); return; } @@ -2370,7 +2372,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC IRegion region = fBracketMatcher.match(document, sourceCaretOffset); if (region == null) { - setStatusLineErrorMessage(CEditorMessages.getString("GotoMatchingBracket.error.noMatchingBracket")); //$NON-NLS-1$ + setStatusLineErrorMessage(CEditorMessages.GotoMatchingBracket_error_noMatchingBracket); sourceViewer.getTextWidget().getDisplay().beep(); return; } @@ -2396,7 +2398,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC } if (!visible) { - setStatusLineErrorMessage(CEditorMessages.getString("GotoMatchingBracket.error.bracketOutsideSelectedElement")); //$NON-NLS-1$ + setStatusLineErrorMessage(CEditorMessages.GotoMatchingBracket_error_bracketOutsideSelectedElement); sourceViewer.getTextWidget().getDisplay().beep(); return; } @@ -2960,7 +2962,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC private final OccurrenceLocation[] fLocations; public OccurrencesAnnotationUpdaterJob(IDocument document, OccurrenceLocation[] locations, ISelection selection, ISelectionValidator validator) { - super(CEditorMessages.getString("CEditor_markOccurrences_job_name")); //$NON-NLS-1$ + super(CEditorMessages.CEditor_markOccurrences_job_name); fDocument= document; fSelection= selection; fLocations= locations; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java index c785041f86b..75a180c8673 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java @@ -58,7 +58,7 @@ public class CEditorActionContributor extends TextEditorActionContributor { public CEditorActionContributor() { super(); - ResourceBundle bundle = CEditorMessages.getResourceBundle(); + ResourceBundle bundle = ConstructedCEditorMessages.getResourceBundle(); fShiftRight= new RetargetTextEditorAction(bundle, "ShiftRight.", ITextOperationTarget.SHIFT_RIGHT); //$NON-NLS-1$ fShiftRight.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_RIGHT); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.java index ffc55149150..7ac0a907116 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 QNX Software Systems and others. + * Copyright (c) 2000, 2008 QNX Software Systems 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 @@ -10,58 +10,78 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.editor; +import org.eclipse.osgi.util.NLS; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - - -public class CEditorMessages { - private static final String RESOURCE_BUNDLE = "org.eclipse.cdt.internal.ui.editor.CEditorMessages"; //$NON-NLS-1$ - - - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } +public final class CEditorMessages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.editor.CEditorMessages";//$NON-NLS-1$ private CEditorMessages() { + // Do not instantiate } + public static String AddIncludeOnSelection_description; + public static String AddIncludeOnSelection_error_message1; + public static String AddIncludeOnSelection_error_message3; + public static String AddIncludeOnSelection_error_message4; + public static String AddIncludeOnSelection_label; + public static String AddIncludeOnSelection_tooltip; + public static String AddIncludesOperation_description; + public static String ShowInCView_description; + public static String ShowInCView_label; + public static String ShowInCView_tooltip; + public static String OpenDeclarations_description; + public static String OpenDeclarationsAction_dialog_title; + public static String OpenDeclarationsAction_selectMessage; + public static String OpenDeclarations_dialog_title; + public static String OpenDeclarations_label; + public static String OpenDeclarations_tooltip; + public static String DefaultCEditorTextHover_html_name; + public static String DefaultCEditorTextHover_html_prototype; + public static String DefaultCEditorTextHover_html_description; + public static String DefaultCEditorTextHover_html_includes; + public static String CEditor_menu_folding; + public static String EditorUtility_concatModifierStrings; + public static String GotoMatchingBracket_label; + public static String GotoMatchingBracket_error_invalidSelection; + public static String GotoMatchingBracket_error_noMatchingBracket; + public static String GotoMatchingBracket_error_bracketOutsideSelectedElement; + public static String Scalability_message; + public static String Scalability_info; + public static String Scalability_reappear; + public static String Scalability_outlineDisabled; + public static String ToggleComment_error_title; + public static String ToggleComment_error_message; + public static String InactiveCodeHighlighting_job; + public static String Reconciling_job; + public static String SemanticHighlighting_job; + public static String SemanticHighlighting_field; + public static String SemanticHighlighting_staticField; + public static String SemanticHighlighting_staticConstField; + public static String SemanticHighlighting_methodDeclaration; + public static String SemanticHighlighting_staticMethodInvocation; + public static String SemanticHighlighting_localVariableDeclaration; + public static String SemanticHighlighting_localVariable; + public static String SemanticHighlighting_globalVariable; + public static String SemanticHighlighting_parameterVariable; + public static String SemanticHighlighting_method; + public static String SemanticHighlighting_classes; + public static String SemanticHighlighting_enums; + public static String SemanticHighlighting_enumerator; + public static String SemanticHighlighting_templateArguments; + public static String SemanticHighlighting_templateParameter; + public static String SemanticHighlighting_functionDeclaration; + public static String SemanticHighlighting_function; + public static String SemanticHighlighting_macroSubstitution; + public static String SemanticHighlighting_macroDefintion; + public static String SemanticHighlighting_typeDef; + public static String SemanticHighlighting_namespace; + public static String SemanticHighlighting_label; + public static String SemanticHighlighting_problem; + public static String SemanticHighlighting_externalSDK; + public static String CEditor_markOccurrences_job_name; - public static ResourceBundle getResourceBundle() { - return fgResourceBundle; + static { + NLS.initializeMessages(BUNDLE_NAME, CEditorMessages.class); } - - public static String getString( String key ) { - try { - return fgResourceBundle.getString( key ); - } catch(MissingResourceException e) { - return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object[] args) { - return MessageFormat.format(getString(key), args); - } - - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(key), new Object[] { arg } ); - } - -} - - +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties index aa0f1bc3a43..bdb94914d8b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties @@ -12,124 +12,43 @@ # Markus Schorn (Wind River Systems) ######################################### -AddIncludeOnSelection.description=Add include statement on selection -AddIncludeOnSelection.error.message1=Adding include statements failed -AddIncludeOnSelection.error.message3=Error -AddIncludeOnSelection.error.message4=BadLocationException: -AddIncludeOnSelection.label=Add Include -AddIncludeOnSelection.tooltip=Add Include Statement on Selection -AddIncludesOperation.description=Adding include statement +AddIncludeOnSelection_description=Add include statement on selection +AddIncludeOnSelection_error_message1=Adding include statements failed +AddIncludeOnSelection_error_message3=Error +AddIncludeOnSelection_error_message4=BadLocationException: +AddIncludeOnSelection_label=Add Include +AddIncludeOnSelection_tooltip=Add Include Statement on Selection +AddIncludesOperation_description=Adding include statement -Scalability.message=You are opening a large file. Turning on scalability mode might help improve editor's performance. Please see the Scalability preference page under Preferences > C/C++ > Editor. -Scalability.info=Editor Scalability -Scalability.reappear=Do not show this message again. -Scalability.outlineDisabled=Outline is disabled due to scalability mode. +ShowInCView_description=Show the current resource in the C/C++ Projects view +ShowInCView_label=Show in C/C++ Projects +ShowInCView_tooltip=Show current resource in C/C++ Projects view -ShowInCView.description=Show the current resource in the C/C++ Projects view -ShowInCView.label=Show in C/C++ Projects -ShowInCView.tooltip=Show current resource in C/C++ Projects view +OpenDeclarations_description=Open an editor on the selected element's declaration +OpenDeclarationsAction_dialog_title=Open Declaration +OpenDeclarationsAction_selectMessage=Select one element from the list +OpenDeclarations_dialog_title=Open Declaration +OpenDeclarations_label=&Open Declaration +OpenDeclarations_tooltip=Open an editor on the selected element's declaration -OpenDeclarations.description=Open an editor on the selected element's declaration -OpenDeclarationsAction.dialog.title=Open Declaration -OpenDeclarationsAction.selectMessage=Select one element from the list -OpenDeclarations.dialog.title=Open Declaration -OpenDeclarations.label=&Open Declaration -OpenDeclarations.tooltip=Open an editor on the selected element's declaration +DefaultCEditorTextHover_html_name=Name: +DefaultCEditorTextHover_html_prototype=
Prototype: +DefaultCEditorTextHover_html_description=
Description:
+DefaultCEditorTextHover_html_includes=
Header files:
-OpenOutline.label= Quick Out&line -OpenOutline.tooltip= Shows the Quick Outline of Editor Input -OpenOutline.description= Shows the quick outline for the editor input +CEditor_menu_folding=F&olding -OpenHierarchy.label= Quick Type Hierarchy -OpenHierarchy.tooltip= Shows the Quick Type Hierarchy of Editor Input -OpenHierarchy.description= Shows the quick type hierarchy for the editor input +EditorUtility_concatModifierStrings= {0} + {1} -TogglePresentation.label=Show Source of Selected Element Only -TogglePresentation.tooltip=Show Source of Selected Element Only +GotoMatchingBracket_label=Go to Matching Bracket +GotoMatchingBracket_error_invalidSelection=No bracket selected +GotoMatchingBracket_error_noMatchingBracket=No matching bracket found +GotoMatchingBracket_error_bracketOutsideSelectedElement=Bracket is outside selected element -NextError.label=Ne&xt Problem -NextError.tooltip=Go to Next Problem -NextError.description=Go to next problem - -PreviousError.label=Previo&us Problem -PreviousError.tooltip=Go to Previous Problem -PreviousError.description=Go to previous problem - -ContentAssistProposal.label=Co&ntent Assist -ContentAssistProposal.tooltip=Content Assist -ContentAssistProposal.description=Content Assist - -ContentAssistContextInformation.label=Parameter &Hints -ContentAssistContextInformation.tooltip=Show Parameter Hints -ContentAssistContextInformation.description=Show Method Parameter Hints - -ToggleComment.label=Comment/Uncomment -ToggleComment.tooltip=Comment/Uncomment For the Selected Lines -ToggleComment.description=Comment/Uncomment for the selected lines - -AddBlockComment.label=Add &Block Comment -AddBlockComment.tooltip=Enclose the Selection in a Block Comment -AddBlockComment.description=Encloses the selection with block comment markers - -RemoveBlockComment.label=Remove Bloc&k Comment -RemoveBlockComment.tooltip=Remove Block Comment Markers Enclosing the Caret -RemoveBlockComment.description=Removes any block comment markers enclosing the caret - -Format.label=F&ormat -Format.tooltip=Format the Selected Text -Format.description=Format the selected text - -ShiftRight.label=Sh&ift Right -ShiftRight.tooltip=Shift Right -ShiftRight.description=Shift the selected text to the right - -ShiftLeft.label=S&hift Left -ShiftLeft.tooltip=Shift Left -ShiftLeft.description=Shift the selected text to the left - -NextAnnotation.label= Ne&xt Annotation -NextAnnotation.tooltip= Next Annotation -NextAnnotation.description= Next Annotation - -PreviousAnnotation.label= Pre&vious Annotation -PreviousAnnotation.tooltip= Previous Annotation -PreviousAnnotation.description= Previous Annotation - -Indent.label=Correct &Indentation -Indent.tooltip=&Indent Current Line to Correct Indentation -Indent.description=&Indents the current line or selection depending on surrounding source code - -DefaultCEditorTextHover.html.name=Name: -DefaultCEditorTextHover.html.prototype=
Prototype: -DefaultCEditorTextHover.html.description=
Description:
-DefaultCEditorTextHover.html.includes=
Header files:
- -CEditor.menu.folding=F&olding - -EditorUtility.concatModifierStrings= {0} + {1} -OpenOnSelection.label=Open On Selection - -GotoNextMember.label= N&ext Member -GotoNextMember.tooltip=Move the Caret to the Next Member of the Translation Unit -GotoNextMember.description=Move the caret to the next member of the translation unit - -GotoPreviousMember.label= Previ&ous Member -GotoPreviousMember.tooltip=Move the Caret to the Previous Member of the Translation Unit -GotoPreviousMember.description=Move the caret to the previous member of the translation unit - -GotoMatchingBracket.label= Matching &Bracket -GotoMatchingBracket.tooltip=Go to Matching Bracket -GotoMatchingBracket.description=Go to Matching Bracket -GotoMatchingBracket.error.invalidSelection=No bracket selected -GotoMatchingBracket.error.noMatchingBracket=No matching bracket found - -GotoNextBookmark.description=Goto next bookmark of the selected file -GotoNextBookmark.label=Next Bookmark -GotoNextBookmark.tooltip=Goto Next Bookmark of the Selected File - -FindWord.description=Select a word and find the next occurrence -FindWord.label=Find Word -FindWord.tooltip=Select a Word and Find the Next Occurrence +Scalability_message=You are opening a large file. Turning on scalability mode might help improve editor's performance. Please see the Scalability preference page under Preferences > C/C++ > Editor. +Scalability_info=Editor Scalability +Scalability_reappear=Do not show this message again. +Scalability_outlineDisabled=Outline is disabled due to scalability mode. ToggleComment_error_title=Comment/Uncomment ToggleComment_error_message=An error occurred while commenting/uncommenting. @@ -164,32 +83,4 @@ SemanticHighlighting_label= Labels SemanticHighlighting_problem= Problems SemanticHighlighting_externalSDK= External SDK calls -ToggleInsertMode.label=Sma&rt Insert Mode -ToggleInsertMode.tooltip=Toggle Smart Insert Mode -ToggleInsertMode.image= -ToggleInsertMode.description= Toggles smart insert mode - -ToggleSourceHeader.label= To&ggle Source/Header -ToggleSourceHeader.tooltip= Toggle Source and Header File -ToggleSourceHeader.image= -ToggleSourceHeader.description= Toggles between corresponding source and header file - -ToggleMarkOccurrencesAction.label= Toggle Mark Occurrences -ToggleMarkOccurrencesAction.tooltip= Toggle Mark Occurrences - CEditor_markOccurrences_job_name= Occurrences Marker - -OpenMacroExplorer.label= Explore &Macro Expansion -OpenMacroExplorer.tooltip= Open a quick view for macro expansion exploration -OpenMacroExplorer.image= -OpenMacroExplorer.description= Opens a quick view for macro expansion exploration - -CSelectAnnotationRulerAction.QuickFix.label= &Quick Fix -CSelectAnnotationRulerAction.QuickFix.tooltip= Quick Fix -CSelectAnnotationRulerAction.QuickFix.description= Runs Quick Fix on the annotation's line -CSelectAnnotationRulerAction.QuickFix.image= - -CSelectAnnotationRulerAction.GotoAnnotation.label= &Go to Annotation -CSelectAnnotationRulerAction.GotoAnnotation.tooltip= Go to Annotation -CSelectAnnotationRulerAction.GotoAnnotation.description= Selects the annotation in the editor -CSelectAnnotationRulerAction.GotoAnnotation.image= diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.java new file mode 100644 index 00000000000..a9e5ba169b1 --- /dev/null +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 QNX Software Systems 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: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.internal.ui.editor; + + +import java.text.MessageFormat; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + + +public class ConstructedCEditorMessages { + private static final String RESOURCE_BUNDLE = "org.eclipse.cdt.internal.ui.editor.ConstructedCEditorMessages"; //$NON-NLS-1$ + + + private static ResourceBundle fgResourceBundle; + static { + try { + fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); + } catch (MissingResourceException x) { + fgResourceBundle = null; + } + } + + + private ConstructedCEditorMessages() { + } + + + public static ResourceBundle getResourceBundle() { + return fgResourceBundle; + } + + public static String getString( String key ) { + try { + return fgResourceBundle.getString( key ); + } catch(MissingResourceException e) { + return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ + } catch (NullPointerException e) { + return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * Gets a string from the resource bundle and formats it with arguments + */ + public static String getFormattedString(String key, Object[] args) { + return MessageFormat.format(getString(key), args); + } + + /** + * Gets a string from the resource bundle and formats it with arguments + */ + public static String getFormattedString(String key, Object arg) { + return MessageFormat.format(getString(key), new Object[] { arg } ); + } + +} + + diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.properties new file mode 100644 index 00000000000..f41715b402b --- /dev/null +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ConstructedCEditorMessages.properties @@ -0,0 +1,128 @@ +######################################### +# Copyright (c) 2005, 2008 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 +# QNX Software System +# Anton Leherbauer (Wind River Systems) +# Markus Schorn (Wind River Systems) +######################################### + +AddIncludeOnSelection.description=Add include statement on selection +AddIncludeOnSelection.label=Add Include +AddIncludeOnSelection.tooltip=Add Include Statement on Selection + +OpenOutline.label= Quick Out&line +OpenOutline.tooltip= Shows the Quick Outline of Editor Input +OpenOutline.description= Shows the quick outline for the editor input + +OpenHierarchy.label= Quick Type Hierarchy +OpenHierarchy.tooltip= Shows the Quick Type Hierarchy of Editor Input +OpenHierarchy.description= Shows the quick type hierarchy for the editor input + +TogglePresentation.label=Show Source of Selected Element Only +TogglePresentation.tooltip=Show Source of Selected Element Only + +#NextError.label=Ne&xt Problem +#NextError.tooltip=Go to Next Problem +#NextError.description=Go to next problem +# +#PreviousError.label=Previo&us Problem +#PreviousError.tooltip=Go to Previous Problem +#PreviousError.description=Go to previous problem + +ContentAssistProposal.label=Co&ntent Assist +ContentAssistProposal.tooltip=Content Assist +ContentAssistProposal.description=Content Assist + +ContentAssistContextInformation.label=Parameter &Hints +ContentAssistContextInformation.tooltip=Show Parameter Hints +ContentAssistContextInformation.description=Show Method Parameter Hints + +ToggleComment.label=Comment/Uncomment +ToggleComment.tooltip=Comment/Uncomment For the Selected Lines +ToggleComment.description=Comment/Uncomment for the selected lines + +AddBlockComment.label=Add &Block Comment +AddBlockComment.tooltip=Enclose the Selection in a Block Comment +AddBlockComment.description=Encloses the selection with block comment markers + +RemoveBlockComment.label=Remove Bloc&k Comment +RemoveBlockComment.tooltip=Remove Block Comment Markers Enclosing the Caret +RemoveBlockComment.description=Removes any block comment markers enclosing the caret + +Format.label=F&ormat +Format.tooltip=Format the Selected Text +Format.description=Format the selected text + +ShiftRight.label=Sh&ift Right +ShiftRight.tooltip=Shift Right +ShiftRight.description=Shift the selected text to the right + +ShiftLeft.label=S&hift Left +ShiftLeft.tooltip=Shift Left +ShiftLeft.description=Shift the selected text to the left + +NextAnnotation.label= Ne&xt Annotation +NextAnnotation.tooltip= Next Annotation +NextAnnotation.description= Next Annotation + +PreviousAnnotation.label= Pre&vious Annotation +PreviousAnnotation.tooltip= Previous Annotation +PreviousAnnotation.description= Previous Annotation + +Indent.label=Correct &Indentation +Indent.tooltip=&Indent Current Line to Correct Indentation +Indent.description=&Indents the current line or selection depending on surrounding source code + +GotoNextMember.label= N&ext Member +GotoNextMember.tooltip=Move the Caret to the Next Member of the Translation Unit +GotoNextMember.description=Move the caret to the next member of the translation unit + +GotoPreviousMember.label= Previ&ous Member +GotoPreviousMember.tooltip=Move the Caret to the Previous Member of the Translation Unit +GotoPreviousMember.description=Move the caret to the previous member of the translation unit + +GotoMatchingBracket.label= Matching &Bracket +GotoMatchingBracket.tooltip=Go to Matching Bracket +GotoMatchingBracket.description=Go to Matching Bracket + +GotoNextBookmark.description=Goto next bookmark of the selected file +GotoNextBookmark.label=Next Bookmark +GotoNextBookmark.tooltip=Goto Next Bookmark of the Selected File + +FindWord.description=Select a word and find the next occurrence +FindWord.label=Find Word +FindWord.tooltip=Select a Word and Find the Next Occurrence + +ToggleInsertMode.label=Sma&rt Insert Mode +ToggleInsertMode.tooltip=Toggle Smart Insert Mode +ToggleInsertMode.image= +ToggleInsertMode.description= Toggles smart insert mode + +ToggleSourceHeader.label= To&ggle Source/Header +ToggleSourceHeader.tooltip= Toggle Source and Header File +ToggleSourceHeader.image= +ToggleSourceHeader.description= Toggles between corresponding source and header file + +ToggleMarkOccurrencesAction.label= Toggle Mark Occurrences +ToggleMarkOccurrencesAction.tooltip= Toggle Mark Occurrences + +OpenMacroExplorer.label= Explore &Macro Expansion +OpenMacroExplorer.tooltip= Open a quick view for macro expansion exploration +OpenMacroExplorer.image= +OpenMacroExplorer.description= Opens a quick view for macro expansion exploration + +CSelectAnnotationRulerAction.QuickFix.label= &Quick Fix +CSelectAnnotationRulerAction.QuickFix.tooltip= Quick Fix +CSelectAnnotationRulerAction.QuickFix.description= Runs Quick Fix on the annotation's line +CSelectAnnotationRulerAction.QuickFix.image= + +CSelectAnnotationRulerAction.GotoAnnotation.label= &Go to Annotation +CSelectAnnotationRulerAction.GotoAnnotation.tooltip= Go to Annotation +CSelectAnnotationRulerAction.GotoAnnotation.description= Selects the annotation in the editor +CSelectAnnotationRulerAction.GotoAnnotation.image= diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoAnnotationAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoAnnotationAction.java index 9d7b51e9723..36342ca62a2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoAnnotationAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoAnnotationAction.java @@ -23,7 +23,7 @@ public class GotoAnnotationAction extends TextEditorAction { private boolean fForward; public GotoAnnotationAction(String prefix, boolean forward) { - super(CEditorMessages.getResourceBundle(), prefix, null); + super(ConstructedCEditorMessages.getResourceBundle(), prefix, null); fForward= forward; if (forward) PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.GOTO_NEXT_ERROR_ACTION); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoMatchingBracketAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoMatchingBracketAction.java index 5cc3271d24d..3b56ae395c6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoMatchingBracketAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/GotoMatchingBracketAction.java @@ -26,7 +26,7 @@ public class GotoMatchingBracketAction extends Action { private final CEditor fEditor; public GotoMatchingBracketAction(CEditor editor) { - super(CEditorMessages.getString("GotoMatchingBracket.label")); //$NON-NLS-1$ + super(CEditorMessages.GotoMatchingBracket_label); Assert.isNotNull(editor); fEditor= editor; setEnabled(true); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/InactiveCodeHighlighting.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/InactiveCodeHighlighting.java index 46f7c1e5135..861aa0a9ed4 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/InactiveCodeHighlighting.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/InactiveCodeHighlighting.java @@ -101,7 +101,7 @@ public class InactiveCodeHighlighting implements ICReconcilingListener, ITextInp private void scheduleJob() { synchronized (fJobLock) { if (fUpdateJob == null) { - fUpdateJob = new Job(CEditorMessages.getString("InactiveCodeHighlighting_job")) { //$NON-NLS-1$ + fUpdateJob = new Job(CEditorMessages.InactiveCodeHighlighting_job) { @Override protected IStatus run(final IProgressMonitor monitor) { IStatus result = Status.OK_STATUS; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java index 226ca4ddd41..096d1491a55 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java @@ -496,7 +496,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener { } if (element != null) { - fJob= new Job(CEditorMessages.getString("SemanticHighlighting_job")) { //$NON-NLS-1$ + fJob= new Job(CEditorMessages.SemanticHighlighting_job) { @Override protected IStatus run(final IProgressMonitor monitor) { if (oldJob != null) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightings.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightings.java index f72c73d8ff4..3e6feaa648b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightings.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightings.java @@ -235,7 +235,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_staticField"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_staticField; } /* @@ -314,7 +314,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_field"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_field; } /* @@ -387,7 +387,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_methodDeclaration"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_methodDeclaration; } /* @@ -483,7 +483,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_staticMethodInvocation"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_staticMethodInvocation; } /* @@ -565,7 +565,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_method"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_method; } /* @@ -639,7 +639,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_functionDeclaration"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_functionDeclaration; } /* @@ -730,7 +730,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_function"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_function; } /* @@ -803,7 +803,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_localVariableDeclaration"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_localVariableDeclaration; } /* @@ -888,7 +888,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_localVariable"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_localVariable; } /* @@ -988,7 +988,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_globalVariable"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_globalVariable; } /* @@ -1075,7 +1075,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_parameterVariable"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_parameterVariable; } /* @@ -1141,7 +1141,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_templateParameter"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_templateParameter; } /* @@ -1210,7 +1210,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_classes"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_classes; } /* @@ -1282,7 +1282,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_enums"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_enums; } /* @@ -1351,7 +1351,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_macroSubstitution"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_macroSubstitution; } /* @@ -1420,7 +1420,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_macroDefintion"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_macroDefintion; } /* @@ -1489,7 +1489,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_typeDef"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_typeDef; } /* @@ -1562,7 +1562,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_namespace"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_namespace; } /* @@ -1628,7 +1628,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_label"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_label; } /* @@ -1694,7 +1694,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_enumerator"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_enumerator; } /* @@ -1775,7 +1775,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_problem"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_problem; } /* @@ -1856,7 +1856,7 @@ public class SemanticHighlightings { */ @Override public String getDisplayName() { - return CEditorMessages.getString("SemanticHighlighting_externalSDK"); //$NON-NLS-1$ + return CEditorMessages.SemanticHighlighting_externalSDK; } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java index a4587c76ecd..92f18845033 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java @@ -90,7 +90,7 @@ public final class ToggleCommentAction extends TextEditorAction { Shell shell= editor.getSite().getShell(); if (!fOperationTarget.canDoOperation(operationCode)) { if (shell != null) - MessageDialog.openError(shell, CEditorMessages.getString("ToggleComment_error_title"), CEditorMessages.getString("ToggleComment_error_message")); //$NON-NLS-1$//$NON-NLS-2$ + MessageDialog.openError(shell, CEditorMessages.ToggleComment_error_title, CEditorMessages.ToggleComment_error_message); return; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleMarkOccurrencesAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleMarkOccurrencesAction.java index f6343a9af20..575f5a39ec3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleMarkOccurrencesAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleMarkOccurrencesAction.java @@ -40,7 +40,7 @@ public class ToggleMarkOccurrencesAction extends TextEditorAction implements IPr * Constructs and updates the action. */ public ToggleMarkOccurrencesAction() { - super(CEditorMessages.getResourceBundle(), "ToggleMarkOccurrencesAction.", null, IAction.AS_CHECK_BOX); //$NON-NLS-1$ + super(ConstructedCEditorMessages.getResourceBundle(), "ToggleMarkOccurrencesAction.", null, IAction.AS_CHECK_BOX); //$NON-NLS-1$ CPluginImages.setToolImageDescriptors(this, "mark_occurrences.gif"); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.TOGGLE_MARK_OCCURRENCES_ACTION); update(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/TogglePresentationAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/TogglePresentationAction.java index 5c220172280..2c78a5ac14b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/TogglePresentationAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/TogglePresentationAction.java @@ -40,7 +40,7 @@ public class TogglePresentationAction extends TextEditorAction implements IPrope * Constructs and updates the action. */ public TogglePresentationAction() { - super(CEditorMessages.getResourceBundle(), "TogglePresentation.", null); //$NON-NLS-1$ + super(ConstructedCEditorMessages.getResourceBundle(), "TogglePresentation.", null); //$NON-NLS-1$ CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SEGMENT_EDIT); setActionDefinitionId(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.TOGGLE_PRESENTATION_ACTION); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java index cbc8f7671df..8660bdcda7e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java @@ -97,8 +97,8 @@ public class CustomFiltersDialog extends SelectionDialog { @Override protected void configureShell(Shell shell) { - setTitle(FilterMessages.getString("CustomFiltersDialog.title")); //$NON-NLS-1$ - setMessage(FilterMessages.getString("CustomFiltersDialog.filterList.label")); //$NON-NLS-1$ + setTitle(FilterMessages.CustomFiltersDialog_title); + setMessage(FilterMessages.CustomFiltersDialog_filterList_label); super.configureShell(shell); PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, ICHelpContextIds.CUSTOM_FILTERS_DIALOG); } @@ -125,7 +125,7 @@ public class CustomFiltersDialog extends SelectionDialog { // Checkbox fEnableUserDefinedPatterns= new Button(group, SWT.CHECK); - fEnableUserDefinedPatterns.setText(FilterMessages.getString("CustomFiltersDialog.enableUserDefinedPattern")); //$NON-NLS-1$ + fEnableUserDefinedPatterns.setText(FilterMessages.CustomFiltersDialog_enableUserDefinedPattern); // Pattern field fUserDefinedPatterns= new Text(group, SWT.SINGLE | SWT.BORDER); @@ -137,7 +137,7 @@ public class CustomFiltersDialog extends SelectionDialog { // Info text final Label info= new Label(group, SWT.LEFT); - info.setText(FilterMessages.getString("CustomFiltersDialog.patternInfo")); //$NON-NLS-1$ + info.setText(FilterMessages.CustomFiltersDialog_patternInfo); // Enabling / disabling of pattern group fEnableUserDefinedPatterns.setSelection(fEnablePatterns); @@ -167,7 +167,7 @@ public class CustomFiltersDialog extends SelectionDialog { new Label(parent, SWT.NONE); Label info= new Label(parent, SWT.LEFT); - info.setText(FilterMessages.getString("CustomFiltersDialog.filterList.label")); //$NON-NLS-1$ + info.setText(FilterMessages.CustomFiltersDialog_filterList_label); fCheckBoxList= CheckboxTableViewer.newCheckList(parent, SWT.BORDER); GridData data= new GridData(GridData.FILL_BOTH); @@ -186,7 +186,7 @@ public class CustomFiltersDialog extends SelectionDialog { // Description info= new Label(parent, SWT.LEFT); - info.setText(FilterMessages.getString("CustomFiltersDialog.description.label")); //$NON-NLS-1$ + info.setText(FilterMessages.CustomFiltersDialog_description_label); final Text description= new Text(parent, SWT.LEFT | SWT.WRAP | SWT.MULTI | SWT.READ_ONLY | SWT.BORDER | SWT.VERTICAL); data = new GridData(GridData.FILL_HORIZONTAL); data.heightHint= convertHeightInCharsToPixels(3); @@ -229,7 +229,7 @@ public class CustomFiltersDialog extends SelectionDialog { composite.setData(data); // Select All button - String label= FilterMessages.getString("CustomFiltersDialog.SelectAllButton.label"); //$NON-NLS-1$ + String label= FilterMessages.CustomFiltersDialog_SelectAllButton_label; Button selectButton= createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, label, false); SWTUtil.setButtonDimensionHint(selectButton); SelectionListener listener= new SelectionAdapter() { @@ -245,7 +245,7 @@ public class CustomFiltersDialog extends SelectionDialog { selectButton.addSelectionListener(listener); // Deselect All button - label= FilterMessages.getString("CustomFiltersDialog.DeselectAllButton.label"); //$NON-NLS-1$ + label= FilterMessages.CustomFiltersDialog_DeselectAllButton_label; Button deselectButton= createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, label, false); SWTUtil.setButtonDimensionHint(deselectButton); listener= new SelectionAdapter() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterDescriptor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterDescriptor.java index 7098c64fb21..19f39f7235d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterDescriptor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterDescriptor.java @@ -24,6 +24,7 @@ import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.util.SafeRunnable; import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.osgi.util.NLS; import org.eclipse.cdt.ui.CUIPlugin; @@ -112,7 +113,7 @@ public class FilterDescriptor implements Comparable { return null; final ViewerFilter[] result= new ViewerFilter[1]; - String message= FilterMessages.getFormattedString("FilterDescriptor.filterCreationError.message", getId()); //$NON-NLS-1$ + String message= NLS.bind(FilterMessages.FilterDescriptor_filterCreationError_message, getId()); ISafeRunnable code= new SafeRunnable(message) { /* * @see org.eclipse.core.runtime.ISafeRunnable#run() @@ -246,7 +247,7 @@ public class FilterDescriptor implements Comparable { if (FILTER_TAG.equals(element.getName())) { final FilterDescriptor[] desc= new FilterDescriptor[1]; - SafeRunnable.run(new SafeRunnable(FilterMessages.getString("FilterDescriptor.filterDescriptionCreationError.message")) { //$NON-NLS-1$ + SafeRunnable.run(new SafeRunnable(FilterMessages.FilterDescriptor_filterDescriptionCreationError_message) { public void run() throws Exception { desc[0]= new FilterDescriptor(element); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.java index 8a9dbec43d8..9a015aa8693 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2008 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 @@ -10,55 +10,28 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.filters; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +import org.eclipse.osgi.util.NLS; -public class FilterMessages { +public final class FilterMessages extends NLS { - private static final String RESOURCE_BUNDLE= FilterMessages.class.getName(); - - private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.filters.FilterMessages";//$NON-NLS-1$ private FilterMessages() { + // Do not instantiate } - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } - } - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object[] args) { - String format= null; - try { - format= fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } - return MessageFormat.format(format, args); - } + public static String CustomFiltersDialog_title; + public static String CustomFiltersDialog_patternInfo; + public static String CustomFiltersDialog_enableUserDefinedPattern; + public static String CustomFiltersDialog_filterList_label; + public static String CustomFiltersDialog_description_label; + public static String CustomFiltersDialog_SelectAllButton_label; + public static String CustomFiltersDialog_DeselectAllButton_label; + public static String OpenCustomFiltersDialogAction_text; + public static String FilterDescriptor_filterDescriptionCreationError_message; + public static String FilterDescriptor_filterCreationError_message; - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object arg) { - String format= null; - try { - format= fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } - if (arg == null) - arg= ""; //$NON-NLS-1$ - return MessageFormat.format(format, new Object[] { arg }); + static { + NLS.initializeMessages(BUNDLE_NAME, FilterMessages.class); } -} +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.properties index d3493484dc4..68019c4039a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterMessages.properties @@ -10,15 +10,15 @@ # Anton Leherbauer (Wind River Systems) ############################################################################### -CustomFiltersDialog.title= C Element Filters -CustomFiltersDialog.patternInfo= The patterns are separated by comma (* = any string, ? = any character) -CustomFiltersDialog.enableUserDefinedPattern= &Name filter patterns (matching names will be hidden): -CustomFiltersDialog.filterList.label= S&elect the elements to exclude from the view: -CustomFiltersDialog.description.label= Filter description: -CustomFiltersDialog.SelectAllButton.label= &Select All -CustomFiltersDialog.DeselectAllButton.label= &Deselect All +CustomFiltersDialog_title= C Element Filters +CustomFiltersDialog_patternInfo= The patterns are separated by comma (* = any string, ? = any character) +CustomFiltersDialog_enableUserDefinedPattern= &Name filter patterns (matching names will be hidden): +CustomFiltersDialog_filterList_label= S&elect the elements to exclude from the view: +CustomFiltersDialog_description_label= Filter description: +CustomFiltersDialog_SelectAllButton_label= &Select All +CustomFiltersDialog_DeselectAllButton_label= &Deselect All -OpenCustomFiltersDialogAction.text= &Filters... +OpenCustomFiltersDialogAction_text= &Filters... -FilterDescriptor.filterDescriptionCreationError.message= One of the extensions for extension-point org.eclipse.cdt.ui.CElementFilters is incorrect. -FilterDescriptor.filterCreationError.message= The org.eclipse.cdt.ui.CElementFilters plug-in extension "{0}" specifies a viewer filter class which does not exist. +FilterDescriptor_filterDescriptionCreationError_message= One of the extensions for extension-point org.eclipse.cdt.ui.CElementFilters is incorrect. +FilterDescriptor_filterCreationError_message= The org.eclipse.cdt.ui.CElementFilters plug-in extension "{0}" specifies a viewer filter class which does not exist. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java index f2d87c12566..c10188b3c18 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java @@ -143,7 +143,7 @@ public class CNavigatorBuildActionGroup extends AbstractCNavigatorActionGroup { @Override protected void makeActions() { fCleanAction= new BuildAction(getViewPart().getSite(), IncrementalProjectBuilder.CLEAN_BUILD); - fCleanAction.setText(CViewMessages.getString("CleanAction.label")); //$NON-NLS-1$ + fCleanAction.setText(CViewMessages.CleanAction_label); } @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java index c0ffed22067..dfcf096d363 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java @@ -145,10 +145,10 @@ public class CNavigatorDropAdapterAssistant extends CommonDropAdapterAssistant { return handleDropCopy(target, event); } } catch (CModelException e){ - ExceptionHandler.handle(e, CViewMessages.getString("SelectionTransferDropAdapter.error.title"), CViewMessages.getString("SelectionTransferDropAdapter.error.message")); //$NON-NLS-1$ //$NON-NLS-2$ + ExceptionHandler.handle(e, CViewMessages.SelectionTransferDropAdapter_error_title, CViewMessages.SelectionTransferDropAdapter_error_message); return e.getStatus(); } catch(InvocationTargetException e) { - ExceptionHandler.handle(e, CViewMessages.getString("SelectionTransferDropAdapter.error.title"), CViewMessages.getString("SelectionTransferDropAdapter.error.exception")); //$NON-NLS-1$ //$NON-NLS-2$ + ExceptionHandler.handle(e, CViewMessages.SelectionTransferDropAdapter_error_title, CViewMessages.SelectionTransferDropAdapter_error_exception); return Status.CANCEL_STATUS; } catch (InterruptedException e) { //ok @@ -227,7 +227,7 @@ public class CNavigatorDropAdapterAssistant extends CommonDropAdapterAssistant { return handleValidateMove(target); } } catch (CModelException e){ - ExceptionHandler.handle(e, CViewMessages.getString("SelectionTransferDropAdapter.error.title"), CViewMessages.getString("SelectionTransferDropAdapter.error.message")); //$NON-NLS-1$ //$NON-NLS-2$ + ExceptionHandler.handle(e, CViewMessages.SelectionTransferDropAdapter_error_title, CViewMessages.SelectionTransferDropAdapter_error_message); } } return Status.CANCEL_STATUS; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java index 1c4db7dc43d..1b96300bc6e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. 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 @@ -83,12 +83,12 @@ public class CNavigatorLabelProvider extends CViewLabelProvider implements IComm if (celement instanceof IBinaryContainer) { ICProject cproj = celement.getCProject(); if (cproj != null) { - return cproj.getPath() + CViewMessages.getString("CView.binaries"); //$NON-NLS-1$ + return cproj.getPath() + CViewMessages.CView_binaries; } } else if (celement instanceof IArchiveContainer) { ICProject cproj = celement.getCProject(); if (cproj != null) { - return cproj.getPath() + CViewMessages.getString("CView.archives"); //$NON-NLS-1$ + return cproj.getPath() + CViewMessages.CView_archives; } } else if (celement instanceof IBinaryModule) { IBinary bin = ((IBinaryModule) celement).getBinary(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorOpenEditorActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorOpenEditorActionGroup.java index f813feb128e..8ec337b5e6a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorOpenEditorActionGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorOpenEditorActionGroup.java @@ -98,7 +98,7 @@ public class CNavigatorOpenEditorActionGroup extends AbstractCNavigatorActionGro return; } - MenuManager submenu= new MenuManager(CViewMessages.getString("OpenWithMenu.label"), ICommonMenuConstants.GROUP_OPEN_WITH); //$NON-NLS-1$ + MenuManager submenu= new MenuManager(CViewMessages.OpenWithMenu_label, ICommonMenuConstants.GROUP_OPEN_WITH); submenu.add(new OpenWithMenu(getViewPart().getSite().getPage(), (IFile) element)); menu.insertAfter(ICommonMenuConstants.GROUP_OPEN_WITH, submenu); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java index 07eebe07fc3..799153b2b4b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsAction.java @@ -86,7 +86,7 @@ public class OpenDeclarationsAction extends SelectionParseAction implements ASTR private class WrapperJob extends Job { WrapperJob() { - super(CEditorMessages.getString("OpenDeclarations.dialog.title")); //$NON-NLS-1$ + super(CEditorMessages.OpenDeclarations_dialog_title); } @Override protected IStatus run(IProgressMonitor monitor) { @@ -111,9 +111,9 @@ public class OpenDeclarationsAction extends SelectionParseAction implements ASTR */ public OpenDeclarationsAction(CEditor editor) { super( editor ); - setText(CEditorMessages.getString("OpenDeclarations.label")); //$NON-NLS-1$ - setToolTipText(CEditorMessages.getString("OpenDeclarations.tooltip")); //$NON-NLS-1$ - setDescription(CEditorMessages.getString("OpenDeclarations.description")); //$NON-NLS-1$ + setText(CEditorMessages.OpenDeclarations_label); + setToolTipText(CEditorMessages.OpenDeclarations_tooltip); + setDescription(CEditorMessages.OpenDeclarations_description); } @@ -358,7 +358,7 @@ public class OpenDeclarationsAction extends SelectionParseAction implements ASTR } ICElement[] elemArray= elements.toArray(new ICElement[elements.size()]); target = (ISourceReference) OpenActionUtil.selectCElement(elemArray, getSite().getShell(), - CEditorMessages.getString("OpenDeclarationsAction.dialog.title"), CEditorMessages.getString("OpenDeclarationsAction.selectMessage"), //$NON-NLS-1$ //$NON-NLS-2$ + CEditorMessages.OpenDeclarationsAction_dialog_title, CEditorMessages.OpenDeclarationsAction_selectMessage, CElementBaseLabels.ALL_DEFAULT | CElementBaseLabels.ALL_FULLY_QUALIFIED | CElementBaseLabels.MF_POST_FILE_QUALIFIED, 0); } if (target != null) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java index 036a705b8b6..57b309805ca 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java @@ -45,7 +45,7 @@ public class HTMLAnnotationHover extends DefaultAnnotationHover { protected String formatMultipleMessages(List messages) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.addPageProlog(buffer); - HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(CUIMessages.getString("CAnnotationHover.multipleMarkers"))); //$NON-NLS-1$ + HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(CUIMessages.CAnnotationHover_multipleMarkers)); HTMLPrinter.startBulletList(buffer); Iterator e= messages.iterator(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CDocHover.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CDocHover.java index 8293978eb00..3ff06e0a1b1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CDocHover.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CDocHover.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 QNX Software Systems and others. + * Copyright (c) 2000, 2008 QNX Software Systems 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 @@ -76,21 +76,21 @@ public class CDocHover extends AbstractCEditorTextHover { IFunctionSummary fs = CHelpProviderManager.getDefault().getFunctionInfo(context, expression); if (fs != null) { - buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.name")); //$NON-NLS-1$ + buffer.append(CEditorMessages.DefaultCEditorTextHover_html_name); buffer.append(HTMLPrinter.convertToHTMLContent(fs.getName())); final IFunctionPrototypeSummary prototype = fs.getPrototype(); if (prototype != null) { - buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.prototype")); //$NON-NLS-1$ + buffer.append(CEditorMessages.DefaultCEditorTextHover_html_prototype); buffer.append(HTMLPrinter.convertToHTMLContent(prototype.getPrototypeString(false))); } if(fs.getDescription() != null) { - buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.description")); //$NON-NLS-1$ + buffer.append(CEditorMessages.DefaultCEditorTextHover_html_description); //Don't convert this description since it could already be formatted buffer.append(fs.getDescription()); } IRequiredInclude[] incs = fs.getIncludes(); if (incs != null && incs.length > 0) { - buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.includes")); //$NON-NLS-1$ + buffer.append(CEditorMessages.DefaultCEditorTextHover_html_includes); int count = 0; for (IRequiredInclude inc : incs) { buffer.append(inc.getIncludeName()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectRulerAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectRulerAction.java index 9055319027d..0e12c6ff841 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectRulerAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectRulerAction.java @@ -11,12 +11,13 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.text.correction; -import org.eclipse.cdt.internal.ui.editor.CEditorMessages; import org.eclipse.jface.action.IAction; import org.eclipse.jface.text.source.IVerticalRulerInfo; import org.eclipse.ui.texteditor.AbstractRulerActionDelegate; import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.cdt.internal.ui.editor.ConstructedCEditorMessages; + public class CSelectRulerAction extends AbstractRulerActionDelegate { /* @@ -24,6 +25,6 @@ public class CSelectRulerAction extends AbstractRulerActionDelegate { */ @Override protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { - return new CSelectAnnotationRulerAction(CEditorMessages.getResourceBundle(), "CSelectAnnotationRulerAction.", editor, rulerInfo); //$NON-NLS-1$ + return new CSelectAnnotationRulerAction(ConstructedCEditorMessages.getResourceBundle(), "CSelectAnnotationRulerAction.", editor, rulerInfo); //$NON-NLS-1$ } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java index beb19107d98..f5eb10c65f3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java @@ -37,6 +37,7 @@ import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.content.IContentType; import org.eclipse.jface.action.Action; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.ui.IEditorDescriptor; @@ -678,7 +679,7 @@ public class EditorUtility { String newModifierString= Action.findModifierString(modifier); if (modifierString.length() == 0) return newModifierString; - return CEditorMessages.getFormattedString("EditorUtility.concatModifierStrings", new String[] {modifierString, newModifierString}); //$NON-NLS-1$ + return NLS.bind(CEditorMessages.EditorUtility_concatModifierStrings, new String[] {modifierString, newModifierString}); } public static IStorage getStorage(IBinary bin) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExceptionHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExceptionHandler.java index d7332d76dfc..5bbf74c4ecc 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExceptionHandler.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExceptionHandler.java @@ -129,7 +129,7 @@ public class ExceptionHandler { msg.write("\n\n"); //$NON-NLS-1$ } if (exceptionMessage == null || exceptionMessage.length() == 0) - msg.write(CUIMessages.getString("ExceptionDialog.seeErrorLogMessage")); //$NON-NLS-1$ + msg.write(CUIMessages.ExceptionDialog_seeErrorLogMessage); else msg.write(exceptionMessage); MessageDialog.openError(shell, title, msg.toString()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/AsyncTreeContentProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/AsyncTreeContentProvider.java index 2a289f4d264..359d0a311b5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/AsyncTreeContentProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/AsyncTreeContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2008 Wind River Systems, Inc. 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 @@ -57,7 +57,7 @@ public abstract class AsyncTreeContentProvider implements ITreeContentProvider { public AsyncTreeContentProvider(Display disp) { fDisplay= disp; - fJob= new Job(CUIMessages.getString("AsyncTreeContentProvider.JobName")) { //$NON-NLS-1$ + fJob= new Job(CUIMessages.AsyncTreeContentProvider_JobName) { @Override protected IStatus run(final IProgressMonitor monitor) { return runJob(monitor); @@ -216,7 +216,7 @@ public abstract class AsyncTreeContentProvider implements ITreeContentProvider { } private IStatus runJob(final IProgressMonitor monitor) { - monitor.beginTask(CUIMessages.getString("AsyncTreeContentProvider.TaskName"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.AsyncTreeContentProvider_TaskName, IProgressMonitor.UNKNOWN); try { Object parent= getParentForNextTask(); while (parent != null) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/StatusBarUpdater.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/StatusBarUpdater.java index 3f332c1e9fa..ec0f5811561 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/StatusBarUpdater.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/StatusBarUpdater.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2008 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 @@ -22,6 +22,7 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.osgi.util.NLS; /** * Add the StatusBarUpdater to your ViewPart to have the statusbar @@ -54,7 +55,7 @@ public class StatusBarUpdater implements ISelectionChangedListener { int nElements= selection.size(); if (nElements > 1) { - return CUIMessages.getFormattedString("StatusBarUpdater.num_elements_selected", String.valueOf(nElements)); //$NON-NLS-1$ + return NLS.bind(CUIMessages.StatusBarUpdater_num_elements_selected, String.valueOf(nElements)); } Object elem= selection.getFirstElement(); if (elem instanceof ICElement) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/AbstractOpenWizardAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/AbstractOpenWizardAction.java index 25195b48855..aa8ec5fb455 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/AbstractOpenWizardAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/AbstractOpenWizardAction.java @@ -165,8 +165,8 @@ public abstract class AbstractOpenWizardAction extends Action implements IWorkbe dialog.create(); dialog.open(); } catch (CoreException e) { - String title= NewWizardMessages.getString("AbstractOpenWizardAction.createerror.title"); //$NON-NLS-1$ - String message= NewWizardMessages.getString("AbstractOpenWizardAction.createerror.message"); //$NON-NLS-1$ + String title= NewWizardMessages.AbstractOpenWizardAction_createerror_title; + String message= NewWizardMessages.AbstractOpenWizardAction_createerror_message; ExceptionHandler.handle(e, shell, title, message); } } @@ -212,8 +212,8 @@ public abstract class AbstractOpenWizardAction extends Action implements IWorkbe IWorkspace workspace= ResourcesPlugin.getWorkspace(); if (workspace.getRoot().getProjects().length == 0) { Shell shell= CUIPlugin.getActiveWorkbenchShell(); - String title= NewWizardMessages.getString("AbstractOpenWizardAction.noproject.title"); //$NON-NLS-1$ - String message= NewWizardMessages.getString("AbstractOpenWizardAction.noproject.message"); //$NON-NLS-1$ + String title= NewWizardMessages.AbstractOpenWizardAction_noproject_title; + String message= NewWizardMessages.AbstractOpenWizardAction_noproject_message; if (MessageDialog.openQuestion(shell, title, message)) { IWorkbenchWindow window= CUIPlugin.getActiveWorkbenchWindow(); (new NewProjectAction(window)).run(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewClassCreationWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewClassCreationWizard.java index a3b2b4917b6..0c23903977e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewClassCreationWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewClassCreationWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2005 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -26,7 +26,7 @@ public class NewClassCreationWizard extends NewElementWizard { super(); setDefaultPageImageDescriptor(CPluginImages.DESC_WIZBAN_NEWCLASS); setDialogSettings(CUIPlugin.getDefault().getDialogSettings()); - setWindowTitle(NewClassWizardMessages.getString("NewClassCreationWizard.title")); //$NON-NLS-1$ + setWindowTitle(NewClassWizardMessages.NewClassCreationWizard_title); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java index 110119bc77e..7698e49e791 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java @@ -84,8 +84,8 @@ public abstract class NewElementWizard extends Wizard implements INewWizard { protected void handleFinishException(Shell shell, InvocationTargetException e) { - String title= NewWizardMessages.getString("NewElementWizard.op_error.title"); //$NON-NLS-1$ - String message= NewWizardMessages.getString("NewElementWizard.op_error.message"); //$NON-NLS-1$ + String title= NewWizardMessages.NewElementWizard_op_error_title; + String message= NewWizardMessages.NewElementWizard_op_error_message; ExceptionHandler.handle(e, shell, title, message); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.java index 7e9b0064978..c8d39626183 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2006 IBM Corporation and others. + * Copyright (c) 2001, 2008 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 @@ -10,51 +10,34 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.wizards; +import org.eclipse.osgi.util.NLS; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +public final class NewWizardMessages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.wizards.NewWizardMessages";//$NON-NLS-1$ -public class NewWizardMessages { - - private static final String RESOURCE_BUNDLE= NewWizardMessages.class.getName(); - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } - private NewWizardMessages() { - } - - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(key), new Object[] { arg }); + // Do not instantiate } - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object[] args) { - return MessageFormat.format(getString(key), args); - } + public static String AbstractOpenWizardAction_noproject_title; + public static String AbstractOpenWizardAction_noproject_message; + public static String AbstractOpenWizardAction_createerror_title; + public static String AbstractOpenWizardAction_createerror_message; + public static String NewElementWizard_op_error_title; + public static String NewElementWizard_op_error_message; + public static String NewClassWizardPage_files_linkFileButton; + public static String CreateLinkedResourceGroup_resolvedPathLabel; + public static String CreateLinkedResourceGroup_browseButton; + public static String CreateLinkedResourceGroup_open; + public static String CreateLinkedResourceGroup_targetSelectionLabel; + public static String CreateLinkedResourceGroup_linkTargetNotFile; + public static String CreateLinkedResourceGroup_linkTargetNotFolder; + public static String CreateLinkedResourceGroup_linkTargetNonExistent; + public static String SourceFolderSelectionDialog_title; + public static String SourceFolderSelectionDialog_description; -} + static { + NLS.initializeMessages(BUNDLE_NAME, NewWizardMessages.class); + } +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties index f56c08b241c..c1875620613 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties @@ -10,31 +10,31 @@ # Anton Leherbauer (Wind River Systems) ############################################################################### -# ------- AbstractOpenWizardAction ------- +# ------- AbstractOpenWizardAction ------- -AbstractOpenWizardAction.noproject.title=New -AbstractOpenWizardAction.noproject.message=A project needs to be created first.\nOpen the 'New Project' wizard'? +AbstractOpenWizardAction_noproject_title=New +AbstractOpenWizardAction_noproject_message=A project needs to be created first.\nOpen the 'New Project' wizard'? -AbstractOpenWizardAction.createerror.title=Open Wizard -AbstractOpenWizardAction.createerror.message=The wizard could not be opened. See log for details. +AbstractOpenWizardAction_createerror_title=Open Wizard +AbstractOpenWizardAction_createerror_message=The wizard could not be opened. See log for details. -# ------- NewElementWizard ------- +# ------- NewElementWizard ------- -NewElementWizard.op_error.title=New -NewElementWizard.op_error.message=Creation of element failed. +NewElementWizard_op_error_title=New +NewElementWizard_op_error_message=Creation of element failed. # -----------NewClassWizardPage ------------- -NewClassWizardPage.files.linkFileButton=Link to file +NewClassWizardPage_files_linkFileButton=Link to file # ----- LinkToFileGroup ----- -CreateLinkedResourceGroup.resolvedPathLabel=Resolved Location: -CreateLinkedResourceGroup.browseButton=Browse... -CreateLinkedResourceGroup.open=Open -CreateLinkedResourceGroup.targetSelectionLabel= Select the link target. -CreateLinkedResourceGroup.linkTargetNotFile= Link target must be a file -CreateLinkedResourceGroup.linkTargetNotFolder= Link target must be a folder -CreateLinkedResourceGroup.linkTargetNonExistent= Link target does not exist +CreateLinkedResourceGroup_resolvedPathLabel=Resolved Location: +CreateLinkedResourceGroup_browseButton=Browse... +CreateLinkedResourceGroup_open=Open +CreateLinkedResourceGroup_targetSelectionLabel= Select the link target. +CreateLinkedResourceGroup_linkTargetNotFile= Link target must be a file +CreateLinkedResourceGroup_linkTargetNotFolder= Link target must be a folder +CreateLinkedResourceGroup_linkTargetNonExistent= Link target does not exist # ----------- SourceFolderSelectionDialog ------------- -SourceFolderSelectionDialog.title= Folder Selection -SourceFolderSelectionDialog.description= &Choose a source folder: +SourceFolderSelectionDialog_title= Folder Selection +SourceFolderSelectionDialog_description= &Choose a source folder: diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/SourceFolderSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/SourceFolderSelectionDialog.java index 0f2fcafa03b..612afef6aef 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/SourceFolderSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/SourceFolderSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -43,8 +43,8 @@ public class SourceFolderSelectionDialog extends ElementTreeSelectionDialog { setValidator(fValidator); setComparator(fSorter); addFilter(fFilter); - setTitle(NewWizardMessages.getString("SourceFolderSelectionDialog.title")); //$NON-NLS-1$ - setMessage(NewWizardMessages.getString("SourceFolderSelectionDialog.description")); //$NON-NLS-1$ + setTitle(NewWizardMessages.SourceFolderSelectionDialog_title); + setMessage(NewWizardMessages.SourceFolderSelectionDialog_description); } private static ITreeContentProvider createContentProvider() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesLabelProvider.java index 21d414d8aa8..a89387514db 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -19,11 +19,11 @@ import org.eclipse.swt.graphics.Image; public final class BaseClassesLabelProvider implements ITableLabelProvider { - private static final String YES_VALUE = NewClassWizardMessages.getString("BaseClassesLabelProvider.boolean.yes.label"); //$NON-NLS-1$ - private static final String NO_VALUE = NewClassWizardMessages.getString("BaseClassesLabelProvider.boolean.no.label"); //$NON-NLS-1$ - private static final String ACCESS_PUBLIC = NewClassWizardMessages.getString("BaseClassesLabelProvider.access.public.label"); //$NON-NLS-1$ - private static final String ACCESS_PROTECTED = NewClassWizardMessages.getString("BaseClassesLabelProvider.access.protected.label"); //$NON-NLS-1$ - private static final String ACCESS_PRIVATE = NewClassWizardMessages.getString("BaseClassesLabelProvider.access.private.label"); //$NON-NLS-1$ + private static final String YES_VALUE = NewClassWizardMessages.BaseClassesLabelProvider_boolean_yes_label; + private static final String NO_VALUE = NewClassWizardMessages.BaseClassesLabelProvider_boolean_no_label; + private static final String ACCESS_PUBLIC = NewClassWizardMessages.BaseClassesLabelProvider_access_public_label; + private static final String ACCESS_PROTECTED = NewClassWizardMessages.BaseClassesLabelProvider_access_protected_label; + private static final String ACCESS_PRIVATE = NewClassWizardMessages.BaseClassesLabelProvider_access_private_label; public static final String getYesNoText(boolean value) { return value ? YES_VALUE : NO_VALUE; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesListDialogField.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesListDialogField.java index d035bc520b4..5c8f0aca185 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesListDialogField.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/BaseClassesListDialogField.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -102,10 +102,10 @@ public class BaseClassesListDialogField extends ListDialogField public BaseClassesListDialogField(String title, IListAdapter listAdapter) { super(listAdapter, new String[] { - /* 0 */ NewClassWizardMessages.getString("BaseClassesListDialogField.buttons.add"), //$NON-NLS-1$ - /* 1 */ NewClassWizardMessages.getString("BaseClassesListDialogField.buttons.remove"), //$NON-NLS-1$ - /* 2 */ NewClassWizardMessages.getString("BaseClassesListDialogField.buttons.up"), //$NON-NLS-1$ - /* 3 */ NewClassWizardMessages.getString("BaseClassesListDialogField.buttons.down") //$NON-NLS-1$ + NewClassWizardMessages.BaseClassesListDialogField_buttons_add, + NewClassWizardMessages.BaseClassesListDialogField_buttons_remove, + NewClassWizardMessages.BaseClassesListDialogField_buttons_up, + NewClassWizardMessages.BaseClassesListDialogField_buttons_down }, new BaseClassesLabelProvider()); setRemoveButtonIndex(1); setUpButtonIndex(2); @@ -113,9 +113,9 @@ public class BaseClassesListDialogField extends ListDialogField setLabelText(title); String[] headers = new String[] { - NewClassWizardMessages.getString("BaseClassesListDialogField.headings.name"), //$NON-NLS-1$ - NewClassWizardMessages.getString("BaseClassesListDialogField.headings.access"), //$NON-NLS-1$ - NewClassWizardMessages.getString("BaseClassesListDialogField.headings.virtual") //$NON-NLS-1$ + NewClassWizardMessages.BaseClassesListDialogField_headings_name, + NewClassWizardMessages.BaseClassesListDialogField_headings_access, + NewClassWizardMessages.BaseClassesListDialogField_headings_virtual }; ColumnLayoutData[] columns = new ColumnLayoutData[] { new ColumnWeightData(70, 30), @@ -139,7 +139,7 @@ public class BaseClassesListDialogField extends ListDialogField new AccessibleAdapter() { @Override public void getName(AccessibleEvent e) { - e.result = NewClassWizardMessages.getString("NewClassCreationWizardPage.baseClasses.label"); //$NON-NLS-1$ + e.result = NewClassWizardMessages.NewClassCreationWizardPage_baseClasses_label; } } ); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java index a69fa7e03e8..efeb3e354d5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2005 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -19,7 +19,7 @@ import org.eclipse.cdt.ui.CodeGeneration; public final class ConstructorMethodStub extends AbstractMethodStub { - private static String NAME = NewClassWizardMessages.getString("NewClassCodeGeneration.stub.constructor.name"); //$NON-NLS-1$ + private static String NAME = NewClassWizardMessages.NewClassCodeGeneration_stub_constructor_name; public ConstructorMethodStub() { this(ASTAccessVisibility.PUBLIC, false); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java index 468bc162f2e..f2e75bceff2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -20,7 +20,7 @@ import org.eclipse.cdt.ui.CodeGeneration; public final class DestructorMethodStub extends AbstractMethodStub { - private static String NAME = NewClassWizardMessages.getString("NewClassCodeGeneration.stub.destructor.name"); //$NON-NLS-1$ + private static String NAME = NewClassWizardMessages.NewClassCodeGeneration_stub_destructor_name; public DestructorMethodStub() { this(ASTAccessVisibility.PUBLIC, true, false); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/EnclosingClassSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/EnclosingClassSelectionDialog.java index cfc6f68623f..c6bc74d1e46 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/EnclosingClassSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/EnclosingClassSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -21,8 +21,8 @@ public class EnclosingClassSelectionDialog extends TypeSelectionDialog { public EnclosingClassSelectionDialog(Shell parent) { super(parent); - setTitle(NewClassWizardMessages.getString("EnclosingClassSelectionDialog.title")); //$NON-NLS-1$ - setMessage(NewClassWizardMessages.getString("EnclosingClassSelectionDialog.message")); //$NON-NLS-1$ + setTitle(NewClassWizardMessages.EnclosingClassSelectionDialog_title); + setMessage(NewClassWizardMessages.EnclosingClassSelectionDialog_message); setDialogSettings(DIALOG_SETTINGS); setVisibleTypes(VISIBLE_TYPES); setFilter("*", true); //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsListDialogField.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsListDialogField.java index 058fd72dcfe..f0788067314 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsListDialogField.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/MethodStubsListDialogField.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -123,10 +123,10 @@ public class MethodStubsListDialogField extends CheckedListDialogField publicMethods, List protectedMethods, List privateMethods, String oldContents, IProgressMonitor monitor) throws CoreException { - monitor.beginTask(NewClassWizardMessages.getString("NewClassCodeGeneration.createType.task.header"), 100); //$NON-NLS-1$ + monitor.beginTask(NewClassWizardMessages.NewClassCodeGeneration_createType_task_header, 100); String lineDelimiter= StubUtility.getLineDelimiterUsed(headerTU); @@ -498,7 +498,7 @@ public class NewClassCodeGenerator { private void addBaseClassIncludes(ITranslationUnit headerTU, StringBuffer text, String lineDelimiter, IProgressMonitor monitor) throws CodeGeneratorException { - monitor.beginTask(NewClassWizardMessages.getString("NewClassCodeGeneration.createType.task.header.includePaths"), 100); //$NON-NLS-1$ + monitor.beginTask(NewClassWizardMessages.NewClassCodeGeneration_createType_task_header_includePaths, 100); ICProject cProject = headerTU.getCProject(); IProject project = cProject.getProject(); @@ -582,7 +582,7 @@ public class NewClassCodeGenerator { } private void addIncludePaths(ICProject cProject, List newIncludePaths, IProgressMonitor monitor) throws CodeGeneratorException { - monitor.beginTask(NewClassWizardMessages.getString("NewClassCodeGeneration.createType.task.header.addIncludePaths"), 100); //$NON-NLS-1$ + monitor.beginTask(NewClassWizardMessages.NewClassCodeGeneration_createType_task_header_addIncludePaths, 100); //TODO prefs option whether to add to project or parent source folder? IPath addToResourcePath = cProject.getPath(); @@ -725,7 +725,7 @@ public class NewClassCodeGenerator { } public String constructSourceFileContent(ITranslationUnit sourceTU, ITranslationUnit headerTU, List publicMethods, List protectedMethods, List privateMethods, String oldContents, IProgressMonitor monitor) throws CoreException { - monitor.beginTask(NewClassWizardMessages.getString("NewClassCodeGeneration.createType.task.source"), 150); //$NON-NLS-1$ + monitor.beginTask(NewClassWizardMessages.NewClassCodeGeneration_createType_task_source, 150); String lineDelimiter= StubUtility.getLineDelimiterUsed(sourceTU); if (oldContents != null && oldContents.length() == 0) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.java index 2f16b9a93a9..6d74ff992b5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -10,51 +10,119 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.wizards.classwizard; +import org.eclipse.osgi.util.NLS; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +public final class NewClassWizardMessages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.wizards.classwizard.NewClassWizardMessages";//$NON-NLS-1$ -public class NewClassWizardMessages { - - private static final String RESOURCE_BUNDLE= NewClassWizardMessages.class.getName(); - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } - private NewClassWizardMessages() { - } - - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(key), new Object[] { arg }); + // Do not instantiate } - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object[] args) { - return MessageFormat.format(getString(key), args); - } + public static String NewClassCreationWizard_title; + public static String NewClassCreationWizardPage_description; + public static String NewClassCreationWizardPage_getTypes_noClasses_title; + public static String NewClassCreationWizardPage_getTypes_noClasses_message; + public static String NewClassCreationWizardPage_getTypes_noNamespaces_title; + public static String NewClassCreationWizardPage_getTypes_noNamespaces_message; + public static String NewClassCreationWizardPage_sourceFolder_label; + public static String NewClassCreationWizardPage_sourceFolder_button; + public static String NewClassCreationWizardPage_error_EnterSourceFolderName; + public static String NewClassCreationWizardPage_error_NotAFolder; + public static String NewClassCreationWizardPage_error_NotASourceFolder; + public static String NewClassCreationWizardPage_warning_NotACProject; + public static String NewClassCreationWizardPage_warning_NotInACProject; + public static String NewClassCreationWizardPage_namespace_label; + public static String NewClassCreationWizardPage_namespace_button; + public static String NewClassCreationWizardPage_error_EnterNamespace; + public static String NewClassCreationWizardPage_error_EnclosingNamespaceNotExists; + public static String NewClassCreationWizardPage_error_NamespaceExistsDifferentCase; + public static String NewClassCreationWizardPage_error_TypeMatchingNamespaceExists; + public static String NewClassCreationWizardPage_error_TypeMatchingNamespaceExistsDifferentCase; + public static String NewClassCreationWizardPage_warning_NamespaceNotExists; + public static String NewClassCreationWizardPage_error_InvalidNamespace; + public static String NewClassCreationWizardPage_warning_NamespaceDiscouraged; + public static String NewClassCreationWizardPage_className_label; + public static String NewClassCreationWizardPage_error_EnterClassName; + public static String NewClassCreationWizardPage_error_ClassNameExists; + public static String NewClassCreationWizardPage_error_ClassNameExistsDifferentCase; + public static String NewClassCreationWizardPage_error_TypeMatchingClassExists; + public static String NewClassCreationWizardPage_error_TypeMatchingClassExistsDifferentCase; + public static String NewClassCreationWizardPage_error_InvalidClassName; + public static String NewClassCreationWizardPage_error_QualifiedClassName; + public static String NewClassCreationWizardPage_warning_ClassNameDiscouraged; + public static String NewClassCreationWizardPage_baseClasses_label; + public static String NewClassCreationWizardPage_error_BaseClassNotExistsInProject; + public static String NewClassCreationWizardPage_methodStubs_label; + public static String NewClassCreationWizardPage_error_NotAFile; + public static String NewClassCreationWizardPage_error_FolderDoesNotExist; + public static String NewClassCreationWizardPage_useDefaultLocation_label; + public static String NewClassCreationWizardPage_headerFile_label; + public static String NewClassCreationWizardPage_headerFile_button; + public static String NewClassCreationWizardPage_ChooseHeaderFileDialog_title; + public static String NewClassCreationWizardPage_error_EnterHeaderFileName; + public static String NewClassCreationWizardPage_error_HeaderFileNotInSourceFolder; + public static String NewClassCreationWizardPage_warning_HeaderFileNameDiscouraged; + public static String NewClassCreationWizardPage_warning_HeaderFileExists; + public static String NewClassCreationWizardPage_error_InvalidHeaderFileName; + public static String NewClassCreationWizardPage_sourceFile_button; + public static String NewClassCreationWizardPage_sourceFile_label; + public static String NewClassCreationWizardPage_ChooseSourceFileDialog_title; + public static String NewClassCreationWizardPage_error_EnterSourceFileName; + public static String NewClassCreationWizardPage_error_SourceFileNotInSourceFolder; + public static String NewClassCreationWizardPage_warning_SourceFileNameDiscouraged; + public static String NewClassCreationWizardPage_warning_SourceFileExists; + public static String NewClassCreationWizardPage_error_InvalidSourceFileName; + public static String NewClassCreationWizardPage_error_LocationUnknown; + public static String BaseClassesListDialogField_buttons_add; + public static String BaseClassesListDialogField_buttons_remove; + public static String BaseClassesListDialogField_buttons_up; + public static String BaseClassesListDialogField_buttons_down; + public static String BaseClassesListDialogField_headings_name; + public static String BaseClassesListDialogField_headings_access; + public static String BaseClassesListDialogField_headings_virtual; + public static String BaseClassesLabelProvider_boolean_yes_label; + public static String BaseClassesLabelProvider_boolean_no_label; + public static String BaseClassesLabelProvider_access_public_label; + public static String BaseClassesLabelProvider_access_protected_label; + public static String BaseClassesLabelProvider_access_private_label; + public static String MethodStubsDialogField_headings_name; + public static String MethodStubsDialogField_headings_access; + public static String MethodStubsDialogField_headings_virtual; + public static String MethodStubsDialogField_headings_inline; + public static String NamespaceSelectionDialog_title; + public static String NamespaceSelectionDialog_message; + public static String EnclosingClassSelectionDialog_title; + public static String EnclosingClassSelectionDialog_message; + public static String NewBaseClassSelectionDialog_title; + public static String NewBaseClassSelectionDialog_message; + public static String NewBaseClassSelectionDialog_addButton_label; + public static String NewBaseClassSelectionDialog_classadded_info; + public static String NewBaseClassSelectionDialog_classalreadyadded_info; + public static String NewBaseClassSelectionDialog_addingclass_info; + public static String NewBaseClassSelectionDialog_error_classnotadded; + public static String SourceFileSelectionDialog_folderName_label; + public static String SourceFileSelectionDialog_fileName_label; + public static String SourceFileSelectionDialog_error_EnterFolderName; + public static String SourceFileSelectionDialog_error_FolderDoesNotExist; + public static String SourceFileSelectionDialog_error_NotAFolder; + public static String SourceFileSelectionDialog_error_NotASourceFolder; + public static String SourceFileSelectionDialog_warning_NotACProject; + public static String SourceFileSelectionDialog_warning_NotInACProject; + public static String SourceFileSelectionDialog_error_EnterFileName; + public static String SourceFileSelectionDialog_error_NotAFile; + public static String SourceFileSelectionDialog_error_NotASourceFile; + public static String SourceFileSelectionDialog_warning_SourceFileExists; + public static String NewClassCodeGeneration_createType_mainTask; + public static String NewClassCodeGeneration_createType_task_header; + public static String NewClassCodeGeneration_createType_task_header_includePaths; + public static String NewClassCodeGeneration_createType_task_header_addIncludePaths; + public static String NewClassCodeGeneration_createType_task_source; + public static String NewClassCodeGeneration_stub_constructor_name; + public static String NewClassCodeGeneration_stub_destructor_name; -} + static { + NLS.initializeMessages(BUNDLE_NAME, NewClassWizardMessages.class); + } +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties index e211279f967..c66943b7f0b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties @@ -11,133 +11,133 @@ # Anton Leherbauer (Wind River Systems) ############################################################################### -# ------- NewClassCreationWizard ------- -NewClassCreationWizard.title=New C++ Class +# ------- NewClassCreationWizard ------- +NewClassCreationWizard_title=New C++ Class # -----------NewClassCreationWizardPage ------------- -NewClassCreationWizardPage.description=Create a new C++ class. +NewClassCreationWizardPage_description=Create a new C++ class. -NewClassCreationWizardPage.getTypes.noClasses.title=Class Selection -NewClassCreationWizardPage.getTypes.noClasses.message=No classes available. -NewClassCreationWizardPage.getTypes.noNamespaces.title=Namespace Selection -NewClassCreationWizardPage.getTypes.noNamespaces.message=No namespaces available. +NewClassCreationWizardPage_getTypes_noClasses_title=Class Selection +NewClassCreationWizardPage_getTypes_noClasses_message=No classes available. +NewClassCreationWizardPage_getTypes_noNamespaces_title=Namespace Selection +NewClassCreationWizardPage_getTypes_noNamespaces_message=No namespaces available. -NewClassCreationWizardPage.sourceFolder.label=&Source Folder: -NewClassCreationWizardPage.sourceFolder.button=Br&owse... -NewClassCreationWizardPage.error.EnterSourceFolderName=Source folder name is empty. -NewClassCreationWizardPage.error.NotAFolder=''{0}'' is not a project or folder. -NewClassCreationWizardPage.error.NotASourceFolder=Folder ''{0}'' is not a source folder. -NewClassCreationWizardPage.warning.NotACProject=Folder is not a C/C++ project. -NewClassCreationWizardPage.warning.NotInACProject=Folder is not in a C/C++ project. +NewClassCreationWizardPage_sourceFolder_label=&Source Folder: +NewClassCreationWizardPage_sourceFolder_button=Br&owse... +NewClassCreationWizardPage_error_EnterSourceFolderName=Source folder name is empty. +NewClassCreationWizardPage_error_NotAFolder=''{0}'' is not a project or folder. +NewClassCreationWizardPage_error_NotASourceFolder=Folder ''{0}'' is not a source folder. +NewClassCreationWizardPage_warning_NotACProject=Folder is not a C/C++ project. +NewClassCreationWizardPage_warning_NotInACProject=Folder is not in a C/C++ project. -NewClassCreationWizardPage.namespace.label=&Namespace: -NewClassCreationWizardPage.namespace.button=Bro&wse... +NewClassCreationWizardPage_namespace_label=&Namespace: +NewClassCreationWizardPage_namespace_button=Bro&wse... -NewClassCreationWizardPage.error.EnterNamespace=Namespace is empty. -NewClassCreationWizardPage.error.EnclosingNamespaceNotExists=Enclosing namespace does not exist. -NewClassCreationWizardPage.error.NamespaceExistsDifferentCase=Namespace with the same name exists in a different scope. -NewClassCreationWizardPage.error.TypeMatchingNamespaceExists=Another type with the same name as specified namespace exists. -NewClassCreationWizardPage.error.TypeMatchingNamespaceExistsDifferentCase=Another type with the same name as specified namespace exists in a different scope. -NewClassCreationWizardPage.warning.NamespaceNotExists=Namespace does not exist. A new namespace will be created. -NewClassCreationWizardPage.error.InvalidNamespace=Namespace is not valid. {0}. -NewClassCreationWizardPage.warning.NamespaceDiscouraged=Namespace is discouraged. {0}. +NewClassCreationWizardPage_error_EnterNamespace=Namespace is empty. +NewClassCreationWizardPage_error_EnclosingNamespaceNotExists=Enclosing namespace does not exist. +NewClassCreationWizardPage_error_NamespaceExistsDifferentCase=Namespace with the same name exists in a different scope. +NewClassCreationWizardPage_error_TypeMatchingNamespaceExists=Another type with the same name as specified namespace exists. +NewClassCreationWizardPage_error_TypeMatchingNamespaceExistsDifferentCase=Another type with the same name as specified namespace exists in a different scope. +NewClassCreationWizardPage_warning_NamespaceNotExists=Namespace does not exist. A new namespace will be created. +NewClassCreationWizardPage_error_InvalidNamespace=Namespace is not valid. {0}. +NewClassCreationWizardPage_warning_NamespaceDiscouraged=Namespace is discouraged. {0}. -NewClassCreationWizardPage.className.label=&Class Name: -NewClassCreationWizardPage.error.EnterClassName=Class name is empty. -NewClassCreationWizardPage.error.ClassNameExists=Class already exists. -NewClassCreationWizardPage.error.ClassNameExistsDifferentCase=Class with same name exists in a different scope. -NewClassCreationWizardPage.error.TypeMatchingClassExists=Another type with the same name exists. -NewClassCreationWizardPage.error.TypeMatchingClassExistsDifferentCase=Another type with the same name exists in a different scope. -NewClassCreationWizardPage.error.InvalidClassName=Class name is not valid. {0}. -NewClassCreationWizardPage.error.QualifiedClassName=Class name must not be qualified. -NewClassCreationWizardPage.warning.ClassNameDiscouraged=Class name is discouraged. {0}. +NewClassCreationWizardPage_className_label=&Class Name: +NewClassCreationWizardPage_error_EnterClassName=Class name is empty. +NewClassCreationWizardPage_error_ClassNameExists=Class already exists. +NewClassCreationWizardPage_error_ClassNameExistsDifferentCase=Class with same name exists in a different scope. +NewClassCreationWizardPage_error_TypeMatchingClassExists=Another type with the same name exists. +NewClassCreationWizardPage_error_TypeMatchingClassExistsDifferentCase=Another type with the same name exists in a different scope. +NewClassCreationWizardPage_error_InvalidClassName=Class name is not valid. {0}. +NewClassCreationWizardPage_error_QualifiedClassName=Class name must not be qualified. +NewClassCreationWizardPage_warning_ClassNameDiscouraged=Class name is discouraged. {0}. -NewClassCreationWizardPage.baseClasses.label=&Base Classes: -NewClassCreationWizardPage.error.BaseClassNotExistsInProject=Base class ''{0}'' not in include paths for current project. +NewClassCreationWizardPage_baseClasses_label=&Base Classes: +NewClassCreationWizardPage_error_BaseClassNotExistsInProject=Base class ''{0}'' not in include paths for current project. -NewClassCreationWizardPage.methodStubs.label=&Method Stubs: +NewClassCreationWizardPage_methodStubs_label=&Method Stubs: -NewClassCreationWizardPage.error.NotAFile=''{0}'' is not a file. -NewClassCreationWizardPage.error.FolderDoesNotExist=Folder ''{0}'' does not exist. +NewClassCreationWizardPage_error_NotAFile=''{0}'' is not a file. +NewClassCreationWizardPage_error_FolderDoesNotExist=Folder ''{0}'' does not exist. -NewClassCreationWizardPage.useDefaultLocation.label=&Use Default -NewClassCreationWizardPage.headerFile.label=&Header: -NewClassCreationWizardPage.headerFile.button=Br&owse... -NewClassCreationWizardPage.ChooseHeaderFileDialog.title=Header File Selection -NewClassCreationWizardPage.error.EnterHeaderFileName=Header file name is empty. -NewClassCreationWizardPage.error.HeaderFileNotInSourceFolder=Header file must be inside source folder. -NewClassCreationWizardPage.warning.HeaderFileNameDiscouraged=Header file name is discouraged. {0}. -NewClassCreationWizardPage.warning.HeaderFileExists=Header file already exists. Contents will be appended. -NewClassCreationWizardPage.error.InvalidHeaderFileName=Header file name is not valid. {0}. +NewClassCreationWizardPage_useDefaultLocation_label=&Use Default +NewClassCreationWizardPage_headerFile_label=&Header: +NewClassCreationWizardPage_headerFile_button=Br&owse... +NewClassCreationWizardPage_ChooseHeaderFileDialog_title=Header File Selection +NewClassCreationWizardPage_error_EnterHeaderFileName=Header file name is empty. +NewClassCreationWizardPage_error_HeaderFileNotInSourceFolder=Header file must be inside source folder. +NewClassCreationWizardPage_warning_HeaderFileNameDiscouraged=Header file name is discouraged. {0}. +NewClassCreationWizardPage_warning_HeaderFileExists=Header file already exists. Contents will be appended. +NewClassCreationWizardPage_error_InvalidHeaderFileName=Header file name is not valid. {0}. -NewClassCreationWizardPage.sourceFile.button=Br&owse... -NewClassCreationWizardPage.sourceFile.label=Sourc&e: -NewClassCreationWizardPage.ChooseSourceFileDialog.title=Source File Selection -NewClassCreationWizardPage.error.EnterSourceFileName=Source file name is empty. -NewClassCreationWizardPage.error.SourceFileNotInSourceFolder=Source file must be inside source folder. -NewClassCreationWizardPage.warning.SourceFileNameDiscouraged=Source file name is discouraged. {0} -NewClassCreationWizardPage.warning.SourceFileExists=Source file already exists. Contents will be appended. -NewClassCreationWizardPage.error.InvalidSourceFileName=Source file name is not valid. {0} -NewClassCreationWizardPage.error.LocationUnknown=Cannot locate resource. {0} +NewClassCreationWizardPage_sourceFile_button=Br&owse... +NewClassCreationWizardPage_sourceFile_label=Sourc&e: +NewClassCreationWizardPage_ChooseSourceFileDialog_title=Source File Selection +NewClassCreationWizardPage_error_EnterSourceFileName=Source file name is empty. +NewClassCreationWizardPage_error_SourceFileNotInSourceFolder=Source file must be inside source folder. +NewClassCreationWizardPage_warning_SourceFileNameDiscouraged=Source file name is discouraged. {0} +NewClassCreationWizardPage_warning_SourceFileExists=Source file already exists. Contents will be appended. +NewClassCreationWizardPage_error_InvalidSourceFileName=Source file name is not valid. {0} +NewClassCreationWizardPage_error_LocationUnknown=Cannot locate resource. {0} # -----------BaseClassesListDialogField ------------- -BaseClassesListDialogField.buttons.add=&Add... -BaseClassesListDialogField.buttons.remove=&Remove -BaseClassesListDialogField.buttons.up=U&p -BaseClassesListDialogField.buttons.down=&Down -BaseClassesListDialogField.headings.name=Name -BaseClassesListDialogField.headings.access=Access -BaseClassesListDialogField.headings.virtual=Virtual +BaseClassesListDialogField_buttons_add=&Add... +BaseClassesListDialogField_buttons_remove=&Remove +BaseClassesListDialogField_buttons_up=U&p +BaseClassesListDialogField_buttons_down=&Down +BaseClassesListDialogField_headings_name=Name +BaseClassesListDialogField_headings_access=Access +BaseClassesListDialogField_headings_virtual=Virtual # -----------BaseClassesLabelProvider ------------- -BaseClassesLabelProvider.boolean.yes.label=yes -BaseClassesLabelProvider.boolean.no.label=no -BaseClassesLabelProvider.access.public.label=public -BaseClassesLabelProvider.access.protected.label=protected -BaseClassesLabelProvider.access.private.label=private +BaseClassesLabelProvider_boolean_yes_label=yes +BaseClassesLabelProvider_boolean_no_label=no +BaseClassesLabelProvider_access_public_label=public +BaseClassesLabelProvider_access_protected_label=protected +BaseClassesLabelProvider_access_private_label=private # -----------MethodStubsDialogField ------------- -MethodStubsDialogField.headings.name=Name -MethodStubsDialogField.headings.access=Access -MethodStubsDialogField.headings.virtual=Virtual -MethodStubsDialogField.headings.inline=Inline +MethodStubsDialogField_headings_name=Name +MethodStubsDialogField_headings_access=Access +MethodStubsDialogField_headings_virtual=Virtual +MethodStubsDialogField_headings_inline=Inline # ------- NamespaceSelectionDialog ----- -NamespaceSelectionDialog.title=Choose Namespace -NamespaceSelectionDialog.message=&Choose a namespace (? = any character, * = any string): +NamespaceSelectionDialog_title=Choose Namespace +NamespaceSelectionDialog_message=&Choose a namespace (? = any character, * = any string): # ------- EnclosingClassSelectionDialog ----- -EnclosingClassSelectionDialog.title=Choose Enclosing Class -EnclosingClassSelectionDialog.message=&Choose a class (? = any character, * = any string): +EnclosingClassSelectionDialog_title=Choose Enclosing Class +EnclosingClassSelectionDialog_message=&Choose a class (? = any character, * = any string): # ------- NewBaseClassSelectionDialog ----- -NewBaseClassSelectionDialog.title=Choose Base Class -NewBaseClassSelectionDialog.message=&Choose a class (? = any character, * = any string): -NewBaseClassSelectionDialog.addButton.label=&Add -NewBaseClassSelectionDialog.classadded.info=''{0}'' added. -NewBaseClassSelectionDialog.classalreadyadded.info=''{0}'' already added. -NewBaseClassSelectionDialog.addingclass.info=Adding ''{0}''... -NewBaseClassSelectionDialog.error.classnotadded=''{0}'' could not be added. +NewBaseClassSelectionDialog_title=Choose Base Class +NewBaseClassSelectionDialog_message=&Choose a class (? = any character, * = any string): +NewBaseClassSelectionDialog_addButton_label=&Add +NewBaseClassSelectionDialog_classadded_info=''{0}'' added. +NewBaseClassSelectionDialog_classalreadyadded_info=''{0}'' already added. +NewBaseClassSelectionDialog_addingclass_info=Adding ''{0}''... +NewBaseClassSelectionDialog_error_classnotadded=''{0}'' could not be added. # ------- SourceFileSelectionDialog ----- -SourceFileSelectionDialog.folderName.label=Folder Name: -SourceFileSelectionDialog.fileName.label=File Name: -SourceFileSelectionDialog.error.EnterFolderName=Folder name is empty. -SourceFileSelectionDialog.error.FolderDoesNotExist=Folder ''{0}'' does not exist. -SourceFileSelectionDialog.error.NotAFolder=''{0}'' must be a project or folder. -SourceFileSelectionDialog.error.NotASourceFolder=Folder ''{0}'' is not a valid source folder. -SourceFileSelectionDialog.warning.NotACProject=Folder is not a C/C++ project. -SourceFileSelectionDialog.warning.NotInACProject=Folder is not in a C/C++ project. -SourceFileSelectionDialog.error.EnterFileName=File name is empty. -SourceFileSelectionDialog.error.NotAFile=''{0}'' is not a source file. -SourceFileSelectionDialog.error.NotASourceFile=''{0}'' is not a valid source file. -SourceFileSelectionDialog.warning.SourceFileExists=New class contents will be appended to existing file ''{0}''. +SourceFileSelectionDialog_folderName_label=Folder Name: +SourceFileSelectionDialog_fileName_label=File Name: +SourceFileSelectionDialog_error_EnterFolderName=Folder name is empty. +SourceFileSelectionDialog_error_FolderDoesNotExist=Folder ''{0}'' does not exist. +SourceFileSelectionDialog_error_NotAFolder=''{0}'' must be a project or folder. +SourceFileSelectionDialog_error_NotASourceFolder=Folder ''{0}'' is not a valid source folder. +SourceFileSelectionDialog_warning_NotACProject=Folder is not a C/C++ project. +SourceFileSelectionDialog_warning_NotInACProject=Folder is not in a C/C++ project. +SourceFileSelectionDialog_error_EnterFileName=File name is empty. +SourceFileSelectionDialog_error_NotAFile=''{0}'' is not a source file. +SourceFileSelectionDialog_error_NotASourceFile=''{0}'' is not a valid source file. +SourceFileSelectionDialog_warning_SourceFileExists=New class contents will be appended to existing file ''{0}''. # -----------NewClassCodeGeneration ------------- -NewClassCodeGeneration.createType.mainTask=Creating type.... -NewClassCodeGeneration.createType.task.header=Creating header file.... -NewClassCodeGeneration.createType.task.header.includePaths=Adding include paths.... -NewClassCodeGeneration.createType.task.header.addIncludePaths=Adding new include paths to project.... -NewClassCodeGeneration.createType.task.source=Creating source file.... -NewClassCodeGeneration.stub.constructor.name=Constructor -NewClassCodeGeneration.stub.destructor.name=Destructor +NewClassCodeGeneration_createType_mainTask=Creating type.... +NewClassCodeGeneration_createType_task_header=Creating header file.... +NewClassCodeGeneration_createType_task_header_includePaths=Adding include paths.... +NewClassCodeGeneration_createType_task_header_addIncludePaths=Adding new include paths to project.... +NewClassCodeGeneration_createType_task_source=Creating source file.... +NewClassCodeGeneration_stub_constructor_name=Constructor +NewClassCodeGeneration_stub_destructor_name=Destructor diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java index ffe2df8cbd2..ce4d309bc11 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -32,6 +32,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.events.SelectionAdapter; @@ -193,11 +194,11 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog { fFolderNameDialogField = new StringDialogField(); fFolderNameDialogField.setDialogFieldListener(fFieldsAdapter); - fFolderNameDialogField.setLabelText(NewClassWizardMessages.getString("SourceFileSelectionDialog.folderName.label")); //$NON-NLS-1$ + fFolderNameDialogField.setLabelText(NewClassWizardMessages.SourceFileSelectionDialog_folderName_label); fFileNameDialogField = new StringDialogField(); fFileNameDialogField.setDialogFieldListener(fFieldsAdapter); - fFileNameDialogField.setLabelText(NewClassWizardMessages.getString("SourceFileSelectionDialog.fileName.label")); //$NON-NLS-1$ + fFileNameDialogField.setLabelText(NewClassWizardMessages.SourceFileSelectionDialog_fileName_label); setResult(new ArrayList(0)); setStatusLineAboveButtons(true); @@ -255,7 +256,7 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog { fCurrentFolder = null; String str = fFolderNameDialogField.getText(); if (str.length() == 0) { - status.setError(NewClassWizardMessages.getString("SourceFileSelectionDialog.error.EnterFolderName")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.SourceFileSelectionDialog_error_EnterFolderName); return status; } @@ -266,28 +267,28 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog { if (resType == IResource.PROJECT || resType == IResource.FOLDER) { IProject proj = res.getProject(); if (!proj.isOpen()) { - status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.NotAFolder", str)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_error_NotAFolder, str)); return status; } ICElement e = CoreModel.getDefault().create(res.getFullPath()); fCurrentFolder = CModelUtil.getSourceFolder(e); if (fCurrentFolder == null) { - status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.NotASourceFolder", str)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_error_NotASourceFolder, str)); return status; } if (!CoreModel.hasCCNature(proj) && !CoreModel.hasCNature(proj)) { if (resType == IResource.PROJECT) { - status.setError(NewClassWizardMessages.getString("SourceFileSelectionDialog.warning.NotACProject")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.SourceFileSelectionDialog_warning_NotACProject); return status; } - status.setWarning(NewClassWizardMessages.getString("SourceFileSelectionDialog.warning.NotInACProject")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.SourceFileSelectionDialog_warning_NotInACProject); } } else { - status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.NotAFolder", str)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_error_NotAFolder, str)); return status; } } else { - status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.FolderDoesNotExist", str)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_error_FolderDoesNotExist, str)); return status; } return status; @@ -300,7 +301,7 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog { ICElement existingFile = null; String str = fFileNameDialogField.getText(); if (str.length() == 0) { - status.setError(NewClassWizardMessages.getString("SourceFileSelectionDialog.error.EnterFileName")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.SourceFileSelectionDialog_error_EnterFileName); return status; } @@ -315,7 +316,7 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog { if (resType == IResource.FILE) { IProject proj = res.getProject(); if (!proj.isOpen()) { - status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.NotAFile", str)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_error_NotAFile, str)); return status; } ICElement e = CoreModel.getDefault().create(res.getFullPath()); @@ -323,20 +324,20 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog { existingFile = e; } if (existingFile == null) { - status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.NotASourceFile", str)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_error_NotASourceFile, str)); return status; } if (!CoreModel.hasCCNature(proj) && !CoreModel.hasCNature(proj)) { - status.setWarning(NewClassWizardMessages.getString("SourceFileSelectionDialog.warning.NotInACProject")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.SourceFileSelectionDialog_warning_NotInACProject); } } else { - status.setError(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.error.NotAFile", str)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_error_NotAFile, str)); return status; } } } if (existingFile != null) { - status.setWarning(NewClassWizardMessages.getFormattedString("SourceFileSelectionDialog.warning.SourceFileExists", str)); //$NON-NLS-1$ + status.setWarning(NLS.bind(NewClassWizardMessages.SourceFileSelectionDialog_warning_SourceFileExists, str)); } fCurrentFileString = str; return status; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java index 4050cc522fc..207d5cc16e7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java @@ -87,7 +87,7 @@ public class LinkToFileGroup extends StringButtonDialogField { DialogField.createEmptySpace(parent); resolvedPathLabelText = new Label(parent, SWT.SINGLE); - resolvedPathLabelText.setText(NewWizardMessages.getString("CreateLinkedResourceGroup.resolvedPathLabel")); //$NON-NLS-1$ + resolvedPathLabelText.setText(NewWizardMessages.CreateLinkedResourceGroup_resolvedPathLabel); resolvedPathLabelText.setVisible(true); resolvedPathLabelData = new Label(parent, SWT.SINGLE); @@ -110,7 +110,7 @@ public class LinkToFileGroup extends StringButtonDialogField { public Button getLinkCheckButtonControl(Composite parent){ if(linkButton == null){ linkButton = new Button(parent, SWT.CHECK); - linkButton.setText(NewWizardMessages.getString("NewClassWizardPage.files.linkFileButton")); //$NON-NLS-1$ + linkButton.setText(NewWizardMessages.NewClassWizardPage_files_linkFileButton); linkButton.setSelection(createLink); linkButton.setFont(parent.getFont()); SelectionListener selectionListener = new SelectionAdapter() { @@ -184,7 +184,7 @@ public class LinkToFileGroup extends StringButtonDialogField { browseButton = new Button(parent, SWT.PUSH); //setButtonLayoutData(browseButton); browseButton.setFont(parent.getFont()); - browseButton.setText(NewWizardMessages.getString("CreateLinkedResourceGroup.browseButton")); //$NON-NLS-1$ + browseButton.setText(NewWizardMessages.CreateLinkedResourceGroup_browseButton); browseButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { @@ -244,7 +244,7 @@ public class LinkToFileGroup extends StringButtonDialogField { } if (type == IResource.FILE) { FileDialog dialog = new FileDialog(linkTargetField.getShell()); - dialog.setText(NewWizardMessages.getString("CreateLinkedResourceGroup.open")); //$NON-NLS-1$ + dialog.setText(NewWizardMessages.CreateLinkedResourceGroup_open); if (file != null) { if (file.isFile()) dialog.setFileName(linkTargetName); @@ -255,14 +255,14 @@ public class LinkToFileGroup extends StringButtonDialogField { } else { DirectoryDialog dialog = new DirectoryDialog(linkTargetField.getShell()); - dialog.setText(NewWizardMessages.getString("CreateLinkedResourceGroup.open")); //$NON-NLS-1$ + dialog.setText(NewWizardMessages.CreateLinkedResourceGroup_open); if (file != null) { if (file.isFile()) linkTargetName = file.getParent(); if (linkTargetName != null) dialog.setFilterPath(linkTargetName); } - dialog.setMessage(NewWizardMessages.getString("CreateLinkedResourceGroup.targetSelectionLabel")); //$NON-NLS-1$ + dialog.setMessage(NewWizardMessages.CreateLinkedResourceGroup_targetSelectionLabel); selection = dialog.open(); } if (selection != null) { @@ -313,11 +313,11 @@ public class LinkToFileGroup extends StringButtonDialogField { if (type == IResource.FILE && linkTargetFile.isFile() == false) { return createStatus( IStatus.ERROR, - NewWizardMessages.getString("CreateLinkedResourceGroup.linkTargetNotFile")); //$NON-NLS-1$ + NewWizardMessages.CreateLinkedResourceGroup_linkTargetNotFile); } else if (type == IResource.FOLDER && linkTargetFile.isDirectory() == false) { return createStatus( IStatus.ERROR, - NewWizardMessages.getString("CreateLinkedResourceGroup.linkTargetNotFolder")); //$NON-NLS-1$ + NewWizardMessages.CreateLinkedResourceGroup_linkTargetNotFolder); } return createStatus(IStatus.OK, ""); //$NON-NLS-1$ } @@ -354,7 +354,7 @@ public class LinkToFileGroup extends StringButtonDialogField { // locationStatus takes precedence over missing location warning. return createStatus( IStatus.WARNING, - NewWizardMessages.getString("CreateLinkedResourceGroup.linkTargetNonExistent")); //$NON-NLS-1$ + NewWizardMessages.CreateLinkedResourceGroup_linkTargetNonExistent); } return locationStatus; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewFileWizardMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewFileWizardMessages.java index cba32311270..b7a0ca91642 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewFileWizardMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/NewFileWizardMessages.java @@ -59,12 +59,10 @@ public final class NewFileWizardMessages extends NLS { public static String NewSourceFileCreationWizardPage_warning_FileNameDiscouraged; public static String NewSourceFileCreationWizardPage_error_InvalidFileName; public static String NewSourceFileGenerator_createFile_task; - public static String NewFileFromTemplateWizard_pageTitle; public static String NewFileFromTemplateWizard_description; public static String NewFileFromTemplateWizard_shellTitle; public static String NewFileFromTemplateWizard_errorMessage; - public static String WizardNewFileFromTemplateCreationPage_configure_label; public static String WizardNewFileFromTemplateCreationPage_noTemplate_name; public static String WizardNewFileFromTemplateCreationPage_useTemplate_label; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.java index 1001061a238..24ef3e22831 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -10,51 +10,41 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.wizards.folderwizard; +import org.eclipse.osgi.util.NLS; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +public final class NewFolderWizardMessages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.wizards.folderwizard.NewFolderWizardMessages";//$NON-NLS-1$ -public class NewFolderWizardMessages { - - private static final String RESOURCE_BUNDLE= NewFolderWizardMessages.class.getName(); - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } - private NewFolderWizardMessages() { - } - - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(key), new Object[] { arg }); + // Do not instantiate } - /** - * Gets a string from the resource bundle and formats it with arguments - */ - public static String getFormattedString(String key, Object[] args) { - return MessageFormat.format(getString(key), args); - } + public static String NewSourceFolderCreationWizard_title; + public static String NewSourceFolderWizardPage_title; + public static String NewSourceFolderWizardPage_description; + public static String NewSourceFolderWizardPage_root_label; + public static String NewSourceFolderWizardPage_root_button; + public static String NewSourceFolderWizardPage_project_label; + public static String NewSourceFolderWizardPage_project_button; + public static String NewSourceFolderWizardPage_operation; + public static String NewSourceFolderWizardPage_exclude_label; + public static String NewSourceFolderWizardPage_ChooseExistingRootDialog_title; + public static String NewSourceFolderWizardPage_ChooseExistingRootDialog_description; + public static String NewSourceFolderWizardPage_ChooseProjectDialog_title; + public static String NewSourceFolderWizardPage_ChooseProjectDialog_description; + public static String NewSourceFolderWizardPage_error_EnterRootName; + public static String NewSourceFolderWizardPage_error_InvalidRootName; + public static String NewSourceFolderWizardPage_error_NotAFolder; + public static String NewSourceFolderWizardPage_error_AlreadyExisting; + public static String NewSourceFolderWizardPage_error_EnterProjectName; + public static String NewSourceFolderWizardPage_error_InvalidProjectPath; + public static String NewSourceFolderWizardPage_error_NotACProject; + public static String NewSourceFolderWizardPage_error_ProjectNotExists; + public static String NewSourceFolderWizardPage_warning_ReplaceSF; + public static String NewSourceFolderWizardPage_warning_AddedExclusions; -} + static { + NLS.initializeMessages(BUNDLE_NAME, NewFolderWizardMessages.class); + } +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.properties index 2403440894e..484da43d81f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizardMessages.properties @@ -12,36 +12,36 @@ # ------- NewSourceFolderWizardPage------- -NewSourceFolderCreationWizard.title=New Source Folder +NewSourceFolderCreationWizard_title=New Source Folder -NewSourceFolderWizardPage.title=Source folder -NewSourceFolderWizardPage.description=Add a new source folder +NewSourceFolderWizardPage_title=Source folder +NewSourceFolderWizardPage_description=Add a new source folder -NewSourceFolderWizardPage.root.label=Fol&der name: -NewSourceFolderWizardPage.root.button=Br&owse... +NewSourceFolderWizardPage_root_label=Fol&der name: +NewSourceFolderWizardPage_root_button=Br&owse... -NewSourceFolderWizardPage.project.label=Project &name: -NewSourceFolderWizardPage.project.button=Bro&wse... +NewSourceFolderWizardPage_project_label=Project &name: +NewSourceFolderWizardPage_project_button=Bro&wse... -NewSourceFolderWizardPage.operation=Creating new source folder... +NewSourceFolderWizardPage_operation=Creating new source folder... -NewSourceFolderWizardPage.exclude.label=&Update exclusion filters in other source folders to solve nesting. +NewSourceFolderWizardPage_exclude_label=&Update exclusion filters in other source folders to solve nesting. -NewSourceFolderWizardPage.ChooseExistingRootDialog.title=Existing Folder Selection -NewSourceFolderWizardPage.ChooseExistingRootDialog.description=&Choose folder as source folder: +NewSourceFolderWizardPage_ChooseExistingRootDialog_title=Existing Folder Selection +NewSourceFolderWizardPage_ChooseExistingRootDialog_description=&Choose folder as source folder: -NewSourceFolderWizardPage.ChooseProjectDialog.title=Project Selection -NewSourceFolderWizardPage.ChooseProjectDialog.description=&Choose project for the new source folder: +NewSourceFolderWizardPage_ChooseProjectDialog_title=Project Selection +NewSourceFolderWizardPage_ChooseProjectDialog_description=&Choose project for the new source folder: -NewSourceFolderWizardPage.error.EnterRootName=Root name must be entered. -NewSourceFolderWizardPage.error.InvalidRootName=Invalid folder name. {0} -NewSourceFolderWizardPage.error.NotAFolder=Not a folder. -NewSourceFolderWizardPage.error.AlreadyExisting=The folder is already a source folder. +NewSourceFolderWizardPage_error_EnterRootName=Root name must be entered. +NewSourceFolderWizardPage_error_InvalidRootName=Invalid folder name. {0} +NewSourceFolderWizardPage_error_NotAFolder=Not a folder. +NewSourceFolderWizardPage_error_AlreadyExisting=The folder is already a source folder. -NewSourceFolderWizardPage.error.EnterProjectName=Project name must be entered. -NewSourceFolderWizardPage.error.InvalidProjectPath=Invalid project path. -NewSourceFolderWizardPage.error.NotACProject=Project is not a C project. -NewSourceFolderWizardPage.error.ProjectNotExists=Project does not exist. +NewSourceFolderWizardPage_error_EnterProjectName=Project name must be entered. +NewSourceFolderWizardPage_error_InvalidProjectPath=Invalid project path. +NewSourceFolderWizardPage_error_NotACProject=Project is not a C project. +NewSourceFolderWizardPage_error_ProjectNotExists=Project does not exist. -NewSourceFolderWizardPage.warning.ReplaceSF=To avoid overlapping, the existing project source folder entry will be replaced. -NewSourceFolderWizardPage.warning.AddedExclusions=Exclusion patterns of {0} source folder(s) updated to solve nesting. +NewSourceFolderWizardPage_warning_ReplaceSF=To avoid overlapping, the existing project source folder entry will be replaced. +NewSourceFolderWizardPage_warning_AddedExclusions=Exclusion patterns of {0} source folder(s) updated to solve nesting. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewSourceFolderWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewSourceFolderWizardPage.java index 0215a22f9a8..a34dd9895aa 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewSourceFolderWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/folderwizard/NewSourceFolderWizardPage.java @@ -33,6 +33,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; @@ -106,8 +107,8 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { public NewSourceFolderWizardPage() { super(PAGE_NAME); - setTitle(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.title")); //$NON-NLS-1$ - setDescription(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.description")); //$NON-NLS-1$ + setTitle(NewFolderWizardMessages.NewSourceFolderWizardPage_title); + setDescription(NewFolderWizardMessages.NewSourceFolderWizardPage_description); fWorkspaceRoot= ResourcesPlugin.getWorkspace().getRoot(); @@ -115,17 +116,17 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { fProjectField= new StringButtonDialogField(adapter); fProjectField.setDialogFieldListener(adapter); - fProjectField.setLabelText(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.project.label")); //$NON-NLS-1$ - fProjectField.setButtonLabel(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.project.button")); //$NON-NLS-1$ + fProjectField.setLabelText(NewFolderWizardMessages.NewSourceFolderWizardPage_project_label); + fProjectField.setButtonLabel(NewFolderWizardMessages.NewSourceFolderWizardPage_project_button); fRootDialogField= new StringButtonDialogField(adapter); fRootDialogField.setDialogFieldListener(adapter); - fRootDialogField.setLabelText(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.root.label")); //$NON-NLS-1$ - fRootDialogField.setButtonLabel(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.root.button")); //$NON-NLS-1$ + fRootDialogField.setLabelText(NewFolderWizardMessages.NewSourceFolderWizardPage_root_label); + fRootDialogField.setButtonLabel(NewFolderWizardMessages.NewSourceFolderWizardPage_root_button); fExcludeInOthersFields= new SelectionButtonDialogField(SWT.CHECK); fExcludeInOthersFields.setDialogFieldListener(adapter); - fExcludeInOthersFields.setLabelText(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.exclude.label")); //$NON-NLS-1$ + fExcludeInOthersFields.setLabelText(NewFolderWizardMessages.NewSourceFolderWizardPage_exclude_label); fRootStatus= new StatusInfo(); fProjectStatus= new StatusInfo(); @@ -247,8 +248,8 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { protected void packRootChangeControlPressed(DialogField field) { if (field == fRootDialogField) { IPath initialPath= new Path(fRootDialogField.getText()); - String title= NewFolderWizardMessages.getString("NewSourceFolderWizardPage.ChooseExistingRootDialog.title"); //$NON-NLS-1$ - String message= NewFolderWizardMessages.getString("NewSourceFolderWizardPage.ChooseExistingRootDialog.description"); //$NON-NLS-1$ + String title= NewFolderWizardMessages.NewSourceFolderWizardPage_ChooseExistingRootDialog_title; + String message= NewFolderWizardMessages.NewSourceFolderWizardPage_ChooseExistingRootDialog_description; IFolder folder= chooseFolder(title, message, initialPath); if (folder != null) { IPath path= folder.getFullPath().removeFirstSegments(1); @@ -282,17 +283,17 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { String str= fProjectField.getText(); if (str.length() == 0) { - fProjectStatus.setError(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.error.EnterProjectName")); //$NON-NLS-1$ + fProjectStatus.setError(NewFolderWizardMessages.NewSourceFolderWizardPage_error_EnterProjectName); return; } IPath path= new Path(str); if (path.segmentCount() != 1) { - fProjectStatus.setError(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.error.InvalidProjectPath")); //$NON-NLS-1$ + fProjectStatus.setError(NewFolderWizardMessages.NewSourceFolderWizardPage_error_InvalidProjectPath); return; } IProject project= fWorkspaceRoot.getProject(path.toString()); if (!project.exists()) { - fProjectStatus.setError(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.error.ProjectNotExists")); //$NON-NLS-1$ + fProjectStatus.setError(NewFolderWizardMessages.NewSourceFolderWizardPage_error_ProjectNotExists); return; } try { @@ -306,7 +307,7 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { CUIPlugin.log(e); fCurrCProject= null; } - fProjectStatus.setError(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.error.NotACProject")); //$NON-NLS-1$ + fProjectStatus.setError(NewFolderWizardMessages.NewSourceFolderWizardPage_error_NotACProject); } private void updateRootStatus() { @@ -320,17 +321,17 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { IPath projPath= fCurrCProject.getProject().getFullPath(); String str= fRootDialogField.getText(); if (str.length() == 0) { - fRootStatus.setError(NewFolderWizardMessages.getFormattedString("NewSourceFolderWizardPage.error.EnterRootName", fCurrCProject.getProject().getFullPath().toString())); //$NON-NLS-1$ + fRootStatus.setError(NLS.bind(NewFolderWizardMessages.NewSourceFolderWizardPage_error_EnterRootName, fCurrCProject.getProject().getFullPath().toString())); } else { IPath path= projPath.append(str); IStatus validate= fWorkspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER); if (validate.matches(IStatus.ERROR)) { - fRootStatus.setError(NewFolderWizardMessages.getFormattedString("NewSourceFolderWizardPage.error.InvalidRootName", validate.getMessage())); //$NON-NLS-1$ + fRootStatus.setError(NLS.bind(NewFolderWizardMessages.NewSourceFolderWizardPage_error_InvalidRootName, validate.getMessage())); } else { IResource res= fWorkspaceRoot.findMember(path); if (res != null) { if (res.getType() != IResource.FOLDER) { - fRootStatus.setError(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.error.NotAFolder")); //$NON-NLS-1$ + fRootStatus.setError(NewFolderWizardMessages.NewSourceFolderWizardPage_error_NotAFolder); return; } } @@ -341,7 +342,7 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { IPathEntry curr= fEntries[i]; if (curr.getEntryKind() == IPathEntry.CDT_SOURCE) { if (path.equals(curr.getPath())) { - fRootStatus.setError(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.error.AlreadyExisting")); //$NON-NLS-1$ + fRootStatus.setError(NewFolderWizardMessages.NewSourceFolderWizardPage_error_AlreadyExisting); return; } if (projPath.equals(curr.getPath())) { @@ -377,11 +378,11 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { fRootStatus.setError(status.getMessage()); return; } else if (fIsProjectAsSourceFolder) { - fRootStatus.setInfo(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.warning.ReplaceSF")); //$NON-NLS-1$ + fRootStatus.setInfo(NewFolderWizardMessages.NewSourceFolderWizardPage_warning_ReplaceSF); return; } if (!modified.isEmpty()) { - fRootStatus.setInfo(NewFolderWizardMessages.getFormattedString("NewSourceFolderWizardPage.warning.AddedExclusions", String.valueOf(modified.size()))); //$NON-NLS-1$ + fRootStatus.setInfo(NLS.bind(NewFolderWizardMessages.NewSourceFolderWizardPage_warning_AddedExclusions, String.valueOf(modified.size()))); return; } } @@ -423,7 +424,7 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { if (monitor == null) { monitor= new NullProgressMonitor(); } - monitor.beginTask(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.operation"), 3); //$NON-NLS-1$ + monitor.beginTask(NewFolderWizardMessages.NewSourceFolderWizardPage_operation, 3); try { // IPath projPath= fCurrCProject.getProject().getFullPath(); String relPath= fRootDialogField.getText(); @@ -512,8 +513,8 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage { ILabelProvider labelProvider= new CElementLabelProvider(CElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider); - dialog.setTitle(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.ChooseProjectDialog.title")); //$NON-NLS-1$ - dialog.setMessage(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.ChooseProjectDialog.description")); //$NON-NLS-1$ + dialog.setTitle(NewFolderWizardMessages.NewSourceFolderWizardPage_ChooseProjectDialog_title); + dialog.setMessage(NewFolderWizardMessages.NewSourceFolderWizardPage_ChooseProjectDialog_description); dialog.setElements(projects); dialog.setInitialSelections(new Object[] { fCurrCProject }); if (dialog.open() == Window.OK) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java index 7868153c6ff..76f16b60a40 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java @@ -69,7 +69,7 @@ import org.eclipse.cdt.internal.ui.viewsupport.DecoratingCLabelProvider; */ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPage { - final private static String PAGE_TITLE= WorkingSetMessages.getString("CElementWorkingSetPage.title"); //$NON-NLS-1$ + final private static String PAGE_TITLE= WorkingSetMessages.CElementWorkingSetPage_title; final private static String PAGE_ID= "CElementWorkingSetPage"; //$NON-NLS-1$ private final static int SIZING_SELECTION_WIDGET_WIDTH = 50; @@ -86,7 +86,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag */ public CElementWorkingSetPage() { super(PAGE_ID, PAGE_TITLE, CPluginImages.DESC_WIZABAN_C_APP); - setDescription(WorkingSetMessages.getString("CElementWorkingSetPage.description")); //$NON-NLS-1$ + setDescription(WorkingSetMessages.CElementWorkingSetPage_description); fFirstCheck= true; } @@ -102,7 +102,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag setControl(composite); Label label = new Label(composite, SWT.WRAP); - label.setText(WorkingSetMessages.getString("CElementWorkingSetPage.name")); //$NON-NLS-1$ + label.setText(WorkingSetMessages.CElementWorkingSetPage_name); GridData gd = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER); label.setLayoutData(gd); @@ -118,7 +118,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag fWorkingSetName.setFocus(); label = new Label(composite, SWT.WRAP); - label.setText(WorkingSetMessages.getString("CElementWorkingSetPage.content")); //$NON-NLS-1$ + label.setText(WorkingSetMessages.CElementWorkingSetPage_content); gd = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER); label.setLayoutData(gd); @@ -407,7 +407,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag String newText = fWorkingSetName.getText(); if (newText.equals(newText.trim()) == false) { - errorMessage = WorkingSetMessages.getString("CElementWorkingSetPage.warning.nameMustNotBeEmpty"); //$NON-NLS-1$ + errorMessage = WorkingSetMessages.CElementWorkingSetPage_warning_nameMustNotBeEmpty; } if (newText.equals("")) { //$NON-NLS-1$ if (fFirstCheck) { @@ -415,7 +415,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag fFirstCheck= false; return; } - errorMessage = WorkingSetMessages.getString("CElementWorkingSetPage.warning.nameMustNotBeEmpty"); //$NON-NLS-1$ + errorMessage = WorkingSetMessages.CElementWorkingSetPage_warning_nameMustNotBeEmpty; } fFirstCheck= false; @@ -424,13 +424,13 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets(); for (IWorkingSet workingSet : workingSets) { if (newText.equals(workingSet.getName())) { - errorMessage = WorkingSetMessages.getString("CElementWorkingSetPage.warning.workingSetExists"); //$NON-NLS-1$ + errorMessage = WorkingSetMessages.CElementWorkingSetPage_warning_workingSetExists; } } } if (errorMessage == null && fTree.getCheckedElements().length == 0) { - String infoMessage = WorkingSetMessages.getString("CElementWorkingSetPage.warning.resourceMustBeChecked"); //$NON-NLS-1$ + String infoMessage = WorkingSetMessages.CElementWorkingSetPage_warning_resourceMustBeChecked; setMessage(infoMessage, INFORMATION); } setErrorMessage(errorMessage); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.java index 8ae84fc30e6..3a7e6db6193 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2008 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 @@ -10,64 +10,25 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.workingsets; -import java.text.MessageFormat; -import java.util.MissingResourceException; -import java.util.ResourceBundle; +import org.eclipse.osgi.util.NLS; -class WorkingSetMessages { +public final class WorkingSetMessages extends NLS { - private static final String RESOURCE_BUNDLE= WorkingSetMessages.class.getName(); + private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.workingsets.WorkingSetMessages";//$NON-NLS-1$ - private static ResourceBundle fgResourceBundle; - static { - try { - fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); - } catch (MissingResourceException x) { - fgResourceBundle = null; - } - } private WorkingSetMessages() { + // Do not instantiate } - public static String getString(String key) { - try { - return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } catch (NullPointerException e) { - return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ - } - } + public static String CElementWorkingSetPage_title; + public static String CElementWorkingSetPage_name; + public static String CElementWorkingSetPage_description; + public static String CElementWorkingSetPage_content; + public static String CElementWorkingSetPage_warning_nameMustNotBeEmpty; + public static String CElementWorkingSetPage_warning_workingSetExists; + public static String CElementWorkingSetPage_warning_resourceMustBeChecked; - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object arg) { - String format= null; - try { - format= fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } - if (arg == null) - arg= ""; //$NON-NLS-1$ - return MessageFormat.format(format, new Object[] { arg }); + static { + NLS.initializeMessages(BUNDLE_NAME, WorkingSetMessages.class); } - - /** - * Gets a string from the resource bundle and formats it with the argument - * - * @param key the string used to get the bundle value, must not be null - */ - public static String getFormattedString(String key, Object[] args) { - String format= null; - try { - format= fgResourceBundle.getString(key); - } catch (MissingResourceException e) { - return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ - } - return MessageFormat.format(format, args); - } -} +} \ No newline at end of file diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.properties index f36949749db..94e4f22dab0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.properties @@ -10,11 +10,11 @@ # Anton Leherbauer (Wind River Systems) ############################################################################### -CElementWorkingSetPage.title= C/C++ Working Set -CElementWorkingSetPage.name= &Working set name: -CElementWorkingSetPage.description= Enter a working set name and select the working set elements. +CElementWorkingSetPage_title= C/C++ Working Set +CElementWorkingSetPage_name= &Working set name: +CElementWorkingSetPage_description= Enter a working set name and select the working set elements. -CElementWorkingSetPage.content= Working set &content: -CElementWorkingSetPage.warning.nameMustNotBeEmpty= The name must not be empty. -CElementWorkingSetPage.warning.workingSetExists= A working set with that name already exists. -CElementWorkingSetPage.warning.resourceMustBeChecked= At least one resource must be checked. +CElementWorkingSetPage_content= Working set &content: +CElementWorkingSetPage_warning_nameMustNotBeEmpty= The name must not be empty. +CElementWorkingSetPage_warning_workingSetExists= A working set with that name already exists. +CElementWorkingSetPage_warning_resourceMustBeChecked= At least one resource must be checked. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java index 89bf65406b8..3c989d1159b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java @@ -71,7 +71,7 @@ public class CustomFiltersActionGroup extends ActionGroup { class ShowFilterDialogAction extends Action { ShowFilterDialogAction() { - setText(FilterMessages.getString("OpenCustomFiltersDialogAction.text")); //$NON-NLS-1$ + setText(FilterMessages.OpenCustomFiltersDialogAction_text); //setImageDescriptor(CPluginImages.DESC_CLCL_FILTER); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ShowInCViewAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ShowInCViewAction.java index d0463aa7c8b..afdc05671ee 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ShowInCViewAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ShowInCViewAction.java @@ -55,11 +55,11 @@ public class ShowInCViewAction extends SelectionProviderAction { } public ShowInCViewAction(IWorkbenchPage page, ISelectionProvider viewer) { - super(viewer, CEditorMessages.getString("ShowInCView.label")); //$NON-NLS-1$ - setToolTipText(CEditorMessages.getString("ShowInCView.tooltip")); //$NON-NLS-1$ - setDescription(CEditorMessages.getString("ShowInCView.description")); //$NON-NLS-1$ + super(viewer, CEditorMessages.ShowInCView_label); + setToolTipText(CEditorMessages.ShowInCView_tooltip); + setDescription(CEditorMessages.ShowInCView_description); this.page = page; - setDescription(CEditorMessages.getString("ShowInCView.tooltip")); //$NON-NLS-1$ + setDescription(CEditorMessages.ShowInCView_tooltip); //WorkbenchHelp.setHelp(this, ICHelpContextIds.SHOW_IN_CVIEW_ACTION); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java index 553e123fd00..f3f7bcaad42 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java @@ -263,21 +263,17 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.ERROR_PARSERS_PAGE); String[] buttonLabels = new String[]{ - /* 0 */ - CUIMessages.getString("AbstractErrorParserBlock.label.up"), //$NON-NLS-1$ - /* 1 */ - CUIMessages.getString("AbstractErrorParserBlock.label.down"), //$NON-NLS-1$ + CUIMessages.AbstractErrorParserBlock_label_up, + CUIMessages.AbstractErrorParserBlock_label_down, /* 2 */ null, - /* 3 */ - CUIMessages.getString("AbstractErrorParserBlock.label.selectAll"), //$NON-NLS-1$ - /* 4 */ - CUIMessages.getString("AbstractErrorParserBlock.label.unselectAll") //$NON-NLS-1$ + CUIMessages.AbstractErrorParserBlock_label_selectAll, + CUIMessages.AbstractErrorParserBlock_label_unselectAll }; fErrorParserList = new CheckedListDialogField(null, buttonLabels, getLabelProvider()); fErrorParserList.setDialogFieldListener(getFieldListenerAdapter()); - fErrorParserList.setLabelText(CUIMessages.getString("AbstractErrorParserBlock.label.errorParsers")); //$NON-NLS-1$ + fErrorParserList.setLabelText(CUIMessages.AbstractErrorParserBlock_label_errorParsers); fErrorParserList.setUpButtonIndex(0); fErrorParserList.setDownButtonIndex(1); fErrorParserList.setCheckAllButtonIndex(3); @@ -296,7 +292,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage { if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.beginTask(CUIMessages.getString("AbstractErrorParserBlock.task.setErrorParser"), 1); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.AbstractErrorParserBlock_task_setErrorParser, 1); List elements = fErrorParserList.getElements(); int count = elements.size(); List list = new ArrayList(count); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractGNUBinaryParserPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractGNUBinaryParserPage.java index 8492b14136c..0c311f86930 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractGNUBinaryParserPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractGNUBinaryParserPage.java @@ -68,7 +68,7 @@ public abstract class AbstractGNUBinaryParserPage extends AbstractCOptionPage { String addr2line = fAddr2LineCommandText.getText().trim(); String cppfilt = fCPPFiltCommandText.getText().trim(); - monitor.beginTask(CUIMessages.getString("BinaryParserPage.task.savingAttributes"), 1); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.BinaryParserPage_task_savingAttributes, 1); IProject proj = getContainer().getProject(); if (proj != null) { ICExtensionReference[] cext = CCorePlugin.getDefault().getBinaryParserExtensions(proj); @@ -151,12 +151,12 @@ public abstract class AbstractGNUBinaryParserPage extends AbstractCOptionPage { @Override public void createControl(Composite parent) { Group comp = new Group(parent, SWT.SHADOW_ETCHED_IN); - comp.setText(CUIMessages.getString("BinaryParserBlock.binaryParserOptions")); //$NON-NLS-1$ + comp.setText(CUIMessages.BinaryParserBlock_binaryParserOptions); comp.setLayout(new GridLayout(2, true)); comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); ((GridLayout) comp.getLayout()).makeColumnsEqualWidth = false; - Label label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.addr2lineCommand")); //$NON-NLS-1$ + Label label = ControlFactory.createLabel(comp, CUIMessages.BinaryParserPage_label_addr2lineCommand); GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -169,7 +169,7 @@ public abstract class AbstractGNUBinaryParserPage extends AbstractCOptionPage { } }); - Button button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ + Button button = ControlFactory.createPushButton(comp, CUIMessages.BinaryParserPage_label_browse); button.addSelectionListener(new SelectionAdapter() { @Override @@ -180,7 +180,7 @@ public abstract class AbstractGNUBinaryParserPage extends AbstractCOptionPage { private void handleAddr2LineButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText(CUIMessages.getString("BinaryParserPage.label.addr2lineCommand")); //$NON-NLS-1$ + dialog.setText(CUIMessages.BinaryParserPage_label_addr2lineCommand); String command = fAddr2LineCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { @@ -194,7 +194,7 @@ public abstract class AbstractGNUBinaryParserPage extends AbstractCOptionPage { } }); - label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ + label = ControlFactory.createLabel(comp, CUIMessages.BinaryParserPage_label_cppfiltCommand); gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -208,7 +208,7 @@ public abstract class AbstractGNUBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse1")); //$NON-NLS-1$ + button = ControlFactory.createPushButton(comp, CUIMessages.BinaryParserPage_label_browse1); button.addSelectionListener(new SelectionAdapter() { @Override @@ -219,7 +219,7 @@ public abstract class AbstractGNUBinaryParserPage extends AbstractCOptionPage { private void handleCPPFiltButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText(CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ + dialog.setText(CUIMessages.BinaryParserPage_label_cppfiltCommand); String command = fCPPFiltCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java index 7636e723040..8d9c0574a08 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java @@ -108,8 +108,8 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { super(CUIPlugin.getResourceString(LABEL)); setDescription(CUIPlugin.getResourceString(DESC)); String[] buttonLabels = new String[]{ - /* 0 */CUIMessages.getString("BinaryParserBlock.button.up"), //$NON-NLS-1$ - /* 1 */CUIMessages.getString("BinaryParserBlock.button.down")}; //$NON-NLS-1$ + CUIMessages.BinaryParserBlock_button_up, + CUIMessages.BinaryParserBlock_button_down}; IListAdapter listAdapter = new IListAdapter() { @@ -142,7 +142,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { } } }); - binaryList.setLabelText(CUIMessages.getString("BinaryParserBlock.binaryParser")); //$NON-NLS-1$ + binaryList.setLabelText(CUIMessages.BinaryParserBlock_binaryParser); binaryList.setUpButtonIndex(0); binaryList.setDownButtonIndex(1); initializeParserList(); @@ -219,7 +219,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.beginTask(CUIMessages.getString("BinaryParserBlock.settingBinaryParser"), 2); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.BinaryParserBlock_settingBinaryParser, 2); List parsers = binaryList.getElements(); final List selected = new ArrayList(); // must do this to get proper order. for (int i = 0; i < parsers.size(); i++) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java index f612f9fe20a..4648e82b39b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2004, 2007 Intel Corporation and others. + * Copyright (c) 2004, 2008 Intel 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 @@ -86,12 +86,12 @@ public class CHelpConfigurationPropertyPage extends PropertyPage implements public CHelpSettingsDisplay() { String[] buttonLabels= new String[] { - /* 0 */ CUIMessages.getString("CHelpConfigurationPropertyPage.buttonLabels.CheckAll"), //NewWizardMessages.getString("BuildPathsBlock.classpath.checkall.button"), //$NON-NLS-1$ - /* 1 */ CUIMessages.getString("CHelpConfigurationPropertyPage.buttonLabels.UncheckAll") //NewWizardMessages.getString("BuildPathsBlock.classpath.uncheckall.button") //$NON-NLS-1$ + /* 0 */ CUIMessages.CHelpConfigurationPropertyPage_buttonLabels_CheckAll, + /* 1 */ CUIMessages.CHelpConfigurationPropertyPage_buttonLabels_UncheckAll }; fCHelpBookList= new CheckedListDialogField(null, buttonLabels, new CHelpBookListLabelProvider()); - fCHelpBookList.setLabelText(CUIMessages.getString("CHelpConfigurationPropertyPage.HelpBooks")); //$NON-NLS-1$ + fCHelpBookList.setLabelText(CUIMessages.CHelpConfigurationPropertyPage_HelpBooks); fCHelpBookList.setCheckAllButtonIndex(0); fCHelpBookList.setUncheckAllButtonIndex(1); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CygwinPEBinaryParserPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CygwinPEBinaryParserPage.java index 6ad797dacc3..4a20be8fbc1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CygwinPEBinaryParserPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CygwinPEBinaryParserPage.java @@ -72,7 +72,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { String cygpath = fCygPathCommandText.getText().trim(); String nm = fNMCommandText.getText().trim(); - monitor.beginTask(CUIMessages.getString("BinaryParserPage.task.savingAttributes"), 1); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.BinaryParserPage_task_savingAttributes, 1); IProject proj = getContainer().getProject(); if (proj != null) { String parserID = ""; //$NON-NLS-1$ @@ -161,13 +161,13 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { @Override public void createControl(Composite composite) { Group comp = new Group(composite, SWT.SHADOW_ETCHED_IN); - comp.setText(CUIMessages.getString("BinaryParserBlock.binaryParserOptions")); //$NON-NLS-1$ + comp.setText(CUIMessages.BinaryParserBlock_binaryParserOptions); comp.setLayout(new GridLayout(2, true)); comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); ((GridLayout) comp.getLayout()).makeColumnsEqualWidth = false; - Label label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.addr2lineCommand")); //$NON-NLS-1$ + Label label = ControlFactory.createLabel(comp, CUIMessages.BinaryParserPage_label_addr2lineCommand); GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -180,7 +180,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { } }); - Button button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ + Button button = ControlFactory.createPushButton(comp, CUIMessages.BinaryParserPage_label_browse); button.addSelectionListener(new SelectionAdapter() { @Override @@ -191,7 +191,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { private void handleAddr2LineButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText(CUIMessages.getString("BinaryParserPage.label.addr2lineCommand")); //$NON-NLS-1$ + dialog.setText(CUIMessages.BinaryParserPage_label_addr2lineCommand); String command = fAddr2LineCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { @@ -205,7 +205,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { } }); - label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ + label = ControlFactory.createLabel(comp, CUIMessages.BinaryParserPage_label_cppfiltCommand); gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -219,7 +219,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse1")); //$NON-NLS-1$ + button = ControlFactory.createPushButton(comp, CUIMessages.BinaryParserPage_label_browse1); button.addSelectionListener(new SelectionAdapter() { @Override @@ -230,7 +230,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { private void handleCPPFiltButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText(CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ + dialog.setText(CUIMessages.BinaryParserPage_label_cppfiltCommand); String command = fCPPFiltCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { @@ -244,7 +244,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { } }); - label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.cygpathCommand")); //$NON-NLS-1$ + label = ControlFactory.createLabel(comp, CUIMessages.BinaryParserPage_label_cygpathCommand); gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -258,7 +258,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse2")); //$NON-NLS-1$ + button = ControlFactory.createPushButton(comp, CUIMessages.BinaryParserPage_label_browse2); button.addSelectionListener(new SelectionAdapter() { @Override @@ -269,7 +269,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { private void handleCygPathButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText(CUIMessages.getString("BinaryParserPage.label.cygpathCommand")); //$NON-NLS-1$ + dialog.setText(CUIMessages.BinaryParserPage_label_cygpathCommand); String command = fCygPathCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { @@ -284,7 +284,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { }); - label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.nmCommand")); //$NON-NLS-1$ + label = ControlFactory.createLabel(comp, CUIMessages.BinaryParserPage_label_nmCommand); gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -298,7 +298,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse2")); //$NON-NLS-1$ + button = ControlFactory.createPushButton(comp, CUIMessages.BinaryParserPage_label_browse2); button.addSelectionListener(new SelectionAdapter() { @Override @@ -309,7 +309,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { private void handleCygPathButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText(CUIMessages.getString("BinaryParserPage.label.nmCommand")); //$NON-NLS-1$ + dialog.setText(CUIMessages.BinaryParserPage_label_nmCommand); String command = fNMCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/MachOBinaryParserPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/MachOBinaryParserPage.java index 06a4fe5530b..af9c2a1af5a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/MachOBinaryParserPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/MachOBinaryParserPage.java @@ -63,7 +63,7 @@ public class MachOBinaryParserPage extends AbstractCOptionPage { String cppfilt = fCPPFiltCommandText.getText().trim(); - monitor.beginTask(CUIMessages.getString("BinaryParserPage.task.savingAttributes"), 1); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.BinaryParserPage_task_savingAttributes, 1); IProject proj = getContainer().getProject(); if (proj != null) { String parserID = ""; //$NON-NLS-1$ @@ -134,12 +134,12 @@ public class MachOBinaryParserPage extends AbstractCOptionPage { @Override public void createControl(Composite parent) { Group comp = new Group(parent, SWT.SHADOW_ETCHED_IN); - comp.setText(CUIMessages.getString("BinaryParserBlock.binaryParserOptions")); //$NON-NLS-1$ + comp.setText(CUIMessages.BinaryParserBlock_binaryParserOptions); comp.setLayout(new GridLayout(2, true)); comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); ((GridLayout) comp.getLayout()).makeColumnsEqualWidth = false; - Label label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ + Label label = ControlFactory.createLabel(comp, CUIMessages.BinaryParserPage_label_cppfiltCommand); GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -153,7 +153,7 @@ public class MachOBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - Button button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ + Button button = ControlFactory.createPushButton(comp, CUIMessages.BinaryParserPage_label_browse); button.addSelectionListener(new SelectionAdapter() { @Override @@ -164,7 +164,7 @@ public class MachOBinaryParserPage extends AbstractCOptionPage { private void handleCPPFiltButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText(CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ + dialog.setText(CUIMessages.BinaryParserPage_label_cppfiltCommand); String command = fCPPFiltCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/ReferenceBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/ReferenceBlock.java index 4648b06072c..ff988997b69 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/ReferenceBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/ReferenceBlock.java @@ -166,7 +166,7 @@ public class ReferenceBlock extends AbstractCOptionPage { if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.beginTask(CUIMessages.getString("ReferenceBlock.task.ReferenceProjects"), 1); //$NON-NLS-1$ + monitor.beginTask(CUIMessages.ReferenceBlock_task_ReferenceProjects, 1); try { IProjectDescription description = project.getDescription(); description.setReferencedProjects(refProjects); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.java index 21ebb7b19eb..585d6bb5518 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.java @@ -22,6 +22,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -161,7 +162,7 @@ public abstract class TabFolderOptionBlock { } catch (CoreException e) { CUIPlugin.errorDialog( composite.getShell(), - CUIMessages.getString("TabFolderOptionBlock.error"), CUIMessages.getString("TabFolderOptionBlock.error.settingOptions"), e, true); //$NON-NLS-1$ //$NON-NLS-2$ + CUIMessages.TabFolderOptionBlock_error, CUIMessages.TabFolderOptionBlock_error_settingOptions, e, true); return false; } } @@ -191,8 +192,8 @@ public abstract class TabFolderOptionBlock { if (!ok) { String errorMessage = tab.getErrorMessage(); if (!tab.getControl().isVisible()) { - setErrorMessage(CUIMessages.getFormattedString( - "TabFolderOptionBlock.error.message", tab.getTitle())); //$NON-NLS-1$ + setErrorMessage(NLS.bind( + CUIMessages.TabFolderOptionBlock_error_message, tab.getTitle())); } else { setErrorMessage(errorMessage); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java index 0ed22861388..8909d248825 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java @@ -26,6 +26,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridLayout; @@ -86,16 +87,16 @@ public class ExPatternDialog extends StatusDialog { fCurrProject = proj; pattern = _data; path = _path; - setTitle(CPathEntryMessages.getString("ExclusionPatternDialog.title")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.ExclusionPatternDialog_title); - String label= CPathEntryMessages.getFormattedString("ExclusionPatternDialog.pattern.label", path.makeRelative().toString()); //$NON-NLS-1$ + String label= NLS.bind(CPathEntryMessages.ExclusionPatternDialog_pattern_label, path.makeRelative().toString()); String[] buttonLabels= new String[] { - /* IDX_ADD */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.add"), //$NON-NLS-1$ - /* IDX_ADD_MULTIPLE */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.add.multiple"), //$NON-NLS-1$ - /* IDX_EDIT */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.edit"), //$NON-NLS-1$ + CPathEntryMessages.ExclusionPatternDialog_pattern_add, + CPathEntryMessages.ExclusionPatternDialog_pattern_add_multiple, + CPathEntryMessages.ExclusionPatternDialog_pattern_edit, null, - /* IDX_REMOVE */ CPathEntryMessages.getString("ExclusionPatternDialog.pattern.remove") //$NON-NLS-1$ + CPathEntryMessages.ExclusionPatternDialog_pattern_remove }; ExclusionPatternAdapter adapter= new ExclusionPatternAdapter(); @@ -242,9 +243,9 @@ public class ExPatternDialog extends StatusDialog { IResource initialElement= null; ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp); - dialog.setTitle(CPathEntryMessages.getString("ExclusionPatternDialog.ChooseExclusionPattern.title")); //$NON-NLS-1$ + dialog.setTitle(CPathEntryMessages.ExclusionPatternDialog_ChooseExclusionPattern_title); dialog.setValidator(validator); - dialog.setMessage(CPathEntryMessages.getString("ExclusionPatternDialog.ChooseExclusionPattern.description")); //$NON-NLS-1$ + dialog.setMessage(CPathEntryMessages.ExclusionPatternDialog_ChooseExclusionPattern_description); dialog.addFilter(filter); dialog.setInput(fCurrSourceFolder); dialog.setInitialSelection(initialElement); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternEntryDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternEntryDialog.java index d6579cef3a5..7ceafe31d9d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternEntryDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternEntryDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 QNX Software Systems and others. + * Copyright (c) 2004, 2008 QNX Software Systems 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 @@ -24,6 +24,7 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; @@ -61,9 +62,9 @@ public class ExPatternEntryDialog extends StatusDialog { super(parent); fExistingPatterns = existingPatterns; if (patternToEdit == null) { - setTitle(CPathEntryMessages.getString("ExclusionPatternEntryDialog.add.title")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.ExclusionPatternEntryDialog_add_title); } else { - setTitle(CPathEntryMessages.getString("ExclusionPatternEntryDialog.edit.title")); //$NON-NLS-1$ + setTitle(CPathEntryMessages.ExclusionPatternEntryDialog_edit_title); fExistingPatterns.remove(patternToEdit); } @@ -75,13 +76,13 @@ public class ExPatternEntryDialog extends StatusDialog { fExclusionPatternStatus = new StatusInfo(); - String label = CPathEntryMessages.getFormattedString("ExclusionPatternEntryDialog.pattern.label", //$NON-NLS-1$ + String label = NLS.bind(CPathEntryMessages.ExclusionPatternEntryDialog_pattern_label, path.makeRelative().toString()); ExPatternAdapter adapter = new ExPatternAdapter(); fExclusionPatternDialog = new StringButtonDialogField(adapter); fExclusionPatternDialog.setLabelText(label); - fExclusionPatternDialog.setButtonLabel(CPathEntryMessages.getString("ExclusionPatternEntryDialog.pattern.button")); //$NON-NLS-1$ + fExclusionPatternDialog.setButtonLabel(CPathEntryMessages.ExclusionPatternEntryDialog_pattern_button); fExclusionPatternDialog.setDialogFieldListener(adapter); fExclusionPatternDialog.enableButton(fCurrSourceFolder != null); @@ -106,7 +107,7 @@ public class ExPatternEntryDialog extends StatusDialog { inner.setLayout(layout); Label description = new Label(inner, SWT.WRAP); - description.setText(CPathEntryMessages.getString("ExclusionPatternEntryDialog.description")); //$NON-NLS-1$ + description.setText(CPathEntryMessages.ExclusionPatternEntryDialog_description); GridData gd = new GridData(); gd.horizontalSpan = 2; gd.widthHint = convertWidthInCharsToPixels(80); @@ -155,16 +156,16 @@ public class ExPatternEntryDialog extends StatusDialog { protected void checkIfPatternValid() { String pattern = fExclusionPatternDialog.getText().trim(); if (pattern.length() == 0) { - fExclusionPatternStatus.setError(CPathEntryMessages.getString("ExclusionPatternEntryDialog.error.empty")); //$NON-NLS-1$ + fExclusionPatternStatus.setError(CPathEntryMessages.ExclusionPatternEntryDialog_error_empty); return; } IPath path = new Path(pattern); if (path.isAbsolute() || path.getDevice() != null) { - fExclusionPatternStatus.setError(CPathEntryMessages.getString("ExclusionPatternEntryDialog.error.notrelative")); //$NON-NLS-1$ + fExclusionPatternStatus.setError(CPathEntryMessages.ExclusionPatternEntryDialog_error_notrelative); return; } if (fExistingPatterns.contains(pattern)) { - fExclusionPatternStatus.setError(CPathEntryMessages.getString("ExclusionPatternEntryDialog.error.exists")); //$NON-NLS-1$ + fExclusionPatternStatus.setError(CPathEntryMessages.ExclusionPatternEntryDialog_error_exists); return; } @@ -213,9 +214,9 @@ public class ExPatternEntryDialog extends StatusDialog { } ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), lp, cp); - dialog.setTitle(CPathEntryMessages.getString("ExclusionPatternEntryDialog.ChooseExclusionPattern.title")); //$NON-NLS-1$ + dialog.setTitle(CPathEntryMessages.ExclusionPatternEntryDialog_ChooseExclusionPattern_title); dialog.setValidator(validator); - dialog.setMessage(CPathEntryMessages.getString("ExclusionPatternEntryDialog.ChooseExclusionPattern.description")); //$NON-NLS-1$ + dialog.setMessage(CPathEntryMessages.ExclusionPatternEntryDialog_ChooseExclusionPattern_description); dialog.addFilter(filter); dialog.setInput(fCurrSourceFolder); dialog.setInitialSelection(initialElement); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java index c2c60916f4c..17566048984 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java @@ -35,6 +35,7 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; @@ -164,46 +165,46 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { public NewClassCreationWizardPage() { super(PAGE_NAME); - setDescription(NewClassWizardMessages.getString("NewClassCreationWizardPage.description")); //$NON-NLS-1$ + setDescription(NewClassWizardMessages.NewClassCreationWizardPage_description); SourceFolderFieldAdapter sourceFolderAdapter = new SourceFolderFieldAdapter(); fSourceFolderDialogField = new StringButtonDialogField(sourceFolderAdapter); fSourceFolderDialogField.setDialogFieldListener(sourceFolderAdapter); - fSourceFolderDialogField.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.sourceFolder.label")); //$NON-NLS-1$ - fSourceFolderDialogField.setButtonLabel(NewClassWizardMessages.getString("NewClassCreationWizardPage.sourceFolder.button")); //$NON-NLS-1$ + fSourceFolderDialogField.setLabelText(NewClassWizardMessages.NewClassCreationWizardPage_sourceFolder_label); + fSourceFolderDialogField.setButtonLabel(NewClassWizardMessages.NewClassCreationWizardPage_sourceFolder_button); NamespaceFieldAdapter namespaceAdapter = new NamespaceFieldAdapter(); fNamespaceSelection = new SelectionButtonDialogField(SWT.CHECK); fNamespaceSelection.setDialogFieldListener(namespaceAdapter); - fNamespaceSelection.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.namespace.label")); //$NON-NLS-1$ + fNamespaceSelection.setLabelText(NewClassWizardMessages.NewClassCreationWizardPage_namespace_label); fNamespaceDialogField = new StringButtonDialogField(namespaceAdapter); fNamespaceDialogField.setDialogFieldListener(namespaceAdapter); - fNamespaceDialogField.setButtonLabel(NewClassWizardMessages.getString("NewClassCreationWizardPage.namespace.button")); //$NON-NLS-1$ + fNamespaceDialogField.setButtonLabel(NewClassWizardMessages.NewClassCreationWizardPage_namespace_button); ClassNameFieldAdapter classAdapter = new ClassNameFieldAdapter(); fClassNameDialogField = new StringDialogField(); fClassNameDialogField.setDialogFieldListener(classAdapter); - fClassNameDialogField.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.className.label")); //$NON-NLS-1$ + fClassNameDialogField.setLabelText(NewClassWizardMessages.NewClassCreationWizardPage_className_label); BaseClassesFieldAdapter baseClassesAdapter = new BaseClassesFieldAdapter(); - fBaseClassesDialogField = new BaseClassesListDialogField(NewClassWizardMessages.getString("NewClassCreationWizardPage.baseClasses.label"), baseClassesAdapter); //$NON-NLS-1$ + fBaseClassesDialogField = new BaseClassesListDialogField(NewClassWizardMessages.NewClassCreationWizardPage_baseClasses_label, baseClassesAdapter); MethodStubsFieldAdapter methodStubsAdapter = new MethodStubsFieldAdapter(); - fMethodStubsDialogField = new MethodStubsListDialogField(NewClassWizardMessages.getString("NewClassCreationWizardPage.methodStubs.label"), methodStubsAdapter); //$NON-NLS-1$ + fMethodStubsDialogField = new MethodStubsListDialogField(NewClassWizardMessages.NewClassCreationWizardPage_methodStubs_label, methodStubsAdapter); FileGroupFieldAdapter fileGroupAdapter = new FileGroupFieldAdapter(); fUseDefaultSelection = new SelectionButtonDialogField(SWT.CHECK); fUseDefaultSelection.setDialogFieldListener(fileGroupAdapter); - fUseDefaultSelection.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.useDefaultLocation.label")); //$NON-NLS-1$ + fUseDefaultSelection.setLabelText(NewClassWizardMessages.NewClassCreationWizardPage_useDefaultLocation_label); fHeaderFileDialogField = new StringButtonDialogField(fileGroupAdapter); fHeaderFileDialogField.setDialogFieldListener(fileGroupAdapter); - fHeaderFileDialogField.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.headerFile.label")); //$NON-NLS-1$ - fHeaderFileDialogField.setButtonLabel(NewClassWizardMessages.getString("NewClassCreationWizardPage.headerFile.button")); //$NON-NLS-1$ + fHeaderFileDialogField.setLabelText(NewClassWizardMessages.NewClassCreationWizardPage_headerFile_label); + fHeaderFileDialogField.setButtonLabel(NewClassWizardMessages.NewClassCreationWizardPage_headerFile_button); fSourceFileDialogField = new StringButtonDialogField(fileGroupAdapter); fSourceFileDialogField.setDialogFieldListener(fileGroupAdapter); - fSourceFileDialogField.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.sourceFile.label")); //$NON-NLS-1$ - fSourceFileDialogField.setButtonLabel(NewClassWizardMessages.getString("NewClassCreationWizardPage.sourceFile.button")); //$NON-NLS-1$ + fSourceFileDialogField.setLabelText(NewClassWizardMessages.NewClassCreationWizardPage_sourceFile_label); + fSourceFileDialogField.setButtonLabel(NewClassWizardMessages.NewClassCreationWizardPage_sourceFile_button); fSourceFolderStatus = STATUS_OK; fNamespaceStatus = STATUS_OK; @@ -1049,8 +1050,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { ITypeInfo[] elements = AllTypesCache.getNamespaces(scope, false); if (elements == null || elements.length == 0) { - String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noNamespaces.title"); //$NON-NLS-1$ - String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noNamespaces.message"); //$NON-NLS-1$ + String title = NewClassWizardMessages.NewClassCreationWizardPage_getTypes_noNamespaces_title; + String message = NewClassWizardMessages.NewClassCreationWizardPage_getTypes_noNamespaces_message; MessageDialog.openInformation(getShell(), title, message); return null; } @@ -1100,8 +1101,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { private void chooseBaseClasses() { ITypeInfo[] elements = NewClassWizardUtil.getReachableClasses(getCurrentProject()); if (elements == null || elements.length == 0) { - String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noClasses.title"); //$NON-NLS-1$ - String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noClasses.message"); //$NON-NLS-1$ + String title = NewClassWizardMessages.NewClassCreationWizardPage_getTypes_noClasses_title; + String message = NewClassWizardMessages.NewClassCreationWizardPage_getTypes_noClasses_message; MessageDialog.openInformation(getShell(), title, message); return; } @@ -1211,7 +1212,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { private IPath chooseHeaderFile() { SourceFileSelectionDialog dialog = new SourceFileSelectionDialog(getShell()); - dialog.setTitle(NewClassWizardMessages.getString("NewClassCreationWizardPage.ChooseHeaderFileDialog.title")); //$NON-NLS-1$ + dialog.setTitle(NewClassWizardMessages.NewClassCreationWizardPage_ChooseHeaderFileDialog_title); ICElement input = CoreModel.create(NewClassWizardUtil.getWorkspaceRoot()); ICProject project = getCurrentProject(); if (project != null) @@ -1238,7 +1239,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { private IPath chooseSourceFile() { SourceFileSelectionDialog dialog = new SourceFileSelectionDialog(getShell()); - dialog.setTitle(NewClassWizardMessages.getString("NewClassCreationWizardPage.ChooseSourceFileDialog.title")); //$NON-NLS-1$ + dialog.setTitle(NewClassWizardMessages.NewClassCreationWizardPage_ChooseSourceFileDialog_title); ICElement input = CoreModel.create(NewClassWizardUtil.getWorkspaceRoot()); ICProject project = getCurrentProject(); if (project != null) @@ -1434,7 +1435,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IPath folderPath = getSourceFolderFullPath(); if (folderPath == null) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnterSourceFolderName")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_EnterSourceFolderName); return status; } @@ -1444,28 +1445,28 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { if (resType == IResource.PROJECT || resType == IResource.FOLDER) { IProject proj = res.getProject(); if (!proj.isOpen()) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.NotAFolder", folderPath)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_NotAFolder, folderPath)); return status; } if (!CoreModel.hasCCNature(proj) && !CoreModel.hasCNature(proj)) { if (resType == IResource.PROJECT) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.NotACProject")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_warning_NotACProject); return status; } - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.NotInACProject")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_warning_NotInACProject); } if (NewClassWizardUtil.getSourceFolder(res) == null) { if (isUseDefaultSelected()) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.NotASourceFolder", folderPath)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_NotASourceFolder, folderPath)); //$NON-NLS-1$ return status; } } } else { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.NotAFolder", folderPath)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_NotAFolder, folderPath)); return status; } } else { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.FolderDoesNotExist", folderPath)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_FolderDoesNotExist, folderPath)); return status; } @@ -1487,16 +1488,16 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { // must not be empty String namespace = getNamespaceText(); if (namespace == null || namespace.length() == 0) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnterNamespace")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_EnterNamespace); return status; } IStatus val = CConventions.validateNamespaceName(namespace); if (val.getSeverity() == IStatus.ERROR) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.InvalidNamespace", val.getMessage())); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_InvalidNamespace, val.getMessage())); return status; } else if (val.getSeverity() == IStatus.WARNING) { - status.setWarning(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.warning.NamespaceDiscouraged", val.getMessage())); //$NON-NLS-1$ + status.setWarning(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_warning_NamespaceDiscouraged, val.getMessage())); } IQualifiedTypeName typeName = new QualifiedTypeName(namespace); @@ -1508,7 +1509,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { if (typeName.isQualified()) { searchResult = NewClassWizardUtil.searchForCppType(typeName.getEnclosingTypeName(),project, ICPPNamespace.class); if (searchResult != NewClassWizardUtil.SEARCH_MATCH_FOUND_EXACT) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnclosingNamespaceNotExists")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_EnclosingNamespaceNotExists); return status; } } @@ -1518,23 +1519,23 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { status.setOK(); return status; case NewClassWizardUtil.SEARCH_MATCH_FOUND_EXACT_ANOTHER_TYPE: - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.TypeMatchingNamespaceExists")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_error_TypeMatchingNamespaceExists); return status; case NewClassWizardUtil.SEARCH_MATCH_FOUND_ANOTHER_NAMESPACE: - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.NamespaceExistsDifferentCase")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_error_NamespaceExistsDifferentCase); return status; case NewClassWizardUtil.SEARCH_MATCH_FOUND_ANOTHER_TYPE: - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.TypeMatchingNamespaceExistsDifferentCase")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_error_TypeMatchingNamespaceExistsDifferentCase); return status; case NewClassWizardUtil.SEARCH_MATCH_NOTFOUND: - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.NamespaceNotExists")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_warning_NamespaceNotExists); break; } } val = CConventions.validateNamespaceName(typeName.lastSegment()); if (val.getSeverity() == IStatus.ERROR) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.InvalidNamespace", val.getMessage())); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_InvalidNamespace, val.getMessage())); return status; } return status; @@ -1552,22 +1553,22 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { String className = getClassName(); // must not be empty if (className == null || className.length() == 0) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnterClassName")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_EnterClassName); return status; } IQualifiedTypeName typeName = new QualifiedTypeName(className); if (typeName.isQualified()) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.QualifiedClassName")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_QualifiedClassName); return status; } IStatus val = CConventions.validateClassName(className); if (val.getSeverity() == IStatus.ERROR) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.InvalidClassName", val.getMessage())); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_InvalidClassName, val.getMessage())); return status; } else if (val.getSeverity() == IStatus.WARNING) { - status.setWarning(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.warning.ClassNameDiscouraged", val.getMessage())); //$NON-NLS-1$ + status.setWarning(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_warning_ClassNameDiscouraged, val.getMessage())); // continue checking } @@ -1584,16 +1585,16 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { int searchResult = NewClassWizardUtil.searchForCppType(fullyQualifiedName, project, ICPPClassType.class); switch(searchResult) { case NewClassWizardUtil.SEARCH_MATCH_FOUND_EXACT: - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.ClassNameExists")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_ClassNameExists); return status; case NewClassWizardUtil.SEARCH_MATCH_FOUND_EXACT_ANOTHER_TYPE: - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.TypeMatchingClassExists")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_TypeMatchingClassExists); return status; case NewClassWizardUtil.SEARCH_MATCH_FOUND_ANOTHER_NAMESPACE: - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.ClassNameExistsDifferentCase")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_error_ClassNameExistsDifferentCase); return status; case NewClassWizardUtil.SEARCH_MATCH_FOUND_ANOTHER_TYPE: - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.TypeMatchingClassExistsDifferentCase")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_error_TypeMatchingClassExistsDifferentCase); return status; case NewClassWizardUtil.SEARCH_MATCH_NOTFOUND: break; @@ -1651,7 +1652,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { ITypeInfo baseType = baseClass.getType(); StatusInfo baseClassStatus = new StatusInfo(); if (!NewClassWizardUtil.isTypeReachable(baseType, project, includePaths)) { - baseClassStatus.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.BaseClassNotExistsInProject", baseType.getQualifiedTypeName().toString())); //$NON-NLS-1$ + baseClassStatus.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_BaseClassNotExistsInProject, baseType.getQualifiedTypeName().toString())); } status.add(baseClassStatus); } @@ -1694,19 +1695,19 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { return status; } if (path == null) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnterHeaderFileName")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_EnterHeaderFileName); return status; } IPath sourceFolderPath = getSourceFolderFullPath(); if (sourceFolderPath == null || !sourceFolderPath.isPrefixOf(path)) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.HeaderFileNotInSourceFolder")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_HeaderFileNotInSourceFolder); return status; } // Make sure the file location is under a source root if (NewClassWizardUtil.getSourceFolder(path) == null) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.HeaderFileNotInSourceFolder")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_HeaderFileNotInSourceFolder); return status; } @@ -1720,7 +1721,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IFileStore store = EFS.getStore(location); fileExists = store.fetchInfo().exists(); } catch (CoreException e) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.LocationUnknown")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_LocationUnknown); return status; } } else { @@ -1729,17 +1730,17 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IProject proj = file.getProject(); if (!proj.isOpen()) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.NotAFile", path)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_NotAFile, path)); return status; } if (!CoreModel.hasCCNature(proj) && !CoreModel.hasCNature(proj)) { - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.NotInACProject")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_warning_NotInACProject); } else if (fileExists) { - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.HeaderFileExists")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_warning_HeaderFileExists); } } else { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.NotAFile")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_NotAFile); return status; } @@ -1747,17 +1748,17 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IPath folderPath = path.removeLastSegments(1).makeRelative(); IResource folder = NewClassWizardUtil.getWorkspaceRoot().findMember(folderPath); if (folder == null || !folder.exists() || (folder.getType() != IResource.PROJECT && folder.getType() != IResource.FOLDER)) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.FolderDoesNotExist", folderPath)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_FolderDoesNotExist, folderPath)); return status; } if (!fileExists) { IStatus val = CConventions.validateHeaderFileName(getCurrentProject().getProject(), path.lastSegment()); if (val.getSeverity() == IStatus.ERROR) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.InvalidHeaderFileName", val.getMessage())); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_InvalidHeaderFileName, val.getMessage())); return status; } else if (val.getSeverity() == IStatus.WARNING) { - status.setWarning(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.warning.HeaderFileNameDiscouraged", val.getMessage())); //$NON-NLS-1$ + status.setWarning(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_warning_HeaderFileNameDiscouraged, val.getMessage())); } } return status; @@ -1774,19 +1775,19 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IPath path = getSourceFileFullPath(); if (path == null) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnterSourceFileName")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_EnterSourceFileName); return status; } IPath sourceFolderPath = getSourceFolderFullPath(); if (sourceFolderPath == null || !sourceFolderPath.isPrefixOf(path)) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.SourceFileNotInSourceFolder")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_SourceFileNotInSourceFolder); return status; } // Make sure the file location is under a source root if (NewClassWizardUtil.getSourceFolder(path) == null) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.SourceFileNotInSourceFolder")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_SourceFileNotInSourceFolder); return status; } @@ -1800,7 +1801,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IFileStore store = EFS.getStore(location); fileExists = store.fetchInfo().exists(); } catch (CoreException e) { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.LocationUnknown")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_LocationUnknown); return status; } } else { @@ -1809,17 +1810,17 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IProject proj = file.getProject(); if (!proj.isOpen()) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.NotAFile", path)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_NotAFile, path)); return status; } if (!CoreModel.hasCCNature(proj) && !CoreModel.hasCNature(proj)) { - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.NotInACProject")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_warning_NotInACProject); } else if (fileExists) { - status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.SourceFileExists")); //$NON-NLS-1$ + status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_warning_SourceFileExists); } } else { - status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.NotAFile")); //$NON-NLS-1$ + status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_NotAFile); return status; } @@ -1827,17 +1828,17 @@ public class NewClassCreationWizardPage extends NewElementWizardPage { IPath folderPath = path.removeLastSegments(1).makeRelative(); IResource folder = NewClassWizardUtil.getWorkspaceRoot().findMember(folderPath); if (folder == null || !folder.exists() || (folder.getType() != IResource.PROJECT && folder.getType() != IResource.FOLDER)) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.FolderDoesNotExist", folderPath)); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_FolderDoesNotExist, folderPath)); return status; } if (!fileExists) { IStatus val = CConventions.validateSourceFileName(getCurrentProject().getProject(), path.lastSegment()); if (val.getSeverity() == IStatus.ERROR) { - status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.InvalidSourceFileName", val.getMessage())); //$NON-NLS-1$ + status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_InvalidSourceFileName, val.getMessage())); return status; } else if (val.getSeverity() == IStatus.WARNING) { - status.setWarning(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.warning.SourceFileNameDiscouraged", val.getMessage())); //$NON-NLS-1$ + status.setWarning(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_warning_SourceFileNameDiscouraged, val.getMessage())); } } return status; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewSourceFolderCreationWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewSourceFolderCreationWizard.java index 024256a14df..59d9f25f37e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewSourceFolderCreationWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewSourceFolderCreationWizard.java @@ -26,7 +26,7 @@ public class NewSourceFolderCreationWizard extends NewElementWizard { super(); setDefaultPageImageDescriptor(CPluginImages.DESC_WIZBAN_NEWSRCFOLDR); setDialogSettings(CUIPlugin.getDefault().getDialogSettings()); - setWindowTitle(NewFolderWizardMessages.getString("NewSourceFolderCreationWizard.title")); //$NON-NLS-1$ + setWindowTitle(NewFolderWizardMessages.NewSourceFolderCreationWizard_title); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java index 2a20bfb918e..b907927fcc9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 QNX Software Systems and others. + * Copyright (c) 2000, 2008 QNX Software Systems 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 @@ -151,7 +151,7 @@ public abstract class ConvertProjectWizardPage protected void addToMainPage(Composite container){ // Add convert to C or C/C++ buttons - Composite area = ControlFactory.createGroup(container, CUIMessages.getString("ConvertProjectWizardPage.convertTo"), 2); //$NON-NLS-1$ + Composite area = ControlFactory.createGroup(container, CUIMessages.ConvertProjectWizardPage_convertTo, 2); SelectionListener cListener = new SelectionAdapter() { @@ -163,12 +163,12 @@ public abstract class ConvertProjectWizardPage } }; cRadioButton = ControlFactory.createRadioButton(area, - CUIMessages.getString("ConvertProjectWizardPage.CProject"), //$NON-NLS-1$ + CUIMessages.ConvertProjectWizardPage_CProject, "C ", //$NON-NLS-1$ cListener); cRadioButton.setSelection(convertToC); ccRadioButton = ControlFactory.createRadioButton(area, - CUIMessages.getString("ConvertProjectWizardPage.CppProject"), //$NON-NLS-1$ + CUIMessages.ConvertProjectWizardPage_CppProject, "C++", //$NON-NLS-1$ cListener); ccRadioButton.setSelection(convertToCC); @@ -277,7 +277,7 @@ public abstract class ConvertProjectWizardPage selectAllButton= new Button(buttons, SWT.PUSH); - selectAllButton.setText(CUIMessages.getString("ConvertProjectWizardPage.SelectAll")); //$NON-NLS-1$ + selectAllButton.setText(CUIMessages.ConvertProjectWizardPage_SelectAll); selectAllButton.setLayoutData(getButtonGridData(selectAllButton)); selectAllButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { @@ -289,7 +289,7 @@ public abstract class ConvertProjectWizardPage }); deselectAllButton= new Button(buttons, SWT.PUSH); - deselectAllButton.setText(CUIMessages.getString("ConvertProjectWizardPage.DeselectAll")); //$NON-NLS-1$ + deselectAllButton.setText(CUIMessages.ConvertProjectWizardPage_DeselectAll); deselectAllButton.setLayoutData(getButtonGridData(deselectAllButton)); deselectAllButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) {