1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 53123 - Externalize Strings

This commit is contained in:
Andrew Niefer 2004-02-26 19:30:36 +00:00
parent 5573057ddc
commit 1738ff2644
104 changed files with 873 additions and 772 deletions

View file

@ -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$
}

View file

@ -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.

View file

@ -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$

View file

@ -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);

View file

@ -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$
}
}
}

View file

@ -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

View file

@ -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 <code>TextBufferEditor</code> manages a set of <code>TextEdit</code>s and applies
* them as a whole to a <code>TextBuffer</code>. Added <code>TextEdit</code>s 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);
}
}

View file

@ -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;

View file

@ -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$
}
});
}

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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$
}
/**

View file

@ -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

View file

@ -9,41 +9,41 @@ public interface ICElementPropertyConstants {
/**
* The <code>ICElement</code> 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 <code>ICElement</code> 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 <code>ICElement</code> 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 <code>ICElement</code> 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 <code>ICElement</code> 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 <code>ICElement</code> 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 <code>ICElement</code> 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 <code>ICElement</code> property key for elf type.
*/
public static final String P_ELF_NEEDED = "needed";
public static final String P_ELF_NEEDED = "needed"; //$NON-NLS-1$
}

View file

@ -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$

View file

@ -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) {

View file

@ -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);
}

View file

@ -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;

View file

@ -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$
}
}

View file

@ -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) {

View file

@ -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)

View file

@ -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) {

View file

@ -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);

View file

@ -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$
}

View file

@ -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() {

View file

@ -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

View file

@ -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();
}
}

View file

@ -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();

View file

@ -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$
}
}

View file

@ -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());

View file

@ -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) {

View file

@ -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);
}

View file

@ -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)

View file

@ -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();

View file

@ -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$
}
}
}

View file

@ -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=<b>Name:</b>
DefaultCEditorTextHover.html.prototype=<br><b>Protoype:</b>
DefaultCEditorTextHover.html.description=<br><b>Description:</b><br>
CContentOutlinePage.menu.fileSearch=File Search
CContentOutlinePage.error.noInput=no Editor Input
CEditor.menu.fileSearch=File Search

View file

@ -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;

View file

@ -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$
}

View file

@ -50,12 +50,12 @@ public class DefaultCEditorTextHover implements ITextHover
IFunctionSummary fs = CCompletionContributorManager.getDefault().getFunctionInfo(expression);
if(fs != null) {
buffer.append("<b>Name:</b> ");
buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.name")); //$NON-NLS-1$
buffer.append(HTMLPrinter.convertToHTMLContent(fs.getName()));
buffer.append("<br><b>Protoype:</b> ");
buffer.append(CEditorMessages.getString("DefaultCEditorTextHover.html.prototype")); //$NON-NLS-1$
buffer.append(HTMLPrinter.convertToHTMLContent(fs.getPrototype().getPrototypeString(false)));
if(fs.getDescription() != null) {
buffer.append("<br><b>Description:</b><br>");
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());
}

View file

@ -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 <cstring>
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);

View file

@ -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);

View file

@ -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) {

View file

@ -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();

View file

@ -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);
}

View file

@ -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 );

View file

@ -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));

View file

@ -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()];

View file

@ -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);

View file

@ -39,3 +39,4 @@ TypeSelectionDialog.error3Title=Exception
TypeInfoLabelProvider.default_filename=default
TypeInfoLabelProvider.dash=\ -
TypeInfoLabelProvider.colon=\ :
TypeSelectionDialog.unknown=Unknown

View file

@ -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);

View file

@ -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 {

View file

@ -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 );

View file

@ -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&reground:");
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 &current 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;

View file

@ -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);

View file

@ -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));

View file

