[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] String externalization work for managedbuilder.core
|
Hi
Please find enclosed a patch that marks those strings that are non-translatable
as such and externalizes those strings that can be translated in managedbuilder.core.
Cheers!
James
Index: ChangeLog
===================================================================
retrieving revision 1.20
diff -u -r1.20 ChangeLog
--- ChangeLog 27 Feb 2004 14:54:22 -0000 1.20
+++ ChangeLog 2 Mar 2004 15:12:00 -0000
@@ -1,3 +1,22 @@
+2004-03-01 James Ciesielski
+
+ Marked those strings that are non-translatable as such and externalized
+ those strings that can be translated. There is still work to be done in
+ this area for this plugin.
+
+ * src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java
+ * src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderManager.java
+ * src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
+ * src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
+
2004-02-26 Jeremiah Lott
Added a header to the automatically generated makefiles to alert users
not to edit them. Also added includes directives to bring in user-supplied
Index: src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
===================================================================
retrieving revision 1.4
diff -u -r1.4 ManagedBuildManager.java
--- src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java 26 Feb 2004 20:53:54 -0000 1.4
+++ src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java 2 Mar 2004 15:12:01 -0000
@@ -34,6 +34,7 @@
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.managedbuilder.internal.core.Target;
import org.eclipse.cdt.managedbuilder.internal.core.Tool;
import org.eclipse.core.resources.IFile;
@@ -63,7 +64,7 @@
public static final String EXTENSION_POINT_ID = "ManagedBuildInfo"; //$NON-NLS-1$
// This is the version of the manifest and project files that
- private static final String buildInfoVersion = "2.0.0";
+ private static final String buildInfoVersion = "2.0.0"; //$NON-NLS-1$
private static boolean extensionTargetsLoaded = false;
private static Map extensionTargetMap;
private static List extensionTargets;
@@ -298,7 +299,7 @@
String xml = null;
try {
Serializer serializer
- = SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(new OutputStreamWriter(s, "UTF8"), format);
+ = SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(new OutputStreamWriter(s, "UTF8"), format); //$NON-NLS-1$
serializer.asDOMSerializer().serialize(doc);
xml = s.toString("UTF8"); //$NON-NLS-1$
IFile rscFile = project.getFile(FILE_NAME);
@@ -405,13 +406,13 @@
if (resource instanceof IProject) {
// Must be an extension target (why?)
if (owner != null)
- throw new BuildException("addTarget: owner not null");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("ManagedBuildManager.error.owner_not_null")); //$NON-NLS-1$
} else {
// Owner must be owned by the project containing this resource
if (owner == null)
- throw new BuildException("addTarget: null owner");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("ManagedBuildManager.error.null_owner")); //$NON-NLS-1$
if (!owner.equals(resource.getProject()))
- throw new BuildException("addTarget: owner not project");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("ManagedBuildManager.error.owner_not_project")); //$NON-NLS-1$
}
// Passed validation
Index: src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java
===================================================================
retrieving revision 1.1
diff -u -r1.1 ManagedBuilderCorePlugin.java
--- src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java 15 Sep 2003 20:44:24 -0000 1.1
+++ src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java 2 Mar 2004 15:12:01 -0000
@@ -50,9 +50,9 @@
try {
return resourceBundle.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$
}
}
Index: src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java
===================================================================
retrieving revision 1.1
diff -u -r1.1 ManagedCProjectNature.java
--- src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java 15 Sep 2003 20:44:24 -0000 1.1
+++ src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java 2 Mar 2004 15:12:01 -0000
@@ -27,7 +27,7 @@
public class ManagedCProjectNature implements IProjectNature {
public static final String BUILDER_NAME = "genmakebuilder";
- public static final String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME;
+ public static final String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
private static final String MNG_NATURE_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".managedBuildNature";
private IProject project;
@@ -50,7 +50,7 @@
// TODO Remove this when the new StandardBuild nature adds the cbuilder
for (int i = 0; i < commands.length; i++) {
ICommand command = commands[i];
- if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) {
+ if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) { //$NON-NLS-1$
// Remove the command
Vector vec = new Vector(Arrays.asList(commands));
vec.removeElementAt(i);
@@ -112,7 +112,7 @@
Plugin plugin = (Plugin)ManagedBuilderCorePlugin.getDefault();
IPluginDescriptor descriptor = plugin.getDescriptor();
if (descriptor.getExtension(BUILDER_NAME) != null) {
- return descriptor.getUniqueIdentifier() + "." + BUILDER_NAME;
+ return descriptor.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
}
return BUILDER_ID;
}
Index: src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
===================================================================
retrieving revision 1.6
diff -u -r1.6 Configuration.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java 26 Feb 2004 20:53:54 -0000 1.6
+++ src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java 2 Mar 2004 15:12:01 -0000
@@ -18,6 +18,7 @@
import org.eclipse.cdt.core.CCProjectNature;
import org.eclipse.cdt.core.CProjectNature;
import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IOption;
import org.eclipse.cdt.managedbuilder.core.ITarget;
@@ -463,6 +464,6 @@
* @see java.lang.Object#toString()
*/
public String toString() {
- return new String("Configuration: ") + getName();
+ return new String(ManagedBuilderCorePlugin.getFormattedString("Configuration.label.Configuration", getName())); //$NON-NLS-1$
}
}
Index: src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
===================================================================
retrieving revision 1.9
diff -u -r1.9 GeneratedMakefileBuilder.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java 24 Feb 2004 21:25:12 -0000 1.9
+++ src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java 2 Mar 2004 15:12:01 -0000
@@ -206,9 +206,9 @@
protected String[] getMakeTargets(boolean fullBuild) {
List args = new ArrayList();
if (fullBuild) {
- args.add("clean");
+ args.add("clean"); //$NON-NLS-1$
}
- args.add("all");
+ args.add("all"); //$NON-NLS-1$
return (String[])args.toArray(new String[args.size()]);
}
@@ -337,7 +337,7 @@
ArrayList makeArgs = new ArrayList();
String arg = info.getMakeArguments();
if (arg.length() > 0) {
- String[] args = arg.split("\\s");
+ String[] args = arg.split("\\s"); //$NON-NLS-1$
for (int i = 0; i < args.length; ++i) {
makeArgs.add(args[i]);
}
@@ -406,13 +406,13 @@
if (errMsg != null && errMsg.length() > 0) {
String errorDesc = ManagedBuilderCorePlugin.getResourceString(BUILD_ERROR);
buf.append(errorDesc);
- buf.append(System.getProperty("line.separator", "\n"));
- buf.append("(").append(errMsg).append(")");
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-2$
+ buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
// Report a successful build
String successMsg = ManagedBuilderCorePlugin.getFormattedString(BUILD_FINISHED, currentProject.getName());
buf.append(successMsg);
- buf.append(System.getProperty("line.separator", "\n"));
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-2$
}
// Write message on the console
Index: src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
===================================================================
retrieving revision 1.14
diff -u -r1.14 MakefileGenerator.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java 27 Feb 2004 14:54:22 -0000 1.14
+++ src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java 2 Mar 2004 15:12:01 -0000
@@ -321,7 +321,7 @@
// Calculate the new directory relative to the build output
IPath moduleRelativePath = module.getProjectRelativePath();
String relativePath = moduleRelativePath.toString();
- relativePath += relativePath.length() == 0 ? "" : SEPARATOR;
+ relativePath += relativePath.length() == 0 ? "" : SEPARATOR; //$NON-NLS-1$
// Create the buffer to hold the output for the module and a dep calculator
StringBuffer buffer = new StringBuffer();
@@ -381,13 +381,13 @@
*/
private String escapeWhitespaces(String path) {
// Escape the spaces in the path/filename if it has any
- String[] segments = path.split("\\s");
+ String[] segments = path.split("\\s"); //$NON-NLS-1$
if (segments.length > 1) {
StringBuffer escapedPath = new StringBuffer();
for (int index = 0; index < segments.length; ++index) {
escapedPath.append(segments[index]);
if (index + 1 < segments.length) {
- escapedPath.append("\\ ");
+ escapedPath.append("\\ "); //$NON-NLS-1$
}
}
return escapedPath.toString().trim();
@@ -432,27 +432,27 @@
StringBuffer buffer = new StringBuffer();
// Add the ROOT macro
- buffer.append("ROOT := .." + NEWLINE);
+ buffer.append("ROOT := .." + NEWLINE); //$NON-NLS-1$
buffer.append(NEWLINE);
// include makefile.init supplementary makefile
- buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_INIT + NEWLINE);
+ buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_INIT + NEWLINE); //$NON-NLS-1$
buffer.append(NEWLINE);
// Get the clean command from the build model
- buffer.append("RM := ");
+ buffer.append("RM := "); //$NON-NLS-1$
buffer.append(info.getCleanCommand() + NEWLINE);
buffer.append(NEWLINE);
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(SRC_LISTS) + NEWLINE);
- buffer.append("C_SRCS := " + NEWLINE);
- buffer.append("CC_SRCS := " + NEWLINE);
- buffer.append("CXX_SRCS := " + NEWLINE);
- buffer.append("CAPC_SRCS := " + NEWLINE);
- buffer.append("CPP_SRCS := " + NEWLINE + NEWLINE);
+ buffer.append("C_SRCS := " + NEWLINE); //$NON-NLS-1$
+ buffer.append("CC_SRCS := " + NEWLINE); //$NON-NLS-1$
+ buffer.append("CXX_SRCS := " + NEWLINE); //$NON-NLS-1$
+ buffer.append("CAPC_SRCS := " + NEWLINE); //$NON-NLS-1$
+ buffer.append("CPP_SRCS := " + NEWLINE + NEWLINE); //$NON-NLS-1$
// Add the libraries this project depends on
- buffer.append("LIBS := ");
+ buffer.append("LIBS := "); //$NON-NLS-1$
String[] libs = info.getLibsForTarget(extension);
for (int i = 0; i < libs.length; i++) {
String string = libs[i];
@@ -461,7 +461,7 @@
buffer.append(NEWLINE + NEWLINE);
// Add the extra user-specified objects
- buffer.append("USER_OBJS := ");
+ buffer.append("USER_OBJS := "); //$NON-NLS-1$
String[] userObjs = info.getUserObjectsForTarget(extension);
for (int j = 0; j < userObjs.length; j++) {
String string = userObjs[j];
@@ -469,7 +469,7 @@
}
buffer.append(NEWLINE + NEWLINE);
- buffer.append("OBJS = $(C_SRCS:$(ROOT)/%.c=%.o) $(CC_SRCS:$(ROOT)/%.cc=%.o) $(CXX_SRCS:$(ROOT)/%.cxx=%.o) $(CAPC_SRCS:$(ROOT)/%.C=%.o) $(CPP_SRCS:$(ROOT)/%.cpp=%.o)" + NEWLINE);
+ buffer.append("OBJS = $(C_SRCS:$(ROOT)/%.c=%.o) $(CC_SRCS:$(ROOT)/%.cc=%.o) $(CXX_SRCS:$(ROOT)/%.cxx=%.o) $(CAPC_SRCS:$(ROOT)/%.C=%.o) $(CPP_SRCS:$(ROOT)/%.cpp=%.o)" + NEWLINE); //$NON-NLS-1$
return (buffer.append(NEWLINE));
}
@@ -480,7 +480,7 @@
StringBuffer buffer = new StringBuffer();
// Add the comment
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_LIST) + NEWLINE);
- buffer.append("SUBDIRS := " + LINEBREAK + NEWLINE);
+ buffer.append("SUBDIRS := " + LINEBREAK + NEWLINE); //$NON-NLS-1$
// Get all the module names
ListIterator iter = getSubdirList().listIterator();
@@ -488,7 +488,7 @@
IContainer container = (IContainer) iter.next();
// Check the special case where the module is the project root
if (container.getFullPath() == project.getFullPath()) {
- buffer.append("." + WHITESPACE + LINEBREAK + NEWLINE);
+ buffer.append("." + WHITESPACE + LINEBREAK + NEWLINE); //$NON-NLS-1$
} else {
IPath path = container.getProjectRelativePath();
buffer.append(path.toString() + WHITESPACE + LINEBREAK + NEWLINE);
@@ -498,11 +498,11 @@
// Now add the makefile instruction to include all the subdirectory makefile fragments
buffer.append(NEWLINE);
buffer.append(COMMENT_SYMBOL +WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_INCL) + NEWLINE);
- buffer.append("-include ${patsubst %, %/subdir.mk, $(SUBDIRS)}" + NEWLINE);
+ buffer.append("-include ${patsubst %, %/subdir.mk, $(SUBDIRS)}" + NEWLINE); //$NON-NLS-1$
buffer.append(NEWLINE);
// Include makefile.defs supplemental makefile
- buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_DEFS + NEWLINE);
+ buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_DEFS + NEWLINE); //$NON-NLS-1$
buffer.append(NEWLINE);
return buffer;
@@ -520,20 +520,20 @@
// Calculate the new directory relative to the build output
IPath moduleRelativePath = module.getProjectRelativePath();
String relativePath = moduleRelativePath.toString();
- relativePath += relativePath.length() == 0 ? "" : SEPARATOR;
+ relativePath += relativePath.length() == 0 ? "" : SEPARATOR; //$NON-NLS-1$
// String buffers
StringBuffer buffer = new StringBuffer();
- StringBuffer cBuffer = new StringBuffer("C_SRCS += " + LINEBREAK + NEWLINE);
- cBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
- StringBuffer ccBuffer = new StringBuffer("CC_SRCS += \\" + NEWLINE);
- ccBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
- StringBuffer cxxBuffer = new StringBuffer("CXX_SRCS += \\" + NEWLINE);
- cxxBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
- StringBuffer capcBuffer = new StringBuffer("CAPC_SRCS += \\" + NEWLINE);
- capcBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
- StringBuffer cppBuffer = new StringBuffer("CPP_SRCS += \\" + NEWLINE);
- cppBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
+ StringBuffer cBuffer = new StringBuffer("C_SRCS += " + LINEBREAK + NEWLINE); //$NON-NLS-1$
+ cBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
+ StringBuffer ccBuffer = new StringBuffer("CC_SRCS += \\" + NEWLINE); //$NON-NLS-1$
+ ccBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
+ StringBuffer cxxBuffer = new StringBuffer("CXX_SRCS += \\" + NEWLINE); //$NON-NLS-1$
+ cxxBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
+ StringBuffer capcBuffer = new StringBuffer("CAPC_SRCS += \\" + NEWLINE); //$NON-NLS-1$
+ capcBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
+ StringBuffer cppBuffer = new StringBuffer("CPP_SRCS += \\" + NEWLINE); //$NON-NLS-1$
+ cppBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
StringBuffer ruleBuffer = new StringBuffer(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_RULES) + NEWLINE);
// Put the comment in
@@ -546,13 +546,13 @@
if (resource.getType() == IResource.FILE) {
String ext = resource.getFileExtension();
if (info.buildsFileType(ext)) {
- if (new String("c").equals(ext)) {
+ if (new String("c").equals(ext)) { //$NON-NLS-1$
cBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
- } else if (new String("cc").equalsIgnoreCase(ext)) {
+ } else if (new String("cc").equalsIgnoreCase(ext)) { //$NON-NLS-1$
ccBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
- } else if (new String("cxx").equalsIgnoreCase(ext)) {
+ } else if (new String("cxx").equalsIgnoreCase(ext)) { //$NON-NLS-1$
cxxBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
- } else if (new String("C").equals(ext)) {
+ } else if (new String("C").equals(ext)) { //$NON-NLS-1$
capcBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
} else {
cppBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
@@ -565,11 +565,11 @@
}
// Finish the commands in the buffers
- buffer.append(cBuffer.append("}" + NEWLINE + NEWLINE));
- buffer.append(ccBuffer.append("}" + NEWLINE + NEWLINE));
- buffer.append(cxxBuffer.append("}" + NEWLINE + NEWLINE));
- buffer.append(capcBuffer.append("}" + NEWLINE + NEWLINE));
- buffer.append(cppBuffer.append("}" + NEWLINE + NEWLINE));
+ buffer.append(cBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
+ buffer.append(ccBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
+ buffer.append(cxxBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
+ buffer.append(capcBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
+ buffer.append(cppBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
return buffer.append(ruleBuffer + NEWLINE);
}
@@ -588,7 +588,7 @@
String flags = info.getFlagsForTarget(extension);
String outflag = info.getOutputFlag(extension);
String outputPrefix = info.getOutputPrefix(extension);
- String targets = rebuild ? "clean all" : "all";
+ String targets = rebuild ? "clean all" : "all"; //$NON-NLS-1$ //$NON-NLS-2$
// Get all the projects the build target depends on
IProject[] deps = null;
@@ -601,9 +601,9 @@
// Write out the all target first in case someone just runs make
// all: targ_<target_name> [deps]
- String defaultTarget = "all:";
+ String defaultTarget = "all:"; //$NON-NLS-1$
if (deps.length > 0) {
- defaultTarget += WHITESPACE + "deps";
+ defaultTarget += WHITESPACE + "deps"; //$NON-NLS-1$
}
buffer.append(defaultTarget + WHITESPACE + outputPrefix + target);
if (extension.length() > 0) {
@@ -619,7 +619,7 @@
*/
List managedProjectOutputs = new ArrayList();
if (deps.length > 0) {
- buffer.append("deps:" + NEWLINE);
+ buffer.append("deps:" + NEWLINE); //$NON-NLS-1$
if (deps != null) {
for (int i = 0; i < deps.length; i++) {
IProject dep = deps[i];
@@ -635,7 +635,7 @@
String depExt = depInfo.getBuildArtifactExtension();
String depPrefix = depInfo.getOutputPrefix(depExt);
if (depInfo.isDirty()) {
- depTargets = "clean all";
+ depTargets = "clean all"; //$NON-NLS-1$
}
String dependency = buildDir + SEPARATOR + depPrefix + depTarget;
if (depExt.length() > 0) {
@@ -643,7 +643,7 @@
}
managedProjectOutputs.add(dependency);
}
- buffer.append(TAB + "-cd" + WHITESPACE + buildDir + WHITESPACE + LOGICAL_AND + WHITESPACE + "$(MAKE) " + depTargets + NEWLINE);
+ buffer.append(TAB + "-cd" + WHITESPACE + buildDir + WHITESPACE + LOGICAL_AND + WHITESPACE + "$(MAKE) " + depTargets + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
}
}
buffer.append(NEWLINE);
@@ -658,27 +658,27 @@
if (extension.length() > 0) {
buffer.append(DOT + extension);
}
- buffer.append(COLON + WHITESPACE + "$(OBJS)");
+ buffer.append(COLON + WHITESPACE + "$(OBJS)"); //$NON-NLS-1$
Iterator iter = managedProjectOutputs.listIterator();
while (iter.hasNext()) {
buffer.append(WHITESPACE + (String)iter.next());
}
buffer.append(NEWLINE);
- buffer.append(TAB + cmd + WHITESPACE + flags + WHITESPACE + outflag + WHITESPACE + "$@" + WHITESPACE + "$(OBJS) $(USER_OBJS) $(LIBS)");
+ buffer.append(TAB + cmd + WHITESPACE + flags + WHITESPACE + outflag + WHITESPACE + "$@" + WHITESPACE + "$(OBJS) $(USER_OBJS) $(LIBS)"); //$NON-NLS-1$ //$NON-NLS-2$
buffer.append(NEWLINE + NEWLINE);
// Always add a clean target
- buffer.append("clean:" + NEWLINE);
- buffer.append(TAB + "-$(RM)" + WHITESPACE + "$(OBJS)" + WHITESPACE + outputPrefix + target + NEWLINE + NEWLINE);
+ buffer.append("clean:" + NEWLINE); //$NON-NLS-1$
+ buffer.append(TAB + "-$(RM)" + WHITESPACE + "$(OBJS)" + WHITESPACE + outputPrefix + target + NEWLINE + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append(".PHONY: all clean deps" + NEWLINE + NEWLINE);
+ buffer.append(".PHONY: all clean deps" + NEWLINE + NEWLINE); //$NON-NLS-1$
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(DEP_INCL) + NEWLINE);
- buffer.append("-include ${patsubst %, %/subdir.dep, $(SUBDIRS)}" + NEWLINE);
+ buffer.append("-include ${patsubst %, %/subdir.dep, $(SUBDIRS)}" + NEWLINE); //$NON-NLS-1$
buffer.append(NEWLINE);
// Include makefile.targets supplemental makefile
- buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_TARGETS + NEWLINE);
+ buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_TARGETS + NEWLINE); //$NON-NLS-1$
return buffer;
}
@@ -717,7 +717,7 @@
* source1/%.o: $(ROOT)/source1/%.cpp
* g++ -g -O2 -c -I/cygdrive/c/eclipse/workspace/Project/headers -o $@ $<
*/
- rule = relativePath + WILDCARD + DOT + outputExtension + COLON + WHITESPACE + "$(ROOT)" + SEPARATOR + relativePath + WILDCARD + DOT + inputExtension;
+ rule = relativePath + WILDCARD + DOT + outputExtension + COLON + WHITESPACE + "$(ROOT)" + SEPARATOR + relativePath + WILDCARD + DOT + inputExtension; //$NON-NLS-1$
}
// Check if the rule is listed as something we already generated in the makefile
@@ -731,7 +731,7 @@
buildFlags = info.getFlagsForSource(inputExtension);
outflag = info.getOutputFlag(outputExtension);
outputPrefix = info.getOutputPrefix(outputExtension);
- buffer.append(TAB + cmd + WHITESPACE + buildFlags + WHITESPACE + outflag + WHITESPACE + outputPrefix + "$@" + WHITESPACE + "$<" + NEWLINE + NEWLINE);
+ buffer.append(TAB + cmd + WHITESPACE + buildFlags + WHITESPACE + outflag + WHITESPACE + outputPrefix + "$@" + WHITESPACE + "$<" + NEWLINE + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Index: src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
===================================================================
retrieving revision 1.9
diff -u -r1.9 ManagedBuildInfo.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java 24 Feb 2004 15:18:00 -0000 1.9
+++ src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java 2 Mar 2004 15:12:01 -0000
@@ -280,7 +280,7 @@
}
String key = new String();
String value = new String();
- int index = symbol.indexOf("=");
+ int index = symbol.indexOf("="); //$NON-NLS-1$
if (index != -1) {
key = symbol.substring(0, index).trim();
value = symbol.substring(index + 1).trim();
@@ -392,7 +392,7 @@
IPath location = owner.getLocation();
// If the build info is out of date this might be null
if (location == null) {
- location = new Path(".");
+ location = new Path("."); //$NON-NLS-1$
}
IPath root = location.addTrailingSeparator().append(config.getName());
ITool[] tools = config.getTools();
Index: src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 Option.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/Option.java 29 Sep 2003 01:42:26 -0000 1.3
+++ src/org/eclipse/cdt/managedbuilder/internal/core/Option.java 2 Mar 2004 15:12:01 -0000
@@ -20,6 +20,7 @@
import org.eclipse.cdt.managedbuilder.core.IOption;
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.core.runtime.IConfigurationElement;
public class Option extends BuildObject implements IOption {
@@ -178,7 +179,7 @@
*/
public String[] getDefinedSymbols() throws BuildException {
if (valueType != PREPROCESSOR_SYMBOLS) {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
ArrayList v = (ArrayList)value;
if (v == null) {
@@ -202,7 +203,7 @@
*/
public String[] getIncludePaths() throws BuildException {
if (valueType != INCLUDE_PATH) {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
ArrayList v = (ArrayList)value;
if (v == null) {
@@ -218,7 +219,7 @@
*/
public String[] getLibraries() throws BuildException {
if (valueType != LIBRARIES) {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
ArrayList v = (ArrayList)value;
if (v == null) {
@@ -234,7 +235,7 @@
*/
public String getSelectedEnum() throws BuildException {
if (valueType != ENUMERATED) {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
return defaultEnumName == null ? EMPTY_STRING : defaultEnumName;
}
@@ -244,7 +245,7 @@
*/
public String[] getStringListValue() throws BuildException {
if (valueType != STRING_LIST) {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
ArrayList v = (ArrayList)value;
if (v == null) {
@@ -260,7 +261,7 @@
*/
public String getStringValue() throws BuildException {
if (valueType != STRING) {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
return value == null ? EMPTY_STRING : (String)value;
}
@@ -277,7 +278,7 @@
*/
public String[] getUserObjects() throws BuildException {
if (valueType != OBJECTS) {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
// This is the right puppy, so return its list value
ArrayList v = (ArrayList)value;
@@ -311,7 +312,7 @@
{
if (valueType != IOption.STRING
|| valueType != ENUMERATED)
- throw new BuildException("Bad value for type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
if (config == null) {
this.value = value;
@@ -333,7 +334,7 @@
|| valueType != PREPROCESSOR_SYMBOLS
|| valueType != LIBRARIES
|| valueType != OBJECTS)
- throw new BuildException("Bad value for type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
if (config == null) {
this.value = value;
Index: src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
===================================================================
retrieving revision 1.5
diff -u -r1.5 OptionReference.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java 2 Oct 2003 02:56:46 -0000 1.5
+++ src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java 2 Mar 2004 15:12:02 -0000
@@ -19,6 +19,7 @@
import org.eclipse.cdt.managedbuilder.core.IOption;
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.core.runtime.IConfigurationElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -190,7 +191,7 @@
while (iter.hasNext()) {
Element valueElement = doc.createElement(LIST_VALUE);
valueElement.setAttribute(LIST_ITEM_VALUE, (String)iter.next());
- valueElement.setAttribute(LIST_ITEM_BUILTIN, "false");
+ valueElement.setAttribute(LIST_ITEM_BUILTIN, "false"); //$NON-NLS-1$
element.appendChild(valueElement);
}
// Serialize the built-ins that have been overridden
@@ -199,7 +200,7 @@
while (iter.hasNext()) {
Element valueElement = doc.createElement(LIST_VALUE);
valueElement.setAttribute(LIST_ITEM_VALUE, (String)iter.next());
- valueElement.setAttribute(LIST_ITEM_BUILTIN, "true");
+ valueElement.setAttribute(LIST_ITEM_BUILTIN, "true"); //$NON-NLS-1$
element.appendChild(valueElement);
}
}
@@ -239,7 +240,7 @@
return (String[]) list.toArray(new String[list.size()]);
}
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -268,7 +269,7 @@
return (String[]) list.toArray(new String[list.size()]);
}
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -282,7 +283,7 @@
return (String[]) list.toArray(new String[list.size()]);
}
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -304,7 +305,7 @@
Boolean bool = (Boolean) value;
return bool.booleanValue();
} else {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
}
@@ -334,7 +335,7 @@
// Value will contain the human-readable name of the enum
return (String) value;
} else {
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
}
@@ -349,7 +350,7 @@
return (String[]) list.toArray(new String[list.size()]);
}
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -361,7 +362,7 @@
else if (getValueType() == STRING)
return (String)value;
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -391,7 +392,7 @@
return (String[]) list.toArray(new String[list.size()]);
}
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -433,7 +434,7 @@
if (getValueType() == BOOLEAN)
this.value = new Boolean(value);
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/**
@@ -444,7 +445,7 @@
if (getValueType() == STRING || getValueType() == ENUMERATED)
this.value = value;
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
/**
@@ -463,7 +464,7 @@
this.value = new ArrayList(Arrays.asList(value));
}
else
- throw new BuildException("bad value type");
+ throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
}
Index: src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
===================================================================
retrieving revision 1.4
diff -u -r1.4 PluginResources.properties
--- src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties 27 Feb 2004 14:54:22 -0000 1.4
+++ src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties 2 Mar 2004 15:12:02 -0000
@@ -25,4 +25,14 @@
ManagedMakeBuilder.comment.module.make.includes = Include the makefiles for each source subdirectory
ManagedMakeBuilder.comment.module.dep.includes = Include automatically-generated dependency list:
ManagedMakeBuilder.comment.autodeps = Automatically-generated dependency list:
-ManagedMakeBuilder.comment.header = Automatically-generated file. Do not edit!
\ No newline at end of file
+ManagedMakeBuilder.comment.header = Automatically-generated file. Do not edit!
+
+Option.error.bad_value_type=Bad value for type
+
+Configuration.label.Configuration=Configuration: {0}
+
+ManagedBuildManager.error.owner_not_null=addTarget: owner not null
+ManagedBuildManager.error.null_owner=addTarget: null owner
+ManagedBuildManager.error.owner_not_project=addTarget: owner not project
+
+Target.label.Target=Target: {0}
Index: src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
===================================================================
retrieving revision 1.8
diff -u -r1.8 Target.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/Target.java 26 Feb 2004 20:53:54 -0000 1.8
+++ src/org/eclipse/cdt/managedbuilder/internal/core/Target.java 2 Mar 2004 15:12:02 -0000
@@ -24,6 +24,7 @@
import org.eclipse.cdt.managedbuilder.core.ITarget;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.core.boot.BootLoader;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -83,7 +84,7 @@
if (id < 0) {
id *= -1;
}
- setId(owner.getName() + "." + parent.getId() + "." + id);
+ setId(owner.getName() + "." + parent.getId() + "." + id); //$NON-NLS-1$ //$NON-NLS-2$
setName(parent.getName());
this.artifactName = parent.getArtifactName();
this.binaryParserId = parent.getBinaryParserId();
@@ -133,10 +134,10 @@
}
// isAbstract
- isAbstract = ("true".equals(element.getAttribute(IS_ABSTRACT)));
+ isAbstract = ("true".equals(element.getAttribute(IS_ABSTRACT))); //$NON-NLS-1$
// Is this a test target
- isTest = ("true".equals(element.getAttribute(IS_TEST)));
+ isTest = ("true".equals(element.getAttribute(IS_TEST))); //$NON-NLS-1$
// Get the clean command
cleanCommand = element.getAttribute(CLEAN_COMMAND);
@@ -148,7 +149,7 @@
String os = element.getAttribute(OS_LIST);
if (os != null) {
targetOSList = new ArrayList();
- StringTokenizer tokens = new StringTokenizer(os, ",");
+ StringTokenizer tokens = new StringTokenizer(os, ","); //$NON-NLS-1$
while (tokens.hasMoreTokens()) {
targetOSList.add(tokens.nextToken().trim());
}
@@ -204,11 +205,11 @@
parent = ManagedBuildManager.getTarget(null, parentId);
// isAbstract
- if ("true".equals(element.getAttribute(IS_ABSTRACT)))
+ if ("true".equals(element.getAttribute(IS_ABSTRACT))) //$NON-NLS-1$
isAbstract = true;
// Is this a test target
- isTest = ("true".equals(element.getAttribute(IS_TEST)));
+ isTest = ("true".equals(element.getAttribute(IS_TEST))); //$NON-NLS-1$
// Get the clean command
cleanCommand = element.getAttribute(CLEAN_COMMAND);
@@ -265,12 +266,12 @@
element.setAttribute(NAME, getName());
if (parent != null)
element.setAttribute(PARENT, parent.getId());
- element.setAttribute(IS_ABSTRACT, isAbstract ? "true" : "false");
+ element.setAttribute(IS_ABSTRACT, isAbstract ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
element.setAttribute(ARTIFACT_NAME, getArtifactName());
if (extension != null) {
element.setAttribute(EXTENSION, extension);
}
- element.setAttribute(IS_TEST, isTest ? "true" : "false");
+ element.setAttribute(IS_TEST, isTest ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
element.setAttribute(CLEAN_COMMAND, getCleanCommand());
if (makeCommand != null) {
element.setAttribute(MAKE_COMMAND, makeCommand);
@@ -312,7 +313,7 @@
return parent.getMakeArguments();
} else {
// No parent and no user setting
- return new String("");
+ return new String(""); //$NON-NLS-1$
}
}
return makeArguments;
@@ -329,7 +330,7 @@
return parent.getMakeCommand();
} else {
// The user has forgotten to specify a command in the plugin manifets.
- return new String("make");
+ return new String("make"); //$NON-NLS-1$
}
} else {
return makeCommand;
@@ -534,10 +535,10 @@
return parent.getCleanCommand();
} else {
// User forgot to specify it. Guess based on OS.
- if (BootLoader.getOS().equals("OS_WIN32")) {
- return new String("del");
+ if (BootLoader.getOS().equals("OS_WIN32")) { //$NON-NLS-1$
+ return new String("del"); //$NON-NLS-1$
} else {
- return new String("rm");
+ return new String("rm"); //$NON-NLS-1$
}
}
} else {
@@ -697,7 +698,7 @@
* @see java.lang.Object#toString()
*/
public String toString() {
- return new String("Target: ") + getName();
+ return new String(ManagedBuilderCorePlugin.getFormattedString("Target.label.Target", getName())); //$NON-NLS-1$
}
/* (non-Javadoc)
Index: src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
===================================================================
retrieving revision 1.5
diff -u -r1.5 Tool.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java 26 Feb 2004 20:53:54 -0000 1.5
+++ src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java 2 Mar 2004 15:12:02 -0000
@@ -32,7 +32,7 @@
*/
public class Tool extends BuildObject implements ITool, IOptionCategory {
- private static final String DEFAULT_SEPARATOR = ",";
+ private static final String DEFAULT_SEPARATOR = ","; //$NON-NLS-1$
private static final IOptionCategory[] EMPTY_CATEGORIES = new IOptionCategory[0];
private static final IOption[] EMPTY_OPTIONS = new IOption[0];
@@ -341,11 +341,11 @@
// Get the nature filter
String nature = element.getAttribute(NATURE);
- if (nature == null || "both".equals(nature)) {
+ if (nature == null || "both".equals(nature)) { //$NON-NLS-1$
natureFilter = FILTER_BOTH;
- } else if ("cnature".equals(nature)) {
+ } else if ("cnature".equals(nature)) { //$NON-NLS-1$
natureFilter = FILTER_C;
- } else if ("ccnature".equals(nature)) {
+ } else if ("ccnature".equals(nature)) { //$NON-NLS-1$
natureFilter = FILTER_CC;
} else {
natureFilter = FILTER_BOTH;