1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +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 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 PATH = "PATH"; //$NON-NLS-1$
private static final String PATH_ENV = "PATH"; //$NON-NLS-1$
@Override
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
String errorPrefix = ManagedMakeMessages.getResourceString("ManagedMakeBuilder.error.prefix"); //$NON-NLS-1$
String buildCommandStr = buildCommand.toString();
String envPath = envMap.get(PATH);
String envPath = envMap.get(PATH_ENV);
if (envPath==null) {
envPath = System.getenv(PATH);
envPath = System.getenv(PATH_ENV);
}
if (PathUtil.findProgramLocation(buildCommandStr, envPath)==null) {
buf.append(errMsg).append(NEWLINE);
errMsg = ManagedMakeMessages.getFormattedString("ManagedMakeBuilder.message.program.not.in.path", buildCommandStr); //$NON-NLS-1$
buf.append(errorPrefix).append(errMsg).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 {
buf.append(errorPrefix).append(errMsg).append(NEWLINE);
}

View file

@ -52,7 +52,7 @@ public class CommandBuilder implements IBuildModelBuilder {
private String fErrMsg;
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
@ -219,7 +219,7 @@ public class CommandBuilder implements IBuildModelBuilder {
if (PathUtil.findProgramLocation(program, envPath)==null) {
printMessage(fErrMsg, out);
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$
} else {
printErrorMessage(fErrMsg, out);
@ -260,7 +260,7 @@ public class CommandBuilder implements IBuildModelBuilder {
if (prefix==null) {
prefix=""; //$NON-NLS-1$
}
msg = prefix + msg + LINE_SEPARATOR;
msg = prefix + msg + NEWLINE;
try {
os.write(msg.getBytes());
os.flush();
@ -300,7 +300,7 @@ public class CommandBuilder implements IBuildModelBuilder {
buf.append(' ');
buf.append(args[i]);
}
buf.append(LINE_SEPARATOR);
buf.append(NEWLINE);
}
return buf.toString();
}