From 1738ff26440cb838b4d42f49cb8d29c4cc9babdf Mon Sep 17 00:00:00 2001 From: Andrew Niefer Date: Thu, 26 Feb 2004 19:30:36 +0000 Subject: [PATCH] Bug 53123 - Externalize Strings --- .../corext/template/ITemplateEditor.java | 12 +- .../template/TemplateMessages.properties | 3 +- .../internal/corext/template/TemplateSet.java | 2 +- .../c/CompilationUnitContextType.java | 14 +- .../corext/template/c/GlobalVariables.java | 16 +- .../textmanipulation/Messages.properties | 1 + .../textmanipulation/TextBufferEditor.java | 9 +- .../cdt/internal/ui/BinaryPropertySource.java | 28 ++-- .../cdt/internal/ui/BuildConsoleManager.java | 2 +- .../ui/CCompletionContributorManager.java | 6 +- .../cdt/internal/ui/CElementProperties.java | 2 +- .../internal/ui/CElementPropertySource.java | 2 +- .../cdt/internal/ui/CPerspectiveFactory.java | 6 +- .../cdt/internal/ui/CPluginImages.java | 148 +++++++++--------- .../cdt/internal/ui/CUIMessages.properties | 27 ++++ .../ui/ICElementPropertyConstants.java | 16 +- .../cdt/internal/ui/ICHelpContextIds.java | 40 ++--- .../ui/buildconsole/BuildConsoleView.java | 8 +- .../ui/buildconsole/ClearConsoleAction.java | 4 +- .../codemanipulation/AddIncludeOperation.java | 4 +- .../ui/codemanipulation/StubUtility.java | 6 +- .../cdt/internal/ui/compare/CMergeViewer.java | 2 +- .../ui/compare/CParseTreeBuilder.java | 8 +- .../ui/compare/CStructureCreator.java | 6 +- .../cdt/internal/ui/cview/BuildGroup.java | 4 +- .../eclipse/cdt/internal/ui/cview/CView.java | 14 +- .../internal/ui/cview/CViewDropAdapter.java | 2 +- .../ui/cview/CViewMessages.properties | 9 ++ .../cdt/internal/ui/cview/DefaultAction.java | 4 +- .../ui/cview/FilterSelectionAction.java | 6 +- .../ui/cview/ShowLibrariesAction.java | 4 +- .../editor/AddIncludeOnSelectionAction.java | 2 +- .../ui/editor/CContentOutlinePage.java | 6 +- .../internal/ui/editor/CDocumentProvider.java | 2 +- .../cdt/internal/ui/editor/CEditor.java | 28 ++-- .../ui/editor/CEditorActionContributor.java | 10 +- .../internal/ui/editor/CEditorMessages.java | 4 +- .../ui/editor/CEditorMessages.properties | 7 + .../internal/ui/editor/CMarkerAnnotation.java | 12 +- .../ui/editor/CTextEditorActionConstants.java | 4 +- .../ui/editor/DefaultCEditorTextHover.java | 6 +- .../internal/ui/editor/FileSearchAction.java | 12 +- .../editor/FileSearchActionInWorkingSet.java | 12 +- .../ui/editor/LexicalSortingAction.java | 12 +- .../ui/editor/OpenDeclarationsAction.java | 2 +- .../internal/ui/editor/OpenIncludeAction.java | 16 +- .../ui/editor/SearchDialogAction.java | 16 +- .../ui/editor/asm/AsmCodeScanner.java | 26 +-- .../ui/editor/asm/AsmPartitionScanner.java | 8 +- .../internal/ui/opentype/OpenTypeAction.java | 2 +- .../ui/opentype/OpenTypeMessages.properties | 1 + .../internal/ui/opentype/TypeSearchMatch.java | 4 +- .../ui/opentype/TypeSearchOperation.java | 16 +- .../BuildConsolePreferencePage.java | 20 +-- .../ui/preferences/CEditorPreferencePage.java | 116 +++++++------- .../ui/preferences/CPluginPreferencePage.java | 6 +- .../preferences/OverlayPreferenceStore.java | 2 +- .../PreferencesMessages.properties | 27 ++++ .../preferences/TemplatePreferencePage.java | 10 +- .../internal/ui/search/CElementLabels.java | 4 +- .../ui/search/CSearchMessages.properties | 3 +- .../internal/ui/search/CSearchOperation.java | 14 +- .../cdt/internal/ui/search/CSearchPage.java | 6 +- .../ui/search/CSearchResultCollector.java | 2 +- .../ui/search/GroupByKeyComputer.java | 2 +- .../ui/search/OpenCSearchPageAction.java | 2 +- .../ui/search/actions/FindAction.java | 2 +- .../actions/FindDeclarationsAction.java | 10 +- .../FindDeclarationsInWorkingSetAction.java | 10 +- .../ui/search/actions/FindRefsAction.java | 10 +- .../actions/FindRefsInWorkingSetAction.java | 10 +- .../internal/ui/text/CAnnotationHover.java | 3 +- .../internal/ui/text/CAutoIndentStrategy.java | 4 +- .../cdt/internal/ui/text/CCodeScanner.java | 46 +++--- .../internal/ui/text/CPartitionScanner.java | 16 +- .../ui/text/CSourceViewerConfiguration.java | 8 +- .../cdt/internal/ui/text/CppCodeScanner.java | 58 ++++--- .../cdt/internal/ui/text/HTML2TextReader.java | 2 +- .../internal/ui/text/HTMLTextPresenter.java | 2 +- .../internal/ui/text/PreprocessorRule.java | 2 +- .../contentassist/CCompletionProcessor.java | 18 +-- .../contentassist/CCompletionProposal.java | 6 +- .../text/contentassist/CompletionEngine.java | 114 +++++++------- .../ContentAssistPreference.java | 42 ++--- .../text/contentassist/ResultCollector.java | 86 +++++----- .../ui/text/link/LinkedPositionUI.java | 2 +- .../ui/text/template/TemplateProposal.java | 2 +- .../eclipse/cdt/internal/ui/util/Util.java | 4 +- .../eclipse/cdt/ui/CElementLabelProvider.java | 8 +- .../org/eclipse/cdt/ui/CElementSorter.java | 6 +- .../cdt/ui/CSearchResultLabelProvider.java | 18 +-- .../src/org/eclipse/cdt/ui/CUIPlugin.java | 38 ++--- .../cdt/ui/FunctionPrototypeSummary.java | 20 +-- .../src/org/eclipse/cdt/ui/ICDTConstants.java | 12 +- .../ui/dialogs/AbstractErrorParserBlock.java | 23 +-- .../cdt/ui/dialogs/BinaryParserBlock.java | 13 +- .../ui/dialogs/CygwinPEBinaryParserPage.java | 33 ++-- .../ui/dialogs/GNUElfBinaryParserPage.java | 31 ++-- .../cdt/ui/dialogs/ReferenceBlock.java | 9 +- .../cdt/ui/dialogs/TabFolderOptionBlock.java | 3 +- .../cdt/ui/wizards/NewCProjectWizard.java | 4 +- .../cdt/ui/wizards/NewClassWizard.java | 6 +- .../cdt/ui/wizards/NewClassWizardPage.java | 108 ++++++------- .../conversion/ConvertProjectWizardPage.java | 19 +-- 104 files changed, 873 insertions(+), 772 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/ITemplateEditor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/ITemplateEditor.java index 34c64f98145..c98f32c2d28 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/ITemplateEditor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/ITemplateEditor.java @@ -22,12 +22,12 @@ public interface ITemplateEditor { void edit(TemplateBuffer buffer, TemplateContext context) throws CoreException; public class TemplateContextKind { - public static final String C_GLOBAL_CONTEXT_TYPE = "C Global"; - public static final String C_FUNCTION_CONTEXT_TYPE = "C Function"; - public static final String C_STRUCTURE_CONTEXT_TYPE = "C Structure"; - public static final String CPP_GLOBAL_CONTEXT_TYPE = "C++ Global"; - public static final String CPP_FUNCTION_CONTEXT_TYPE = "C++ Function"; - public static final String CPP_STRUCTURE_CONTEXT_TYPE = "C++ Structure"; + public static final String C_GLOBAL_CONTEXT_TYPE = "C Global"; //$NON-NLS-1$ + public static final String C_FUNCTION_CONTEXT_TYPE = "C Function"; //$NON-NLS-1$ + public static final String C_STRUCTURE_CONTEXT_TYPE = "C Structure"; //$NON-NLS-1$ + public static final String CPP_GLOBAL_CONTEXT_TYPE = "C++ Global"; //$NON-NLS-1$ + public static final String CPP_FUNCTION_CONTEXT_TYPE = "C++ Function"; //$NON-NLS-1$ + public static final String CPP_STRUCTURE_CONTEXT_TYPE = "C++ Structure"; //$NON-NLS-1$ } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateMessages.properties index 73743c48aea..c20dc608a58 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateMessages.properties @@ -71,7 +71,7 @@ TemplateVariableProcessor.error.title=Error creating template variable proposals # template set TemplateSet.error.read=Error occured while reading templates. TemplateSet.error.write=Error occured while writing templates. - +TemplateSet.error.missingAttribute=Missing required attribute # templates Templates.error.title=Error accessing templates. Templates.error.read=Error occured while reading templates. @@ -104,3 +104,4 @@ TemplateCollector.variable.description.arguments=Method arguments (evaluates to # template translator TemplateTranslator.error.incomplete.variable=Template has incomplete variables. TemplateTranslator.error.invalid.identifier=Template has invalid variable identifiers. + diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateSet.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateSet.java index 94fbff31f63..fecaf546dca 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateSet.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/TemplateSet.java @@ -117,7 +117,7 @@ public class TemplateSet { Node enabledNode= attributes.getNamedItem(ENABLED_ATTRIBUTE); if (name == null || description == null || context == null) - throw new SAXException("Missing required attribute"); + throw new SAXException(TemplateMessages.getString("TemplateSet.error.missingAttribute")); //$NON-NLS-1$ boolean enabled= (enabledNode == null) || (enabledNode.getNodeValue().equals("true")); //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/CompilationUnitContextType.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/CompilationUnitContextType.java index 6b458e7f9a1..f5d239858f3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/CompilationUnitContextType.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/CompilationUnitContextType.java @@ -26,7 +26,7 @@ public abstract class CompilationUnitContextType extends ContextType { protected static class ReturnType extends TemplateVariable { public ReturnType() { - super("return_type", TemplateMessages.getString("JavaContextType.variable.description.return.type")); + super("return_type", TemplateMessages.getString("JavaContextType.variable.description.return.type")); //$NON-NLS-1$ //$NON-NLS-2$ } public String evaluate(TemplateContext context) { /* IJavaElement element= ((CompilationUnitContext) context).findEnclosingElement(IJavaElement.METHOD); @@ -47,7 +47,7 @@ public abstract class CompilationUnitContextType extends ContextType { protected static class File extends TemplateVariable { public File() { - super("file", TemplateMessages.getString("JavaContextType.variable.description.file")); + super("file", TemplateMessages.getString("JavaContextType.variable.description.file")); //$NON-NLS-1$ //$NON-NLS-2$ } public String evaluate(TemplateContext context) { //ICompilationUnit unit= ((CompilationUnitContext) context).getCompilationUnit(); @@ -80,13 +80,13 @@ public abstract class CompilationUnitContextType extends ContextType { protected static class Method extends EnclosingJavaElement { public Method() { //super("enclosing_method", TemplateMessages.getString("JavaContextType.variable.description.enclosing.method"), IJavaElement.METHOD); - super("enclosing_method", TemplateMessages.getString("JavaContextType.variable.description.enclosing.method"), 0); + super("enclosing_method", TemplateMessages.getString("JavaContextType.variable.description.enclosing.method"), 0); //$NON-NLS-1$ //$NON-NLS-2$ } } protected static class Type extends EnclosingJavaElement { public Type() { - super("enclosing_type", TemplateMessages.getString("JavaContextType.variable.description.enclosing.type"), 0); + super("enclosing_type", TemplateMessages.getString("JavaContextType.variable.description.enclosing.type"), 0); //$NON-NLS-1$ //$NON-NLS-2$ } } /* @@ -98,13 +98,13 @@ public abstract class CompilationUnitContextType extends ContextType { */ protected static class Package extends EnclosingJavaElement { public Package() { - super("enclosing_package", TemplateMessages.getString("JavaContextType.variable.description.enclosing.package"), 0); + super("enclosing_package", TemplateMessages.getString("JavaContextType.variable.description.enclosing.package"), 0); //$NON-NLS-1$ //$NON-NLS-2$ } } protected static class Project extends EnclosingJavaElement { public Project() { - super("enclosing_project", TemplateMessages.getString("JavaContextType.variable.description.enclosing.project"), 0); + super("enclosing_project", TemplateMessages.getString("JavaContextType.variable.description.enclosing.project"), 0); //$NON-NLS-1$ //$NON-NLS-2$ } } /* @@ -120,7 +120,7 @@ public abstract class CompilationUnitContextType extends ContextType { */ protected static class Arguments extends TemplateVariable { public Arguments() { - super("enclosing_method_arguments", TemplateMessages.getString("JavaContextType.variable.description.enclosing.method.arguments")); + super("enclosing_method_arguments", TemplateMessages.getString("JavaContextType.variable.description.enclosing.method.arguments")); //$NON-NLS-1$ //$NON-NLS-2$ } public String evaluate(TemplateContext context) { /*IJavaElement element= ((CompilationUnitContext) context).findEnclosingElement(IJavaElement.METHOD); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/GlobalVariables.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/GlobalVariables.java index 4c276d16ff9..7df694493b3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/GlobalVariables.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/GlobalVariables.java @@ -20,8 +20,8 @@ public class GlobalVariables { */ static class Cursor extends SimpleTemplateVariable { public Cursor() { - super("cursor", TemplateMessages.getString("GlobalVariables.variable.description.cursor")); - setEvaluationString(""); + super("cursor", TemplateMessages.getString("GlobalVariables.variable.description.cursor")); //$NON-NLS-1$ //$NON-NLS-2$ + setEvaluationString(""); //$NON-NLS-1$ setResolved(true); } } @@ -31,8 +31,8 @@ public class GlobalVariables { */ static class Dollar extends SimpleTemplateVariable { public Dollar() { - super("dollar", TemplateMessages.getString("GlobalVariables.variable.description.dollar")); - setEvaluationString("$"); + super("dollar", TemplateMessages.getString("GlobalVariables.variable.description.dollar")); //$NON-NLS-1$ //$NON-NLS-2$ + setEvaluationString("$"); //$NON-NLS-1$ setResolved(true); } } @@ -42,7 +42,7 @@ public class GlobalVariables { */ static class Date extends SimpleTemplateVariable { public Date() { - super("date", TemplateMessages.getString("GlobalVariables.variable.description.date")); + super("date", TemplateMessages.getString("GlobalVariables.variable.description.date")); //$NON-NLS-1$ //$NON-NLS-2$ setResolved(true); } public String evaluate(TemplateContext context) { @@ -55,7 +55,7 @@ public class GlobalVariables { */ static class Time extends SimpleTemplateVariable { public Time() { - super("time", TemplateMessages.getString("GlobalVariables.variable.description.time")); + super("time", TemplateMessages.getString("GlobalVariables.variable.description.time")); //$NON-NLS-1$ //$NON-NLS-2$ setResolved(true); } public String evaluate(TemplateContext context) { @@ -68,11 +68,11 @@ public class GlobalVariables { */ static class User extends SimpleTemplateVariable { public User() { - super("user", TemplateMessages.getString("GlobalVariables.variable.description.user")); + super("user", TemplateMessages.getString("GlobalVariables.variable.description.user")); //$NON-NLS-1$ //$NON-NLS-2$ setResolved(true); } public String evaluate(TemplateContext context) { - return System.getProperty("user.name"); + return System.getProperty("user.name"); //$NON-NLS-1$ } } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/Messages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/Messages.properties index 729774b29aa..81f736bb404 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/Messages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/Messages.properties @@ -15,3 +15,4 @@ TextRange.length=\ Length: TextBuffer.wrongRange=Replace failed due to wrong range [{0},{1}] TextBufferFactory.bufferNotManaged=Buffer not managed +TextBufferEditor.rootNodeEmpty=RootNode empty diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/TextBufferEditor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/TextBufferEditor.java index 2ee24f66208..f8e123738f6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/TextBufferEditor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/textmanipulation/TextBufferEditor.java @@ -9,16 +9,15 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.eclipse.cdt.internal.corext.textmanipulation.TextEditNode.RootNode; +import org.eclipse.cdt.internal.ui.CStatusConstants; +import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.jface.util.Assert; - -import org.eclipse.cdt.internal.corext.textmanipulation.TextEditNode.RootNode; -import org.eclipse.cdt.internal.ui.CStatusConstants; -import org.eclipse.cdt.ui.CUIPlugin; /** * A TextBufferEditor manages a set of TextEdits and applies * them as a whole to a TextBuffer. Added TextEdits must @@ -165,7 +164,7 @@ public class TextBufferEditor { fRootNode= buildTree(); if (fRootNode == null || !fRootNode.validate(fBuffer.getLength())) { IStatus s= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR, - "RootNode empty", null); + TextManipulationMessages.getString("TextBufferEditor.rootNodeEmpty"), null); //$NON-NLS-1$ throw new CoreException(s); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BinaryPropertySource.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BinaryPropertySource.java index 770b9ad34ff..5c8c708ef88 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BinaryPropertySource.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BinaryPropertySource.java @@ -14,14 +14,14 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class BinaryPropertySource implements IPropertySource { - private final static String ELF_CPU= "CElementProperties.elf_cpu"; - private final static String ELF_TEXT= "CElementProperties.elf_text"; - private final static String ELF_DATA= "CElementProperties.elf_data"; - private final static String ELF_BSS= "CElementProperties.elf_bss"; - private final static String ELF_TYPE= "CElementProperties.elf_type"; - private final static String ELF_HAS_DEBUG= "CElementProperties.elf_has_debug"; - private final static String ELF_SONAME= "CElementProperties.elf_soname"; - private final static String ELF_NEEDED= "CElementProperties.elf_needed"; + private final static String ELF_CPU= "CElementProperties.elf_cpu"; //$NON-NLS-1$ + private final static String ELF_TEXT= "CElementProperties.elf_text"; //$NON-NLS-1$ + private final static String ELF_DATA= "CElementProperties.elf_data"; //$NON-NLS-1$ + private final static String ELF_BSS= "CElementProperties.elf_bss"; //$NON-NLS-1$ + private final static String ELF_TYPE= "CElementProperties.elf_type"; //$NON-NLS-1$ + private final static String ELF_HAS_DEBUG= "CElementProperties.elf_has_debug"; //$NON-NLS-1$ + private final static String ELF_SONAME= "CElementProperties.elf_soname"; //$NON-NLS-1$ + private final static String ELF_NEEDED= "CElementProperties.elf_needed"; //$NON-NLS-1$ private IBinary binary; @@ -120,20 +120,20 @@ public class BinaryPropertySource implements IPropertySource { } } else if (name.equals(ICElementPropertyConstants.P_ELF_NEEDED)) { String[] needed = binary.getNeededSharedLibs(); - String need = ""; + String need = ""; //$NON-NLS-1$ for (int i = 0; i < needed.length; i++) { - need += " " + needed[i]; + need += " " + needed[i]; //$NON-NLS-1$ } return need.trim(); } else if (name.equals(ICElementPropertyConstants.P_ELF_TYPE)) { if (binary.isObject()) { - return "object"; + return "object"; //$NON-NLS-1$ } else if (binary.isExecutable()) { - return "executable"; + return "executable"; //$NON-NLS-1$ } else if (binary.isSharedLib()) { - return "shared library"; + return "shared library"; //$NON-NLS-1$ } else if (binary.isCore()) { - return "core file"; + return "core file"; //$NON-NLS-1$ } } return null; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BuildConsoleManager.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BuildConsoleManager.java index 9dfa0ebafb0..cd88e5dc7cd 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BuildConsoleManager.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BuildConsoleManager.java @@ -102,7 +102,7 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang super.clear(); Display.getDefault().syncExec(new Runnable() { public void run() { - fDocument.set(""); + fDocument.set(""); //$NON-NLS-1$ } }); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CCompletionContributorManager.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CCompletionContributorManager.java index 2c1eaaee17a..c6933316c64 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CCompletionContributorManager.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CCompletionContributorManager.java @@ -26,7 +26,7 @@ public class CCompletionContributorManager { static private List fCompletionContributors; static boolean fContributorsLoaded = false; - public static final String CONTRIBUTION_EXTENSION = "CCompletionContributor"; + public static final String CONTRIBUTION_EXTENSION = "CCompletionContributor"; //$NON-NLS-1$ static private CCompletionContributorManager fInstance; private CCompletionContributorManager() { @@ -93,11 +93,11 @@ public class CCompletionContributorManager { if (extensionPoint != null) { IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); for (int i = 0; i < elements.length; i++) { - if (elements[i].getName().equals("provider")) { + if (elements[i].getName().equals("provider")) { //$NON-NLS-1$ try { final ICCompletionContributor c; // Instantiate the classe - c = (ICCompletionContributor) elements[i].createExecutableExtension("class"); + c = (ICCompletionContributor) elements[i].createExecutableExtension("class"); //$NON-NLS-1$ ISafeRunnable runnable = new ISafeRunnable() { public void run() throws Exception { // Initialize diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementProperties.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementProperties.java index d49038f6e7a..d4ce8ca8670 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementProperties.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementProperties.java @@ -15,7 +15,7 @@ import org.eclipse.cdt.ui.*; public class CElementProperties implements IPropertySource { - private final static String LABEL= "CElementProperties.name"; + private final static String LABEL= "CElementProperties.name"; //$NON-NLS-1$ private ICElement fCElement; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementPropertySource.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementPropertySource.java index d8481647422..123c99018a3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementPropertySource.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementPropertySource.java @@ -15,7 +15,7 @@ import org.eclipse.cdt.ui.*; public class CElementPropertySource implements IPropertySource { - private final static String LABEL= "CElementProperties.name"; + private final static String LABEL= "CElementProperties.name"; //$NON-NLS-1$ private ICElement fCElement; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java index af1b061d565..d2d37db56c8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java @@ -26,17 +26,17 @@ public class CPerspectiveFactory implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); - IFolderLayout folder1= layout.createFolder("topLeft", IPageLayout.LEFT, (float)0.25, editorArea); + IFolderLayout folder1= layout.createFolder("topLeft", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$ folder1.addView(IPageLayout.ID_RES_NAV); folder1.addPlaceholder(IPageLayout.ID_BOOKMARKS); folder1.addView(CUIPlugin.CVIEW_ID); - IFolderLayout folder2= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); + IFolderLayout folder2= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$ folder2.addView(IPageLayout.ID_TASK_LIST); folder2.addView(CUIPlugin.CONSOLE_ID); folder2.addView(IPageLayout.ID_PROP_SHEET); - IFolderLayout folder3= layout.createFolder("topRight", IPageLayout.RIGHT,(float)0.75, editorArea); + IFolderLayout folder3= layout.createFolder("topRight", IPageLayout.RIGHT,(float)0.75, editorArea); //$NON-NLS-1$ folder3.addView(IPageLayout.ID_OUTLINE); layout.addActionSet(CUIPlugin.SEARCH_ACTION_SET_ID); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java index 9fcfb3a302b..f92ab29a801 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java @@ -26,59 +26,59 @@ public class CPluginImages { private static URL fgIconBaseURL; static { try { - fgIconBaseURL= new URL(CUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" ); + fgIconBaseURL= new URL(CUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" ); //$NON-NLS-1$ } catch (MalformedURLException e) { CUIPlugin.getDefault().log(e); } } private static final String NAME_PREFIX= CUIPlugin.PLUGIN_ID + '.'; private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length(); - private static final String T= "full/"; + private static final String T= "full/"; //$NON-NLS-1$ - public static final String T_OBJ= T + "obj16/"; - public static final String T_WIZBAN= T + "wizban/"; - public static final String T_LCL= "lcl16/"; - public static final String T_TOOL= "tool16/"; - public static final String T_VIEW= "view16/"; - public static final String T_OVR= T + "ovr16/"; + public static final String T_OBJ= T + "obj16/"; //$NON-NLS-1$ + public static final String T_WIZBAN= T + "wizban/"; //$NON-NLS-1$ + public static final String T_LCL= "lcl16/"; //$NON-NLS-1$ + public static final String T_TOOL= "tool16/"; //$NON-NLS-1$ + public static final String T_VIEW= "view16/"; //$NON-NLS-1$ + public static final String T_OVR= T + "ovr16/"; //$NON-NLS-1$ - public static final String IMG_OBJS_TEMPLATE= NAME_PREFIX + "template_obj.gif"; - public static final String IMG_OBJS_VARIABLE= NAME_PREFIX + "variable_obj.gif"; - public static final String IMG_OBJS_LOCAL_VARIABLE= NAME_PREFIX + "variable_local_obj.gif"; - public static final String IMG_OBJS_CLASS= NAME_PREFIX + "class_obj.gif"; - public static final String IMG_OBJS_STRUCT= NAME_PREFIX + "struct_obj.gif"; - public static final String IMG_OBJS_UNION= NAME_PREFIX + "union_obj.gif"; - public static final String IMG_OBJS_TYPEDEF= NAME_PREFIX + "typedef_obj.gif"; - public static final String IMG_OBJS_ENUMERATION= NAME_PREFIX + "enum_obj.gif"; - public static final String IMG_OBJS_ENUMERATOR= NAME_PREFIX + "enumerator_obj.gif"; - public static final String IMG_OBJS_FUNCTION= NAME_PREFIX + "function_obj.gif"; - public static final String IMG_OBJS_PUBLIC_METHOD= NAME_PREFIX + "method_public_obj.gif"; - public static final String IMG_OBJS_PROTECTED_METHOD= NAME_PREFIX + "method_protected_obj.gif"; - public static final String IMG_OBJS_PRIVATE_METHOD= NAME_PREFIX + "method_private_obj.gif"; - public static final String IMG_OBJS_PUBLIC_FIELD= NAME_PREFIX + "field_public_obj.gif"; - public static final String IMG_OBJS_PROTECTED_FIELD= NAME_PREFIX + "field_protected_obj.gif"; - public static final String IMG_OBJS_PRIVATE_FIELD= NAME_PREFIX + "field_private_obj.gif"; - public static final String IMG_OBJS_DECLARATION= NAME_PREFIX + "cdeclaration_obj.gif"; - public static final String IMG_OBJS_VAR_DECLARATION= NAME_PREFIX + "var_declaration_obj.gif"; - public static final String IMG_OBJS_INCLUDE= NAME_PREFIX + "include_obj.gif"; - public static final String IMG_OBJS_MACRO= NAME_PREFIX + "define_obj.gif"; - public static final String IMG_OBJS_TUNIT= NAME_PREFIX + "c_file_obj.gif"; - public static final String IMG_OBJS_TUNIT_HEADER= NAME_PREFIX + "h_file_obj.gif"; - public static final String IMG_OBJS_TUNIT_ASM= NAME_PREFIX + "s_file_obj.gif"; - public static final String IMG_OBJS_TUNIT_RESOURCE = NAME_PREFIX + "c_resource_obj.gif"; - public static final String IMG_OBJS_ARCHIVE= NAME_PREFIX + "ar_obj.gif"; - public static final String IMG_OBJS_BINARY= NAME_PREFIX + "bin_obj.gif"; - public static final String IMG_OBJS_SHLIB= NAME_PREFIX + "shlib_obj.gif"; - public static final String IMG_OBJS_CEXEC= NAME_PREFIX + "exec_obj.gif"; - public static final String IMG_OBJS_CEXEC_DEBUG= NAME_PREFIX + "exec_dbg_obj.gif"; - public static final String IMG_OBJS_CORE= NAME_PREFIX + "core_obj.gif"; - public static final String IMG_OBJS_CONTAINER= NAME_PREFIX + "container_obj.gif"; - public static final String IMG_OBJS_LIBRARY= NAME_PREFIX + "lib_obj.gif"; + public static final String IMG_OBJS_TEMPLATE= NAME_PREFIX + "template_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_VARIABLE= NAME_PREFIX + "variable_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_LOCAL_VARIABLE= NAME_PREFIX + "variable_local_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_CLASS= NAME_PREFIX + "class_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_STRUCT= NAME_PREFIX + "struct_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_UNION= NAME_PREFIX + "union_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_TYPEDEF= NAME_PREFIX + "typedef_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_ENUMERATION= NAME_PREFIX + "enum_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_ENUMERATOR= NAME_PREFIX + "enumerator_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_FUNCTION= NAME_PREFIX + "function_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_PUBLIC_METHOD= NAME_PREFIX + "method_public_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_PROTECTED_METHOD= NAME_PREFIX + "method_protected_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_PRIVATE_METHOD= NAME_PREFIX + "method_private_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_PUBLIC_FIELD= NAME_PREFIX + "field_public_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_PROTECTED_FIELD= NAME_PREFIX + "field_protected_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_PRIVATE_FIELD= NAME_PREFIX + "field_private_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_DECLARATION= NAME_PREFIX + "cdeclaration_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_VAR_DECLARATION= NAME_PREFIX + "var_declaration_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_INCLUDE= NAME_PREFIX + "include_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_MACRO= NAME_PREFIX + "define_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_TUNIT= NAME_PREFIX + "c_file_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_TUNIT_HEADER= NAME_PREFIX + "h_file_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_TUNIT_ASM= NAME_PREFIX + "s_file_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_TUNIT_RESOURCE = NAME_PREFIX + "c_resource_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_ARCHIVE= NAME_PREFIX + "ar_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_BINARY= NAME_PREFIX + "bin_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_SHLIB= NAME_PREFIX + "shlib_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_CEXEC= NAME_PREFIX + "exec_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_CEXEC_DEBUG= NAME_PREFIX + "exec_dbg_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_CORE= NAME_PREFIX + "core_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_CONTAINER= NAME_PREFIX + "container_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_LIBRARY= NAME_PREFIX + "lib_obj.gif"; //$NON-NLS-1$ // Breakpoint images - public static final String IMG_OBJS_BREAKPOINT = NAME_PREFIX + "breakpoint.gif"; - public static final String IMG_OBJS_BREAKPOINT_DISABLED = NAME_PREFIX + "breakpoint_disabled.gif"; - public static final String IMG_OBJS_BREAKPOINT_ACTIVE = NAME_PREFIX + "breakpoint_active.gif"; + public static final String IMG_OBJS_BREAKPOINT = NAME_PREFIX + "breakpoint.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_BREAKPOINT_DISABLED = NAME_PREFIX + "breakpoint_disabled.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_BREAKPOINT_ACTIVE = NAME_PREFIX + "breakpoint_active.gif"; //$NON-NLS-1$ public static final ImageDescriptor DESC_OBJS_VARIABLE= createManaged(T_OBJ, IMG_OBJS_VARIABLE); public static final ImageDescriptor DESC_OBJS_LOCAL_VARIABLE= createManaged(T_OBJ, IMG_OBJS_LOCAL_VARIABLE); @@ -117,48 +117,48 @@ public class CPluginImages { public static final ImageDescriptor DESC_OBJS_BREAKPOINT_DISABLED = createManaged( T_OBJ, IMG_OBJS_BREAKPOINT_DISABLED ); public static final ImageDescriptor DESC_OBJS_BREAKPOINT_ACTIVE = createManaged( T_OBJ, IMG_OBJS_BREAKPOINT_ACTIVE ); - public static final String IMG_MENU_SHIFT_RIGHT= NAME_PREFIX + "shift_r_edit.gif"; - public static final String IMG_MENU_SHIFT_LEFT= NAME_PREFIX + "shift_l_edit.gif"; - public static final String IMG_MENU_OPEN_INCLUDE= NAME_PREFIX + "open_incl.gif"; - public static final String IMG_MENU_SEGMENT_EDIT= NAME_PREFIX + "segment_edit.gif"; - public static final String IMG_MENU_CODE_ASSIST= NAME_PREFIX + "metharg_obj.gif"; - public static final String IMG_MENU_COLLAPSE_ALL= NAME_PREFIX + "collapseall.gif"; - public static final String IMG_CLEAR_CONSOLE= NAME_PREFIX + "clear_co.gif"; - public static final String IMG_ALPHA_SORTING= NAME_PREFIX + "alphab_sort_co.gif"; - public static final String IMG_TOOL_GOTO_PREV_ERROR= NAME_PREFIX + "prev_error_nav.gif"; - public static final String IMG_TOOL_GOTO_NEXT_ERROR= NAME_PREFIX + "next_error_nav.gif"; - public static final String IMG_EDIT_PROPERTIES= NAME_PREFIX + "prop_edt.gif"; + public static final String IMG_MENU_SHIFT_RIGHT= NAME_PREFIX + "shift_r_edit.gif"; //$NON-NLS-1$ + public static final String IMG_MENU_SHIFT_LEFT= NAME_PREFIX + "shift_l_edit.gif"; //$NON-NLS-1$ + public static final String IMG_MENU_OPEN_INCLUDE= NAME_PREFIX + "open_incl.gif"; //$NON-NLS-1$ + public static final String IMG_MENU_SEGMENT_EDIT= NAME_PREFIX + "segment_edit.gif"; //$NON-NLS-1$ + public static final String IMG_MENU_CODE_ASSIST= NAME_PREFIX + "metharg_obj.gif"; //$NON-NLS-1$ + public static final String IMG_MENU_COLLAPSE_ALL= NAME_PREFIX + "collapseall.gif"; //$NON-NLS-1$ + public static final String IMG_CLEAR_CONSOLE= NAME_PREFIX + "clear_co.gif"; //$NON-NLS-1$ + public static final String IMG_ALPHA_SORTING= NAME_PREFIX + "alphab_sort_co.gif"; //$NON-NLS-1$ + public static final String IMG_TOOL_GOTO_PREV_ERROR= NAME_PREFIX + "prev_error_nav.gif"; //$NON-NLS-1$ + public static final String IMG_TOOL_GOTO_NEXT_ERROR= NAME_PREFIX + "next_error_nav.gif"; //$NON-NLS-1$ + public static final String IMG_EDIT_PROPERTIES= NAME_PREFIX + "prop_edt.gif"; //$NON-NLS-1$ - public static final String IMG_ACTION_SHOW_FIELDS= NAME_PREFIX + "fields_co.gif"; - public static final String IMG_ACTION_SHOW_PUBLIC= NAME_PREFIX + "public_co.gif"; - public static final String IMG_ACTION_SHOW_STATIC= NAME_PREFIX + "static_co.gif"; + public static final String IMG_ACTION_SHOW_FIELDS= NAME_PREFIX + "fields_co.gif"; //$NON-NLS-1$ + public static final String IMG_ACTION_SHOW_PUBLIC= NAME_PREFIX + "public_co.gif"; //$NON-NLS-1$ + public static final String IMG_ACTION_SHOW_STATIC= NAME_PREFIX + "static_co.gif"; //$NON-NLS-1$ public static final ImageDescriptor DESC_OBJS_TEMPLATE= createManaged(T_OBJ, IMG_OBJS_TEMPLATE); - public static final ImageDescriptor DESC_OVR_STATIC= create(T_OVR, "static_co.gif"); - public static final ImageDescriptor DESC_OVR_CONSTANT= create(T_OVR, "c_ovr.gif"); - public static final ImageDescriptor DESC_OVR_VOLATILE= create(T_OVR, "volatile_co.gif"); - public static final ImageDescriptor DESC_OVR_TEMPLATE= create(T_OVR, "template_co.gif"); + public static final ImageDescriptor DESC_OVR_STATIC= create(T_OVR, "static_co.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_OVR_CONSTANT= create(T_OVR, "c_ovr.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_OVR_VOLATILE= create(T_OVR, "volatile_co.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_OVR_TEMPLATE= create(T_OVR, "template_co.gif"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_OVR_WARNING= create(T_OVR, "warning_co.gif"); - public static final ImageDescriptor DESC_OVR_ERROR= create(T_OVR, "error_co.gif"); + public static final ImageDescriptor DESC_OVR_WARNING= create(T_OVR, "warning_co.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_OVR_ERROR= create(T_OVR, "error_co.gif"); //$NON-NLS-1$ - public static final ImageDescriptor DESC_WIZABAN_NEW_PROJ= create(T_WIZBAN, "newcprj_wiz.gif"); - public static final ImageDescriptor DESC_WIZBAN_NEWCLASS= create(T_WIZBAN, "newclass_wiz.gif"); - public static final ImageDescriptor DESC_WIZABAN_C_APP= create(T_WIZBAN, "c_app_wiz.gif"); - public static final String IMG_OBJS_PROJECT = NAME_PREFIX + "prj_obj.gif"; + public static final ImageDescriptor DESC_WIZABAN_NEW_PROJ= create(T_WIZBAN, "newcprj_wiz.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_WIZBAN_NEWCLASS= create(T_WIZBAN, "newclass_wiz.gif"); //$NON-NLS-1$ + public static final ImageDescriptor DESC_WIZABAN_C_APP= create(T_WIZBAN, "c_app_wiz.gif"); //$NON-NLS-1$ + public static final String IMG_OBJS_PROJECT = NAME_PREFIX + "prj_obj.gif"; //$NON-NLS-1$ public static final ImageDescriptor DESC_PROJECT= createManaged(T_WIZBAN, IMG_OBJS_PROJECT); public static final ImageDescriptor DESC_TOOL_NEWCLASS= create(T_TOOL, "newclass_wiz.gif"); //$NON-NLS-1$ // For the build image - public static final String IMG_OBJS_BUILD= NAME_PREFIX + "build_menu.gif"; + public static final String IMG_OBJS_BUILD= NAME_PREFIX + "build_menu.gif"; //$NON-NLS-1$ public static final ImageDescriptor DESC_BUILD_MENU = createManaged(T_OBJ, IMG_OBJS_BUILD); //for search - public static final String IMG_OBJS_SEARCH_REF = NAME_PREFIX + "search_ref_obj.gif"; - public static final String IMG_OBJS_SEARCH_DECL = NAME_PREFIX + "search_decl_obj.gif"; - public static final String IMG_OBJS_CSEARCH = NAME_PREFIX + "csearch_obj.gif"; + public static final String IMG_OBJS_SEARCH_REF = NAME_PREFIX + "search_ref_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_SEARCH_DECL = NAME_PREFIX + "search_decl_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_CSEARCH = NAME_PREFIX + "csearch_obj.gif"; //$NON-NLS-1$ public static final ImageDescriptor DESC_OBJS_SEARCH_DECL = createManaged(T_OBJ, IMG_OBJS_SEARCH_DECL); public static final ImageDescriptor DESC_OBJS_SEARCH_REF = createManaged(T_OBJ, IMG_OBJS_SEARCH_REF); @@ -218,9 +218,9 @@ public class CPluginImages { */ public static void setImageDescriptors(IAction action, String type, String relPath) { relPath= relPath.substring(NAME_PREFIX_LENGTH); - action.setDisabledImageDescriptor(create(T + "d" + type, relPath)); - action.setHoverImageDescriptor(create(T + "c" + type, relPath)); - action.setImageDescriptor(create(T + "e" + type, relPath)); + action.setDisabledImageDescriptor(create(T + "d" + type, relPath)); //$NON-NLS-1$ + action.setHoverImageDescriptor(create(T + "c" + type, relPath)); //$NON-NLS-1$ + action.setImageDescriptor(create(T + "e" + type, relPath)); //$NON-NLS-1$ } /** 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 998d356f7ef..de7cbb9f39c 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 @@ -17,3 +17,30 @@ ExceptionDialog.seeErrorLogMessage=See error log for more details. # Content Assist ################ CEditor.contentassist.noCompletions=No completions available. + +CAnnotationHover.multipleMarkers=Multiple markers at this line + +TabFolderOptionBlock.error=Error +TabFolderOptionBlock.error.settingOptions=Error setting options + +BinaryParserBlock.binaryParser=Binary Parser: +BinaryParserBlock.binaryParserOptions=Binary Parser Options +BinaryParserBlock.settingBinaryParser=Setting Binary Parser... + +ReferenceBlock.task.ReferenceProjects=Reference Projects + +BinaryParserPage.task.savingAttributes=Saving Attributes +BinaryParserPage.label.addr2lineCommand=addr2line Command: +BinaryParserPage.label.browse=&Browse... +BinaryParserPage.label.cppfiltCommand=c++filt Command: +BinaryParserPage.label.cygpathCommand=cygpath Command: + +AbstractErrorParserBlock.task.setErrorParser=Setting Error Parsers... +ConvertProjectWizardPage.convertTo=Convert to C or C++ +ConvertProjectWizardPage.CProject=C Project +ConvertProjectWizardPage.CppProject=C++ Project +AbstractErrorParserBlock.label.up=Up +AbstractErrorParserBlock.label.down=Down +AbstractErrorParserBlock.label.selectAll=Select All +AbstractErrorParserBlock.label.unselectAll=Unselect All +AbstractErrorParserBlock.label.errorParsers=Error Parsers 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 093bd15e59a..2dceb510c59 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 @@ -9,41 +9,41 @@ public interface ICElementPropertyConstants { /** * The ICElement property key for elf cpu. */ - public static final String P_ELF_CPU = "elf_cpu"; + public static final String P_ELF_CPU = "elf_cpu"; //$NON-NLS-1$ /** * The ICElement property key for elf text. */ - public static final String P_ELF_TEXT = "text"; + public static final String P_ELF_TEXT = "text"; //$NON-NLS-1$ /** * The ICElement property key for elf data. */ - public static final String P_ELF_DATA = "data"; + public static final String P_ELF_DATA = "data"; //$NON-NLS-1$ /** * The ICElement property key for elf bss. */ - public static final String P_ELF_BSS = "bss"; + public static final String P_ELF_BSS = "bss"; //$NON-NLS-1$ /** * The ICElement property key for elf bss. */ - public static final String P_ELF_HAS_DEBUG = "debug"; + public static final String P_ELF_HAS_DEBUG = "debug"; //$NON-NLS-1$ /** * The ICElement property key for elf soname. */ - public static final String P_ELF_SONAME = "soname"; + public static final String P_ELF_SONAME = "soname"; //$NON-NLS-1$ /** * The ICElement property key for elf type. */ - public static final String P_ELF_TYPE = "type"; + public static final String P_ELF_TYPE = "type"; //$NON-NLS-1$ /** * The ICElement property key for elf type. */ - public static final String P_ELF_NEEDED = "needed"; + public static final String P_ELF_NEEDED = "needed"; //$NON-NLS-1$ } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java index a5ad6383140..72f852aba58 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/ICHelpContextIds.java @@ -14,30 +14,30 @@ import org.eclipse.cdt.ui.CUIPlugin; * */ public interface ICHelpContextIds { - public static final String PREFIX = CUIPlugin.PLUGIN_ID + "."; + public static final String PREFIX = CUIPlugin.PLUGIN_ID + "."; //$NON-NLS-1$ // Wizard pages - public static final String NEW_CPROJECT_WIZARD_PAGE = PREFIX + "new_cproject_wizard_page_context"; - public static final String NEW_LAUNCH_WIZARD_PAGE = PREFIX + "new_launch_wizard_page_context"; - public static final String NEW_CLASS_WIZARD_PAGE = PREFIX + "new_class_wizard_page_context"; - public static final String OPEN_CLASS_WIZARD_ACTION = PREFIX + "open_class_wizard_action"; + public static final String NEW_CPROJECT_WIZARD_PAGE = PREFIX + "new_cproject_wizard_page_context"; //$NON-NLS-1$ + public static final String NEW_LAUNCH_WIZARD_PAGE = PREFIX + "new_launch_wizard_page_context"; //$NON-NLS-1$ + public static final String NEW_CLASS_WIZARD_PAGE = PREFIX + "new_class_wizard_page_context"; //$NON-NLS-1$ + public static final String OPEN_CLASS_WIZARD_ACTION = PREFIX + "open_class_wizard_action"; //$NON-NLS-1$ // Actions - public static final String FILTER_PUBLIC_ACTION = PREFIX + "filter_public_action"; - public static final String FILTER_FIELDS_ACTION = PREFIX + "filter_fields_action"; - public static final String FILTER_STATIC_ACTION = PREFIX + "filter_static_action"; + public static final String FILTER_PUBLIC_ACTION = PREFIX + "filter_public_action"; //$NON-NLS-1$ + public static final String FILTER_FIELDS_ACTION = PREFIX + "filter_fields_action"; //$NON-NLS-1$ + public static final String FILTER_STATIC_ACTION = PREFIX + "filter_static_action"; //$NON-NLS-1$ // Preference/property pages - public static final String C_PREF_PAGE = PREFIX + "new_c_pref_page_context"; - public static final String C_EDITOR_PREF_PAGE = PREFIX + "new_c_editor_pref_page_context"; - public static final String C_EDITOR_ANNOTATIONS_PREF_PAGE = PREFIX + "new_c_editor_annotations_pref_page_context"; - public static final String C_EDITOR_COLORS_PREF_PAGE = PREFIX + "new_c_editor_colors_pref_page_context"; - public static final String C_EDITOR_CONTENT_ASSIST_PREF_PAGE = PREFIX + "new_c_editor_content_assist_pref_page_context"; - public static final String TEMPLATE_PREFERENCE_PAGE = PREFIX + "new_c_templates_pref_page_context"; - public static final String LAUNCH_PROPERTY_PAGE = PREFIX + "new_launch_property_page_context"; - public static final String PROJECT_PROPERTY_PAGE = PREFIX + "new_project_property_page_context"; + public static final String C_PREF_PAGE = PREFIX + "new_c_pref_page_context"; //$NON-NLS-1$ + public static final String C_EDITOR_PREF_PAGE = PREFIX + "new_c_editor_pref_page_context"; //$NON-NLS-1$ + public static final String C_EDITOR_ANNOTATIONS_PREF_PAGE = PREFIX + "new_c_editor_annotations_pref_page_context"; //$NON-NLS-1$ + public static final String C_EDITOR_COLORS_PREF_PAGE = PREFIX + "new_c_editor_colors_pref_page_context"; //$NON-NLS-1$ + public static final String C_EDITOR_CONTENT_ASSIST_PREF_PAGE = PREFIX + "new_c_editor_content_assist_pref_page_context"; //$NON-NLS-1$ + public static final String TEMPLATE_PREFERENCE_PAGE = PREFIX + "new_c_templates_pref_page_context"; //$NON-NLS-1$ + public static final String LAUNCH_PROPERTY_PAGE = PREFIX + "new_launch_property_page_context"; //$NON-NLS-1$ + public static final String PROJECT_PROPERTY_PAGE = PREFIX + "new_project_property_page_context"; //$NON-NLS-1$ - public static final String PROJ_CONF_BLOCK = PREFIX + "new_proj_conf_block_context"; + public static final String PROJ_CONF_BLOCK = PREFIX + "new_proj_conf_block_context"; //$NON-NLS-1$ public static final String TODO_TASK_INPUT_DIALOG = PREFIX + "todo_task_input_dialog_context"; //$NON-NLS-1$ public static final String TODO_TASK_PROPERTY_PAGE = PREFIX + "tasktags_property_page_context"; //$NON-NLS-1$ @@ -47,8 +47,8 @@ public interface ICHelpContextIds { public static final String ERROR_PARSERS_PAGE = PREFIX + "cdt_error_parsers_page"; //$NON-NLS-1$ // Console view - public static final String CLEAR_CONSOLE_ACTION = PREFIX + "clear_console_action_context"; - public static final String CLEAR_CONSOLE_VIEW = PREFIX + "clear_console_view_context"; + public static final String CLEAR_CONSOLE_ACTION = PREFIX + "clear_console_action_context"; //$NON-NLS-1$ + public static final String CLEAR_CONSOLE_VIEW = PREFIX + "clear_console_view_context"; //$NON-NLS-1$ public static final String TOGGLE_PRESENTATION_ACTION = PREFIX + "toggle_presentation_action_context"; //$NON-NLS-1$ public static final String TOGGLE_TEXTHOVER_ACTION = PREFIX + "toggle_texthover_action_context"; //$NON-NLS-1$ @@ -59,7 +59,7 @@ public interface ICHelpContextIds { public static final String COPY_ACTION = PREFIX + "copy_action_context"; //$NON-NLS-1$ - public static final String PASTE_ACTION = PREFIX + "paste_action_context"; //$NON_NLS-1$ + public static final String PASTE_ACTION = PREFIX + "paste_action_context"; //$NON_NLS-1$ //$NON-NLS-1$ public static final String MOVE_ACTION = PREFIX + "move_action_context"; //$NON-NLS-1$ public static final String RENAME_ACTION = PREFIX + "rename_action_context"; //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleView.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleView.java index 8966f84f2f6..8719c4efbd4 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleView.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleView.java @@ -86,8 +86,8 @@ public class BuildConsoleView extends ViewPart implements ISelectionListener, IB IActionBars actionBars = getViewSite().getActionBars(); fClearOutputAction = new ClearConsoleAction(this); - fCopyAction = new BuildConsoleAction(bundle, "Editor.Copy.", fTextViewer, ITextOperationTarget.COPY); - fSelectAllAction = new BuildConsoleAction(bundle, "Editor.SelectAll.", fTextViewer, ITextOperationTarget.SELECT_ALL); + fCopyAction = new BuildConsoleAction(bundle, "Editor.Copy.", fTextViewer, ITextOperationTarget.COPY); //$NON-NLS-1$ + fSelectAllAction = new BuildConsoleAction(bundle, "Editor.SelectAll.", fTextViewer, ITextOperationTarget.SELECT_ALL); //$NON-NLS-1$ actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, fCopyAction); actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, fSelectAllAction); @@ -151,7 +151,7 @@ public class BuildConsoleView extends ViewPart implements ISelectionListener, IB String title = origTitle; IProject project = getProject(); if (project != null) { - title += " [" + project.getName() + "]"; + title += " [" + project.getName() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ } setTitle(title); } @@ -190,7 +190,7 @@ public class BuildConsoleView extends ViewPart implements ISelectionListener, IB * Initializes the context menu */ protected void initializeContextMenu(Control parent) { - MenuManager menuMgr = new MenuManager("#PopupMenu"); + MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$ menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ClearConsoleAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ClearConsoleAction.java index eb533fa7509..bd229947373 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ClearConsoleAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ClearConsoleAction.java @@ -23,10 +23,10 @@ public class ClearConsoleAction extends Action { public ClearConsoleAction(BuildConsoleView view) { - super(CUIPlugin.getResourceString("ClearOutputAction.label")); + super(CUIPlugin.getResourceString("ClearOutputAction.label")); //$NON-NLS-1$ CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_CLEAR_CONSOLE); fConsoleView= view; - setToolTipText(CUIPlugin.getResourceString("ClearOutputAction.tooltip")); + setToolTipText(CUIPlugin.getResourceString("ClearOutputAction.tooltip")); //$NON-NLS-1$ WorkbenchHelp.setHelp(this, ICHelpContextIds.CLEAR_CONSOLE_ACTION); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/AddIncludeOperation.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/AddIncludeOperation.java index bc46fea7f6f..9143dfbfb56 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/AddIncludeOperation.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/AddIncludeOperation.java @@ -100,9 +100,9 @@ public class AddIncludeOperation extends WorkspaceModifyOperation { if(toAdd.size() > 0) { // So we have our list. Now insert. - StringBuffer insert = new StringBuffer(""); + StringBuffer insert = new StringBuffer(""); //$NON-NLS-1$ for(int j = 0; j < toAdd.size(); j++) { - insert.append("#include <" + ((IRequiredInclude)toAdd.get(j)).getIncludeName() + ">\n"); + insert.append("#include <" + ((IRequiredInclude)toAdd.get(j)).getIncludeName() + ">\n"); //$NON-NLS-1$ //$NON-NLS-2$ } int pos; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/StubUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/StubUtility.java index 52497dcce96..6477f217205 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/StubUtility.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/codemanipulation/StubUtility.java @@ -19,18 +19,18 @@ public class StubUtility { * @see org.eclipse.jdt.ui.CodeGeneration#getTypeComment(ICompilationUnit, String, String) */ public static String getHeaderFileContent(ITranslationUnit cu, String typeComment, String typeContent, String lineDelimiter) throws CoreException { - return ""; + return ""; //$NON-NLS-1$ } /** * @see org.eclipse.jdt.ui.CodeGeneration#getTypeComment(ICompilationUnit, String, String) */ public static String getBodyFileContent(ITranslationUnit cu, String typeComment, String typeContent, String lineDelimiter) throws CoreException { - return ""; + return ""; //$NON-NLS-1$ } /* * @see org.eclipse.jdt.ui.CodeGeneration#getTypeComment(ICompilationUnit, String, String) */ public static String getClassComment(ITranslationUnit cu, String typeQualifiedName, String lineDelim) throws CoreException { - return ""; + return ""; //$NON-NLS-1$ } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CMergeViewer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CMergeViewer.java index 9e052265eb7..d1bd04f6513 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CMergeViewer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CMergeViewer.java @@ -24,7 +24,7 @@ import org.eclipse.jface.text.source.SourceViewer; public class CMergeViewer extends TextMergeViewer { - private static final String TITLE= "CMergeViewer.title"; + private static final String TITLE= "CMergeViewer.title"; //$NON-NLS-1$ public CMergeViewer(Composite parent, int styles, CompareConfiguration mp) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CParseTreeBuilder.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CParseTreeBuilder.java index 6c8f545f54d..cf8c4f1f111 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CParseTreeBuilder.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CParseTreeBuilder.java @@ -70,7 +70,7 @@ public class CParseTreeBuilder extends SourceElementRequestorAdapter { * @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterCompilationUnit(org.eclipse.cdt.core.parser.ast.IASTCompilationUnit) */ public void enterCompilationUnit(IASTCompilationUnit compilationUnit) { - push(ICElement.C_UNIT, "Translation Unit", 0); + push(ICElement.C_UNIT, "Translation Unit", 0); //$NON-NLS-1$ } /* (non-Javadoc) @@ -112,21 +112,21 @@ public class CParseTreeBuilder extends SourceElementRequestorAdapter { * @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateDeclaration(org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration) */ public void enterTemplateDeclaration(IASTTemplateDeclaration declaration) { - push(ICElement.C_TEMPLATE_VARIABLE, "export", declaration.getStartingOffset()); + push(ICElement.C_TEMPLATE_VARIABLE, "export", declaration.getStartingOffset()); //$NON-NLS-1$ } /* (non-Javadoc) * @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateInstantiation(org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation) */ public void enterTemplateInstantiation(IASTTemplateInstantiation instantiation) { - push(ICElement.C_TEMPLATE_VARIABLE, "template instanciation", instantiation.getStartingOffset()); + push(ICElement.C_TEMPLATE_VARIABLE, "template instantiation", instantiation.getStartingOffset()); //$NON-NLS-1$ } /* (non-Javadoc) * @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateSpecialization(org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization) */ public void enterTemplateSpecialization(IASTTemplateSpecialization specialization) { - push(ICElement.C_TEMPLATE_VARIABLE, "template specialization", specialization.getStartingOffset()); + push(ICElement.C_TEMPLATE_VARIABLE, "template specialization", specialization.getStartingOffset()); //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java index 04d545ba913..2e70c90dcd0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java @@ -36,7 +36,7 @@ import org.eclipse.jface.text.IDocument; */ public class CStructureCreator implements IStructureCreator { - private static final String NAME = "CStructureCreator.name"; + private static final String NAME = "CStructureCreator.name"; //$NON-NLS-1$ public CStructureCreator() { } @@ -66,7 +66,7 @@ public class CStructureCreator implements IStructureCreator { } Document doc = new Document(s); - CNode root = new CNode(null, ICElement.C_UNIT, "root", doc, 0, 0); + CNode root = new CNode(null, ICElement.C_UNIT, "root", doc, 0, 0); //$NON-NLS-1$ ISourceElementRequestor builder = new CParseTreeBuilder(root, doc); try { @@ -74,7 +74,7 @@ public class CStructureCreator implements IStructureCreator { //are bugs while parsing C files, we might want to create a separate Structure //compare for c files, but we'll never be completely right about .h files IScanner scanner = - ParserFactory.createScanner(new StringReader(s), "code", new ScannerInfo(), ParserMode.QUICK_PARSE, ParserLanguage.CPP, builder, new NullLogService()); + ParserFactory.createScanner(new StringReader(s), "code", new ScannerInfo(), ParserMode.QUICK_PARSE, ParserLanguage.CPP, builder, new NullLogService()); //$NON-NLS-1$ IParser parser = ParserFactory.createParser(scanner, builder, ParserMode.QUICK_PARSE, ParserLanguage.CPP, ParserUtil.getParserLogService() ); parser.parse(); } catch (Exception e) { 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 58841951c9c..891814b1ffb 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 @@ -36,8 +36,8 @@ public class BuildGroup extends CViewActionGroup { private BuildAction rebuildAction; // Menu tags for the build - final String BUILD_GROUP_MARKER = "buildGroup"; - final String BUILD_GROUP_MARKER_END = "end-buildGroup"; + final String BUILD_GROUP_MARKER = "buildGroup"; //$NON-NLS-1$ + final String BUILD_GROUP_MARKER_END = "end-buildGroup"; //$NON-NLS-1$ public BuildGroup(CView cview) { super(cview); 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 994e4cb5296..557a0f0760b 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 @@ -131,8 +131,8 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha static final String TAG_SORTER = "sorter"; //$NON-NLS-1$ //Menu tags - final String WORKING_GROUP_MARKER = "workingSetGroup"; - final String WORKING_GROUP_MARKER_END = "end-workingSetGroup"; + final String WORKING_GROUP_MARKER = "workingSetGroup"; //$NON-NLS-1$ + final String WORKING_GROUP_MARKER_END = "end-workingSetGroup"; //$NON-NLS-1$ private IPartListener partListener = new IPartListener() { @@ -730,19 +730,19 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha if (celement instanceof IBinaryContainer) { ICProject cproj = celement.getCProject(); if (cproj != null) { - return cproj.getPath() + " - binaries"; + return cproj.getPath() + CViewMessages.getString("CView.binaries"); //$NON-NLS-1$ } } else if (celement instanceof IArchiveContainer) { ICProject cproj = celement.getCProject(); if (cproj != null) { - return cproj.getPath() + " - archives"; + return cproj.getPath() + CViewMessages.getString("CView.archives"); //$NON-NLS-1$ } } else if (celement instanceof IBinaryModule) { IBinary bin = ((IBinaryModule) celement).getBinary(); - return bin.getPath() + ":" + celement.getElementName(); + return bin.getPath() + ":" + celement.getElementName(); //$NON-NLS-1$ } } else if (celement.getElementType() > ICElement.C_UNIT) { - return celement.getPath().toString() + " - [" + celement.getElementName() + "]"; + return celement.getPath().toString() + " - [" + celement.getElementName() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ } return celement.getElementName(); } else { @@ -750,7 +750,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha } } if (selection.size() > 1) { - return "StatusLine"; + return "StatusLine"; //$NON-NLS-1$ } return "";//$NON-NLS-1$ } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewDropAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewDropAdapter.java index acdef8208f7..ad7dee164db 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewDropAdapter.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewDropAdapter.java @@ -352,7 +352,7 @@ class CViewDropAdapter extends PluginDropAdapter implements IOverwriteQuery { */ public String queryOverwrite(String pathString) { final String returnCode[] = {CANCEL}; - final String msg = pathString + " " + CUIPlugin.getResourceString("CViewDragNDrop.txt") ; //$NON-NLS-1$ + final String msg = pathString + " " + CUIPlugin.getResourceString("CViewDragNDrop.txt") ; //$NON-NLS-1$ //$NON-NLS-2$ final String[] options = {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL}; getDisplay().syncExec(new Runnable() { public void run() { 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 f023aa6b1f2..6d6f5a74eb0 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 @@ -48,3 +48,12 @@ FileSearchAction.label=Search FilterSelectionAction.label= Filters ... ShowLibrariesAction.label = Show Reference Libs +DefaultAction.WIP=WIP +DefaultAction.workInProgress=Work In Progress +FilterSelectionAction.toolTip=Filter Selection Action +FilterSelectionAction.selectFilters=Select the filters to apply (matching files will be hidden): +FilterSelectionAction.title=C/C++ File Filters +CView.binaries=\ - binaries +CView.archives=\ - archives +ShowLibrariesAction.hideReferenced.tooltip=Hide Referenced Libs +ShowLibrariesAction.showReferenced.tooltip=Show Referenced Libs 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 ff7099d249e..02109c238c4 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 @@ -21,8 +21,8 @@ public class DefaultAction extends Action { public void run() { MessageBox errorMsg = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); - errorMsg.setText("WIP"); - errorMsg.setMessage ("Work In Progress"); + errorMsg.setText(CViewMessages.getString("DefaultAction.WIP")); //$NON-NLS-1$ + errorMsg.setMessage (CViewMessages.getString("DefaultAction.workInProgress")); //$NON-NLS-1$ errorMsg.open(); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/FilterSelectionAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/FilterSelectionAction.java index 51f77ec9e03..4eb7b64acfd 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/FilterSelectionAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/FilterSelectionAction.java @@ -34,7 +34,7 @@ class FilterSelectionAction extends SelectionProviderAction { */ public FilterSelectionAction(Shell shell, CView cview, String label) { super(cview.getViewer(), label); - setToolTipText("Filter Selection Action"); + setToolTipText(CViewMessages.getString("FilterSelectionAction.toolTip")); //$NON-NLS-1$ setEnabled(true); this.shell= shell; this.cview= cview; @@ -53,10 +53,10 @@ class FilterSelectionAction extends SelectionProviderAction { cview.getViewer(), contentProvider, new LabelProvider(), - "Select the filters to apply (matching files will be hidden):"); + CViewMessages.getString("FilterSelectionAction.selectFilters")); //$NON-NLS-1$ dialog.setInitialSelections(contentProvider.getInitialSelections()); - dialog.setTitle("C/C++ File Filters"); + dialog.setTitle(CViewMessages.getString("FilterSelectionAction.title")); //$NON-NLS-1$ dialog.open(); if (dialog.getReturnCode() == Window.OK) { Object[] results= dialog.getResult(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/ShowLibrariesAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/ShowLibrariesAction.java index 30b115c3d20..8169277de2f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/ShowLibrariesAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/ShowLibrariesAction.java @@ -62,8 +62,8 @@ class ShowLibrariesAction extends SelectionProviderAction { private void updateToolTipText() { CLibFilter filter = cview.getLibraryFilter(); if (filter.getShowLibraries()) - setToolTipText("Hide Referenced Libs"); + setToolTipText(CViewMessages.getString("ShowLibrariesAction.hideReferenced.tooltip")); //$NON-NLS-1$ else - setToolTipText("Show Referenced Libs"); + setToolTipText(CViewMessages.getString("ShowLibrariesAction.showReferenced.tooltip")); //$NON-NLS-1$ } } 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 d5f81ed56fb..a39fc594736 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 @@ -77,7 +77,7 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate { else if (editorInput instanceof IStorageEditorInput) unit = new CFileElementWorkingCopy((IStorageEditorInput)editorInput, provider); else - throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, "no Editor Input", null)); + throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, CEditorMessages.getString("AddIncludeOnSelectionAction.error.noInput"), null)); //$NON-NLS-1$ } catch (CoreException e) { CUIPlugin.getDefault().log(e.getStatus()); 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 bbe4fa83ede..5deb464d496 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 @@ -69,7 +69,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS private ActionGroup fSelectionSearchGroup; public CContentOutlinePage(CEditor editor) { - this("#TranslationUnitOutlinerContext", editor); + this("#TranslationUnitOutlinerContext", editor); //$NON-NLS-1$ } public CContentOutlinePage(String contextMenuID, CEditor editor) { @@ -150,7 +150,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS } if (FileSearchAction.canActionBeAdded(getSelection())) { - MenuManager fileSearch = new MenuManager("File Search"); + MenuManager fileSearch = new MenuManager(CEditorMessages.getString("CContentOutlinePage.menu.fileSearch")); //$NON-NLS-1$ fileSearch.add(fFileSearchAction); fileSearch.add(fFileSearchActionInWorkingSet); menu.add(fileSearch); @@ -213,7 +213,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS // If it is an IStorage it means that there is no underlying IFile. fInput = new CFileElementWorkingCopy((IStorageEditorInput)editorInput, provider); } else { - throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, "no Editor Input", null)); + throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, CEditorMessages.getString("CContentOutlinePage.error.noInput"), null)); //$NON-NLS-1$ } treeViewer.setInput(fInput); } catch (CoreException e) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java index 8ef4fd3ec1f..ab27c6d19ed 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java @@ -418,7 +418,7 @@ public class CDocumentProvider extends FileDocumentProvider { if (((IEditorInputDelegate) element).getDelegate() != null) return super.getStatus(((IEditorInputDelegate) element).getDelegate()); else - return new Status(IStatus.INFO,CUIPlugin.getPluginId(),0,"",null); + return new Status(IStatus.INFO,CUIPlugin.getPluginId(),0,"",null); //$NON-NLS-1$ } return super.getStatus(element); } 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 70a7199388f..ba24d1d5248 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 @@ -136,11 +136,11 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS private CEditorErrorTickUpdater fCEditorErrorTickUpdater; /* Preference key for matching brackets */ - public final static String MATCHING_BRACKETS = "matchingBrackets"; + public final static String MATCHING_BRACKETS = "matchingBrackets"; //$NON-NLS-1$ /* Preference key for matching brackets color */ - public final static String MATCHING_BRACKETS_COLOR = "matchingBracketsColor"; + public final static String MATCHING_BRACKETS_COLOR = "matchingBracketsColor"; //$NON-NLS-1$ /** Preference key for inserting spaces rather than tabs */ - public final static String SPACES_FOR_TABS = "spacesForTabs"; + public final static String SPACES_FOR_TABS = "spacesForTabs"; //$NON-NLS-1$ /** Preference key for linked position color */ public final static String LINKED_POSITION_COLOR = "linkedPositionColor"; //$NON-NLS-1$ @@ -456,18 +456,18 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS action = new ContentAssistAction(CEditorMessages.getResourceBundle(), "ContentAssistProposal.", this); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); - setAction("ContentAssistProposal", action); + setAction("ContentAssistProposal", action); //$NON-NLS-1$ markAsStateDependentAction("ContentAssistProposal", true); //$NON-NLS-1$ action = new TextOperationAction(CEditorMessages.getResourceBundle(), "ContentAssistTip.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION); //$NON-NLS-1$ action.setActionDefinitionId(ICEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION); - setAction("ContentAssistTip", action); + setAction("ContentAssistTip", action); //$NON-NLS-1$ setAction("AddIncludeOnSelection", new AddIncludeOnSelectionAction(this)); //$NON-NLS-1$ action = new OpenDeclarationsAction(this); action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_DECL); - setAction("OpenDeclarations", action); + setAction("OpenDeclarations", action); //$NON-NLS-1$ action = new ShowInCViewAction(this); action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_CVIEW); @@ -506,7 +506,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS } if (FileSearchAction.canActionBeAdded(getSelectionProvider().getSelection())) { - MenuManager fileSearch = new MenuManager("File Search"); + MenuManager fileSearch = new MenuManager(CEditorMessages.getString("CEditor.menu.fileSearch")); //$NON-NLS-1$ fileSearch.add(fFileSearchAction); fileSearch.add(fFileSearchActionInWorkingSet); search.add(fileSearch); @@ -701,7 +701,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS static class TabConverter implements ITextConverter { - private String fTabString = ""; + private String fTabString = ""; //$NON-NLS-1$ private int tabRatio = 0; public void setNumberOfSpacesPerTab(int ratio) { @@ -715,7 +715,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS public void customizeDocumentCommand(IDocument document, DocumentCommand command) { String text = command.text; StringBuffer buffer = new StringBuffer(); - final String TAB = "\t"; + final String TAB = "\t"; //$NON-NLS-1$ // create tokens including the tabs StringTokenizer tokens = new StringTokenizer(text, TAB, true); @@ -751,8 +751,8 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS }; /* Source code language to display */ - public final static String LANGUAGE_CPP = "CEditor.language.cpp"; - public final static String LANGUAGE_C = "CEditor.language.c"; + public final static String LANGUAGE_CPP = "CEditor.language.cpp"; //$NON-NLS-1$ + public final static String LANGUAGE_C = "CEditor.language.c"; //$NON-NLS-1$ /** * Adapted source viewer for CEditor @@ -840,9 +840,9 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) { // Figure out if this is a C or C++ source file String filename = getEditorInput().getName(); - boolean c_file = filename.endsWith(".c"); + boolean c_file = filename.endsWith(".c"); //$NON-NLS-1$ - if (!c_file && filename.endsWith(".h")) { + if (!c_file && filename.endsWith(".h")) { //$NON-NLS-1$ // ensure that this .h file is part of a C project & not a CPP project IFile file = getInputFile(); @@ -922,7 +922,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS * @see org.eclipse.ui.editors.text.TextEditor#initializeKeyBindingScopes() */ protected void initializeKeyBindingScopes() { - setKeyBindingScopes(new String [] { "org.eclipse.cdt.ui.cEditorScope" } ); + setKeyBindingScopes(new String [] { "org.eclipse.cdt.ui.cEditorScope" } ); //$NON-NLS-1$ } /* (non-Javadoc) 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 c3b611aa599..8aefb01a69a 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 @@ -94,22 +94,22 @@ public class CEditorActionContributor extends TextEditorActionContributor { ResourceBundle bundle = CEditorMessages.getResourceBundle(); - fShiftRight= new SelectionAction("ShiftRight.", ITextOperationTarget.SHIFT_RIGHT); + fShiftRight= new SelectionAction("ShiftRight.", ITextOperationTarget.SHIFT_RIGHT); //$NON-NLS-1$ fShiftRight.setActionDefinitionId(ICEditorActionDefinitionIds.SHIFT_RIGHT); CPluginImages.setImageDescriptors(fShiftRight, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SHIFT_RIGHT); - fShiftLeft= new SelectionAction("ShiftLeft.", ITextOperationTarget.SHIFT_LEFT); + fShiftLeft= new SelectionAction("ShiftLeft.", ITextOperationTarget.SHIFT_LEFT); //$NON-NLS-1$ fShiftLeft.setActionDefinitionId(ICEditorActionDefinitionIds.SHIFT_LEFT); CPluginImages.setImageDescriptors(fShiftLeft, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SHIFT_LEFT); - fContentAssist = new RetargetTextEditorAction(bundle, "ContentAssistProposal."); + fContentAssist = new RetargetTextEditorAction(bundle, "ContentAssistProposal."); //$NON-NLS-1$ fContentAssist.setActionDefinitionId(ICEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); CPluginImages.setImageDescriptors(fContentAssist, CPluginImages.T_TOOL, CPluginImages.IMG_MENU_COLLAPSE_ALL); - fAddInclude = new RetargetTextEditorAction(bundle, "AddIncludeOnSelection."); + fAddInclude = new RetargetTextEditorAction(bundle, "AddIncludeOnSelection."); //$NON-NLS-1$ fAddInclude.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_INCLUDE); - fOpenOnSelection = new RetargetTextEditorAction(bundle, "OpenOnSelection."); + fOpenOnSelection = new RetargetTextEditorAction(bundle, "OpenOnSelection."); //$NON-NLS-1$ // actions that are "contributed" to editors, they are considered belonging to the active editor fTogglePresentation= new TogglePresentationAction(); 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 4d858decf7a..286c61db0dd 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 @@ -11,7 +11,7 @@ import java.util.ResourceBundle; public class CEditorMessages { - private static final String RESOURCE_BUNDLE = "org.eclipse.cdt.internal.ui.editor.CEditorMessages"; + private static final String RESOURCE_BUNDLE = "org.eclipse.cdt.internal.ui.editor.CEditorMessages"; //$NON-NLS-1$ private static ResourceBundle fgResourceBundle = ResourceBundle.getBundle( RESOURCE_BUNDLE ); @@ -35,7 +35,7 @@ public class CEditorMessages } catch( MissingResourceException e ) { - return "!" + key + "!"; + return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ } } } 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 125d6da781d..1832c234da4 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 @@ -138,3 +138,10 @@ CompilationUnitDocumentProvider.out_of_sync.message=Compilation unit buffer and JavaEditor.Inspect.description=Inspect the result of evaluating the selected text JavaEditor.Inspect.label=I&nspect JavaEditor.Inspect.tooltip=Inspect the Result of Evaluating the Selected Text +AddIncludeOnSelectionAction.error.noInput=no Editor Input +DefaultCEditorTextHover.html.name=Name: +DefaultCEditorTextHover.html.prototype=
Protoype: +DefaultCEditorTextHover.html.description=
Description:
+CContentOutlinePage.menu.fileSearch=File Search +CContentOutlinePage.error.noInput=no Editor Input +CEditor.menu.fileSearch=File Search diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CMarkerAnnotation.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CMarkerAnnotation.java index 1cf2df4f909..3ca07f395ad 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CMarkerAnnotation.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CMarkerAnnotation.java @@ -97,7 +97,7 @@ public class CMarkerAnnotation extends MarkerAnnotation implements IProblemAnnot // otherwise we need to find the first one not inside of quotes int indexOfStringStart = pos; - final String QUOTE = "\""; + final String QUOTE = "\""; //$NON-NLS-1$ indexOfStringStart = text.indexOf(QUOTE, indexOfStringStart); int newPosition = -1; currentPosition = pos; // reinitialize currentPosition @@ -168,9 +168,9 @@ public class CMarkerAnnotation extends MarkerAnnotation implements IProblemAnnot if(line >= 0 && line == -1) { try { int position = fDocument.getLineOffset(line); - System.out.println("offset " + position); + System.out.println("offset " + position); //$NON-NLS-1$ String text = fDocument.get(position, fDocument.getLineLength(line)); - System.out.println("text:" + text); + System.out.println("text:" + text); //$NON-NLS-1$ } catch (BadLocationException e) {} } } @@ -194,8 +194,8 @@ public class CMarkerAnnotation extends MarkerAnnotation implements IProblemAnnot */ public String getMessage() { if (fIsProblemMarker) - return getMarker().getAttribute(IMarker.MESSAGE, ""); - return ""; + return getMarker().getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$ + return ""; //$NON-NLS-1$ } /** @@ -231,7 +231,7 @@ public class CMarkerAnnotation extends MarkerAnnotation implements IProblemAnnot * @see IProblemAnnotation#getArguments() */ public String[] getArguments() { - String [] s = {"problem", "here"}; + String [] s = {"problem", "here"}; //$NON-NLS-1$ //$NON-NLS-2$ //if (fIsProblemMarker) // return Util.getProblemArgumentsFromMarker(getMarker().getAttribute(CCorePlugin.C_PROBLEMMARKER)); return s; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTextEditorActionConstants.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTextEditorActionConstants.java index a19106d2852..bee696320c6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTextEditorActionConstants.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CTextEditorActionConstants.java @@ -12,13 +12,13 @@ public interface CTextEditorActionConstants extends IWorkbenchActionConstants { /** * Status category "input position". */ - static final String STATUS_CURSOR_POS= "CursorPosition"; + static final String STATUS_CURSOR_POS= "CursorPosition"; //$NON-NLS-1$ /** * Status category "input mode". */ - static final String STATUS_INPUT_MODE= "InputMode"; + static final String STATUS_INPUT_MODE= "InputMode"; //$NON-NLS-1$ } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultCEditorTextHover.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultCEditorTextHover.java index 02f79870b98..5837b4e4b5f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultCEditorTextHover.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultCEditorTextHover.java @@ -50,12 +50,12 @@ public class DefaultCEditorTextHover implements ITextHover IFunctionSummary fs = CCompletionContributorManager.getDefault().getFunctionInfo(expression); if(fs != null) { - buffer.append("Name: "); + buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.name")); //$NON-NLS-1$ buffer.append(HTMLPrinter.convertToHTMLContent(fs.getName())); - buffer.append("
Protoype: "); + buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.prototype")); //$NON-NLS-1$ buffer.append(HTMLPrinter.convertToHTMLContent(fs.getPrototype().getPrototypeString(false))); if(fs.getDescription() != null) { - buffer.append("
Description:
"); + buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.description")); //$NON-NLS-1$ //Don't convert this description since it could already be formatted buffer.append(fs.getDescription()); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchAction.java index 3182c305dd7..4dfa85406e7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchAction.java @@ -35,14 +35,14 @@ import org.eclipse.ui.PlatformUI; public class FileSearchAction extends Action { - private static final String PREFIX= "FileSearchAction."; + private static final String PREFIX= "FileSearchAction."; //$NON-NLS-1$ private ISelectionProvider fSelectionProvider; public FileSearchAction(ISelectionProvider provider) { - super(CUIPlugin.getResourceString(PREFIX + "label")); - setDescription(CUIPlugin.getResourceString(PREFIX + "description")); - setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); + super(CUIPlugin.getResourceString(PREFIX + "label")); //$NON-NLS-1$ + setDescription(CUIPlugin.getResourceString(PREFIX + "description")); //$NON-NLS-1$ + setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); //$NON-NLS-1$ if(provider instanceof CContentOutlinePage) { CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_OPEN_INCLUDE); @@ -85,7 +85,7 @@ public class FileSearchAction extends Action { // FIXME: For C/C++ not all files rely on extension to be C++ for String[] cexts = CoreModel.getDefault().getTranslationUnitExtensions(); for (int i = 0; i < cexts.length; i++) { - scope.addExtension("*." + cexts[i]); + scope.addExtension("*." + cexts[i]); //$NON-NLS-1$ } // scope.addExtension("*.c"); // scope.addExtension("*.h"); @@ -95,7 +95,7 @@ public class FileSearchAction extends Action { TextSearchOperation op= new TextSearchOperation( CUIPlugin.getWorkspace(), search_name, - "", + "", //$NON-NLS-1$ scope, col); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchActionInWorkingSet.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchActionInWorkingSet.java index 523171c6824..d7e9bafb5db 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchActionInWorkingSet.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/FileSearchActionInWorkingSet.java @@ -37,14 +37,14 @@ import org.eclipse.ui.PlatformUI; public class FileSearchActionInWorkingSet extends Action { - private static final String PREFIX= "FileSearchActionInWorkingSet."; + private static final String PREFIX= "FileSearchActionInWorkingSet."; //$NON-NLS-1$ private ISelectionProvider fSelectionProvider; public FileSearchActionInWorkingSet(ISelectionProvider provider) { - super(CUIPlugin.getResourceString(PREFIX + "label")); - setDescription(CUIPlugin.getResourceString(PREFIX + "description")); - setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); + super(CUIPlugin.getResourceString(PREFIX + "label")); //$NON-NLS-1$ + setDescription(CUIPlugin.getResourceString(PREFIX + "description")); //$NON-NLS-1$ + setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); //$NON-NLS-1$ if(provider instanceof CContentOutlinePage) { CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_OPEN_INCLUDE); @@ -90,13 +90,13 @@ public class FileSearchActionInWorkingSet extends Action { IResource[] result = new IResource[resourceList.size()]; resourceList.toArray(result); - SearchScope scope= new SearchScope("File Search",(IResource []) result); + SearchScope scope= new SearchScope("File Search",(IResource []) result); //$NON-NLS-1$ TextSearchOperation op= new TextSearchOperation( CUIPlugin.getWorkspace(), search_name, - "", + "", //$NON-NLS-1$ scope, col); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/LexicalSortingAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/LexicalSortingAction.java index b3d416ea79c..a65707f42c3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/LexicalSortingAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/LexicalSortingAction.java @@ -17,17 +17,17 @@ import org.eclipse.cdt.ui.CUIPlugin; public class LexicalSortingAction extends Action { - private static final String ACTION_NAME= "LexicalSortingAction"; - private static final String DIALOG_STORE_KEY= ACTION_NAME + ".sort"; + private static final String ACTION_NAME= "LexicalSortingAction"; //$NON-NLS-1$ + private static final String DIALOG_STORE_KEY= ACTION_NAME + ".sort"; //$NON-NLS-1$ private LexicalCSorter fSorter; private TreeViewer fTreeViewer; public LexicalSortingAction(TreeViewer treeViewer) { - super(CUIPlugin.getResourceString(ACTION_NAME + ".label")); + super(CUIPlugin.getResourceString(ACTION_NAME + ".label")); //$NON-NLS-1$ - setDescription(CUIPlugin.getResourceString(ACTION_NAME + ".description")); - setToolTipText(CUIPlugin.getResourceString(ACTION_NAME + ".tooltip")); + setDescription(CUIPlugin.getResourceString(ACTION_NAME + ".description")); //$NON-NLS-1$ + setToolTipText(CUIPlugin.getResourceString(ACTION_NAME + ".tooltip")); //$NON-NLS-1$ CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_ALPHA_SORTING); @@ -46,7 +46,7 @@ public class LexicalSortingAction extends Action { setChecked(on); fTreeViewer.setSorter(on ? fSorter : null); - String key= ACTION_NAME + ".tooltip" + (on ? ".on" : ".off"); + String key= ACTION_NAME + ".tooltip" + (on ? ".on" : ".off"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ setToolTipText(CUIPlugin.getResourceString(key)); if (store) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenDeclarationsAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenDeclarationsAction.java index 3001c73c13f..1be9532f051 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenDeclarationsAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenDeclarationsAction.java @@ -106,7 +106,7 @@ public class OpenDeclarationsAction extends Action implements IUpdate { try { ITextSelection selection= (ITextSelection) fEditor.getSelectionProvider().getSelection(); String sel = selection.getText(); - if (sel.equals("")) + if (sel.equals("")) //$NON-NLS-1$ { int selStart = selection.getOffset(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java index c4dd2af9d3d..bce4648a86b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java @@ -44,18 +44,18 @@ import org.eclipse.ui.PlatformUI; public class OpenIncludeAction extends Action { - private static final String PREFIX= "OpenIncludeAction."; + private static final String PREFIX= "OpenIncludeAction."; //$NON-NLS-1$ - private static final String DIALOG_TITLE= PREFIX + "dialog.title"; - private static final String DIALOG_MESSAGE= PREFIX + "dialog.message"; + private static final String DIALOG_TITLE= PREFIX + "dialog.title"; //$NON-NLS-1$ + private static final String DIALOG_MESSAGE= PREFIX + "dialog.message"; //$NON-NLS-1$ private ISelectionProvider fSelectionProvider; public OpenIncludeAction(ISelectionProvider provider) { - super(CUIPlugin.getResourceString(PREFIX + "label")); - setDescription(CUIPlugin.getResourceString(PREFIX + "description")); - setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); + super(CUIPlugin.getResourceString(PREFIX + "label")); //$NON-NLS-1$ + setDescription(CUIPlugin.getResourceString(PREFIX + "description")); //$NON-NLS-1$ + setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); //$NON-NLS-1$ CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_OPEN_INCLUDE); @@ -120,7 +120,7 @@ public class OpenIncludeAction extends Action { private void findFile(String[] includePaths, String name, ArrayList list) throws CoreException { for (int i = 0; i < includePaths.length; i++) { - IPath path = new Path(includePaths[i] + "/" + name); + IPath path = new Path(includePaths[i] + "/" + name); //$NON-NLS-1$ File file = path.toFile(); if (file.exists()) { list.add(path); @@ -154,7 +154,7 @@ public class OpenIncludeAction extends Action { public String getText(Object element) { if (element instanceof IPath) { IPath file= (IPath)element; - return file.lastSegment() + " - " + file.toString(); + return file.lastSegment() + " - " + file.toString(); //$NON-NLS-1$ } return super.getText(element); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SearchDialogAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SearchDialogAction.java index 215199e9d54..5c780976278 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SearchDialogAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SearchDialogAction.java @@ -30,17 +30,17 @@ import org.eclipse.ui.texteditor.ITextEditor; * Window>Preferences>Java>Code Generation>Code and Comments */ public class SearchDialogAction extends Action { - private static final String PREFIX= "SearchDialogAction."; - private static final String C_SEARCH_PAGE_ID= "org.eclipse.cdt.ui.CSearchPage"; + private static final String PREFIX= "SearchDialogAction."; //$NON-NLS-1$ + private static final String C_SEARCH_PAGE_ID= "org.eclipse.cdt.ui.CSearchPage"; //$NON-NLS-1$ private ISelectionProvider fSelectionProvider; private ITextEditor fEditor; private IWorkbenchWindow fWorkbenchWindow; public SearchDialogAction(ISelectionProvider provider, CEditor editor) { - super(CUIPlugin.getResourceString(PREFIX + "label")); - setDescription(CUIPlugin.getResourceString(PREFIX + "description")); - setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); + super(CUIPlugin.getResourceString(PREFIX + "label")); //$NON-NLS-1$ + setDescription(CUIPlugin.getResourceString(PREFIX + "description")); //$NON-NLS-1$ + setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); //$NON-NLS-1$ if(provider instanceof CContentOutlinePage) { setImageDescriptor( CPluginImages.DESC_OBJS_CSEARCH ); @@ -52,9 +52,9 @@ public class SearchDialogAction extends Action { public SearchDialogAction(ISelectionProvider provider, IWorkbenchWindow window) { - super(CUIPlugin.getResourceString(PREFIX + "label")); - setDescription(CUIPlugin.getResourceString(PREFIX + "description")); - setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); + super(CUIPlugin.getResourceString(PREFIX + "label")); //$NON-NLS-1$ + setDescription(CUIPlugin.getResourceString(PREFIX + "description")); //$NON-NLS-1$ + setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); //$NON-NLS-1$ if(provider instanceof CContentOutlinePage) { setImageDescriptor( CPluginImages.DESC_OBJS_CSEARCH ); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java index 24525b976cf..1bf6ba84d50 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java @@ -32,17 +32,17 @@ import org.eclipse.jface.util.PropertyChangeEvent; public final class AsmCodeScanner extends AbstractCScanner { private static String[] fgKeywords= { - ".set", ".section", - ".global",".file", - ".extern", ".macro", ".endm", - ".if", ".ifdef", ".ifndef", ".else", ".endif", - ".include", ".globl", - ".text",".data", ".rodata", ".common", ".debug", ".ctor", ".dtor", - ".ascii", ".asciz", ".byte", ".long", ".size", ".align", ".type" + ".set", ".section", //$NON-NLS-1$ //$NON-NLS-2$ + ".global",".file", //$NON-NLS-1$ //$NON-NLS-2$ + ".extern", ".macro", ".endm", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + ".if", ".ifdef", ".ifndef", ".else", ".endif", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + ".include", ".globl", //$NON-NLS-1$ //$NON-NLS-2$ + ".text",".data", ".rodata", ".common", ".debug", ".ctor", ".dtor", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ + ".ascii", ".asciz", ".byte", ".long", ".size", ".align", ".type" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ }; - private static String[] fgTypes= { "char", "double", "float", "int", "long", "short", "signed", "unsigned", "void"}; + private static String[] fgTypes= { "char", "double", "float", "int", "long", "short", "signed", "unsigned", "void"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ private static String[] fgTokenProperties= { ICColorConstants.C_KEYWORD, @@ -78,11 +78,11 @@ public final class AsmCodeScanner extends AbstractCScanner { Token token= getToken(ICColorConstants.C_SINGLE_LINE_COMMENT); // Add rule for single line comments. - rules.add(new EndOfLineRule("#", token)); + rules.add(new EndOfLineRule("#", token)); //$NON-NLS-1$ token= getToken(ICColorConstants.C_STRING); // Add rule for strings and character constants. - rules.add(new SingleLineRule("'", "'", token, '\\')); + rules.add(new SingleLineRule("'", "'", token, '\\')); //$NON-NLS-1$ //$NON-NLS-2$ //rules.add(new SingleLineRule("\"", "\"", token, '\\')); Token other= getToken(ICColorConstants.C_DEFAULT); @@ -111,7 +111,7 @@ public final class AsmCodeScanner extends AbstractCScanner { return fDefaultToken; } else { fBuffer.append((char) c); - IToken token= (IToken) fWords.get(":"); + IToken token= (IToken) fWords.get(":"); //$NON-NLS-1$ if (token != null) return token; } @@ -145,7 +145,7 @@ public final class AsmCodeScanner extends AbstractCScanner { }; token= getToken(ICColorConstants.C_TYPE); - labelRule.addWord(":", token); + labelRule.addWord(":", token); //$NON-NLS-1$ //wordRule.setColumnConstraint(0); rules.add(labelRule); @@ -158,7 +158,7 @@ public final class AsmCodeScanner extends AbstractCScanner { rules.add(wordRule); token= getToken(ICColorConstants.C_KEYWORD); - WordPatternRule regPattern = new WordPatternRule(new AsmWordDetector('%', (char)0), "%", null, token); + WordPatternRule regPattern = new WordPatternRule(new AsmWordDetector('%', (char)0), "%", null, token); //$NON-NLS-1$ rules.add(regPattern); setDefaultReturnToken(getToken(ICColorConstants.C_DEFAULT)); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmPartitionScanner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmPartitionScanner.java index 808439bf0d2..21c629921c9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmPartitionScanner.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmPartitionScanner.java @@ -111,19 +111,19 @@ public class AsmPartitionScanner extends RuleBasedPartitionScanner { // Add rule for single line comments. - rules.add(new EndOfLineRule("//", single_comment)); + rules.add(new EndOfLineRule("//", single_comment)); //$NON-NLS-1$ rules.add(new EndOfLineRule("#", single_comment)); //$NON-NLS-1$ // Add rule for strings and character constants. - rules.add(new SingleLineRule("\"", "\"", string, '\\')); - rules.add(new SingleLineRule("'", "'", string, '\\')); + rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-1$ //$NON-NLS-2$ + rules.add(new SingleLineRule("'", "'", string, '\\')); //$NON-NLS-1$ //$NON-NLS-2$ EmptyCommentRule wordRule= new EmptyCommentRule(comment); rules.add(wordRule); // Add rules for multi-line comments. - rules.add(new MultiLineRule("/*", "*/", comment)); + rules.add(new MultiLineRule("/*", "*/", comment)); //$NON-NLS-1$ //$NON-NLS-2$ IPredicateRule[] result= new IPredicateRule[rules.size()]; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeAction.java index 3155a1c995f..3214ded16bb 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeAction.java @@ -123,7 +123,7 @@ public class OpenTypeAction implements IWorkbenchWindowActionDelegate { // could not find definition String path= selection.getFilePath(); if (path == null || path.length() == 0) - path= "Unknown"; + path= OpenTypeMessages.getString("TypeSelectionDialog.unknown"); //$NON-NLS-1$ String title= OpenTypeMessages.getString("TypeSelectionDialog.errorTitle"); //$NON-NLS-1$ String message= OpenTypeMessages.getFormattedString("TypeSelectionDialog.dialogMessage", path); //$NON-NLS-1$ MessageDialog.openError(parent, title, message); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeMessages.properties index 709ccf7dab5..3d89de1668f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/OpenTypeMessages.properties @@ -39,3 +39,4 @@ TypeSelectionDialog.error3Title=Exception TypeInfoLabelProvider.default_filename=default TypeInfoLabelProvider.dash=\ - TypeInfoLabelProvider.colon=\ : +TypeSelectionDialog.unknown=Unknown diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchMatch.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchMatch.java index 0e1ff7673b4..fb4f55ce040 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchMatch.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchMatch.java @@ -77,7 +77,7 @@ public class TypeSearchMatch extends BasicSearchMatch if (parentName != null && parentName.length() > 0) { buf.append(OpenTypeMessages.getString("TypeInfoLabelProvider.colon")); //$NON-NLS-1$ buf.append(parentName); - buf.append("::"); + buf.append("::"); //$NON-NLS-1$ } String name = getName(); if (name != null && name.length() > 0) @@ -122,7 +122,7 @@ public class TypeSearchMatch extends BasicSearchMatch String parentName = getParentName(); while (parentElement != null && parentName != null && parentName.length() > 0) { - int pos = parentName.indexOf("::"); + int pos = parentName.indexOf("::"); //$NON-NLS-1$ if (pos >= 0) { parentElement = findCElement(parentElement, parentName.substring(0, pos)); parentName = parentName.substring(pos + 2); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchOperation.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchOperation.java index b7d4840e020..09089454c8f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchOperation.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/opentype/TypeSearchOperation.java @@ -35,16 +35,16 @@ public class TypeSearchOperation implements IRunnableWithProgress { // search for namespaces, classes, structs, unions, enums and typedefs pattern = new OrPattern(); - pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.TYPE, ICSearchConstants.DECLARATIONS, false)); + pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.TYPE, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ pattern.addPattern( - SearchEngine.createSearchPattern("*", ICSearchConstants.NAMESPACE, ICSearchConstants.DECLARATIONS, false)); - pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.CLASS, ICSearchConstants.DECLARATIONS, false)); - pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.STRUCT, ICSearchConstants.DECLARATIONS, false)); + SearchEngine.createSearchPattern("*", ICSearchConstants.NAMESPACE, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ + pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.CLASS, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ + pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.STRUCT, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ pattern.addPattern( - SearchEngine.createSearchPattern("*", ICSearchConstants.CLASS_STRUCT, ICSearchConstants.DECLARATIONS, false)); - pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.UNION, ICSearchConstants.DECLARATIONS, false)); - pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.ENUM, ICSearchConstants.DECLARATIONS, false)); - pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.TYPEDEF, ICSearchConstants.DECLARATIONS, false)); + SearchEngine.createSearchPattern("*", ICSearchConstants.CLASS_STRUCT, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ + pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.UNION, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ + pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.ENUM, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ + pattern.addPattern(SearchEngine.createSearchPattern("*", ICSearchConstants.TYPEDEF, ICSearchConstants.DECLARATIONS, false)); //$NON-NLS-1$ } public void run(IProgressMonitor monitor) throws InterruptedException { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java index 767bb2d03c0..407f6e49c69 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java @@ -20,17 +20,17 @@ import org.eclipse.ui.IWorkbenchPreferencePage; public class BuildConsolePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - public static final String PREF_CONSOLE_FONT = "consoleFont"; - private static final String PREF_CLEAR_CONSOLE = "clearConsole"; - private static final String PREF_CONSOLE_ON_TOP = "consoleOnTop"; - private static final String PREF_AUTO_OPEN_CONSOLE = "autoOpenConsole"; - public static final String PREF_BUILDCONSOLE_LINES = "buildConsoleLines"; + public static final String PREF_CONSOLE_FONT = "consoleFont"; //$NON-NLS-1$ + private static final String PREF_CLEAR_CONSOLE = "clearConsole"; //$NON-NLS-1$ + private static final String PREF_CONSOLE_ON_TOP = "consoleOnTop"; //$NON-NLS-1$ + private static final String PREF_AUTO_OPEN_CONSOLE = "autoOpenConsole"; //$NON-NLS-1$ + public static final String PREF_BUILDCONSOLE_LINES = "buildConsoleLines"; //$NON-NLS-1$ public static final String PREF_BUILDCONSOLE_LINES_ERROR = "CBasePreferencePage.buildConsole.errorMessage"; //$NON-NLS-1$ - private static final String CLEAR_CONSOLE_LABEL= "CBasePreferencePage.clearConsole.label"; - private static final String CONSOLE_ON_TOP_LABEL= "CBasePreferencePage.consoleOnTop.label"; - private static final String AUTO_OPEN_CONSOLE_LABEL= "CBasePreferencePage.autoOpenConsole.label"; - private static final String CONSOLE_FONT_LABEL= "CBasePreferencePage.consoleFont.label"; + private static final String CLEAR_CONSOLE_LABEL= "CBasePreferencePage.clearConsole.label"; //$NON-NLS-1$ + private static final String CONSOLE_ON_TOP_LABEL= "CBasePreferencePage.consoleOnTop.label"; //$NON-NLS-1$ + private static final String AUTO_OPEN_CONSOLE_LABEL= "CBasePreferencePage.autoOpenConsole.label"; //$NON-NLS-1$ + private static final String CONSOLE_FONT_LABEL= "CBasePreferencePage.consoleFont.label"; //$NON-NLS-1$ public BuildConsolePreferencePage() { super(GRID); @@ -50,7 +50,7 @@ public class BuildConsolePreferencePage extends FieldEditorPreferencePage implem new BooleanFieldEditor(PREF_CONSOLE_ON_TOP, CUIPlugin.getResourceString(CONSOLE_ON_TOP_LABEL), parent); addField(consoleOnTop); - IntegerFieldEditor buildCount = new IntegerFieldEditor( PREF_BUILDCONSOLE_LINES, "&Build console lines: ", parent ); + IntegerFieldEditor buildCount = new IntegerFieldEditor( PREF_BUILDCONSOLE_LINES, PreferencesMessages.getString("BuildConsolePreferencePage.fieldEditors.buildConsoleLines"), parent ); //$NON-NLS-1$ buildCount.setErrorMessage(CUIPlugin.getResourceString(PREF_BUILDCONSOLE_LINES_ERROR)); buildCount.setValidRange( 10, Integer.MAX_VALUE ); addField( buildCount ); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java index c5d6d27054d..0f8969b20d5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java @@ -70,13 +70,13 @@ import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor; */ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { - protected final String[][] fListModel = new String[][] { { "Multi-line comment", ICColorConstants.C_MULTI_LINE_COMMENT }, { - "Single-line comment", ICColorConstants.C_SINGLE_LINE_COMMENT }, { - "Keywords", ICColorConstants.C_KEYWORD }, { - "Built-in types", ICColorConstants.C_TYPE }, { - "Strings", ICColorConstants.C_STRING }, { - "Others", ICColorConstants.C_DEFAULT }, { - PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags"), PreferenceConstants.EDITOR_TASK_TAG_COLOR } + protected final String[][] fListModel = new String[][] { { PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags.MultiLine"), ICColorConstants.C_MULTI_LINE_COMMENT }, { //$NON-NLS-1$ + PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags.singleLine"), ICColorConstants.C_SINGLE_LINE_COMMENT }, { //$NON-NLS-1$ + PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags.keywords"), ICColorConstants.C_KEYWORD }, { //$NON-NLS-1$ + PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags.builtInTypes"), ICColorConstants.C_TYPE }, { //$NON-NLS-1$ + PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags.strings"), ICColorConstants.C_STRING }, { //$NON-NLS-1$ + PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags.others"), ICColorConstants.C_DEFAULT }, { //$NON-NLS-1$ + PreferencesMessages.getString("CEditorPreferencePage.cCommentTaskTags"), PreferenceConstants.EDITOR_TASK_TAG_COLOR } //$NON-NLS-1$ }; protected final String[][] fAppearanceColorListModel = new String[][] { { "Line number color", ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR }, //$NON-NLS-1$ @@ -141,7 +141,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP private Button fShowInTextCheckBox; public CEditorPreferencePage() { - setDescription(CUIPlugin.getResourceString("CEditorPreferencePage.description")); + setDescription(CUIPlugin.getResourceString("CEditorPreferencePage.description")); //$NON-NLS-1$ setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore()); MarkerAnnotationPreferences preferences = new MarkerAnnotationPreferences(); fAnnotationColorListModel = createAnnotationTypeListModel(preferences); @@ -164,17 +164,17 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,CEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, CSourceViewerConfiguration.PREFERENCE_TAB_WIDTH)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICColorConstants.C_MULTI_LINE_COMMENT)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_MULTI_LINE_COMMENT + "_bold")); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_MULTI_LINE_COMMENT + "_bold")); //$NON-NLS-1$ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICColorConstants.C_SINGLE_LINE_COMMENT)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_SINGLE_LINE_COMMENT + "_bold")); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_SINGLE_LINE_COMMENT + "_bold")); //$NON-NLS-1$ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICColorConstants.C_KEYWORD)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_KEYWORD + "_bold")); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_KEYWORD + "_bold")); //$NON-NLS-1$ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICColorConstants.C_TYPE)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_TYPE + "_bold")); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_TYPE + "_bold")); //$NON-NLS-1$ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICColorConstants.C_STRING)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_STRING + "_bold")); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_STRING + "_bold")); //$NON-NLS-1$ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICColorConstants.C_DEFAULT)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_DEFAULT + "_bold")); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ICColorConstants.C_DEFAULT + "_bold")); //$NON-NLS-1$ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CEditor.MATCHING_BRACKETS_COLOR)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CEditor.MATCHING_BRACKETS)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR)); @@ -251,22 +251,22 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP store.setDefault(CEditor.SPACES_FOR_TABS, false); PreferenceConverter.setDefault(store, ICColorConstants.C_MULTI_LINE_COMMENT, new RGB(63, 127, 95)); - store.setDefault(ICColorConstants.C_MULTI_LINE_COMMENT + "_bold", false); + store.setDefault(ICColorConstants.C_MULTI_LINE_COMMENT + "_bold", false); //$NON-NLS-1$ PreferenceConverter.setDefault(store, ICColorConstants.C_SINGLE_LINE_COMMENT, new RGB(63, 125, 95)); - store.setDefault(ICColorConstants.C_SINGLE_LINE_COMMENT + "_bold", false); + store.setDefault(ICColorConstants.C_SINGLE_LINE_COMMENT + "_bold", false); //$NON-NLS-1$ PreferenceConverter.setDefault(store, ICColorConstants.C_KEYWORD, new RGB(127, 0, 85)); - store.setDefault(ICColorConstants.C_KEYWORD + "_bold", true); + store.setDefault(ICColorConstants.C_KEYWORD + "_bold", true); //$NON-NLS-1$ PreferenceConverter.setDefault(store, ICColorConstants.C_TYPE, new RGB(127, 0, 85)); - store.setDefault(ICColorConstants.C_TYPE + "_bold", true); + store.setDefault(ICColorConstants.C_TYPE + "_bold", true); //$NON-NLS-1$ PreferenceConverter.setDefault(store, ICColorConstants.C_STRING, new RGB(42, 0, 255)); - store.setDefault(ICColorConstants.C_STRING + "_bold", false); + store.setDefault(ICColorConstants.C_STRING + "_bold", false); //$NON-NLS-1$ PreferenceConverter.setDefault(store, ICColorConstants.C_DEFAULT, new RGB(0, 0, 0)); - store.setDefault(ICColorConstants.C_DEFAULT + "_bold", false); + store.setDefault(ICColorConstants.C_DEFAULT + "_bold", false); //$NON-NLS-1$ PreferenceConverter.setDefault(store, CEditor.LINKED_POSITION_COLOR, new RGB(0, 200, 100)); @@ -311,7 +311,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP String key = fListModel[i][1]; RGB rgb = PreferenceConverter.getColor(fOverlayStore, key); fForegroundColorEditor.setColorValue(rgb); - fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + "_bold")); + fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + "_bold")); //$NON-NLS-1$ } private Control createAnnotationsPage(Composite parent) { @@ -321,7 +321,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP composite.setLayout(layout); Label label = new Label(composite, SWT.LEFT); - label.setText("Annotation Presentation Options"); + label.setText(PreferencesMessages.getString("CEditorPreferencePage.annotationsPage.presentationOptions")); //$NON-NLS-1$ GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -350,21 +350,21 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP optionsComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); fShowInTextCheckBox = new Button(optionsComposite, SWT.CHECK); - fShowInTextCheckBox.setText("Show In Text"); + fShowInTextCheckBox.setText(PreferencesMessages.getString("CEditorPreferencePage.annotationsPage.showInText")); //$NON-NLS-1$ gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment = GridData.BEGINNING; gd.horizontalSpan = 2; fShowInTextCheckBox.setLayoutData(gd); fShowInOverviewRulerCheckBox = new Button(optionsComposite, SWT.CHECK); - fShowInOverviewRulerCheckBox.setText("Show In Overview Ruler"); + fShowInOverviewRulerCheckBox.setText(PreferencesMessages.getString("CEditorPreferencePage.annotationsPage.showInOverview")); //$NON-NLS-1$ gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalAlignment = GridData.BEGINNING; gd.horizontalSpan = 2; fShowInOverviewRulerCheckBox.setLayoutData(gd); label = new Label(optionsComposite, SWT.LEFT); - label.setText("Annotations Color"); + label.setText(PreferencesMessages.getString("CEditorPreferencePage.annotationsPage.color")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalAlignment = GridData.BEGINNING; label.setLayoutData(gd); @@ -469,7 +469,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP backgroundComposite.setLayout(layout); Label label = new Label(backgroundComposite, SWT.NULL); - label.setText("Bac&kground Color:"); + label.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.backgroundColor")); //$NON-NLS-1$ GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -485,14 +485,14 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP }; fBackgroundDefaultRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT); - fBackgroundDefaultRadioButton.setText("S&ystem Default"); + fBackgroundDefaultRadioButton.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.systemDefault")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalSpan = 2; fBackgroundDefaultRadioButton.setLayoutData(gd); fBackgroundDefaultRadioButton.addSelectionListener(backgroundSelectionListener); fBackgroundCustomRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT); - fBackgroundCustomRadioButton.setText("C&ustom"); + fBackgroundCustomRadioButton.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.custom")); //$NON-NLS-1$ fBackgroundCustomRadioButton.addSelectionListener(backgroundSelectionListener); fBackgroundColorEditor = new ColorEditor(backgroundComposite); @@ -502,7 +502,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP fBackgroundColorButton.setLayoutData(gd); label = new Label(colorComposite, SWT.LEFT); - label.setText("Fo®round:"); + label.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.foreground")); //$NON-NLS-1$ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite editorComposite = new Composite(colorComposite, SWT.NULL); @@ -528,7 +528,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); label = new Label(stylesComposite, SWT.LEFT); - label.setText("C&olor:"); + label.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.color")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalAlignment = GridData.BEGINNING; label.setLayoutData(gd); @@ -540,7 +540,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP foregroundColorButton.setLayoutData(gd); label = new Label(stylesComposite, SWT.LEFT); - label.setText("&Bold:"); + label.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.bold")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalAlignment = GridData.BEGINNING; label.setLayoutData(gd); @@ -551,7 +551,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP fBoldCheckBox.setLayoutData(gd); label = new Label(colorComposite, SWT.LEFT); - label.setText("Preview:"); + label.setText(PreferencesMessages.getString("CEditorPreferencePage.colorPage.preview")); //$NON-NLS-1$ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Control previewer = createPreviewer(colorComposite); @@ -600,7 +600,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP public void widgetSelected(SelectionEvent e) { int i = fList.getSelectionIndex(); String key = fListModel[i][1]; - fOverlayStore.setValue(key + "_bold", fBoldCheckBox.getSelection()); + fOverlayStore.setValue(key + "_bold", fBoldCheckBox.getSelection()); //$NON-NLS-1$ } }); @@ -619,7 +619,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP initializeViewerColors(fPreviewViewer); - String content = loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); + String content = loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); //$NON-NLS-1$ IDocument document = new Document(content); IDocumentPartitioner partitioner = fCTextTools.createDocumentPartitioner(); partitioner.connect(document); @@ -727,31 +727,31 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP layout.numColumns = 2; behaviorComposite.setLayout(layout); - String label = "Text &font:"; + String label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.textFont"); //$NON-NLS-1$ addTextFontEditor(behaviorComposite, label, JFaceResources.TEXT_FONT); - label = "Displayed &tab width:"; + label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.tabWidth"); //$NON-NLS-1$ addTextField(behaviorComposite, label, CSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 2, 0, true); - label = "Print margin col&umn:"; + label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.marginColumn"); //$NON-NLS-1$ addTextField(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 4, 0, true); - label = "Insert &space for tabs"; + label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.tabSpace"); //$NON-NLS-1$ addCheckBox(behaviorComposite, label, CEditor.SPACES_FOR_TABS, 0); - label = "Highlight &matching brackets"; + label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.matchingBrackets"); //$NON-NLS-1$ fBracketHighlightButton = addCheckBox(behaviorComposite, label, CEditor.MATCHING_BRACKETS, 0); label = "Show line numbers"; //$NON-NLS-1$ addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, 0); - label = "Highlight ¤t line"; + label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.highlightLine"); //$NON-NLS-1$ fLineHighlightButton = addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0); label = "Show overview ruler"; //$NON-NLS-1$ addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, 0); - label = "Show print &margin"; + label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.printMargin"); //$NON-NLS-1$ addCheckBox(behaviorComposite, label, ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0); Label l = new Label(behaviorComposite, SWT.LEFT); @@ -834,47 +834,47 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& // The following three radio buttons are grouped together - String label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupTitle"); + String label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupTitle"); //$NON-NLS-1$ Group searchGroup = addGroupBox(contentAssistComposite, label, 2); - label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupCurrentFileOption"); + label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupCurrentFileOption"); //$NON-NLS-1$ addRadioButton(searchGroup, label, ContentAssistPreference.CURRENT_FILE_SEARCH_SCOPE, 0); - label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupCurrentProjectOption"); + label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupCurrentProjectOption"); //$NON-NLS-1$ addRadioButton(searchGroup, label, ContentAssistPreference.PROJECT_SEARCH_SCOPE, 0); //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.insertSingleProposalAutomatically"); + label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.insertSingleProposalAutomatically"); //$NON-NLS-1$ addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0); - label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.showProposalsInAlphabeticalOrder"); + label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.showProposalsInAlphabeticalOrder"); //$NON-NLS-1$ addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0); //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& // The following items are grouped for Auto Activation - label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationGroupTitle"); + label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationGroupTitle"); //$NON-NLS-1$ Group enableGroup = addGroupBox(contentAssistComposite, label, 2); - label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationEnableDot"); + label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationEnableDot"); //$NON-NLS-1$ addCheckBox(enableGroup, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_DOT, 0); - label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationEnableArrow"); + label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationEnableArrow"); //$NON-NLS-1$ addCheckBox(enableGroup, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_ARROW, 0); - label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationEnableDoubleColon"); + label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationEnableDoubleColon"); //$NON-NLS-1$ addCheckBox(enableGroup, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_DOUBLECOLON, 0); - label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationDelay"); + label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.autoActivationDelay"); //$NON-NLS-1$ addTextField(enableGroup, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0, true); //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.completionProposalBackgroundColor"); + label = PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.completionProposalBackgroundColor"); //$NON-NLS-1$ addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0); - label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.completionProposalForegroundColor"); + label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.completionProposalForegroundColor"); //$NON-NLS-1$ addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0); // label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.parameterBackgroundColor"); @@ -901,22 +901,22 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP folder.setLayoutData(new GridData(GridData.FILL_BOTH)); TabItem item = new TabItem(folder, SWT.NONE); - item.setText(PreferencesMessages.getString("CEditorPreferencePage.generalTabTitle")); + item.setText(PreferencesMessages.getString("CEditorPreferencePage.generalTabTitle")); //$NON-NLS-1$ item.setImage(CPluginImages.get(CPluginImages.IMG_OBJS_TUNIT)); item.setControl(createBehaviorPage(folder)); item = new TabItem(folder, SWT.NONE); item.setImage(CPluginImages.get(CPluginImages.IMG_OBJS_TUNIT)); - item.setText(PreferencesMessages.getString("CEditorPreferencePage.annotationTabTitle")); + item.setText(PreferencesMessages.getString("CEditorPreferencePage.annotationTabTitle")); //$NON-NLS-1$ item.setControl(createAnnotationsPage(folder)); item = new TabItem(folder, SWT.NONE); - item.setText(PreferencesMessages.getString("CEditorPreferencePage.colorsTabTitle")); + item.setText(PreferencesMessages.getString("CEditorPreferencePage.colorsTabTitle")); //$NON-NLS-1$ item.setImage(CPluginImages.get(CPluginImages.IMG_OBJS_TUNIT)); item.setControl(createColorPage(folder)); item = new TabItem(folder, SWT.NONE); - item.setText(PreferencesMessages.getString("CEditorPreferencePage.contentAssistTabTitle")); + item.setText(PreferencesMessages.getString("CEditorPreferencePage.contentAssistTabTitle")); //$NON-NLS-1$ item.setImage(CPluginImages.get(CPluginImages.IMG_OBJS_TUNIT)); item.setControl(createContentAssistPage(folder)); @@ -1149,7 +1149,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP layout.numColumns = 3; editorComposite.setLayout(layout); fFontEditor = new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite); - fFontEditor.setChangeButtonText("C&hange..."); + fFontEditor.setChangeButtonText(PreferencesMessages.getString("CEditorPreferencePage.textFont.changeButton")); //$NON-NLS-1$ GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java index b53b8997501..9d9d53c68dc 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java @@ -23,9 +23,9 @@ import org.eclipse.ui.help.WorkbenchHelp; public class CPluginPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - private static final String LINK_TO_EDITOR_LABEL= "CBasePreferencePage.linkToEditor.label"; - private static final String SHOW_CU_CHILDREN_LABEL= "CBasePreferencePage.CUChildren.label"; - private static final String USE_STRUCTURAL_PARSE_MODE_LABEL= "CBasePreferencePage.OutlineView.structuralParseMode.label"; + private static final String LINK_TO_EDITOR_LABEL= "CBasePreferencePage.linkToEditor.label"; //$NON-NLS-1$ + private static final String SHOW_CU_CHILDREN_LABEL= "CBasePreferencePage.CUChildren.label"; //$NON-NLS-1$ + private static final String USE_STRUCTURAL_PARSE_MODE_LABEL= "CBasePreferencePage.OutlineView.structuralParseMode.label"; //$NON-NLS-1$ public CPluginPreferencePage() { super(GRID); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OverlayPreferenceStore.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OverlayPreferenceStore.java index 093c549d997..19ac6ca2bcc 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OverlayPreferenceStore.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OverlayPreferenceStore.java @@ -176,7 +176,7 @@ public class OverlayPreferenceStore implements IPreferenceStore { } else if (STRING == d) { if (forceInitialization) - target.setValue(key.fKey, "1"); + target.setValue(key.fKey, "1"); //$NON-NLS-1$ target.setValue(key.fKey, orgin.getString(key.fKey)); target.setDefault(key.fKey, orgin.getDefaultString(key.fKey)); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties index 07d25cf4316..5b443b5afc7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties @@ -85,3 +85,30 @@ CEditorPreferencePage.ContentAssistPage.completionProposalForegroundColor=&Foreg CEditorPreferencePage.ContentAssistPage.parameterBackgroundColor=Bac&kground for method parameters: CEditorPreferencePage.ContentAssistPage.parameterForegroundColor=Fo®round for method parameters: CEditorPreferencePage.ContentAssistPage.autoActivationEnableDoubleColon=Enable "::" as trigger +CEditorPreferencePage.cCommentTaskTags.MultiLine=Multi-line comment +CEditorPreferencePage.cCommentTaskTags.singleLine=Single-line comment +CEditorPreferencePage.cCommentTaskTags.keywords=Keywords +CEditorPreferencePage.cCommentTaskTags.builtInTypes=Built-in types +CEditorPreferencePage.cCommentTaskTags.strings=Strings +CEditorPreferencePage.cCommentTaskTags.others=Others +CEditorPreferencePage.annotationsPage.presentationOptions=Annotation Presentation Options +CEditorPreferencePage.annotationsPage.showInText=Show In Text +CEditorPreferencePage.annotationsPage.showInOverview=Show In Overview Ruler +CEditorPreferencePage.annotationsPage.color=Annotations Color +CEditorPreferencePage.colorPage.backgroundColor=Bac&kground Color: +CEditorPreferencePage.colorPage.systemDefault=S&ystem Default +CEditorPreferencePage.colorPage.custom=C&ustom +CEditorPreferencePage.colorPage.foreground=Fo®round: +CEditorPreferencePage.colorPage.color=C&olor: +CEditorPreferencePage.colorPage.bold=&Bold: +CEditorPreferencePage.colorPage.preview=Preview: +CEditorPreferencePage.behaviorPage.textFont=Text &font: +CEditorPreferencePage.behaviorPage.tabWidth=Displayed &tab width: +CEditorPreferencePage.behaviorPage.marginColumn=Print margin col&umn: +CEditorPreferencePage.behaviorPage.tabSpace=Insert &space for tabs +CEditorPreferencePage.behaviorPage.matchingBrackets=Highlight &matching brackets +CEditorPreferencePage.behaviorPage.highlightLine=Highlight ¤t line +CEditorPreferencePage.behaviorPage.printMargin=Show print &margin +CEditorPreferencePage.textFont.changeButton=C&hange... +TemplatePreferencePage.Viewer.preview=Preview: +BuildConsolePreferencePage.fieldEditors.buildConsoleLines=&Build console lines: diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TemplatePreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TemplatePreferencePage.java index 6edbbb0587b..619b87aa37e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TemplatePreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TemplatePreferencePage.java @@ -289,7 +289,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench private SourceViewer createViewer(Composite parent) { Label label= new Label(parent, SWT.NONE); - label.setText("Preview:"); + label.setText(PreferencesMessages.getString("TemplatePreferencePage.Viewer.preview")); //$NON-NLS-1$ GridData data= new GridData(); data.horizontalSpan= 2; label.setLayoutData(data); @@ -396,8 +396,8 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench if (!newTemplate.getName().equals(template.getName()) && MessageDialog.openQuestion(getShell(), - TemplateMessages.getString("TemplatePreferencePage.question.create.new.title"), - TemplateMessages.getString("TemplatePreferencePage.question.create.new.message"))) + TemplateMessages.getString("TemplatePreferencePage.question.create.new.title"), //$NON-NLS-1$ + TemplateMessages.getString("TemplatePreferencePage.question.create.new.message"))) //$NON-NLS-1$ { template= newTemplate; fTemplates.add(template); @@ -474,8 +474,8 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench private boolean confirmOverwrite(File file) { return MessageDialog.openQuestion(getShell(), - TemplateMessages.getString("TemplatePreferencePage.export.exists.title"), - TemplateMessages.getFormattedString("TemplatePreferencePage.export.exists.message", file.getAbsolutePath())); + TemplateMessages.getString("TemplatePreferencePage.export.exists.title"), //$NON-NLS-1$ + TemplateMessages.getFormattedString("TemplatePreferencePage.export.exists.message", file.getAbsolutePath())); //$NON-NLS-1$ } protected void remove() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CElementLabels.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CElementLabels.java index d9b4137ad13..7e153b251f7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CElementLabels.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CElementLabels.java @@ -289,7 +289,7 @@ public class CElementLabels { //qualification if( getFlag( flags, M_FULLY_QUALIFIED ) ){ getTypeLabel( method.getParent(), T_FULLY_QUALIFIED | (flags & P_COMPRESSED), buf ); - buf.append( "::" ); + buf.append( "::" ); //$NON-NLS-1$ } buf.append( method.getElementName() ); @@ -333,7 +333,7 @@ public class CElementLabels { } buf.append( types[i] ); } - buf.append( " )" ); + buf.append( " )" ); //$NON-NLS-1$ } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties index be8e3b42cdc..1465b7e6928 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties @@ -93,4 +93,5 @@ HierarchyScope= Hierarchy - {0} CElementLabels.concat_string=\ -\ CElementLabels.comma_string=,\ -CElementLabels.declseparator_string=\ :\ \ No newline at end of file +CElementLabels.declseparator_string=\ :\ +CSearchResultCollector.4=IMatchObject diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchOperation.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchOperation.java index 5b773a03977..bd0f9a0a70a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchOperation.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchOperation.java @@ -97,11 +97,11 @@ public class CSearchOperation implements IRunnableWithProgress,ICSearchConstants String [] args = new String [] { desc, _scopeDescription }; if( _limitTo == DECLARATIONS ){ - return CSearchMessages.getFormattedString( "CSearchOperation.singularDeclarationsPostfix", args ); //$NON_NLS-1$ + return CSearchMessages.getFormattedString( "CSearchOperation.singularDeclarationsPostfix", args ); //$NON_NLS-1$ //$NON-NLS-1$ } else if( _limitTo == REFERENCES ){ - return CSearchMessages.getFormattedString( "CSearchOperation.singularReferencesPostfix", args ); //$NON_NLS-1$ + return CSearchMessages.getFormattedString( "CSearchOperation.singularReferencesPostfix", args ); //$NON_NLS-1$ //$NON-NLS-1$ } else { - return CSearchMessages.getFormattedString( "CSearchOperation.singularOccurrencesPostfix", args ); //$NON_NLS-1$ + return CSearchMessages.getFormattedString( "CSearchOperation.singularOccurrencesPostfix", args ); //$NON_NLS-1$ //$NON-NLS-1$ } } @@ -117,13 +117,13 @@ public class CSearchOperation implements IRunnableWithProgress,ICSearchConstants desc = _stringPattern; // } - String [] args = new String [] { desc, "{0}", _scopeDescription }; + String [] args = new String [] { desc, "{0}", _scopeDescription }; //$NON-NLS-1$ if( _limitTo == DECLARATIONS ){ - return CSearchMessages.getFormattedString( "CSearchOperation.pluralDeclarationsPostfix", args ); //$NON_NLS-1$ + return CSearchMessages.getFormattedString( "CSearchOperation.pluralDeclarationsPostfix", args ); //$NON_NLS-1$ //$NON-NLS-1$ } else if ( _limitTo == REFERENCES ){ - return CSearchMessages.getFormattedString( "CSearchOperation.pluralReferencesPostfix", args ); //$NON_NLS-1$ + return CSearchMessages.getFormattedString( "CSearchOperation.pluralReferencesPostfix", args ); //$NON_NLS-1$ //$NON-NLS-1$ } else { - return CSearchMessages.getFormattedString( "CSearchOperation.pluralOccurrencesPostfix", args ); //$NON_NLS-1$ + return CSearchMessages.getFormattedString( "CSearchOperation.pluralOccurrencesPostfix", args ); //$NON_NLS-1$ //$NON-NLS-1$ } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java index 8340503eec7..a5d2e44e7f1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java @@ -534,7 +534,7 @@ public class CSearchPage extends DialogPage implements ISearchPage, ICSearchCons //outliune view will confuse methods with functions, so if the //name contains a "::", treat it as a method String pattern = element.getElementName(); - boolean forceMethod = ( pattern.indexOf("::") != -1 ); + boolean forceMethod = ( pattern.indexOf("::") != -1 ); //$NON-NLS-1$ switch ( element.getElementType() ){ case ICElement.C_TEMPLATE_FUNCTION: /*fall through to function */ @@ -580,7 +580,7 @@ public class CSearchPage extends DialogPage implements ISearchPage, ICSearchCons i++; if (!pattern.equals(match.pattern)) match= null; - }; + } if (match == null) { match= new SearchPatternData( getSearchFor(), @@ -599,7 +599,7 @@ public class CSearchPage extends DialogPage implements ISearchPage, ICSearchCons match.cElement= fCElement; match.scope= getContainer().getSelectedScope(); match.workingSets= getContainer().getSelectedWorkingSets(); - }; + } return match; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResultCollector.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResultCollector.java index 60bfb127698..41afa70d1e8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResultCollector.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResultCollector.java @@ -36,7 +36,7 @@ import org.eclipse.search.ui.SearchUI; */ public class CSearchResultCollector extends BasicSearchResultCollector{ - public static final String IMATCH = "IMatchObject"; + public static final String IMATCH = CSearchMessages.getString("CSearchResultCollector.4"); //$NON-NLS-1$ /** * diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/GroupByKeyComputer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/GroupByKeyComputer.java index b1b43cfd20b..8fa66a689ed 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/GroupByKeyComputer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/GroupByKeyComputer.java @@ -42,5 +42,5 @@ public class GroupByKeyComputer implements IGroupByKeyComputer { } catch (CoreException e) { } - return match.getParentName() + "::" + match.getName() + " - " + match.getLocation(); } + return match.getParentName() + "::" + match.getName() + " - " + match.getLocation(); //$NON-NLS-1$ //$NON-NLS-2$ } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/OpenCSearchPageAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/OpenCSearchPageAction.java index c99ff3ccbad..36a5f0567e8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/OpenCSearchPageAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/OpenCSearchPageAction.java @@ -16,7 +16,7 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate; */ public class OpenCSearchPageAction implements IWorkbenchWindowActionDelegate { - private static final String C_SEARCH_PAGE_ID= "org.eclipse.cdt.ui.CSearchPage"; + private static final String C_SEARCH_PAGE_ID= "org.eclipse.cdt.ui.CSearchPage"; //$NON-NLS-1$ private IWorkbenchWindow fWindow; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindAction.java index ece217d9512..fc0628343f1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindAction.java @@ -259,7 +259,7 @@ public abstract class FindAction extends Action { } private void operationNotAvailableDialog(){ - MessageDialog.openInformation(fEditor.getSite().getShell(),CSearchMessages.getString("CSearchOperation.operationUnavailable.title"), CSearchMessages.getString("CSearchOperation.operationUnavailable.message")); + MessageDialog.openInformation(fEditor.getSite().getShell(),CSearchMessages.getString("CSearchOperation.operationUnavailable.title"), CSearchMessages.getString("CSearchOperation.operationUnavailable.message")); //$NON-NLS-1$ //$NON-NLS-2$ } abstract protected String getScopeDescription(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsAction.java index 300d75085d8..1c2269a4634 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsAction.java @@ -30,14 +30,14 @@ public class FindDeclarationsAction extends FindAction { public FindDeclarationsAction(CEditor editor){ this(editor, - CSearchMessages.getString("CSearch.FindDeclarationAction.label"), - CSearchMessages.getString("CSearch.FindDeclarationAction.tooltip")); + CSearchMessages.getString("CSearch.FindDeclarationAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindDeclarationAction.tooltip")); //$NON-NLS-1$ } public FindDeclarationsAction(IWorkbenchSite site){ this(site, - CSearchMessages.getString("CSearch.FindDeclarationAction.label"), - CSearchMessages.getString("CSearch.FindDeclarationAction.tooltip")); + CSearchMessages.getString("CSearch.FindDeclarationAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindDeclarationAction.tooltip")); //$NON-NLS-1$ } /** * @param site @@ -61,7 +61,7 @@ public class FindDeclarationsAction extends FindAction { */ protected String getScopeDescription() { // TODO Auto-generated method stub - return CSearchMessages.getString("WorkspaceScope"); + return CSearchMessages.getString("WorkspaceScope"); //$NON-NLS-1$ } /* (non-Javadoc) * @see org.eclipse.cdt.internal.ui.editor.selsearch.FindAction#getLimitTo() diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsInWorkingSetAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsInWorkingSetAction.java index cb30657c4a5..09bcdafbc42 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsInWorkingSetAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindDeclarationsInWorkingSetAction.java @@ -29,8 +29,8 @@ public class FindDeclarationsInWorkingSetAction extends FindAction { */ public FindDeclarationsInWorkingSetAction(IWorkbenchSite site) { this(site, - CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.label"), - CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.tooltip")); + CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.tooltip")); //$NON-NLS-1$ } /** @@ -38,8 +38,8 @@ public class FindDeclarationsInWorkingSetAction extends FindAction { */ public FindDeclarationsInWorkingSetAction(CEditor editor) { this(editor, - CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.label"), - CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.tooltip")); + CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindDeclarationsInWorkingSetAction.tooltip")); //$NON-NLS-1$ } public FindDeclarationsInWorkingSetAction(CEditor editor, String label, String tooltip){ @@ -62,7 +62,7 @@ public class FindDeclarationsInWorkingSetAction extends FindAction { * @see org.eclipse.cdt.internal.ui.editor.selsearch.FindAction#getScopeDescription() */ protected String getScopeDescription() { - return CSearchMessages.getString("WorkingSetScope"); + return CSearchMessages.getString("WorkingSetScope"); //$NON-NLS-1$ } /* (non-Javadoc) * @see org.eclipse.cdt.internal.ui.editor.selsearch.FindAction#getScope() diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsAction.java index 0ddfdcdd4de..d23ebd86985 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsAction.java @@ -25,14 +25,14 @@ public class FindRefsAction extends FindAction { */ public FindRefsAction(CEditor editor) { this(editor, - CSearchMessages.getString("CSearch.FindReferencesAction.label"), - CSearchMessages.getString("CSearch.FindReferencesAction.tooltip")); + CSearchMessages.getString("CSearch.FindReferencesAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindReferencesAction.tooltip")); //$NON-NLS-1$ } public FindRefsAction(IWorkbenchSite site){ this(site, - CSearchMessages.getString("CSearch.FindReferencesAction.label"), - CSearchMessages.getString("CSearch.FindReferencesAction.tooltip")); + CSearchMessages.getString("CSearch.FindReferencesAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindReferencesAction.tooltip")); //$NON-NLS-1$ } /** * @param editor @@ -61,7 +61,7 @@ public class FindRefsAction extends FindAction { * @see org.eclipse.cdt.internal.ui.editor.selsearch.FindAction#getScopeDescription() */ protected String getScopeDescription() { - return CSearchMessages.getString("WorkspaceScope"); + return CSearchMessages.getString("WorkspaceScope"); //$NON-NLS-1$ } /* (non-Javadoc) * @see org.eclipse.cdt.internal.ui.editor.selsearch.FindAction#getScope() diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsInWorkingSetAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsInWorkingSetAction.java index f800023112f..10c08cf8132 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsInWorkingSetAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindRefsInWorkingSetAction.java @@ -24,14 +24,14 @@ public class FindRefsInWorkingSetAction extends FindAction { public FindRefsInWorkingSetAction(CEditor editor) { this(editor, - CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.label"), - CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.tooltip")); + CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.tooltip")); //$NON-NLS-1$ } public FindRefsInWorkingSetAction(IWorkbenchSite site){ this(site, - CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.label"), - CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.tooltip")); + CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.label"), //$NON-NLS-1$ + CSearchMessages.getString("CSearch.FindReferencesInWorkingSetAction.tooltip")); //$NON-NLS-1$ } /** * @param editor @@ -65,7 +65,7 @@ public class FindRefsInWorkingSetAction extends FindAction { * @see org.eclipse.cdt.internal.ui.editor.selsearch.FindAction#getScopeDescription() */ protected String getScopeDescription() { - return CSearchMessages.getString("WorkingSetScope"); + return CSearchMessages.getString("WorkingSetScope"); //$NON-NLS-1$ } /* (non-Javadoc) * @see org.eclipse.cdt.internal.ui.editor.selsearch.FindAction#getScope() diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAnnotationHover.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAnnotationHover.java index 3f52ee21437..dd7b550d534 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAnnotationHover.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAnnotationHover.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.core.resources.IMarker; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; @@ -148,7 +149,7 @@ public class CAnnotationHover implements IAnnotationHover { private String formatMultipleMessages(List messages) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.addPageProlog(buffer); - HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent("Multiple markers at this line")); + HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(CUIMessages.getString("CAnnotationHover.multipleMarkers"))); //$NON-NLS-1$ HTMLPrinter.startBulletList(buffer); Iterator e= messages.iterator(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAutoIndentStrategy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAutoIndentStrategy.java index 0c18f9800f8..f2049ae1b5c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAutoIndentStrategy.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CAutoIndentStrategy.java @@ -115,7 +115,7 @@ public class CAutoIndentStrategy extends DefaultAutoIndentStrategy { int whiteend= findEndOfWhiteSpace(d, start, end); return d.get(start, whiteend - start); } else { - return ""; + return ""; //$NON-NLS-1$ } } @@ -218,7 +218,7 @@ public class CAutoIndentStrategy extends DefaultAutoIndentStrategy { public void customizeDocumentCommand(IDocument d, DocumentCommand c) { if (c.length == 0 && c.text != null && endsWithDelimiter(d, c.text)) smartIndentAfterNewLine(d, c); - else if ("}".equals(c.text)) { + else if ("}".equals(c.text)) { //$NON-NLS-1$ smartInsertAfterBracket(d, c); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CCodeScanner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CCodeScanner.java index 6159a8d6153..5ffbc35b76d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CCodeScanner.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CCodeScanner.java @@ -25,27 +25,35 @@ public final class CCodeScanner extends AbstractCScanner { private static String[] fgKeywords= { - "asm", "auto", - "break", - "case", - "const", "continue", - "default", "do", - "else", "enum", "extern", - "for", - "goto", - "if", "inline", - "register", "return", "restrict", - "sizeof", "static", "struct", "switch", - "typedef", - "union", - "volatile", - "while", "_Pragma" + "asm", "auto", //$NON-NLS-1$ //$NON-NLS-2$ + "break", //$NON-NLS-1$ + "case", //$NON-NLS-1$ + "const", "continue", //$NON-NLS-1$ //$NON-NLS-2$ + "default", "do", //$NON-NLS-1$ //$NON-NLS-2$ + "else", "enum", "extern", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "for", //$NON-NLS-1$ + "goto", //$NON-NLS-1$ + "if", "inline", //$NON-NLS-1$ //$NON-NLS-2$ + "register", "return", "restrict", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "sizeof", "static", "struct", "switch", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "typedef", //$NON-NLS-1$ + "union", //$NON-NLS-1$ + "volatile", //$NON-NLS-1$ + "while", "_Pragma" //$NON-NLS-1$ //$NON-NLS-2$ }; - private static String[] fgTypes= { "char", "double", "float", "int", "long", "short", "signed", "unsigned", "void", "_Bool", "_Complex", "_Imaginary"}; - private static String[] fgConstants= { "NULL", "__DATE__", "__LINE__", "__TIME__", "__FILE__", "__STDC__"}; - private static String[] fgPreprocessor= { "#define", "#undef", "#include", "#error", "#warning", "#pragma", "#ifdef", "#ifndef", "#if", "#else", "#elif", "#endif", "#line"}; + private static String[] fgTypes= { "char", "double", "float", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "int", "long", "short", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "signed", "unsigned", "void", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "_Bool", "_Complex", "_Imaginary"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static String[] fgConstants= { "NULL", "__DATE__", "__LINE__", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "__TIME__", "__FILE__", "__STDC__"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static String[] fgPreprocessor= { "#define", "#undef", "#include", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#error", "#warning", "#pragma", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#ifdef", "#ifndef", "#if", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#else", "#elif", "#endif", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#line"}; //$NON-NLS-1$ private static String[] fgTokenProperties= { @@ -81,7 +89,7 @@ public final class CCodeScanner extends AbstractCScanner { // Add rule for strings Token token= getToken(ICColorConstants.C_STRING); // Add rule for strings and character constants. - rules.add(new SingleLineRule("'", "'", token, '\\')); + rules.add(new SingleLineRule("'", "'", token, '\\')); //$NON-NLS-1$ //$NON-NLS-2$ // Add generic whitespace rule. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CPartitionScanner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CPartitionScanner.java index 2dc995fe0b5..a6edea2cdeb 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CPartitionScanner.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CPartitionScanner.java @@ -26,12 +26,12 @@ import org.eclipse.jface.text.rules.WordRule; public class CPartitionScanner extends RuleBasedPartitionScanner { - private final static String SKIP= "__skip"; + private final static String SKIP= "__skip"; //$NON-NLS-1$ - public final static String C_MULTILINE_COMMENT= "c_multi_line_comment"; - public final static String C_SINGLE_LINE_COMMENT= "c_single_line_comment"; - public final static String C_STRING= "c_string"; + public final static String C_MULTILINE_COMMENT= "c_multi_line_comment"; //$NON-NLS-1$ + public final static String C_SINGLE_LINE_COMMENT= "c_single_line_comment"; //$NON-NLS-1$ + public final static String C_STRING= "c_string"; //$NON-NLS-1$ /** @@ -106,12 +106,12 @@ public class CPartitionScanner extends RuleBasedPartitionScanner { // Add rule for single line comments. - rules.add(new EndOfLineRule("//", single_comment)); + rules.add(new EndOfLineRule("//", single_comment)); //$NON-NLS-1$ // Add rule for strings and character constants. - rules.add(new SingleLineRule("\"", "\"", string, '\\')); - rules.add(new SingleLineRule("'", "'", skip, '\\')); + rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-1$ //$NON-NLS-2$ + rules.add(new SingleLineRule("'", "'", skip, '\\')); //$NON-NLS-1$ //$NON-NLS-2$ // Add special case word rule. EmptyCommentRule wordRule= new EmptyCommentRule(comment); @@ -119,7 +119,7 @@ public class CPartitionScanner extends RuleBasedPartitionScanner { // Add rules for multi-line comments. - rules.add(new MultiLineRule("/*", "*/", comment)); + rules.add(new MultiLineRule("/*", "*/", comment)); //$NON-NLS-1$ //$NON-NLS-2$ IPredicateRule[] result= new IPredicateRule[rules.size()]; rules.toArray(result); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java index 77adf69a774..c6d7a7b66ae 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java @@ -232,7 +232,7 @@ public class CSourceViewerConfiguration extends SourceViewerConfiguration { * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getDefaultPrefixes(ISourceViewer, String) */ public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) { - return new String[] { "//", "" }; + return new String[] { "//", "" }; //$NON-NLS-1$ //$NON-NLS-2$ } /** @@ -240,11 +240,11 @@ public class CSourceViewerConfiguration extends SourceViewerConfiguration { */ public String getDefaultPrefix(ISourceViewer sourceViewer, String contentType) { if(IDocument.DEFAULT_CONTENT_TYPE.equals(contentType)) - return "//"; + return "//"; //$NON-NLS-1$ if(CPartitionScanner.C_SINGLE_LINE_COMMENT.equals(contentType)) - return "//"; + return "//"; //$NON-NLS-1$ if(CPartitionScanner.C_MULTILINE_COMMENT.equals(contentType)) - return "//"; + return "//"; //$NON-NLS-1$ return null; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CppCodeScanner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CppCodeScanner.java index 5fc2ccd3a8b..ecdade76bf8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CppCodeScanner.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CppCodeScanner.java @@ -23,32 +23,44 @@ import org.eclipse.jface.util.PropertyChangeEvent; public final class CppCodeScanner extends AbstractCScanner { private static String[] fgKeywords= { - "and", "and_eq", "asm", "auto", - "bitand", "bitor", "break", - "case", "catch", "class", "compl", "const", "const_cast", "continue", - "default", "delete", "do", "dynamic_cast", - "else", "enum", "explicit", "export", "extern", - "false", "final", "finally", "for", "friend", - "goto", - "if", "inline", - "mutable", - "namespace", "new", "not", "not_eq", - "operator", "or", "or_eq", - "private", "protected", "public", - "redeclared", "register", "reinterpret_cast", "return", "restrict", - "sizeof", "static", "static_cast", "struct", "switch", - "template", "this", "throw", "true", "try", "typedef", "typeid", "typename", - "union", "using", - "virtual", "volatile", - "while", - "xor", "xor_eq" + "and", "and_eq", "asm", "auto", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "bitand", "bitor", "break", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "case", "catch", "class", "compl", "const", "const_cast", "continue", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ + "default", "delete", "do", "dynamic_cast", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "else", "enum", "explicit", "export", "extern", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + "false", "final", "finally", "for", "friend", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + "goto", //$NON-NLS-1$ + "if", "inline", //$NON-NLS-1$ //$NON-NLS-2$ + "mutable", //$NON-NLS-1$ + "namespace", "new", "not", "not_eq", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "operator", "or", "or_eq", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "private", "protected", "public", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "redeclared", "register", "reinterpret_cast", "return", "restrict", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + "sizeof", "static", "static_cast", "struct", "switch", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + "template", "this", "throw", "true", "try", "typedef", "typeid", "typename", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ + "union", "using", //$NON-NLS-1$ //$NON-NLS-2$ + "virtual", "volatile", //$NON-NLS-1$ //$NON-NLS-2$ + "while", //$NON-NLS-1$ + "xor", "xor_eq" //$NON-NLS-1$ //$NON-NLS-2$ }; - private static String[] fgTypes= { "bool", "char", "double", "float", "int", "long", "short", "signed", "unsigned", "void", "wchar_t", "_Bool", "_Complex", "_Imaginary"}; - private static String[] fgConstants= { "false", "NULL", "true", "__DATE__", "__LINE__", "__TIME__", "__FILE__", "__STDC__"}; - private static String[] fgPreprocessor= { "#define", "#undef", "#include", "#error", "#warning", "#pragma", "#ifdef", "#ifndef", "#line", "#undef", "#if", "#else", "#elif", "#endif"}; + private static String[] fgTypes= { "bool", "char", "double", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "float", "int", "long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "short", "signed", "unsigned", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "void", "wchar_t", "_Bool", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "_Complex", "_Imaginary"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + private static String[] fgConstants= { "false", "NULL", "true", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "__DATE__", "__LINE__", "__TIME__", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "__FILE__", "__STDC__"}; //$NON-NLS-1$ //$NON-NLS-2$ + + private static String[] fgPreprocessor= { "#define", "#undef", "#include", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#error", "#warning", "#pragma", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#ifdef", "#ifndef", "#line", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#undef", "#if", "#else", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + "#elif", "#endif"}; //$NON-NLS-1$ //$NON-NLS-2$ private static String[] fgTokenProperties= { @@ -84,7 +96,7 @@ public final class CppCodeScanner extends AbstractCScanner { // Add rule for strings Token token= getToken(ICColorConstants.C_STRING); // Add rule for strings and character constants. - rules.add(new SingleLineRule("'", "'", token, '\\')); + rules.add(new SingleLineRule("'", "'", token, '\\')); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java index 1d8bfc62c6f..0e974178033 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTML2TextReader.java @@ -131,7 +131,7 @@ public class HTML2TextReader extends SubstitutionTextReader { return "\t"; //$NON-NLS-1$ if ("li".equals(html)) //$NON-NLS-1$ - return LINE_DELIM + "\t" + "-"; + return LINE_DELIM + "\t" + "-"; //$NON-NLS-1$ //$NON-NLS-2$ if ("/b".equals(html)) { //$NON-NLS-1$ stopBold(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLTextPresenter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLTextPresenter.java index 8f8bcf35ede..9d741c273f5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLTextPresenter.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLTextPresenter.java @@ -142,7 +142,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation if (line != null) { append(buffer, LINE_DELIM, lineFormatted ? presentation : null); - append(buffer, (""), presentation); + append(buffer, (""), presentation); //$NON-NLS-1$ } return trim(buffer, presentation); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java index 39839c9ba6e..8febf57e0f4 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java @@ -99,7 +99,7 @@ public class PreprocessorRule extends WordRule implements IRule { scanner.unread(); - IToken token = (IToken) fWords.get("#" + fBuffer.toString()); + IToken token = (IToken) fWords.get("#" + fBuffer.toString()); //$NON-NLS-1$ if (token != null) return token; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java index cc1b8d3d821..3557d1b0c12 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java @@ -147,15 +147,15 @@ public class CCompletionProcessor implements IContentAssistProcessor { } if (filename == null) { return true; - } else if (filename.endsWith(".c")) { + } else if (filename.endsWith(".c")) { //$NON-NLS-1$ //Straight C files are always C return false; } else if ( - filename.endsWith(".cpp") - || filename.endsWith(".cc") - || filename.endsWith(".cxx") - || filename.endsWith(".C") - || filename.endsWith(".hxx")) { + filename.endsWith(".cpp") //$NON-NLS-1$ + || filename.endsWith(".cc") //$NON-NLS-1$ + || filename.endsWith(".cxx") //$NON-NLS-1$ + || filename.endsWith(".C") //$NON-NLS-1$ + || filename.endsWith(".hxx")) { //$NON-NLS-1$ return true; } else { //Defer to the nature of the project @@ -452,7 +452,7 @@ public class CCompletionProcessor implements IContentAssistProcessor { } for (int i = 0; i < summary.length; i++) { - String fname = summary[i].getName() + "()"; + String fname = summary[i].getName() + "()"; //$NON-NLS-1$ String fdesc = summary[i].getDescription(); IFunctionSummary.IFunctionPrototypeSummary fproto = summary[i].getPrototype(); String fargs = fproto.getArguments(); @@ -485,7 +485,7 @@ public class CCompletionProcessor implements IContentAssistProcessor { case ICElement.C_METHOD: case ICElement.C_METHOD_DECLARATION: { - return (new FunctionPrototypeSummary ( match.getReturnType() + " " + match.getName() )); + return (new FunctionPrototypeSummary ( match.getReturnType() + " " + match.getName() )); //$NON-NLS-1$ } default: return null; @@ -506,7 +506,7 @@ public class CCompletionProcessor implements IContentAssistProcessor { int offset = fCurrentOffset - prefix.length(); int length = prefix.length(); - String searchPrefix = prefix + "*"; + String searchPrefix = prefix + "*"; //$NON-NLS-1$ // figure out the search scope IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProposal.java index 77e3d466a71..eb616877ec3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProposal.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProposal.java @@ -59,9 +59,9 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro fTextViewer= viewer; //@@@ Is this the best way to do this, likely it isn't - if(replacementString.indexOf("()") == -1) { //Not replacing with a function + if(replacementString.indexOf("()") == -1) { //Not replacing with a function //$NON-NLS-1$ fCursorPosition = replacementString.length(); - } else if(displayString.indexOf("()") == -1) { //Assume that there are arguments between () + } else if(displayString.indexOf("()") == -1) { //Assume that there are arguments between () //$NON-NLS-1$ fCursorPosition = replacementString.length() - 1; } else { fCursorPosition = replacementString.length(); @@ -180,7 +180,7 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro // } try { - functionBracketIndex = fReplacementString.indexOf("()"); + functionBracketIndex = fReplacementString.indexOf("()"); //$NON-NLS-1$ isBeforeBracket = document.getChar(fReplacementOffset + fReplacementLength) == '('; //Strip the brackets off the function if inserting right before brackets diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java index f61c279a5ab..49fb9fb5520 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java @@ -80,7 +80,7 @@ public class CompletionEngine implements RelevanceConstants { IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore(); private Map macroMap = new HashMap(); - private static final String exceptionKeyword = "..."; + private static final String exceptionKeyword = "..."; //$NON-NLS-1$ // scope relevance element counters private int numFields = 0; private int numVariables = 0; @@ -329,7 +329,7 @@ public class CompletionEngine implements RelevanceConstants { addKeywordToCompletions(keyword); numOfKeywords++; } - log("No of Keywords = " + numOfKeywords); + log("No of Keywords = " + numOfKeywords); //$NON-NLS-1$ } private void addMacroToCompletions (String macroName){ @@ -344,7 +344,7 @@ public class CompletionEngine implements RelevanceConstants { addMacroToCompletions(macro); numOfMacros++; } - log("No of Macros = " + numOfMacros); + log("No of Macros = " + numOfMacros); //$NON-NLS-1$ } @@ -363,13 +363,13 @@ public class CompletionEngine implements RelevanceConstants { } private void addToCompletions (ILookupResult result){ if(result == null){ - log("Lookup Results = null ................. !!! No Lookup Results found !!! "); + log("Lookup Results = null ................. !!! No Lookup Results found !!! "); //$NON-NLS-1$ return; } Iterator nodes = result.getNodes(); int numberOfElements = result.getResultsSize(); - log("No of Lookup Results = " + numberOfElements); + log("No of Lookup Results = " + numberOfElements); //$NON-NLS-1$ resetElementNumbers(); while (nodes.hasNext()){ @@ -403,7 +403,7 @@ public class CompletionEngine implements RelevanceConstants { while( i.hasNext() ) { String key = (String) i.next(); - String value = ""; + String value = ""; //$NON-NLS-1$ if(key.length() > prefix.length()) { value = key.substring(0, prefix.length()); }else { @@ -507,8 +507,8 @@ public class CompletionEngine implements RelevanceConstants { IASTNode.LookupKind[] kinds = new IASTNode.LookupKind[1]; kinds[0] = IASTNode.LookupKind.ALL; String prefix = completionNode.getCompletionPrefix(); - if(prefix.equals("(")) - prefix = ""; + if(prefix.equals("(")) //$NON-NLS-1$ + prefix = ""; //$NON-NLS-1$ result = lookup(searchNode, prefix, kinds, completionNode.getCompletionContext()); addToCompletions(result); @@ -605,21 +605,21 @@ public class CompletionEngine implements RelevanceConstants { // 1- Parse the translation unit IASTCompletionNode completionNode = parse(sourceUnit, completionOffset); - log(""); + log(""); //$NON-NLS-1$ if (completionNode == null){ - log("Null Completion Node Error"); + log("Null Completion Node Error"); //$NON-NLS-1$ return null; } - log ("Offset = " + completionOffset); - logNode("Scope = " , completionNode.getCompletionScope()); - logNode("Context = " , completionNode.getCompletionContext()); - logKind("Kind = ", completionNode.getCompletionKind()); - log ("Prefix = " + completionNode.getCompletionPrefix()); + log ("Offset = " + completionOffset); //$NON-NLS-1$ + logNode("Scope = " , completionNode.getCompletionScope()); //$NON-NLS-1$ + logNode("Context = " , completionNode.getCompletionContext()); //$NON-NLS-1$ + logKind("Kind = ", completionNode.getCompletionKind()); //$NON-NLS-1$ + log ("Prefix = " + completionNode.getCompletionPrefix()); //$NON-NLS-1$ if (completionNode.getCompletionScope() == null){ - log("Null Completion Scope Error"); + log("Null Completion Scope Error"); //$NON-NLS-1$ return null; } @@ -693,7 +693,7 @@ public class CompletionEngine implements RelevanceConstants { addKeywordsToCompletions( completionNode.getKeywords()); } - log("Time spent in Completion Engine = "+ ( System.currentTimeMillis() - startTime ) + " ms"); + log("Time spent in Completion Engine = "+ ( System.currentTimeMillis() - startTime ) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$ return completionNode; } @@ -701,39 +701,39 @@ public class CompletionEngine implements RelevanceConstants { if (! CCorePlugin.getDefault().isDebugging() && Util.isActive(IDebugLogConstants.CONTENTASSIST) ) return; - String kindStr = ""; + String kindStr = ""; //$NON-NLS-1$ if(kind == IASTCompletionNode.CompletionKind.MEMBER_REFERENCE) - kindStr = "MEMBER_REFERENCE"; + kindStr = "MEMBER_REFERENCE"; //$NON-NLS-1$ // else if(kind == IASTCompletionNode.CompletionKind.SCOPED_REFERENCE) // kindStr = "SCOPED_REFERENCE"; else if(kind == IASTCompletionNode.CompletionKind.FIELD_TYPE) - kindStr = "FIELD_TYPE Class Scope"; + kindStr = "FIELD_TYPE Class Scope"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.VARIABLE_TYPE) - kindStr = "VARIABLE_TYPE Global Scope"; + kindStr = "VARIABLE_TYPE Global Scope"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.ARGUMENT_TYPE) - kindStr = "ARGUMENT_TYPE"; + kindStr = "ARGUMENT_TYPE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.SINGLE_NAME_REFERENCE) - kindStr = "SINGLE_NAME_REFERENCE"; + kindStr = "SINGLE_NAME_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.TYPE_REFERENCE) - kindStr = "TYPE_REFERENCE"; + kindStr = "TYPE_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.CLASS_REFERENCE) - kindStr = "CLASS_REFERENCE"; + kindStr = "CLASS_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.NAMESPACE_REFERENCE) - kindStr = "NAMESPACE_REFERENCE"; + kindStr = "NAMESPACE_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.EXCEPTION_REFERENCE) - kindStr = "EXCEPTION_REFERENCE"; + kindStr = "EXCEPTION_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.MACRO_REFERENCE) - kindStr = "MACRO_REFERENCE"; + kindStr = "MACRO_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.CONSTRUCTOR_REFERENCE) - kindStr = "CONSTRUCTOR_REFERENCE"; + kindStr = "CONSTRUCTOR_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.NEW_TYPE_REFERENCE) - kindStr = "NEW_TYPE_REFERENCE"; + kindStr = "NEW_TYPE_REFERENCE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.PREPROCESSOR_DIRECTIVE) - kindStr = "PREPROCESSOR_DIRECTIVE"; + kindStr = "PREPROCESSOR_DIRECTIVE"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.USER_SPECIFIED_NAME) - kindStr = "USER_SPECIFIED_NAME"; + kindStr = "USER_SPECIFIED_NAME"; //$NON-NLS-1$ else if(kind == IASTCompletionNode.CompletionKind.NO_SUCH_KIND) - kindStr = "NO_SUCH_KIND"; + kindStr = "NO_SUCH_KIND"; //$NON-NLS-1$ log (message + kindStr); } @@ -742,34 +742,34 @@ public class CompletionEngine implements RelevanceConstants { return; if(node == null){ - log(message + "null"); + log(message + "null"); //$NON-NLS-1$ return; } if(node instanceof IASTMethod){ - String name = "Method: "; + String name = "Method: "; //$NON-NLS-1$ name += ((IASTMethod)node).getName(); log(message + name); return; } if(node instanceof IASTFunction){ - String name = "Function: "; + String name = "Function: "; //$NON-NLS-1$ name += ((IASTFunction)node).getName(); log(message + name); return; } if(node instanceof IASTClassSpecifier){ - String name = "Class: "; + String name = "Class: "; //$NON-NLS-1$ name += ((IASTClassSpecifier)node).getName(); log(message + name); return; } if(node instanceof IASTCompilationUnit){ - String name = "Global"; + String name = "Global"; //$NON-NLS-1$ log(message + name); return; } if(node instanceof IASTCodeScope){ - String name = "Code Scope"; + String name = "Code Scope"; //$NON-NLS-1$ log(message + name); return; } @@ -782,43 +782,43 @@ public class CompletionEngine implements RelevanceConstants { if (! CCorePlugin.getDefault().isDebugging() && Util.isActive(IDebugLogConstants.CONTENTASSIST)) return; - StringBuffer kindName = new StringBuffer("Looking For "); + StringBuffer kindName = new StringBuffer("Looking For "); //$NON-NLS-1$ for(int i = 0; i 100) { String partial = message.substring(0, 100); message = message.substring(100); - System.out.println(partial + "\\"); + System.out.println(partial + "\\"); //$NON-NLS-1$ } - if (message.endsWith("\n")) { + if (message.endsWith("\n")) { //$NON-NLS-1$ System.err.print(message); } else { System.out.println(message); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementLabelProvider.java index 8994794187f..cf1ab730136 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementLabelProvider.java @@ -106,7 +106,7 @@ public class CElementLabelProvider extends LabelProvider { IVariableDeclaration vDecl = (IVariableDeclaration) celem; name.append(vDecl.getElementName()); if((vDecl.getTypeName() != null) &&(vDecl.getTypeName().length() > 0)){ - name.append(" : "); + name.append(" : "); //$NON-NLS-1$ name.append(vDecl.getTypeName()); } break; @@ -117,7 +117,7 @@ public class CElementLabelProvider extends LabelProvider { IFunctionDeclaration fDecl = (IFunctionDeclaration) celem; name.append(fDecl.getSignature()); if((fDecl.getReturnType() != null) &&(fDecl.getReturnType().length() > 0)){ - name.append(" : "); + name.append(" : "); //$NON-NLS-1$ name.append(fDecl.getReturnType()); } break; @@ -135,7 +135,7 @@ public class CElementLabelProvider extends LabelProvider { ITypeDef tDecl = (ITypeDef) celem; name.append(tDecl.getElementName()); if((tDecl.getTypeName() != null) &&(tDecl.getTypeName().length() > 0)){ - name.append(" : "); + name.append(" : "); //$NON-NLS-1$ name.append(tDecl.getTypeName()); } break; @@ -164,7 +164,7 @@ public class CElementLabelProvider extends LabelProvider { if (celem instanceof IBinary) { IBinary bin = (IBinary)celem; - name.append(" - [" + bin.getCPU() + (bin.isLittleEndian() ? "le" : "be") + "]"); + name.append(" - [" + bin.getCPU() + (bin.isLittleEndian() ? "le" : "be") + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } return name.toString(); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java index e124b8a2b5f..935ddfcf863 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java @@ -100,7 +100,7 @@ public class CElementSorter extends ViewerSorter { return 120; } else if (element instanceof IVariable) { String name = ((ICElement)element).getElementName(); - if (name.startsWith("__")) { + if (name.startsWith("__")) { //$NON-NLS-1$ return 122; } if (name.charAt(0) == '_') { @@ -109,7 +109,7 @@ public class CElementSorter extends ViewerSorter { return 130; } else if (element instanceof IFunction) { String name = ((ICElement)element).getElementName(); - if (name.startsWith("__")) { + if (name.startsWith("__")) { //$NON-NLS-1$ return 132; } if (name.charAt(0) == '_') { @@ -124,7 +124,7 @@ public class CElementSorter extends ViewerSorter { return 170; } else if (element instanceof ICElement) { String name = ((ICElement)element).getElementName(); - if (name.startsWith("__")) { + if (name.startsWith("__")) { //$NON-NLS-1$ return 172; } if (name.charAt(0) == '_') { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CSearchResultLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CSearchResultLabelProvider.java index 7ec82a06d64..9e015a86627 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CSearchResultLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CSearchResultLabelProvider.java @@ -120,35 +120,35 @@ public class CSearchResultLabelProvider extends LabelProvider { try { match = (IMatch) marker.getAttribute(CSearchResultCollector.IMATCH); } catch (CoreException e) { - return ""; + return ""; //$NON-NLS-1$ } } else if( element instanceof IMatch ){ match = (IMatch) element; } if( match == null ) - return ""; + return ""; //$NON-NLS-1$ IResource resource = match.getResource(); - String result = ""; - String path = (resource != null ) ? resource.getFullPath().toString() : ""; + String result = ""; //$NON-NLS-1$ + String path = (resource != null ) ? resource.getFullPath().toString() : ""; //$NON-NLS-1$ switch( getOrder() ){ case SHOW_NAME_ONLY: result = match.getName(); case SHOW_ELEMENT_CONTAINER: - if( !match.getParentName().equals("") ) - result = match.getName() + " - " + match.getParentName() + " ( " + path + " )"; + if( !match.getParentName().equals("") ) //$NON-NLS-1$ + result = match.getName() + " - " + match.getParentName() + " ( " + path + " )"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ else - result = match.getName() + " ( " + path + " )"; + result = match.getName() + " ( " + path + " )"; //$NON-NLS-1$ //$NON-NLS-2$ break; case SHOW_PATH: - result = path + " - " + match.getParentName()+ "::" + match.getName(); + result = path + " - " + match.getParentName()+ "::" + match.getName(); //$NON-NLS-1$ //$NON-NLS-2$ break; case SHOW_CONTAINER_ELEMENT: - result = match.getParentName() + "::" + match.getName() + " ( " + path + " )"; + result = match.getParentName() + "::" + match.getName() + " ( " + path + " )"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ break; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java index 129a1a421d8..8591ca7418d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java @@ -59,28 +59,28 @@ public class CUIPlugin extends AbstractUIPlugin { private ISharedTextColors fSharedTextColors; - public static final String PLUGIN_ID = "org.eclipse.cdt.ui"; - public static final String PLUGIN_CORE_ID = "org.eclipse.cdt.core"; - public static final String EDITOR_ID = PLUGIN_ID + ".editor.CEditor"; - public static final String CONSOLE_ID = PLUGIN_ID + ".BuildConsoleView"; - public static final String CVIEW_ID = PLUGIN_ID + ".CView"; - public static final String C_PROBLEMMARKER = PLUGIN_CORE_ID + ".problem"; + public static final String PLUGIN_ID = "org.eclipse.cdt.ui"; //$NON-NLS-1$ + public static final String PLUGIN_CORE_ID = "org.eclipse.cdt.core"; //$NON-NLS-1$ + public static final String EDITOR_ID = PLUGIN_ID + ".editor.CEditor"; //$NON-NLS-1$ + public static final String CONSOLE_ID = PLUGIN_ID + ".BuildConsoleView"; //$NON-NLS-1$ + public static final String CVIEW_ID = PLUGIN_ID + ".CView"; //$NON-NLS-1$ + public static final String C_PROBLEMMARKER = PLUGIN_CORE_ID + ".problem"; //$NON-NLS-1$ - public static final String C_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCWizard"; - public static final String CPP_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCCWizard"; + public static final String C_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCWizard"; //$NON-NLS-1$ + public static final String CPP_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCCWizard"; //$NON-NLS-1$ - public static final String FILE_WIZARD_ID = "org.eclipse.ui.wizards.new.file"; - public static final String FOLDER_WIZARD_ID = "org.eclipse.ui.wizards.new.folder"; - public static final String CLASS_WIZARD_ID = "org.eclipse.cdt.ui.wizards.NewClassWizard"; - public static final String SEARCH_ACTION_SET_ID = PLUGIN_ID + ".SearchActionSet"; - public static final String FOLDER_ACTION_SET_ID = PLUGIN_ID + ".CFolderActionSet"; - public static final String BUILDER_ID = PLUGIN_CORE_ID + ".cbuilder"; + public static final String FILE_WIZARD_ID = "org.eclipse.ui.wizards.new.file"; //$NON-NLS-1$ + public static final String FOLDER_WIZARD_ID = "org.eclipse.ui.wizards.new.folder"; //$NON-NLS-1$ + public static final String CLASS_WIZARD_ID = "org.eclipse.cdt.ui.wizards.NewClassWizard"; //$NON-NLS-1$ + public static final String SEARCH_ACTION_SET_ID = PLUGIN_ID + ".SearchActionSet"; //$NON-NLS-1$ + public static final String FOLDER_ACTION_SET_ID = PLUGIN_ID + ".CFolderActionSet"; //$NON-NLS-1$ + public static final String BUILDER_ID = PLUGIN_CORE_ID + ".cbuilder"; //$NON-NLS-1$ private static CUIPlugin fgCPlugin; private static ResourceBundle fgResourceBundle; private ImageDescriptorRegistry fImageDescriptorRegistry; - static String SEPARATOR = System.getProperty("file.separator"); + static String SEPARATOR = System.getProperty("file.separator"); //$NON-NLS-1$ private static final String CONTENTASSIST = CUIPlugin.PLUGIN_ID + "/debug/contentassist" ; //$NON-NLS-1$ @@ -88,7 +88,7 @@ public class CUIPlugin extends AbstractUIPlugin { static { try { - fgResourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.internal.ui.CPluginResources"); + fgResourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.internal.ui.CPluginResources"); //$NON-NLS-1$ } catch (MissingResourceException x) { fgResourceBundle = null; @@ -111,10 +111,10 @@ public class CUIPlugin extends AbstractUIPlugin { return fgResourceBundle.getString(key); } catch (MissingResourceException e) { - return "!" + key + "!"; + return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ } catch (NullPointerException e) { - return "#" + key + "#"; + return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -158,7 +158,7 @@ public class CUIPlugin extends AbstractUIPlugin { } public void log(Throwable e) { - log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error", e)); + log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error", e)); //$NON-NLS-1$ } public void log(IStatus status) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/FunctionPrototypeSummary.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/FunctionPrototypeSummary.java index 4e546af76b0..98a824489c7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/FunctionPrototypeSummary.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/FunctionPrototypeSummary.java @@ -25,11 +25,11 @@ public class FunctionPrototypeSummary implements IFunctionSummary.IFunctionProto //If there are brackets missing, then assume void parameters if(leftbracket == -1 || rightbracket == -1) { if(leftbracket != -1) { - proto = proto.substring(leftbracket) + ")"; + proto = proto.substring(leftbracket) + ")"; //$NON-NLS-1$ } else if(rightbracket != -1) { - proto = proto.substring(rightbracket - 1) + "()"; + proto = proto.substring(rightbracket - 1) + "()"; //$NON-NLS-1$ } else { - proto = proto + "()"; + proto = proto + "()"; //$NON-NLS-1$ } leftbracket = proto.indexOf('('); @@ -39,8 +39,8 @@ public class FunctionPrototypeSummary implements IFunctionSummary.IFunctionProto farguments = proto.substring(leftbracket + 1, rightbracket); // fix for bug #44359 - if(farguments.equals("void")) - farguments = ""; + if(farguments.equals("void")) //$NON-NLS-1$ + farguments = ""; //$NON-NLS-1$ int nameend = leftbracket - 1; while(proto.charAt(nameend) == ' ') { @@ -56,7 +56,7 @@ public class FunctionPrototypeSummary implements IFunctionSummary.IFunctionProto if(namestart == 0) { //@@@ Should this be int instead? - freturn = "void"; + freturn = "void"; //$NON-NLS-1$ } else { freturn = proto.substring(0, namestart).trim(); } @@ -82,16 +82,16 @@ public class FunctionPrototypeSummary implements IFunctionSummary.IFunctionProto StringBuffer buffer = new StringBuffer(); if((!namefirst) && (appendReturnType)) { buffer.append(getReturnType()); - buffer.append(" "); + buffer.append(" "); //$NON-NLS-1$ } buffer.append(getName()); - buffer.append("("); + buffer.append("("); //$NON-NLS-1$ if(getArguments() != null) { buffer.append(getArguments()); } - buffer.append(")"); + buffer.append(")"); //$NON-NLS-1$ if((namefirst) && (appendReturnType) ) { - buffer.append(" "); + buffer.append(" "); //$NON-NLS-1$ buffer.append(getReturnType()); } return buffer.toString(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/ICDTConstants.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/ICDTConstants.java index d48aa6d2167..2a91bc28046 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/ICDTConstants.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/ICDTConstants.java @@ -8,15 +8,15 @@ package org.eclipse.cdt.ui; public interface ICDTConstants { // CDT Extension Points - public static final String EP_TEXT_HOVERS = "textHovers"; + public static final String EP_TEXT_HOVERS = "textHovers"; //$NON-NLS-1$ // Persistance tags. - public static final String TAG_TEXT_HOVER = "textHover"; + public static final String TAG_TEXT_HOVER = "textHover"; //$NON-NLS-1$ // Atributes - public static final String ATT_CLASS = "class"; - public static final String ATT_ID = "id"; - public static final String ATT_NAME = "name"; - public static final String ATT_PERSPECTIVE = "perspective"; + public static final String ATT_CLASS = "class"; //$NON-NLS-1$ + public static final String ATT_ID = "id"; //$NON-NLS-1$ + public static final String ATT_NAME = "name"; //$NON-NLS-1$ + public static final String ATT_PERSPECTIVE = "perspective"; //$NON-NLS-1$ } 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 db8fbcc4772..257c5466003 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 @@ -19,6 +19,7 @@ import java.util.StringTokenizer; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ErrorParserManager; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.wizards.dialogfields.CheckedListDialogField; import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField; @@ -41,9 +42,9 @@ import org.eclipse.ui.help.WorkbenchHelp; public abstract class AbstractErrorParserBlock extends AbstractCOptionPage { - private static final String PREFIX = "ErrorParserBlock"; // $NON-NLS-1$ - private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$ - private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$ + private static final String PREFIX = "ErrorParserBlock"; // $NON-NLS-1$ //$NON-NLS-1$ + private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$ //$NON-NLS-1$ + private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$ //$NON-NLS-1$ private static String[] EMPTY = new String[0]; private Preferences fPrefs; @@ -84,7 +85,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage { */ public String getText(Object element) { String name = (String)mapParsers.get(element.toString()); - return name != null ? name : ""; + return name != null ? name : ""; //$NON-NLS-1$ } }; } @@ -97,7 +98,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage { String parserIDs = prefs.getString(ErrorParserManager.PREF_ERROR_PARSER); String[] empty = new String[0]; if (parserIDs != null && parserIDs.length() > 0) { - StringTokenizer tok = new StringTokenizer(parserIDs, ";"); + StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$ List list = new ArrayList(tok.countTokens()); while (tok.hasMoreElements()) { list.add(tok.nextToken()); @@ -181,20 +182,20 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage { String[] buttonLabels = new String[] { /* 0 */ - "Up", //$NON-NLS-1$ + CUIMessages.getString("AbstractErrorParserBlock.label.up"), //$NON-NLS-1$ /* 1 */ - "Down", //$NON-NLS-1$ + CUIMessages.getString("AbstractErrorParserBlock.label.down"), //$NON-NLS-1$ /* 2 */ null, /* 3 */ - "Select All", //$NON-NLS-1$ + CUIMessages.getString("AbstractErrorParserBlock.label.selectAll"), //$NON-NLS-1$ /* 4 */ - "Unselect All" //$NON-NLS-1$ + CUIMessages.getString("AbstractErrorParserBlock.label.unselectAll") //$NON-NLS-1$ }; fErrorParserList = new CheckedListDialogField(null, buttonLabels, getLabelProvider()); fErrorParserList.setDialogFieldListener(getFieldListenerAdapter()); - fErrorParserList.setLabelText("Error Parsers"); //$NON-NLS-1$ + fErrorParserList.setLabelText(CUIMessages.getString("AbstractErrorParserBlock.label.errorParsers")); //$NON-NLS-1$ fErrorParserList.setUpButtonIndex(0); fErrorParserList.setDownButtonIndex(1); fErrorParserList.setCheckAllButtonIndex(3); @@ -212,7 +213,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage { if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.beginTask("Setting Error Parsers...", 1); + monitor.beginTask(CUIMessages.getString("AbstractErrorParserBlock.task.setErrorParser"), 1); //$NON-NLS-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/BinaryParserBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java index 8c2a508f70e..dd90b4e1482 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 @@ -16,6 +16,7 @@ import java.util.Iterator; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ICDescriptor; import org.eclipse.cdt.core.ICExtensionReference; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; @@ -39,9 +40,9 @@ import org.eclipse.ui.help.WorkbenchHelp; public class BinaryParserBlock extends AbstractBinaryParserPage { - private static final String PREFIX = "BinaryParserBlock"; // $NON-NLS-1$ - private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$ - private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$ + private static final String PREFIX = "BinaryParserBlock"; // $NON-NLS-1$ //$NON-NLS-1$ + private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$ //$NON-NLS-1$ + private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$ //$NON-NLS-1$ private static String[][] radios; protected Combo comboBox; @@ -65,7 +66,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { ControlFactory.createEmptySpace(control, 2); - Label label = ControlFactory.createLabel(control, "Binary Parser:"); + Label label = ControlFactory.createLabel(control, CUIMessages.getString("BinaryParserBlock.binaryParser")); //$NON-NLS-1$ label.setLayoutData(new GridData()); comboBox = new Combo(control, SWT.DROP_DOWN | SWT.READ_ONLY); GridData gd = new GridData(GridData.GRAB_HORIZONTAL); @@ -88,7 +89,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { // Add the Parser UI contribution. Group parserGroup = new Group(control, SWT.SHADOW_ETCHED_IN); - parserGroup.setText("Binary Parser Options"); + parserGroup.setText(CUIMessages.getString("BinaryParserBlock.binaryParserOptions")); //$NON-NLS-1$ GridLayout tabHolderLayout = new GridLayout(); tabHolderLayout.marginHeight = 0; tabHolderLayout.marginWidth = 0; @@ -108,7 +109,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.beginTask("Setting Binary Parser...", 2); + monitor.beginTask(CUIMessages.getString("BinaryParserBlock.settingBinaryParser"), 2); //$NON-NLS-1$ String selected = comboBox.getText(); if (selected != null) { if (initial == null || !selected.equals(initial)) { 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 49919847e5d..f98a6785fc3 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 @@ -16,6 +16,7 @@ import java.io.File; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ICDescriptor; import org.eclipse.cdt.core.ICExtensionReference; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.core.resources.IProject; @@ -63,7 +64,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { String cppfilt = fCPPFiltCommandText.getText().trim(); String cygpath = fCygPathCommandText.getText().trim(); - monitor.beginTask("Saving Attributes", 1); + monitor.beginTask(CUIMessages.getString("BinaryParserPage.task.savingAttributes"), 1); //$NON-NLS-1$ IProject proj = getContainer().getProject(); if (proj != null) { ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(proj); @@ -87,17 +88,17 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { cext = cdesc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID); } if (cext.length > 0) { - String orig = cext[0].getExtensionData("addr2line"); + String orig = cext[0].getExtensionData("addr2line"); //$NON-NLS-1$ if (orig == null || !orig.equals(addr2line)) { - cext[0].setExtensionData("addr2line", addr2line); + cext[0].setExtensionData("addr2line", addr2line); //$NON-NLS-1$ } - orig = cext[0].getExtensionData("c++filt"); + orig = cext[0].getExtensionData("c++filt"); //$NON-NLS-1$ if (orig == null || !orig.equals(cppfilt)) { - cext[0].setExtensionData("c++filt", cppfilt); + cext[0].setExtensionData("c++filt", cppfilt); //$NON-NLS-1$ } - orig = cext[0].getExtensionData("cygpath"); + orig = cext[0].getExtensionData("cygpath"); //$NON-NLS-1$ if (orig == null || !orig.equals(cygpath)) { - cext[0].setExtensionData("cygpath", cygpath); + cext[0].setExtensionData("cygpath", cygpath); //$NON-NLS-1$ } } } else { @@ -149,7 +150,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { Composite comp = ControlFactory.createCompositeEx(parent, 2, GridData.FILL_HORIZONTAL); ((GridLayout) comp.getLayout()).makeColumnsEqualWidth = false; - Label label = ControlFactory.createLabel(comp, "addr2line Command:"); + Label label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.addr2lineCommand")); //$NON-NLS-1$ GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -161,7 +162,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { } }); - Button button = ControlFactory.createPushButton(comp, "&Browse..."); + Button button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleAddr2LineButtonSelected(); @@ -170,7 +171,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { private void handleAddr2LineButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText("addr2line Command"); + dialog.setText("addr2line Command"); //$NON-NLS-1$ String command = fAddr2LineCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { @@ -184,7 +185,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { } }); - label = ControlFactory.createLabel(comp, "c++filt Command:"); + label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -197,7 +198,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - button = ControlFactory.createPushButton(comp, "&Browse..."); + button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleCPPFiltButtonSelected(); @@ -206,7 +207,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { private void handleCPPFiltButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText("c++filt Command"); + dialog.setText("c++filt Command"); //$NON-NLS-1$ String command = fCPPFiltCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { @@ -220,7 +221,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { } }); - label = ControlFactory.createLabel(comp, "cygpath Command:"); + label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.cygpathCommand")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -233,7 +234,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - button = ControlFactory.createPushButton(comp, "&Browse..."); + button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleCygPathButtonSelected(); @@ -242,7 +243,7 @@ public class CygwinPEBinaryParserPage extends AbstractCOptionPage { private void handleCygPathButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText("cygpath Command"); + dialog.setText("cygpath Command"); //$NON-NLS-1$ String command = fCygPathCommandText.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/GNUElfBinaryParserPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/GNUElfBinaryParserPage.java index 1d33158e98b..ec392d35cfd 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/GNUElfBinaryParserPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/GNUElfBinaryParserPage.java @@ -16,6 +16,7 @@ import java.io.File; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ICDescriptor; import org.eclipse.cdt.core.ICExtensionReference; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.core.resources.IProject; @@ -60,7 +61,7 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { String addr2line = fAddr2LineCommandText.getText().trim(); String cppfilt = fCPPFiltCommandText.getText().trim(); - monitor.beginTask("Saving Attributes", 1); + monitor.beginTask(CUIMessages.getString("BinaryParserPage.task.savingAttributes"), 1); //$NON-NLS-1$ IProject proj = getContainer().getProject(); if (proj != null) { ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(proj); @@ -84,13 +85,13 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { cext = cdesc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID); } if (cext.length > 0) { - String orig = cext[0].getExtensionData("addr2line"); + String orig = cext[0].getExtensionData("addr2line"); //$NON-NLS-1$ if (orig == null || !orig.equals(addr2line)) { - cext[0].setExtensionData("addr2line", addr2line); + cext[0].setExtensionData("addr2line", addr2line); //$NON-NLS-1$ } - orig = cext[0].getExtensionData("c++filt"); + orig = cext[0].getExtensionData("c++filt"); //$NON-NLS-1$ if (orig == null || !orig.equals(cppfilt)) { - cext[0].setExtensionData("c++filt", cppfilt); + cext[0].setExtensionData("c++filt", cppfilt); //$NON-NLS-1$ } } } else { @@ -114,8 +115,8 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(proj); ICExtensionReference[] cext = cdesc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID); if (cext.length > 0) { - addr2line = cext[0].getExtensionData("addr2line"); - cppfilt = cext[0].getExtensionData("c++filt"); + addr2line = cext[0].getExtensionData("addr2line"); //$NON-NLS-1$ + cppfilt = cext[0].getExtensionData("c++filt"); //$NON-NLS-1$ } } catch (CoreException e) { } @@ -126,8 +127,8 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { cppfilt = store.getString(PREF_CPPFILT_PATH); } } - fAddr2LineCommandText.setText((addr2line == null || addr2line.length() == 0) ? "addr2line" : addr2line); - fCPPFiltCommandText.setText((cppfilt == null || cppfilt.length() == 0) ? "c++filt" : cppfilt); + fAddr2LineCommandText.setText((addr2line == null || addr2line.length() == 0) ? "addr2line" : addr2line); //$NON-NLS-1$ + fCPPFiltCommandText.setText((cppfilt == null || cppfilt.length() == 0) ? "c++filt" : cppfilt); //$NON-NLS-1$ } /* (non-Javadoc) @@ -137,7 +138,7 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { Composite comp = ControlFactory.createCompositeEx(parent, 2, GridData.FILL_HORIZONTAL); ((GridLayout) comp.getLayout()).makeColumnsEqualWidth = false; - Label label = ControlFactory.createLabel(comp, "addr2line Command:"); + Label label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.addr2lineCommand")); //$NON-NLS-1$ GridData gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -149,7 +150,7 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { } }); - Button button = ControlFactory.createPushButton(comp, "&Browse..."); + Button button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleAddr2LineButtonSelected(); @@ -158,7 +159,7 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { private void handleAddr2LineButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText("addr2line Command"); + dialog.setText("addr2line Command"); //$NON-NLS-1$ String command = fAddr2LineCommandText.getText().trim(); int lastSeparatorIndex = command.lastIndexOf(File.separator); if (lastSeparatorIndex != -1) { @@ -172,7 +173,7 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { } }); - label = ControlFactory.createLabel(comp, "c++filt Command:"); + label = ControlFactory.createLabel(comp, CUIMessages.getString("BinaryParserPage.label.cppfiltCommand")); //$NON-NLS-1$ gd = new GridData(); gd.horizontalSpan = 2; label.setLayoutData(gd); @@ -185,7 +186,7 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { //updateLaunchConfigurationDialog(); } }); - button = ControlFactory.createPushButton(comp, "&Browse..."); + button = ControlFactory.createPushButton(comp, CUIMessages.getString("BinaryParserPage.label.browse")); //$NON-NLS-1$ button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent evt) { handleCPPFiltButtonSelected(); @@ -194,7 +195,7 @@ public class GNUElfBinaryParserPage extends AbstractCOptionPage { private void handleCPPFiltButtonSelected() { FileDialog dialog = new FileDialog(getShell(), SWT.NONE); - dialog.setText("c++filt Command"); + dialog.setText("c++filt Command"); //$NON-NLS-1$ 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 b6ccb9c0819..1b94d309646 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 @@ -14,6 +14,7 @@ import java.util.ArrayList; import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; @@ -38,9 +39,9 @@ import org.eclipse.ui.model.WorkbenchLabelProvider; public class ReferenceBlock extends AbstractCOptionPage { - private static final String PREFIX = "ReferenceBlock"; // $NON-NLS-1$ - private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$ - private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$ + private static final String PREFIX = "ReferenceBlock"; // $NON-NLS-1$ //$NON-NLS-1$ + private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$ //$NON-NLS-1$ + private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$ //$NON-NLS-1$ private CheckboxTableViewer referenceProjectsViewer; @@ -160,7 +161,7 @@ public class ReferenceBlock extends AbstractCOptionPage { if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.beginTask("Reference Projects", 1); + monitor.beginTask(CUIMessages.getString("ReferenceBlock.task.ReferenceProjects"), 1); //$NON-NLS-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 5ac31cc4013..769c63e31d8 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 @@ -14,6 +14,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.utils.ui.controls.TabFolderLayout; import org.eclipse.core.runtime.CoreException; @@ -132,7 +133,7 @@ public abstract class TabFolderOptionBlock { try { tab.performApply(new NullProgressMonitor()); } catch (CoreException e) { - CUIPlugin.errorDialog(composite.getShell(), "Error", "Error setting options", e); + CUIPlugin.errorDialog(composite.getShell(), CUIMessages.getString("TabFolderOptionBlock.error"), CUIMessages.getString("TabFolderOptionBlock.error.settingOptions"), e); //$NON-NLS-1$ //$NON-NLS-2$ return false; } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java index 9632001d92f..42fb4174222 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java @@ -101,7 +101,7 @@ public abstract class NewCProjectWizard extends BasicNewResourceWizard implement protected abstract void doRunEpilogue(IProgressMonitor monitor); protected IStatus isValidName(String name) { - return new Status(IStatus.OK, CUIPlugin.PLUGIN_ID, 0, "", null); + return new Status(IStatus.OK, CUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$ } /** @@ -110,7 +110,7 @@ public abstract class NewCProjectWizard extends BasicNewResourceWizard implement * @return IStatus */ protected IStatus isValidLocation(String projectFieldContents) { - return new Status(IStatus.OK, CUIPlugin.PLUGIN_ID, 0, "", null); + return new Status(IStatus.OK, CUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$ } /** diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizard.java index 1647096b2bb..51f6258bda8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizard.java @@ -31,9 +31,9 @@ public class NewClassWizard extends BasicNewResourceWizard implements INewWizard private NewClassWizardPage fPage; private String wz_title; - private static final String WZ_TITLE = "NewClassWizard.title"; - private static final String WZ_DESC = "NewClassWizard.description"; - private static final String PAGE_TITLE = "NewClassWizard.page.title"; + private static final String WZ_TITLE = "NewClassWizard.title"; //$NON-NLS-1$ + private static final String WZ_DESC = "NewClassWizard.description"; //$NON-NLS-1$ + private static final String PAGE_TITLE = "NewClassWizard.page.title"; //$NON-NLS-1$ /** * "NewClassWizard" constructor. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java index 41542484138..b12d852094f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java @@ -96,9 +96,9 @@ import org.eclipse.ui.internal.WorkbenchPlugin; public class NewClassWizardPage extends WizardPage implements Listener { // the page name - private final static String PAGE_NAME= "NewClassWizardPage"; - private final String HEADER_EXT = ".h"; - private final String BODY_EXT = ".cpp"; + private final static String PAGE_NAME= "NewClassWizardPage"; //$NON-NLS-1$ + private final String HEADER_EXT = ".h"; //$NON-NLS-1$ + private final String BODY_EXT = ".cpp"; //$NON-NLS-1$ // the current resource selection private IStructuredSelection currentSelection; @@ -147,37 +147,37 @@ public class NewClassWizardPage extends WizardPage implements Listener { fClassNameDialogField= new StringDialogField(); fClassNameDialogField.setDialogFieldListener(adapter); - fClassNameDialogField.setLabelText(NewWizardMessages.getString("NewClassWizardPage.classname.label")); + fClassNameDialogField.setLabelText(NewWizardMessages.getString("NewClassWizardPage.classname.label")); //$NON-NLS-1$ fBaseClassDialogField= new StringButtonDialogField(adapter); fBaseClassDialogField.setDialogFieldListener(adapter); - fBaseClassDialogField.setLabelText(NewWizardMessages.getString("NewClassWizardPage.baseclass.label")); - fBaseClassDialogField.setButtonLabel(NewWizardMessages.getString("NewClassWizardPage.baseclass.button")); + fBaseClassDialogField.setLabelText(NewWizardMessages.getString("NewClassWizardPage.baseclass.label")); //$NON-NLS-1$ + fBaseClassDialogField.setButtonLabel(NewWizardMessages.getString("NewClassWizardPage.baseclass.button")); //$NON-NLS-1$ String[] buttonNames1= new String[] { - /* 0 == PUBLIC_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.public"), - /* 1 == PROTECTED_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.protected"), - /* 2 == PRIVATE_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.private"), - /* 3 == DEFAULT_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.access") + /* 0 == PUBLIC_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.public"), //$NON-NLS-1$ + /* 1 == PROTECTED_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.protected"), //$NON-NLS-1$ + /* 2 == PRIVATE_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.private"), //$NON-NLS-1$ + /* 3 == DEFAULT_INDEX */ NewWizardMessages.getString("NewClassWizardPage.baseclass.access.access") //$NON-NLS-1$ }; fAccessButtons= new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames1, 4); fAccessButtons.setDialogFieldListener(adapter); - fAccessButtons.setLabelText(NewWizardMessages.getString("NewClassWizardPage.baseclass.access.label")); + fAccessButtons.setLabelText(NewWizardMessages.getString("NewClassWizardPage.baseclass.access.label")); //$NON-NLS-1$ fAccessButtons.setSelection(0, true); String[] buttonNames2= new String[] { - /* 0 == INLINE_INDEX */ NewWizardMessages.getString("NewClassWizardPage.constdest.inline"), - /* 1 == VIRTUAL_DEST_INDEX */ NewWizardMessages.getString("NewClassWizardPage.constdest.virtualdestructor"), - /* 2 == INCLUDE_GUARD_INDEX */ NewWizardMessages.getString("NewClassWizardPage.constdest.includeguard"), + /* 0 == INLINE_INDEX */ NewWizardMessages.getString("NewClassWizardPage.constdest.inline"), //$NON-NLS-1$ + /* 1 == VIRTUAL_DEST_INDEX */ NewWizardMessages.getString("NewClassWizardPage.constdest.virtualdestructor"), //$NON-NLS-1$ + /* 2 == INCLUDE_GUARD_INDEX */ NewWizardMessages.getString("NewClassWizardPage.constdest.includeguard"), //$NON-NLS-1$ }; fConstDestButtons= new SelectionButtonDialogFieldGroup(SWT.CHECK, buttonNames2, 3); fConstDestButtons.setDialogFieldListener(adapter); linkedResourceGroupForHeader = new LinkToFileGroup(adapter, this); - linkedResourceGroupForHeader.setLabelText(NewWizardMessages.getString("NewClassWizardPage.files.header")); + linkedResourceGroupForHeader.setLabelText(NewWizardMessages.getString("NewClassWizardPage.files.header")); //$NON-NLS-1$ linkedResourceGroupForBody = new LinkToFileGroup(adapter, this); - linkedResourceGroupForBody.setLabelText(NewWizardMessages.getString("NewClassWizardPage.files.body")); + linkedResourceGroupForBody.setLabelText(NewWizardMessages.getString("NewClassWizardPage.files.body")); //$NON-NLS-1$ fClassNameStatus= new StatusInfo(); fBaseClassStatus= new StatusInfo(); @@ -444,7 +444,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { } private void searchForClasses(ICProject cProject, List elementsFound, IProgressMonitor monitor, int worked){ - ICSearchPattern pattern = SearchEngine.createSearchPattern( "*", ICSearchConstants.CLASS, ICSearchConstants.DECLARATIONS, false ); + ICSearchPattern pattern = SearchEngine.createSearchPattern( "*", ICSearchConstants.CLASS, ICSearchConstants.DECLARATIONS, false ); //$NON-NLS-1$ ICElement[] elements = new ICElement[1]; elements[0] = cProject; ICSearchScope scope = SearchEngine.createCSearchScope(elements, true); @@ -505,7 +505,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { dialog.setTitle(NewWizardMessages.getString("BaseClassSelectionDialog.title")); //$NON-NLS-1$ dialog.setMessage(NewWizardMessages.getString("BaseClassSelectionDialog.message")); //$NON-NLS-1$ dialog.setElements(elementsFound.toArray()); - dialog.setFilter("*"); + dialog.setFilter("*"); //$NON-NLS-1$ if (dialog.open() == ElementListSelectionDialog.OK) { Object element= dialog.getFirstResult(); @@ -537,12 +537,12 @@ public class NewClassWizardPage extends WizardPage implements Listener { public String getAccess(){ if(fAccessButtons.isSelected(0)) - return "public"; + return "public"; //$NON-NLS-1$ else if(fAccessButtons.isSelected(1)) - return "protected"; + return "protected"; //$NON-NLS-1$ else if(fAccessButtons.isSelected(2)) - return "private"; - else return ""; + return "private"; //$NON-NLS-1$ + else return ""; //$NON-NLS-1$ } public ITranslationUnit getCreatedClassHeaderFile(){ @@ -571,7 +571,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { try{ String lineDelimiter= null; - lineDelimiter= System.getProperty("line.separator", "\n"); + lineDelimiter= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ parentHeaderTU = createTranslationUnit(linkedResourceGroupForHeader); parentBodyTU = createTranslationUnit(linkedResourceGroupForBody); @@ -802,7 +802,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { StringBuffer text = new StringBuffer(); boolean extendingBase = false; String baseClassName = getBaseClassName(); - String baseClassFileName = ""; + String baseClassFileName = ""; //$NON-NLS-1$ if((baseClassName != null) && (baseClassName.length() > 0)) { extendingBase = true; @@ -819,74 +819,74 @@ public class NewClassWizardPage extends WizardPage implements Listener { } if(isIncludeGuard()){ - text.append("#ifndef "); + text.append("#ifndef "); //$NON-NLS-1$ text.append(getNewClassName().toUpperCase()); - text.append("_H"); + text.append("_H"); //$NON-NLS-1$ text.append(lineDelimiter); - text.append("#define "); + text.append("#define "); //$NON-NLS-1$ text.append(getNewClassName().toUpperCase()); - text.append("_H"); + text.append("_H"); //$NON-NLS-1$ text.append(lineDelimiter); text.append(lineDelimiter); } if(extendingBase){ - text.append("#include \""); + text.append("#include \""); //$NON-NLS-1$ text.append(baseClassFileName); text.append('\"'); text.append(lineDelimiter); text.append(lineDelimiter); } - text.append("class "); + text.append("class "); //$NON-NLS-1$ text.append(getNewClassName()); if(extendingBase){ - text.append(" : "); + text.append(" : "); //$NON-NLS-1$ text.append(getAccess()); - text.append(" "); + text.append(" "); //$NON-NLS-1$ text.append(baseClassName); } - text.append("{"); + text.append("{"); //$NON-NLS-1$ text.append(lineDelimiter); - text.append("public:"); + text.append("public:"); //$NON-NLS-1$ text.append(lineDelimiter); text.append(lineDelimiter); // constructor text.append('\t'); text.append(getNewClassName()); - text.append("()"); + text.append("()"); //$NON-NLS-1$ if(isInline()){ - text.append(" {}"); + text.append(" {}"); //$NON-NLS-1$ text.append(lineDelimiter); }else { - text.append(";"); + text.append(";"); //$NON-NLS-1$ text.append(lineDelimiter); } // destructor text.append('\t'); if(isVirtualDestructor()){ - text.append("virtual "); + text.append("virtual "); //$NON-NLS-1$ } - text.append("~"); + text.append("~"); //$NON-NLS-1$ text.append(getNewClassName()); - text.append("()"); + text.append("()"); //$NON-NLS-1$ if(isInline()){ - text.append(" {}"); + text.append(" {}"); //$NON-NLS-1$ text.append(lineDelimiter); }else { - text.append(";"); + text.append(";"); //$NON-NLS-1$ text.append(lineDelimiter); } - text.append("};"); + text.append("};"); //$NON-NLS-1$ text.append(lineDelimiter); if(isIncludeGuard()){ text.append(lineDelimiter); - text.append("#endif // "); + text.append("#endif // "); //$NON-NLS-1$ text.append(getNewClassName().toUpperCase()); - text.append("_H"); + text.append("_H"); //$NON-NLS-1$ text.append(lineDelimiter); } @@ -895,9 +895,9 @@ public class NewClassWizardPage extends WizardPage implements Listener { protected String constructBodyFileContent(String lineDelimiter){ StringBuffer text = new StringBuffer(); - text.append("#include \""); + text.append("#include \""); //$NON-NLS-1$ text.append(getCreatedClassHeaderFile().getElementName()); - text.append("\""); + text.append("\""); //$NON-NLS-1$ text.append(lineDelimiter); text.append(lineDelimiter); @@ -906,20 +906,20 @@ public class NewClassWizardPage extends WizardPage implements Listener { // constructor text.append(getNewClassName()); - text.append("::"); + text.append("::"); //$NON-NLS-1$ text.append(getNewClassName()); - text.append("()"); + text.append("()"); //$NON-NLS-1$ text.append(lineDelimiter); - text.append("{}"); + text.append("{}"); //$NON-NLS-1$ text.append(lineDelimiter); // destructor text.append(getNewClassName()); - text.append("::~"); + text.append("::~"); //$NON-NLS-1$ text.append(getNewClassName()); - text.append("()"); + text.append("()"); //$NON-NLS-1$ text.append(lineDelimiter); - text.append("{}"); + text.append("{}"); //$NON-NLS-1$ text.append(lineDelimiter); return text.toString(); } @@ -969,7 +969,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { status.setError(NewWizardMessages.getString("NewClassWizardPage.error.EnterClassName")); //$NON-NLS-1$ return status; } - if (className.indexOf("::") != -1) { + if (className.indexOf("::") != -1) { //$NON-NLS-1$ status.setError(NewWizardMessages.getString("NewClassWizardPage.error.QualifiedName")); //$NON-NLS-1$ return status; } 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 1d9e42c395e..89deb2a6ef5 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 @@ -10,6 +10,7 @@ import java.util.Vector; import org.eclipse.cdt.core.CCProjectNature; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CProjectNature; +import org.eclipse.cdt.internal.ui.CUIMessages; import org.eclipse.cdt.internal.ui.util.SWTUtil; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; @@ -67,9 +68,9 @@ import org.eclipse.ui.PlatformUI; public abstract class ConvertProjectWizardPage extends WizardPage { - public static final String KEY_TITLE = "ConvertionWizard.title"; - public static final String KEY_CONVERTING = "ConvertionWizard.converting"; - private static final String PROJECT_LIST = "ConversionWizard.projectlist"; + public static final String KEY_TITLE = "ConvertionWizard.title"; //$NON-NLS-1$ + public static final String KEY_CONVERTING = "ConvertionWizard.converting"; //$NON-NLS-1$ + private static final String PROJECT_LIST = "ConversionWizard.projectlist"; //$NON-NLS-1$ protected boolean convertToC = false; protected boolean convertToCC = true; @@ -138,7 +139,7 @@ public abstract class ConvertProjectWizardPage protected void addToMainPage(Composite container){ // Add convert to C or C/C++ buttons - Composite area = ControlFactory.createGroup(container, "Convert to C or C++", 2); + Composite area = ControlFactory.createGroup(container, CUIMessages.getString("ConvertProjectWizardPage.convertTo"), 2); //$NON-NLS-1$ SelectionListener cListener = new SelectionAdapter() { @@ -149,13 +150,13 @@ public abstract class ConvertProjectWizardPage } }; cRadioButton = ControlFactory.createRadioButton(area, - "C Project", - "C ", + CUIMessages.getString("ConvertProjectWizardPage.CProject"), //$NON-NLS-1$ + "C ", //$NON-NLS-1$ cListener); cRadioButton.setSelection(convertToC); ccRadioButton = ControlFactory.createRadioButton(area, - "C++ Project", - "C++", + CUIMessages.getString("ConvertProjectWizardPage.CppProject"), //$NON-NLS-1$ + "C++", //$NON-NLS-1$ cListener); ccRadioButton.setSelection(convertToCC); @@ -359,7 +360,7 @@ public abstract class ConvertProjectWizardPage return ((IProject)obj).getName(); } - return ""; + return ""; //$NON-NLS-1$ } public Image getColumnImage(Object obj, int index) {