1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 10:46:02 +02:00

unified names of local variables (ExternalBuildRunner and CommandBuilder)

This commit is contained in:
Andrew Gvozdev 2011-04-08 17:35:05 +00:00
parent 60417d5ce5
commit 3bad5334d0
2 changed files with 8 additions and 8 deletions

View file

@ -73,7 +73,7 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
private static final String CONSOLE_HEADER = "ManagedMakeBuilder.message.console.header"; //$NON-NLS-1$ private static final String CONSOLE_HEADER = "ManagedMakeBuilder.message.console.header"; //$NON-NLS-1$
private static final String WARNING_UNSUPPORTED_CONFIGURATION = "ManagedMakeBuilder.warning.unsupported.configuration"; //$NON-NLS-1$ private static final String WARNING_UNSUPPORTED_CONFIGURATION = "ManagedMakeBuilder.warning.unsupported.configuration"; //$NON-NLS-1$
private static final String NEWLINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ private static final String NEWLINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
private static final String PATH = "PATH"; //$NON-NLS-1$ private static final String PATH_ENV = "PATH"; //$NON-NLS-1$
@Override @Override
public boolean invokeBuild(int kind, IProject project, IConfiguration configuration, public boolean invokeBuild(int kind, IProject project, IConfiguration configuration,
@ -209,16 +209,16 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
// Launching failed, trying to figure out possible cause // Launching failed, trying to figure out possible cause
String errorPrefix = ManagedMakeMessages.getResourceString("ManagedMakeBuilder.error.prefix"); //$NON-NLS-1$ String errorPrefix = ManagedMakeMessages.getResourceString("ManagedMakeBuilder.error.prefix"); //$NON-NLS-1$
String buildCommandStr = buildCommand.toString(); String buildCommandStr = buildCommand.toString();
String envPath = envMap.get(PATH); String envPath = envMap.get(PATH_ENV);
if (envPath==null) { if (envPath==null) {
envPath = System.getenv(PATH); envPath = System.getenv(PATH_ENV);
} }
if (PathUtil.findProgramLocation(buildCommandStr, envPath)==null) { if (PathUtil.findProgramLocation(buildCommandStr, envPath)==null) {
buf.append(errMsg).append(NEWLINE); buf.append(errMsg).append(NEWLINE);
errMsg = ManagedMakeMessages.getFormattedString("ManagedMakeBuilder.message.program.not.in.path", buildCommandStr); //$NON-NLS-1$ errMsg = ManagedMakeMessages.getFormattedString("ManagedMakeBuilder.message.program.not.in.path", buildCommandStr); //$NON-NLS-1$
buf.append(errorPrefix).append(errMsg).append(NEWLINE); buf.append(errorPrefix).append(errMsg).append(NEWLINE);
buf.append(NEWLINE); buf.append(NEWLINE);
buf.append(PATH+"=["+envPath+"]").append(NEWLINE); //$NON-NLS-1$//$NON-NLS-2$ buf.append(PATH_ENV+"=["+envPath+"]").append(NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
} else { } else {
buf.append(errorPrefix).append(errMsg).append(NEWLINE); buf.append(errorPrefix).append(errMsg).append(NEWLINE);
} }

View file

@ -52,7 +52,7 @@ public class CommandBuilder implements IBuildModelBuilder {
private String fErrMsg; private String fErrMsg;
private static final String BUILDER_MSG_HEADER = "InternalBuilder.msg.header"; //$NON-NLS-1$ private static final String BUILDER_MSG_HEADER = "InternalBuilder.msg.header"; //$NON-NLS-1$
private static final String LINE_SEPARATOR = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ private static final String NEWLINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
/* /*
* no need in this for now, Spawner is always used * no need in this for now, Spawner is always used
@ -219,7 +219,7 @@ public class CommandBuilder implements IBuildModelBuilder {
if (PathUtil.findProgramLocation(program, envPath)==null) { if (PathUtil.findProgramLocation(program, envPath)==null) {
printMessage(fErrMsg, out); printMessage(fErrMsg, out);
String errMsg = ManagedMakeMessages.getFormattedString("ManagedMakeBuilder.message.program.not.in.path", program); //$NON-NLS-1$ String errMsg = ManagedMakeMessages.getFormattedString("ManagedMakeBuilder.message.program.not.in.path", program); //$NON-NLS-1$
printErrorMessage(errMsg + LINE_SEPARATOR, out); printErrorMessage(errMsg + NEWLINE, out);
printMessage(null, PATH_ENV+"=["+envPath+"]", out); //$NON-NLS-1$//$NON-NLS-2$ printMessage(null, PATH_ENV+"=["+envPath+"]", out); //$NON-NLS-1$//$NON-NLS-2$
} else { } else {
printErrorMessage(fErrMsg, out); printErrorMessage(fErrMsg, out);
@ -260,7 +260,7 @@ public class CommandBuilder implements IBuildModelBuilder {
if (prefix==null) { if (prefix==null) {
prefix=""; //$NON-NLS-1$ prefix=""; //$NON-NLS-1$
} }
msg = prefix + msg + LINE_SEPARATOR; msg = prefix + msg + NEWLINE;
try { try {
os.write(msg.getBytes()); os.write(msg.getBytes());
os.flush(); os.flush();
@ -300,7 +300,7 @@ public class CommandBuilder implements IBuildModelBuilder {
buf.append(' '); buf.append(' ');
buf.append(args[i]); buf.append(args[i]);
} }
buf.append(LINE_SEPARATOR); buf.append(NEWLINE);
} }
return buf.toString(); return buf.toString();
} }