@ -85,3 +85,30 @@ CEditorPreferencePage.ContentAssistPage.completionProposalForegroundColor=&Foreg
CEditorPreferencePage.ContentAssistPage.parameterBackgroundColor=Bac&kground for method parameters:
CEditorPreferencePage.ContentAssistPage.parameterForegroundColor=Fo&reground 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&reground:
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 &current line
CEditorPreferencePage.behaviorPage.printMargin=Show print &margin
CEditorPreferencePage.textFont.changeButton=C&hange...
TemplatePreferencePage.Viewer.preview=Preview:
BuildConsolePreferencePage.fieldEditors.buildConsoleLines=&Build console lines:

View file

@ -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() {

View file

@ -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$
}
}

View file

@ -94,3 +94,4 @@ HierarchyScope= Hierarchy - {0}
CElementLabels.concat_string=\ -\
CElementLabels.comma_string=,\
CElementLabels.declseparator_string=\ :\
CSearchResultCollector.4=IMatchObject

View file

@ -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$
}
}

View file

@ -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;
}

View file

@ -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$
/**
*

View file

@ -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$ }
}

View file

@ -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;

View file

@ -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();

View file

@ -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()

View file

@ -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()

View file

@ -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()

View file

@ -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()

View file

@ -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();

View file

@ -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);
}
}

View file

@ -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.

View file

@ -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);

View file

@ -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;
}

View file

@ -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$

View file

@ -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();

View file

@ -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);

View file

@ -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;

View file

@ -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();

View file

@ -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

View file

@ -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<kinds.length; i++){
LookupKind kind = kinds[i];
if(kind == IASTNode.LookupKind.ALL)
kindName.append("ALL");
kindName.append("ALL"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.STRUCTURES)
kindName.append("STRUCTURES");
kindName.append("STRUCTURES"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.STRUCTS)
kindName.append("STRUCTS");
kindName.append("STRUCTS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.UNIONS)
kindName.append("UNIONS");
kindName.append("UNIONS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.CLASSES)
kindName.append("CLASSES");
kindName.append("CLASSES"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.FUNCTIONS)
kindName.append("FUNCTIONS");
kindName.append("FUNCTIONS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.VARIABLES)
kindName.append("VARIABLES");
kindName.append("VARIABLES"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.LOCAL_VARIABLES)
kindName.append("LOCAL_VARIABLES");
kindName.append("LOCAL_VARIABLES"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.MEMBERS)
kindName.append("MEMBERS");
kindName.append("MEMBERS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.METHODS)
kindName.append("METHODS");
kindName.append("METHODS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.FIELDS)
kindName.append("FIELDS");
kindName.append("FIELDS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.CONSTRUCTORS)
kindName.append("CONSTRUCTORS");
kindName.append("CONSTRUCTORS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.NAMESPACES)
kindName.append("NAMESPACES");
kindName.append("NAMESPACES"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.ENUMERATIONS)
kindName.append("ENUMERATIONS");
kindName.append("ENUMERATIONS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.ENUMERATORS)
kindName.append("ENUMERATORS");
kindName.append("ENUMERATORS"); //$NON-NLS-1$
else if(kind == IASTNode.LookupKind.THIS)
kindName.append("THIS");
kindName.append("THIS"); //$NON-NLS-1$
kindName.append(", ");
kindName.append(", "); //$NON-NLS-1$
}
log (kindName.toString());
}

View file

@ -25,35 +25,35 @@ public class ContentAssistPreference {
/** Preference key for content assist auto activation */
//public final static String AUTOACTIVATION= "content_assist_autoactivation";
/** Preference key for content assist auto activation delay */
public final static String AUTOACTIVATION_DELAY= "content_assist_autoactivation_delay";
public final static String AUTOACTIVATION_DELAY= "content_assist_autoactivation_delay"; //$NON-NLS-1$
/** Preference key for content assist proposal color */
public final static String PROPOSALS_FOREGROUND= "content_assist_proposals_foreground";
public final static String PROPOSALS_FOREGROUND= "content_assist_proposals_foreground"; //$NON-NLS-1$
/** Preference key for content assist proposal color */
public final static String PROPOSALS_BACKGROUND= "content_assist_proposals_background";
public final static String PROPOSALS_BACKGROUND= "content_assist_proposals_background"; //$NON-NLS-1$
/** Preference key for content assist parameters color */
public final static String PARAMETERS_FOREGROUND= "content_assist_parameters_foreground";
public final static String PARAMETERS_FOREGROUND= "content_assist_parameters_foreground"; //$NON-NLS-1$
/** Preference key for content assist parameters color */
public final static String PARAMETERS_BACKGROUND= "content_assist_parameters_background";
public final static String PARAMETERS_BACKGROUND= "content_assist_parameters_background"; //$NON-NLS-1$
/** Preference key for content assist auto insert */
public final static String AUTOINSERT= "content_assist_autoinsert";
public final static String AUTOINSERT= "content_assist_autoinsert"; //$NON-NLS-1$
/** Preference key for C/CPP content assist auto activation triggers */
public final static String AUTOACTIVATION_TRIGGERS_DOT= "content_assist_autoactivation_trigger_dot";
public final static String AUTOACTIVATION_TRIGGERS_ARROW= "content_assist_autoactivation_trigger_arrow";
public final static String AUTOACTIVATION_TRIGGERS_DOUBLECOLON= "content_assist_autoactivation_trigger_doublecolon";
public final static String AUTOACTIVATION_TRIGGERS_DOT= "content_assist_autoactivation_trigger_dot"; //$NON-NLS-1$
public final static String AUTOACTIVATION_TRIGGERS_ARROW= "content_assist_autoactivation_trigger_arrow"; //$NON-NLS-1$
public final static String AUTOACTIVATION_TRIGGERS_DOUBLECOLON= "content_assist_autoactivation_trigger_doublecolon"; //$NON-NLS-1$
/** Preference key for visibility of proposals */
public final static String SHOW_DOCUMENTED_PROPOSALS= "content_assist_show_visible_proposals";
public final static String SHOW_DOCUMENTED_PROPOSALS= "content_assist_show_visible_proposals"; //$NON-NLS-1$
/** Preference key for alphabetic ordering of proposals */
public final static String ORDER_PROPOSALS= "content_assist_order_proposals";
public final static String ORDER_PROPOSALS= "content_assist_order_proposals"; //$NON-NLS-1$
/** Preference key for case sensitivity of propsals */
//public final static String CASE_SENSITIVITY= "content_assist_case_sensitivity";
/** Preference key for adding imports on code assist */
public final static String ADD_INCLUDE= "content_assist_add_import";
public final static String ADD_INCLUDE= "content_assist_add_import"; //$NON-NLS-1$
/** Preference key for completion search scope */
public final static String CURRENT_FILE_SEARCH_SCOPE= "content_assist_current_file_search_scope";
public final static String CURRENT_FILE_SEARCH_SCOPE= "content_assist_current_file_search_scope"; //$NON-NLS-1$
/** Preference key for completion search scope */
public final static String PROJECT_SEARCH_SCOPE= "content_assist_project_search_scope";
public final static String PROJECT_SEARCH_SCOPE= "content_assist_project_search_scope"; //$NON-NLS-1$
private static Color getColor(IPreferenceStore store, String key, IColorManager manager) {
RGB rgb= PreferenceConverter.getColor(store, key);
@ -77,16 +77,16 @@ public class ContentAssistPreference {
if (jcp == null)
return;
String triggers = "";
String triggers = ""; //$NON-NLS-1$
boolean useDotAsTrigger = store.getBoolean(AUTOACTIVATION_TRIGGERS_DOT);
if(useDotAsTrigger)
triggers = ".";
triggers = "."; //$NON-NLS-1$
boolean useArrowAsTrigger = store.getBoolean(AUTOACTIVATION_TRIGGERS_ARROW);
if(useArrowAsTrigger)
triggers += ">";
triggers += ">"; //$NON-NLS-1$
boolean useDoubleColonAsTrigger = store.getBoolean(AUTOACTIVATION_TRIGGERS_DOUBLECOLON);
if(useDoubleColonAsTrigger)
triggers += ":";
triggers += ":"; //$NON-NLS-1$
jcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
boolean enabled= store.getBoolean(SHOW_DOCUMENTED_PROPOSALS);
@ -149,19 +149,19 @@ public class ContentAssistPreference {
if (AUTOACTIVATION_TRIGGERS_DOT.equals(key)) {
boolean useDotAsTrigger = store.getBoolean(AUTOACTIVATION_TRIGGERS_DOT);
if (useDotAsTrigger){
String triggers= ".";
String triggers= "."; //$NON-NLS-1$
jcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
}
} else if (AUTOACTIVATION_TRIGGERS_ARROW.equals(key)) {
boolean useArrowAsTrigger = store.getBoolean(AUTOACTIVATION_TRIGGERS_ARROW);
if (useArrowAsTrigger){
String triggers= ">";
String triggers= ">"; //$NON-NLS-1$
jcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
}
} else if (AUTOACTIVATION_TRIGGERS_DOUBLECOLON.equals(key)) {
boolean useDoubleColonAsTrigger = store.getBoolean(AUTOACTIVATION_TRIGGERS_DOUBLECOLON);
if (useDoubleColonAsTrigger){
String triggers= ":";
String triggers= ":"; //$NON-NLS-1$
jcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray());
}
} else if (SHOW_DOCUMENTED_PROPOSALS.equals(key)) {

View file

@ -88,8 +88,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
*/
public void acceptField(String name, String returnType, ASTAccessVisibility visibility,
int completionStart, int completionLength, int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -97,7 +97,7 @@ public class ResultCollector extends CompletionRequestorAdaptor {
replaceString = name;
displayString = name;
if(returnType != null)
displayString+= " : " + returnType;
displayString+= " : " + returnType; //$NON-NLS-1$
// get the image
ImageDescriptor imageDescriptor = CElementImageProvider.getFieldImageDescriptor(visibility);
@ -116,8 +116,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -145,9 +145,9 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String arguments = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
String arguments = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -155,11 +155,11 @@ public class ResultCollector extends CompletionRequestorAdaptor {
// fill the replace, display and info strings
replaceString = name;
displayString = name;
String functionPrototype = returnType + " " + name;
String functionPrototype = returnType + " " + name; //$NON-NLS-1$
if(parameterString != null){
if ((parameterString.indexOf("(") == -1) && (parameterString.indexOf(")") == -1))
if ((parameterString.indexOf("(") == -1) && (parameterString.indexOf(")") == -1)) //$NON-NLS-1$ //$NON-NLS-2$
{
functionPrototype += "(" + parameterString + ")";
functionPrototype += "(" + parameterString + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
else {
functionPrototype += parameterString;
@ -168,7 +168,7 @@ public class ResultCollector extends CompletionRequestorAdaptor {
FunctionPrototypeSummary fproto = new FunctionPrototypeSummary(functionPrototype);
if(fproto != null) {
replaceString = fproto.getName() + "()";
replaceString = fproto.getName() + "()"; //$NON-NLS-1$
displayString = fproto.getPrototypeString(true);
infoString.append(displayString);
arguments = fproto.getArguments();
@ -194,8 +194,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -203,7 +203,7 @@ public class ResultCollector extends CompletionRequestorAdaptor {
replaceString = name;
displayString = name;
if(returnType != null)
displayString+= " : " + returnType;
displayString+= " : " + returnType; //$NON-NLS-1$
// get the image
ImageDescriptor imageDescriptor = CElementImageProvider.getLocalVariableImageDescriptor();
@ -223,15 +223,15 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String arguments = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
String arguments = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
String prototype = "";
String prototype = ""; //$NON-NLS-1$
// fill the replace, display and info strings
final String DEFINE ="#define ";
final String DEFINE ="#define "; //$NON-NLS-1$
if(name.startsWith(DEFINE)){
prototype = name.substring(DEFINE.length(), name.length());
}else {
@ -245,7 +245,7 @@ public class ResultCollector extends CompletionRequestorAdaptor {
}else {
FunctionPrototypeSummary fproto = new FunctionPrototypeSummary(prototype);
if(fproto != null) {
replaceString = fproto.getName() + "()";
replaceString = fproto.getName() + "()"; //$NON-NLS-1$
displayString = fproto.getPrototypeString(true, false);
infoString.append(displayString);
arguments = fproto.getArguments();
@ -276,20 +276,20 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String arguments = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
String arguments = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
// fill the replace, display and info strings
replaceString = name;
displayString = name;
String functionPrototype = returnType + " " + name;
String functionPrototype = returnType + " " + name; //$NON-NLS-1$
if(parameterString != null){
if ((parameterString.indexOf("(") == -1) && (parameterString.indexOf(")") == -1))
if ((parameterString.indexOf("(") == -1) && (parameterString.indexOf(")") == -1)) //$NON-NLS-1$ //$NON-NLS-2$
{
functionPrototype += "(" + parameterString + ")";
functionPrototype += "(" + parameterString + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
else {
functionPrototype += parameterString;
@ -298,7 +298,7 @@ public class ResultCollector extends CompletionRequestorAdaptor {
FunctionPrototypeSummary fproto = new FunctionPrototypeSummary(functionPrototype);
if(fproto != null) {
replaceString = fproto.getName() + "()";
replaceString = fproto.getName() + "()"; //$NON-NLS-1$
displayString = fproto.getPrototypeString(true);
infoString.append(displayString);
arguments = fproto.getArguments();
@ -322,8 +322,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -349,8 +349,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -375,8 +375,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -402,8 +402,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -411,7 +411,7 @@ public class ResultCollector extends CompletionRequestorAdaptor {
replaceString = name;
displayString = name;
if(returnType != null)
displayString+= " : " + returnType;
displayString+= " : " + returnType; //$NON-NLS-1$
// get the image
ImageDescriptor imageDescriptor = CElementImageProvider.getVariableImageDescriptor();
@ -429,8 +429,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -457,8 +457,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();
@ -485,8 +485,8 @@ public class ResultCollector extends CompletionRequestorAdaptor {
int completionStart,
int completionLength,
int relevance) {
String replaceString = "";
String displayString = "";
String replaceString = ""; //$NON-NLS-1$
String displayString = ""; //$NON-NLS-1$
Image image = null;
StringBuffer infoString = new StringBuffer();

View file

@ -61,7 +61,7 @@ public class LinkedPositionUI implements LinkedPositionListener,
private static final int DOCUMENT_CHANGED= 4; // document has changed
public static final int UPDATE_CARET= 8; // update caret
private static final String CARET_POSITION= "LinkedPositionUI.caret.position";
private static final String CARET_POSITION= "LinkedPositionUI.caret.position"; //$NON-NLS-1$
private static final IPositionUpdater fgUpdater= new DefaultPositionUpdater(CARET_POSITION);
private static final IPreferenceStore fgStore= CUIPlugin.getDefault().getPreferenceStore();

View file

@ -114,7 +114,7 @@ public class TemplateProposal implements ICCompletionProposal {
for (int i= 0; i != variables.length; i++) {
TemplatePosition variable= variables[i];
if (variable.getName().equals("cursor"))
if (variable.getName().equals("cursor")) //$NON-NLS-1$
return variable.getOffsets()[0];
}

View file

@ -30,9 +30,9 @@ public class Util implements IDebugLogConstants{
while (message.length() > 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);

View file

@ -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();
}

View file

@ -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) == '_') {

View file

@ -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;
}

View file

@ -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) {

View file

@ -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();

View file

@ -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$
}

View file

@ -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);

View file

@ -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)) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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);

View file

@ -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;
}
}

Some files were not shown because too many files have changed in this diff Show more