mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 16:56:04 +02:00
Fixed NLS and null warnings
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se> Change-Id: I6e40038e99c37a4efc25f64d8d186b00c6f55f8c
This commit is contained in:
parent
718156aa6b
commit
0391d6ccf1
76 changed files with 289 additions and 264 deletions
|
@ -32,8 +32,8 @@ import org.eclipse.core.runtime.Platform;
|
|||
public class AutotoolsEnvironmentVariableSupplier implements IConfigurationEnvironmentVariableSupplier {
|
||||
|
||||
private static class VerboseEnvironmentVariable extends EnvironmentVariable implements IBuildEnvironmentVariable {
|
||||
private static final String VERBOSE_VAR_NAME = "V";
|
||||
private static final String VERBOSE_VAR_VALUE = "1";
|
||||
private static final String VERBOSE_VAR_NAME = "V"; //$NON-NLS-1$
|
||||
private static final String VERBOSE_VAR_VALUE = "1"; //$NON-NLS-1$
|
||||
|
||||
private VerboseEnvironmentVariable(String name, String value, int op, String delimiter) {
|
||||
super(name, value, op, delimiter);
|
||||
|
|
|
@ -93,6 +93,8 @@ import org.eclipse.remote.core.exception.RemoteConnectionException;
|
|||
@SuppressWarnings("deprecation")
|
||||
public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
||||
|
||||
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||
|
||||
public static final String CONFIG_STATUS = "config.status"; //$NON-NLS-1$
|
||||
public static final String MAKEFILE = "Makefile"; //$NON-NLS-1$
|
||||
public static final String MAKEFILE_CVS = "Makefile.cvs"; //$NON-NLS-1$
|
||||
|
@ -114,7 +116,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
private static final String TARGET_USE_DEFAULT_CMD = "useDefaultCommand"; //$NON-NLS-1$
|
||||
private static final String TARGET_ARGUMENTS = "buildArguments"; //$NON-NLS-1$
|
||||
private static final String TARGET_COMMAND = "buildCommand"; //$NON-NLS-1$
|
||||
private static final String TARGET_RUN_ALL_BUILDERS = "runAllBuilders";
|
||||
private static final String TARGET_RUN_ALL_BUILDERS = "runAllBuilders"; //$NON-NLS-1$
|
||||
private static final String TARGET = "buildTarget"; //$NON-NLS-1$
|
||||
private static final String DEFAULT_AUTORECONF = "autoreconf"; //$NON-NLS-1$
|
||||
|
||||
|
@ -127,7 +129,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
private IPath buildLocation;
|
||||
private String buildDir;
|
||||
private String srcDir;
|
||||
private String winOSType = "";
|
||||
private String winOSType = EMPTY_STRING;
|
||||
|
||||
private IConfiguration cfg;
|
||||
private ICConfigurationDescription cdesc;
|
||||
|
@ -154,7 +156,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
buildDir = buildDirectory.toString();
|
||||
srcDir = a.getConfigToolDirectory();
|
||||
try {
|
||||
String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValue(srcDir, "", null,
|
||||
String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValue(srcDir, EMPTY_STRING, null,
|
||||
IBuildMacroProvider.CONTEXT_CONFIGURATION, c);
|
||||
srcDir = resolved;
|
||||
} catch (BuildMacroException e) {
|
||||
|
@ -169,7 +171,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
this.cfg = info.getDefaultConfiguration();
|
||||
this.builder = cfg.getBuilder();
|
||||
this.monitor = monitor;
|
||||
CUIPlugin.getDefault().getPreferenceStore().getString("dummy");
|
||||
CUIPlugin.getDefault().getPreferenceStore().getString("dummy"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -250,7 +252,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
// Create or get the handle for the build directory
|
||||
IPath path = new Path(dirName);
|
||||
boolean rc = true;
|
||||
if (dirName.length() == 0 || dirName.equals("."))
|
||||
if (dirName.length() == 0 || dirName.equals(".")) //$NON-NLS-1$
|
||||
path = getProjectLocation().append(dirName);
|
||||
File f = path.toFile();
|
||||
if (!f.exists()) {
|
||||
|
@ -297,7 +299,8 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
Status rc = regenerateMakefiles(icfg, reconfigure);
|
||||
if (!rc.isOK()) {
|
||||
if (status == null) {
|
||||
status = new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(), IStatus.ERROR, "", null);
|
||||
status = new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(), IStatus.ERROR, EMPTY_STRING,
|
||||
null);
|
||||
}
|
||||
status.add(rc);
|
||||
}
|
||||
|
@ -305,14 +308,12 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
} else {
|
||||
Status rc = regenerateMakefiles(cfg, reconfigure);
|
||||
if (!rc.isOK()) {
|
||||
if (status == null) {
|
||||
status = new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(), IStatus.ERROR, "", null);
|
||||
}
|
||||
status = new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(), IStatus.ERROR, EMPTY_STRING, null);
|
||||
status.add(rc);
|
||||
}
|
||||
}
|
||||
if (status == null) {
|
||||
status = new MultiStatus(ManagedBuilderCorePlugin.getUniqueIdentifier(), IStatus.OK, "", null);
|
||||
status = new MultiStatus(ManagedBuilderCorePlugin.getUniqueIdentifier(), IStatus.OK, EMPTY_STRING, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
@ -320,7 +321,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
private Status regenerateMakefiles(IConfiguration icfg, boolean reconfigure) throws CoreException {
|
||||
MultiStatus status;
|
||||
int rc = IStatus.OK;
|
||||
String errMsg = "";
|
||||
String errMsg = EMPTY_STRING;
|
||||
boolean needFullConfigure = false;
|
||||
|
||||
// See if the user has cancelled the build
|
||||
|
@ -645,46 +646,46 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
* @return stripped command
|
||||
*/
|
||||
public static String stripEnvVars(String command, List<String> envVars) {
|
||||
Pattern p1 = Pattern.compile("(\\w+[=]\\\".*?\\\"\\s+)\\w+.*");
|
||||
Pattern p2 = Pattern.compile("(\\w+[=]'.*?'\\s+)\\w+.*");
|
||||
Pattern p3 = Pattern.compile("(\\w+[=][^\\s]+\\s+)\\w+.*");
|
||||
Pattern p4 = Pattern.compile("\\w+\\s+(\\w+[=]\\\".*?\\\"\\s*)+.*");
|
||||
Pattern p5 = Pattern.compile("\\w+\\s+(\\w+[=]'.*?'\\s*)+.*");
|
||||
Pattern p6 = Pattern.compile("\\w+\\s+(\\w+[=][^\\s]+).*");
|
||||
Pattern p1 = Pattern.compile("(\\w+[=]\\\".*?\\\"\\s+)\\w+.*"); //$NON-NLS-1$
|
||||
Pattern p2 = Pattern.compile("(\\w+[=]'.*?'\\s+)\\w+.*"); //$NON-NLS-1$
|
||||
Pattern p3 = Pattern.compile("(\\w+[=][^\\s]+\\s+)\\w+.*"); //$NON-NLS-1$
|
||||
Pattern p4 = Pattern.compile("\\w+\\s+(\\w+[=]\\\".*?\\\"\\s*)+.*"); //$NON-NLS-1$
|
||||
Pattern p5 = Pattern.compile("\\w+\\s+(\\w+[=]'.*?'\\s*)+.*"); //$NON-NLS-1$
|
||||
Pattern p6 = Pattern.compile("\\w+\\s+(\\w+[=][^\\s]+).*"); //$NON-NLS-1$
|
||||
boolean finished = false;
|
||||
while (!finished) {
|
||||
Matcher m1 = p1.matcher(command);
|
||||
if (m1.matches()) {
|
||||
command = command.replaceFirst("\\w+[=]\\\".*?\\\"", "").trim();
|
||||
command = command.replaceFirst("\\w+[=]\\\".*?\\\"", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
String s = m1.group(1).trim();
|
||||
envVars.add(s.replaceAll("\\\"", ""));
|
||||
envVars.add(s.replaceAll("\\\"", EMPTY_STRING)); //$NON-NLS-1$
|
||||
} else {
|
||||
Matcher m2 = p2.matcher(command);
|
||||
if (m2.matches()) {
|
||||
command = command.replaceFirst("\\w+[=]'.*?'", "").trim();
|
||||
command = command.replaceFirst("\\w+[=]'.*?'", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
String s = m2.group(1).trim();
|
||||
envVars.add(s.replaceAll("'", ""));
|
||||
envVars.add(s.replaceAll("'", EMPTY_STRING)); //$NON-NLS-1$
|
||||
} else {
|
||||
Matcher m3 = p3.matcher(command);
|
||||
if (m3.matches()) {
|
||||
command = command.replaceFirst("\\w+[=][^\\s]+", "").trim();
|
||||
command = command.replaceFirst("\\w+[=][^\\s]+", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
envVars.add(m3.group(1).trim());
|
||||
} else {
|
||||
Matcher m4 = p4.matcher(command);
|
||||
if (m4.matches()) {
|
||||
command = command.replaceFirst("\\w+[=]\\\".*?\\\"", "").trim();
|
||||
command = command.replaceFirst("\\w+[=]\\\".*?\\\"", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
String s = m4.group(1).trim();
|
||||
envVars.add(s.replaceAll("\\\"", ""));
|
||||
envVars.add(s.replaceAll("\\\"", EMPTY_STRING)); //$NON-NLS-1$
|
||||
} else {
|
||||
Matcher m5 = p5.matcher(command);
|
||||
if (m5.matches()) {
|
||||
command = command.replaceFirst("\\w+[=]'.*?'", "").trim();
|
||||
command = command.replaceFirst("\\w+[=]'.*?'", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
String s = m5.group(1).trim();
|
||||
envVars.add(s.replaceAll("'", ""));
|
||||
envVars.add(s.replaceAll("'", EMPTY_STRING)); //$NON-NLS-1$
|
||||
} else {
|
||||
Matcher m6 = p6.matcher(command);
|
||||
if (m6.matches()) {
|
||||
command = command.replaceFirst("\\w+[=][^\\s+]+", "").trim();
|
||||
command = command.replaceFirst("\\w+[=][^\\s+]+", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
envVars.add(m6.group(1).trim());
|
||||
} else {
|
||||
finished = true;
|
||||
|
@ -707,26 +708,26 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
* @return stripped option
|
||||
*/
|
||||
public static String stripEnvVarsFromOption(String str, List<String> envVars) {
|
||||
Pattern p1 = Pattern.compile("(\\w+[=]\\\".*?\\\"\\s*).*");
|
||||
Pattern p2 = Pattern.compile("(\\w+[=]'.*?'\\s*).*");
|
||||
Pattern p3 = Pattern.compile("(\\w+[=][^\\s]+).*");
|
||||
Pattern p1 = Pattern.compile("(\\w+[=]\\\".*?\\\"\\s*).*"); //$NON-NLS-1$
|
||||
Pattern p2 = Pattern.compile("(\\w+[=]'.*?'\\s*).*"); //$NON-NLS-1$
|
||||
Pattern p3 = Pattern.compile("(\\w+[=][^\\s]+).*"); //$NON-NLS-1$
|
||||
boolean finished = false;
|
||||
while (!finished) {
|
||||
Matcher m1 = p1.matcher(str);
|
||||
if (m1.matches()) {
|
||||
str = str.replaceFirst("\\w+[=]\\\".*?\\\"", "").trim();
|
||||
str = str.replaceFirst("\\w+[=]\\\".*?\\\"", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
String s = m1.group(1).trim();
|
||||
envVars.add(s.replaceAll("\\\"", ""));
|
||||
envVars.add(s.replaceAll("\\\"", EMPTY_STRING)); //$NON-NLS-1$
|
||||
} else {
|
||||
Matcher m2 = p2.matcher(str);
|
||||
if (m2.matches()) {
|
||||
str = str.replaceFirst("\\w+[=]'.*?'", "").trim();
|
||||
str = str.replaceFirst("\\w+[=]'.*?'", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
String s = m2.group(1).trim();
|
||||
envVars.add(s.replaceAll("'", ""));
|
||||
envVars.add(s.replaceAll("'", EMPTY_STRING)); //$NON-NLS-1$
|
||||
} else {
|
||||
Matcher m3 = p3.matcher(str);
|
||||
if (m3.matches()) {
|
||||
str = str.replaceFirst("\\w+[=][^\\s]+", "").trim();
|
||||
str = str.replaceFirst("\\w+[=][^\\s]+", EMPTY_STRING).trim(); //$NON-NLS-1$
|
||||
envVars.add(m3.group(1).trim());
|
||||
} else {
|
||||
finished = true;
|
||||
|
@ -766,7 +767,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
if (configOption != null)
|
||||
command = stripEnvVars(configOption.getValue().trim(), envVars);
|
||||
|
||||
String[] tokens = command.split("\\s");
|
||||
String[] tokens = command.split("\\s"); //$NON-NLS-1$
|
||||
if (tokens.length > 1) {
|
||||
command = tokens[0];
|
||||
for (int i = 1; i < tokens.length; ++i)
|
||||
|
@ -798,7 +799,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
if (autogenOption != null)
|
||||
command = stripEnvVars(autogenOption.getValue().trim(), envVars);
|
||||
|
||||
String[] tokens = command.split("\\s");
|
||||
String[] tokens = command.split("\\s"); //$NON-NLS-1$
|
||||
if (tokens.length > 1) {
|
||||
command = tokens[0];
|
||||
for (int i = 1; i < tokens.length; ++i)
|
||||
|
@ -840,8 +841,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
// try to resolve the build macros in any argument
|
||||
try {
|
||||
String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
|
||||
configTargets[i], "", //$NON-NLS-1$
|
||||
" ", //$NON-NLS-1$
|
||||
configTargets[i], EMPTY_STRING, " ", //$NON-NLS-1$
|
||||
IBuildMacroProvider.CONTEXT_CONFIGURATION, cfg);
|
||||
configTargets[i] = resolved;
|
||||
} catch (BuildMacroException e) {
|
||||
|
@ -1062,10 +1062,10 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
private String getPathString(IPath path) {
|
||||
String s = path.toString();
|
||||
if (getOSName().equals(Platform.OS_WIN32)) {
|
||||
if (getWinOSType().equals("cygwin")) {
|
||||
s = s.replaceAll("^([a-zA-Z]):", "/cygdrive/$1");
|
||||
if (getWinOSType().equals("cygwin")) { //$NON-NLS-1$
|
||||
s = s.replaceAll("^([a-zA-Z]):", "/cygdrive/$1"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
} else {
|
||||
s = s.replaceAll("^([a-zA-Z]):", "/$1");
|
||||
s = s.replaceAll("^([a-zA-Z]):", "/$1"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
return s;
|
||||
|
@ -1073,9 +1073,9 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
|
||||
// Fix any escape characters in sh -c command arguments
|
||||
private String fixEscapeChars(String s) {
|
||||
s = s.replaceAll("\\\\", "\\\\\\\\");
|
||||
s = s.replaceAll("\\(", "\\\\(");
|
||||
s = s.replaceAll("\\)", "\\\\)");
|
||||
s = s.replaceAll("\\\\", "\\\\\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
s = s.replaceAll("\\(", "\\\\("); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
s = s.replaceAll("\\)", "\\\\)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -1116,16 +1116,15 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
if (command == null)
|
||||
command = arg;
|
||||
else
|
||||
command += " " + arg;
|
||||
command += " " + arg; //$NON-NLS-1$
|
||||
}
|
||||
configTargets = new String[] { "-c", command };
|
||||
configTargets = new String[] { "-c", command }; //$NON-NLS-1$
|
||||
|
||||
for (int i = 0; i < configTargets.length; ++i) {
|
||||
// try to resolve the build macros in any argument
|
||||
try {
|
||||
String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
|
||||
configTargets[i], "", //$NON-NLS-1$
|
||||
" ", //$NON-NLS-1$
|
||||
configTargets[i], EMPTY_STRING, " ", //$NON-NLS-1$
|
||||
IBuildMacroProvider.CONTEXT_CONFIGURATION, cfg);
|
||||
// strip any env-var settings from options
|
||||
// fix for bug #356278
|
||||
|
@ -1161,12 +1160,12 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
// Display command-line environment variables that have been stripped by us
|
||||
// because launch showCommand won't do this.
|
||||
if (additionalEnvs != null && additionalEnvs.size() > 0) {
|
||||
buf.append(AutotoolsPlugin.getResourceString("MakeGenerator.commandline.envvars"));
|
||||
buf.append(AutotoolsPlugin.getResourceString("MakeGenerator.commandline.envvars")); //$NON-NLS-1$
|
||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buf.append("\t");
|
||||
buf.append("\t"); //$NON-NLS-1$
|
||||
for (int i = 0; i < additionalEnvs.size(); ++i) {
|
||||
String envvar = additionalEnvs.get(i);
|
||||
buf.append(envvar.replaceFirst("(\\w+=)(.*)", " $1\"$2\""));
|
||||
buf.append(envvar.replaceFirst("(\\w+=)(.*)", " $1\"$2\"")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
@ -1474,7 +1473,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
Class<? extends IMakeTargetManager> c = makeTargetManager.getClass();
|
||||
boolean targetsAdded = false;
|
||||
try {
|
||||
Method m = c.getMethod("setTargets", IContainer.class, IMakeTarget[].class);
|
||||
Method m = c.getMethod("setTargets", IContainer.class, IMakeTarget[].class); //$NON-NLS-1$
|
||||
m.invoke(makeTargetManager, project, makeTargetArray);
|
||||
targetsAdded = true;
|
||||
} catch (NoSuchMethodException | IllegalArgumentException | IllegalAccessException
|
||||
|
|
|
@ -37,12 +37,13 @@ public class AutotoolsPropertyConstants {
|
|||
public static final QualifiedName LIBTOOLIZE_TOOL = new QualifiedName(PREFIX, "LibtoolizePath"); //$NON-NLS-1$
|
||||
public static final QualifiedName CLEAN_DELETE = new QualifiedName(PREFIX, "CleanDelete"); //$NON-NLS-1$
|
||||
public static final QualifiedName CLEAN_MAKE_TARGET = new QualifiedName(PREFIX, "CleanMakeTarget"); //$NON-NLS-1$
|
||||
public static final QualifiedName SCANNER_USE_MAKE_W = new QualifiedName(PREFIX, "ScannerUseMakeW");
|
||||
public static final QualifiedName SCANNER_USE_MAKE_W = new QualifiedName(PREFIX, "ScannerUseMakeW"); //$NON-NLS-1$
|
||||
public static final QualifiedName AUTO_BUILD_NAME = new QualifiedName(PREFIX, "AutoBuildName"); //$NON-NLS-1$
|
||||
public static final QualifiedName OPEN_INCLUDE = new QualifiedName(PREFIX, "IncludeResourceMapping"); //$NON-NLS-1$
|
||||
public static final QualifiedName OPEN_INCLUDE_P = new QualifiedName(PREFIX, "PersistentIncludeResourceMapping"); //$NON-NLS-1$
|
||||
public static final QualifiedName SCANNER_INFO_DIRTY = new QualifiedName(PREFIX, "ScannerInfoDirty"); // $NON-NLSp-1$
|
||||
public static final QualifiedName SCANNER_INFO_DIRTY = new QualifiedName(PREFIX, "ScannerInfoDirty"); //$NON-NLS-1$
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public static final String[] fACVersions = { "2.13", "2.59", "2.61", "2.67", "2.68" }; //$NON-NLS-1$
|
||||
public static final String AC_VERSION_2_13 = fACVersions[0];
|
||||
public static final String AC_VERSION_2_59 = fACVersions[1];
|
||||
|
@ -51,6 +52,7 @@ public class AutotoolsPropertyConstants {
|
|||
public static final String AC_VERSION_2_68 = fACVersions[4];
|
||||
public static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1];
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public static final String[] fAMVersions = { "1.4-p6", "1.9.5", "1.9.6", "1.11.1" }; //$NON-NLS-1$
|
||||
public static final String LATEST_AM_VERSION = fAMVersions[fAMVersions.length - 1];
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser {
|
|||
if (marker != null) {
|
||||
// Check to see if addProblemMarker exists.
|
||||
try {
|
||||
Method method = eoParser.getClass().getMethod("addProblemMarker", ProblemMarkerInfo.class);
|
||||
Method method = eoParser.getClass().getMethod("addProblemMarker", ProblemMarkerInfo.class); //$NON-NLS-1$
|
||||
try {
|
||||
method.invoke(eoParser, marker);
|
||||
return true;
|
||||
|
@ -145,7 +145,7 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser {
|
|||
int lineNumber = getErrorConfigLineNumber(name);
|
||||
|
||||
// now open configure file.
|
||||
File file = new File(sourcePath + "/configure");
|
||||
File file = new File(sourcePath + "/configure"); //$NON-NLS-1$
|
||||
// If the log file is not present there is nothing we can do.
|
||||
if (!file.exists())
|
||||
return null;
|
||||
|
@ -166,13 +166,13 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser {
|
|||
Matcher m = errorPattern.matcher(line);
|
||||
if (m.matches()) {
|
||||
String typeString = m.group(1);
|
||||
if (typeString.equals("prog"))
|
||||
if (typeString.equals("prog")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.PROG;
|
||||
if (typeString.equals("header"))
|
||||
if (typeString.equals("header")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.HEADER;
|
||||
if (typeString.equals("file"))
|
||||
if (typeString.equals("file")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.FILE;
|
||||
if (typeString.equals("lib"))
|
||||
if (typeString.equals("lib")) //$NON-NLS-1$
|
||||
return AutotoolsProblemMarkerInfo.Type.LIB;
|
||||
|
||||
return null;
|
||||
|
@ -194,7 +194,7 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser {
|
|||
* @return
|
||||
*/
|
||||
private int getErrorConfigLineNumber(String name) {
|
||||
File file = new File(buildDir + "/config.log");
|
||||
File file = new File(buildDir + "/config.log"); //$NON-NLS-1$
|
||||
// If the log file is not present there is nothing we can do.
|
||||
if (!file.exists())
|
||||
return -1;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class PkgconfigErrorResolution implements IMarkerResolution {
|
|||
|
||||
public PkgconfigErrorResolution(String pkgconfigRequirement) {
|
||||
// Get the pkgconfig package name from the requirement message.
|
||||
Pattern p = Pattern.compile("(.*?)[\\s,>,<,=].*");
|
||||
Pattern p = Pattern.compile("(.*?)[\\s,>,<,=].*"); //$NON-NLS-1$
|
||||
Matcher m = p.matcher(pkgconfigRequirement);
|
||||
if (m.matches()) {
|
||||
pkgName = m.group(1);
|
||||
|
@ -98,7 +98,7 @@ public class PkgconfigErrorResolution implements IMarkerResolution {
|
|||
// Use CDT launcher to run rpm to query the package that provides
|
||||
// the pkgconfig .pc file for the package in question.
|
||||
ConsoleOutputStream output = new ConsoleOutputStream();
|
||||
Process proc = launcher.execute(commandPath, commandArgs, null, new Path("."), new NullProgressMonitor());
|
||||
Process proc = launcher.execute(commandPath, commandArgs, null, new Path("."), new NullProgressMonitor()); //$NON-NLS-1$
|
||||
if (proc != null) {
|
||||
try {
|
||||
// Close the input of the process since we will never write to
|
||||
|
@ -111,7 +111,7 @@ public class PkgconfigErrorResolution implements IMarkerResolution {
|
|||
} else {
|
||||
String result = output.readBuffer();
|
||||
if (!result.startsWith("error:")) //$NON-NLS-1$
|
||||
System.out.println("need to execute update of " + result);
|
||||
System.out.println("need to execute update of " + result); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ public class VersionComparator {
|
|||
* VersionComparator.compare("1.5.1", "1.5.1") returns 0
|
||||
*/
|
||||
public static int compare(String v1, String v2) {
|
||||
String[] v1digits = v1.split("\\.");
|
||||
String[] v2digits = v2.split("\\.");
|
||||
String[] v1digits = v1.split("\\."); //$NON-NLS-1$
|
||||
String[] v2digits = v2.split("\\."); //$NON-NLS-1$
|
||||
|
||||
for (int i = 0; i < v1digits.length && i < v2digits.length; i++) {
|
||||
int d1 = Integer.valueOf(v1digits[i]);
|
||||
|
|
|
@ -64,7 +64,7 @@ public abstract class AbstractConfigurationOption implements IConfigureOption {
|
|||
}
|
||||
|
||||
public String getParameterName() {
|
||||
return "--" + getName();
|
||||
return "--" + getName(); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -133,11 +133,11 @@ public class AutotoolsConfiguration implements IAConfiguration {
|
|||
IConfigureOption.BIN),
|
||||
new Option(AutotoolsOptionConstants.FLAG_CFLAGS, "cflags", AutotoolsOptionConstants.FLAG_CFLAGS_FLAGS, //$NON-NLS-1$
|
||||
IConfigureOption.FLAG),
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_DEBUG, "cflags_debug", IConfigureOption.FLAGVALUE), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_GPROF, "cflags_gprof", IConfigureOption.FLAGVALUE), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_GCOV, "cflags_gcov", IConfigureOption.FLAGVALUE), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_DEBUG, "cflags_debug", IConfigureOption.FLAGVALUE), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_GPROF, "cflags_gprof", IConfigureOption.FLAGVALUE), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_CFLAGS_GCOV, "cflags_gcov", IConfigureOption.FLAGVALUE), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.OPT_USER, IConfigureOption.MULTIARG),
|
||||
new Option(AutotoolsOptionConstants.TOOL_AUTOGEN, "autogen", "autogen.sh", IConfigureOption.TOOL), //$NON-NLS-1$
|
||||
new Option(AutotoolsOptionConstants.TOOL_AUTOGEN, "autogen", "autogen.sh", IConfigureOption.TOOL), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new Option(AutotoolsOptionConstants.CATEGORY_OPTIONS, IConfigureOption.CATEGORY),
|
||||
new Option(AutotoolsOptionConstants.OPT_AUTOGENOPTS, IConfigureOption.MULTIARG), };
|
||||
|
||||
|
@ -406,12 +406,12 @@ public class AutotoolsConfiguration implements IAConfiguration {
|
|||
|
||||
@Override
|
||||
public void setConfigToolDirectory(String configToolDirectory) {
|
||||
setOption("configdir", configToolDirectory);
|
||||
setOption("configdir", configToolDirectory); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigToolDirectory() {
|
||||
IConfigureOption option = configOptions.get("configdir");
|
||||
IConfigureOption option = configOptions.get("configdir"); //$NON-NLS-1$
|
||||
return option.getValue();
|
||||
}
|
||||
|
||||
|
|
|
@ -417,19 +417,19 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
|||
String childName = children.get(k);
|
||||
IConfigureOption childopt = cfg.getOption(childName);
|
||||
p.println("<flagvalue id=\"" + childopt.getName() + "\" value=\"" //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ xmlEscape(childopt.getValue()) + "\"/>"); //$NON-NLS-3$
|
||||
+ xmlEscape(childopt.getValue()) + "\"/>"); //$NON-NLS-1$
|
||||
}
|
||||
p.println("</flag>"); //$NON-NLS-1$
|
||||
} else if (!opt.isCategory() && !opt.isFlagValue())
|
||||
p.println("<option id=\"" + option.getName() + "\" value=\"" + xmlEscape(opt.getValue()) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ "\"/>"); //$NON-NLS-3$
|
||||
+ "\"/>"); //$NON-NLS-1$
|
||||
}
|
||||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
// Sync name field as this configuration is now
|
||||
// officially saved
|
||||
syncNameField(cfgd);
|
||||
}
|
||||
p.println("</configurations>");
|
||||
p.println("</configurations>"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -503,7 +503,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
|||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
p.println("</configurations>");
|
||||
p.println("</configurations>"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -602,7 +602,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
|||
|
||||
private String createDummyId() {
|
||||
for (;;) {
|
||||
String id = "TEMP_" + rand.nextInt();
|
||||
String id = "TEMP_" + rand.nextInt(); //$NON-NLS-1$
|
||||
if (tmpConfigs.get(id) == null)
|
||||
return id;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class AutotoolsOptionValueHandler extends ManagedOptionValueHandler imple
|
|||
// SortedSet<Integer> nums = new TreeSet<Integer>();
|
||||
IConfiguration configuration = (IConfiguration) buildObject;
|
||||
ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(configuration);
|
||||
if (option.getName().equals("Name") && cfgd != null) {
|
||||
if (option.getName().equals("Name") && cfgd != null) { //$NON-NLS-1$
|
||||
String cfgId = cfgd.getId();
|
||||
if (!value.isEmpty() && !value.equals(cfgId)) {
|
||||
// we have a cloned configuration and we know that the
|
||||
|
@ -95,7 +95,7 @@ public class AutotoolsOptionValueHandler extends ManagedOptionValueHandler imple
|
|||
|
||||
private String fixName(String cfgName) {
|
||||
// Replace whitespace with underscores.
|
||||
return cfgName.replaceAll("\\s", "_");
|
||||
return cfgName.replaceAll("\\s", "_"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
// IOptionApplicability methods
|
||||
|
|
|
@ -26,7 +26,7 @@ public class ConfigureMessages {
|
|||
}
|
||||
|
||||
public static String getConfigureDescription(String name) {
|
||||
return getString("Option.configure." + name); //$NON-NLS-11$
|
||||
return getString("Option.configure." + name); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static String getConfigureTip(String name) {
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ConfigureOptionCategory implements IConfigureOption {
|
|||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,12 +50,12 @@ public class ConfigureOptionCategory implements IConfigureOption {
|
|||
|
||||
@Override
|
||||
public String getToolTip() {
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return "null";
|
||||
return "null"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,7 +43,7 @@ public class FlagConfigureOption extends AbstractConfigurationOption {
|
|||
StringBuilder parms = new StringBuilder();
|
||||
// Multiple flags are designated by putting multiple flags together using "|" as delimiter
|
||||
String[] flagNames = getValue().split("\\|"); //$NON-NLS-1$
|
||||
String flagSeparator = "";
|
||||
String flagSeparator = ""; //$NON-NLS-1$
|
||||
for (String flagName : flagNames) {
|
||||
parms.append(flagSeparator);
|
||||
flagSeparator = " "; //$NON-NLS-1$
|
||||
|
|
|
@ -37,7 +37,7 @@ public class FlagValueConfigureOption extends BinConfigureOption implements IFla
|
|||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,7 +52,7 @@ public class InternalConfigureOption extends AbstractConfigurationOption {
|
|||
|
||||
@Override
|
||||
public String getParameter() {
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,7 +54,7 @@ public class StringConfigureOption extends AbstractConfigurationOption {
|
|||
public String getParameter() {
|
||||
if (isParmSet())
|
||||
return getParameterName() + "=" + getValue(); //$NON-NLS-1$
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.cdt.internal.autotools.core.VersionComparator;
|
|||
|
||||
public class AcInitElement extends AutoconfMacroElement {
|
||||
|
||||
private static final String BAD_VERSION_NUMBER = "AC_INIT_badVersionNumber";
|
||||
private static final String BAD_VERSION_NUMBER = "AC_INIT_badVersionNumber"; //$NON-NLS-1$
|
||||
|
||||
public AcInitElement(String name) {
|
||||
super(name);
|
||||
|
@ -56,7 +56,7 @@ public class AcInitElement extends AutoconfMacroElement {
|
|||
AutoconfElement argument = this.getChildren()[1];
|
||||
// match a digit followed by a dot zero or more times
|
||||
// but always end with a digit
|
||||
if (!argument.getName().matches("(\\d*\\.)*((\\d+))")) {
|
||||
if (!argument.getName().matches("(\\d*\\.)*((\\d+))")) { //$NON-NLS-1$
|
||||
throw new InvalidMacroException(AutoconfEditorMessages.getString(BAD_VERSION_NUMBER), argument);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ public class AutoconfCodeScanner extends RuleBasedScanner {
|
|||
rules.add(new AutoconfIdentifierRule(other));
|
||||
|
||||
// Make sure we don't treat "\#" as comment start.
|
||||
rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED));
|
||||
rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED)); //$NON-NLS-1$
|
||||
|
||||
rules.add(new WhitespaceRule(new AutoconfWhitespaceDetector()));
|
||||
|
||||
|
|
|
@ -81,8 +81,8 @@ public class AutoconfMacroCodeScanner extends RuleBasedScanner {
|
|||
List<IRule> rules = new ArrayList<>();
|
||||
|
||||
// Add rule for single line comments.
|
||||
rules.add(new RestrictedEndOfLineRule("dnl", "[]", comment)); //$NON-NLS-1$
|
||||
rules.add(new RestrictedEndOfLineRule("#", "[]", comment, '\\')); //$NON-NLS-1$
|
||||
rules.add(new RestrictedEndOfLineRule("dnl", "[]", comment)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
rules.add(new RestrictedEndOfLineRule("#", "[]", comment, '\\')); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
// Add special recursive rule for strings which allows variable
|
||||
// references to be internally tokenized.
|
||||
|
|
|
@ -43,7 +43,7 @@ public class AutoconfPartitionScanner extends RuleBasedPartitionScanner {
|
|||
rules.add(new AutoconfMacroPartitionRule(macro));
|
||||
|
||||
rules.add(new EndOfLineRule("dnl", comment)); //$NON-NLS-1$
|
||||
rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED));
|
||||
rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED)); //$NON-NLS-1$
|
||||
rules.add(new EndOfLineRule("#", comment, '\\')); //$NON-NLS-1$
|
||||
|
||||
// We want to process identifiers that might have macro
|
||||
|
|
|
@ -39,7 +39,7 @@ public class InlineDataRule implements IRule {
|
|||
/** Buffer used for pattern detection */
|
||||
private StringBuilder fBuffer = new StringBuilder();
|
||||
|
||||
private String fStartingSequence = "<<";
|
||||
private String fStartingSequence = "<<"; //$NON-NLS-1$
|
||||
|
||||
public InlineDataRule(IToken inToken) {
|
||||
token = inToken;
|
||||
|
|
|
@ -28,7 +28,7 @@ public class AutoconfContentProvider implements ITreeContentProvider {
|
|||
|
||||
private IDocumentProvider documentProvider;
|
||||
private AutoconfEditor editor;
|
||||
protected final static String SECTION_POSITIONS = "section_positions";
|
||||
protected final static String SECTION_POSITIONS = "section_positions"; //$NON-NLS-1$
|
||||
protected IPositionUpdater positionUpdater = new DefaultPositionUpdater(SECTION_POSITIONS);
|
||||
|
||||
public AutoconfContentProvider(ITextEditor editor) {
|
||||
|
|
|
@ -88,21 +88,21 @@ public class AutoconfLabelProvider implements ILabelProvider {
|
|||
String result;
|
||||
String name = e.getName();
|
||||
if (name.length() > 31)
|
||||
name = name.substring(0, 31) + "...";
|
||||
name = name.substring(0, 31) + "..."; //$NON-NLS-1$
|
||||
String var = e.getVar();
|
||||
if (var != null) {
|
||||
if (var.length() > 15)
|
||||
var = var.substring(0, 15) + "...";
|
||||
var = var.substring(0, 15) + "..."; //$NON-NLS-1$
|
||||
var = " " + var; //$NON-NLS-1$
|
||||
} else {
|
||||
var = "";
|
||||
var = ""; //$NON-NLS-1$
|
||||
}
|
||||
result = (name + var).replaceAll("(\r|\n| |\t|\f)+", " ");
|
||||
result = (name + var).replaceAll("(\r|\n| |\t|\f)+", " "); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return result;
|
||||
} else if (element instanceof String) {
|
||||
return (String) element;
|
||||
}
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ package org.eclipse.cdt.autotools.ui.editors.parser;
|
|||
public class AutoconfCaseConditionElement extends AutoconfElement {
|
||||
|
||||
public AutoconfCaseConditionElement() {
|
||||
super("");
|
||||
super(""); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public AutoconfCaseConditionElement(String name) {
|
||||
|
|
|
@ -24,7 +24,7 @@ package org.eclipse.cdt.autotools.ui.editors.parser;
|
|||
public class AutoconfMacroArgumentElement extends AutoconfElement {
|
||||
|
||||
public AutoconfMacroArgumentElement() {
|
||||
super(""); // //$NON-NLS-N$
|
||||
super(""); // //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public AutoconfMacroArgumentElement(String name) {
|
||||
|
|
|
@ -43,7 +43,7 @@ public class AutoconfOutlineErrorHandler {
|
|||
try {
|
||||
IPath absPath = input.getStorage().getFullPath();
|
||||
IPath rootPath = root.getLocation();
|
||||
IPath relPath = new Path("");
|
||||
IPath relPath = new Path(""); //$NON-NLS-1$
|
||||
|
||||
for (int i = 0; i < rootPath.segmentCount(); ++i) {
|
||||
relPath = relPath.append("../"); //$NON-NLS-1$
|
||||
|
|
|
@ -56,7 +56,8 @@ public class AutoconfParser {
|
|||
private AutoconfTokenizer tokenizer;
|
||||
private IAutoconfMacroDetector macroDetector;
|
||||
|
||||
private static final String M4_BUILTINS = "define undefine defn pushdef popdef indir builtin ifdef ifelse shift reverse cond " //$NON-NLS-1$
|
||||
@SuppressWarnings("nls")
|
||||
private static final String M4_BUILTINS = "define undefine defn pushdef popdef indir builtin ifdef ifelse shift reverse cond "
|
||||
+ "dumpdef traceon traceoff debugmode debugfile dnl changequote changecom changeword " + "m4wrap "
|
||||
+ "include sinclude divert undivert divnum len index regexp substr translit patsubst "
|
||||
+ "format incr decr eval syscmd esyscmd sysval mkstemp maketemp errprint m4exit "
|
||||
|
@ -240,9 +241,9 @@ public class AutoconfParser {
|
|||
} else {
|
||||
String exp;
|
||||
if (block instanceof AutoconfIfElement || block instanceof AutoconfElifElement)
|
||||
exp = "then";
|
||||
exp = "then"; //$NON-NLS-1$
|
||||
else
|
||||
exp = "do";
|
||||
exp = "do"; //$NON-NLS-1$
|
||||
|
||||
handleError(token, AutoconfEditorMessages.getFormattedString(MISSING_SPECIFIER, exp));
|
||||
|
||||
|
@ -606,6 +607,7 @@ public class AutoconfParser {
|
|||
// fall through
|
||||
|
||||
// 5. Abort on unexpected tokens
|
||||
//$FALL-THROUGH$
|
||||
case ITokenConstants.SH_DO:
|
||||
case ITokenConstants.SH_THEN:
|
||||
handleError(token, AutoconfEditorMessages.getFormattedString(INVALID_SPECIFIER, token.getText()));
|
||||
|
@ -863,11 +865,11 @@ public class AutoconfParser {
|
|||
|
||||
private void validateMacroParameterCount(AutoconfMacroElement macro, Token token, int count) {
|
||||
if (macro.getParameterCount() < count) {
|
||||
handleError(token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooFew", macro.getName(),
|
||||
Integer.valueOf(2))); //$NON-NLS-1$
|
||||
handleError(token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooFew", macro.getName(), //$NON-NLS-1$
|
||||
Integer.valueOf(2)));
|
||||
} else if (macro.getParameterCount() > count) {
|
||||
handleError(token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooMany", macro.getName(),
|
||||
Integer.valueOf(2))); //$NON-NLS-1$
|
||||
handleError(token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooMany", macro.getName(), //$NON-NLS-1$
|
||||
Integer.valueOf(2)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public class AutoconfTokenizer {
|
|||
this.chars = document.get().toCharArray();
|
||||
this.offset = 0;
|
||||
|
||||
this.eofToken = new Token(ITokenConstants.EOF, "", document, chars.length, 0);
|
||||
this.eofToken = new Token(ITokenConstants.EOF, "", document, chars.length, 0); //$NON-NLS-1$
|
||||
|
||||
this.m4OpenQuote = "`"; //$NON-NLS-1$
|
||||
this.m4CloseQuote = "'"; //$NON-NLS-1$
|
||||
|
@ -179,7 +179,7 @@ public class AutoconfTokenizer {
|
|||
}
|
||||
if (!found) {
|
||||
handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNMATCHED_CLOSE_COMMENT,
|
||||
m4CloseComment.equals("\n") ? "newline" : m4CloseComment)); //$NON-NLS-1$
|
||||
m4CloseComment.equals("\n") ? "newline" : m4CloseComment)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
return makeToken(ITokenConstants.M4_COMMENT);
|
||||
}
|
||||
|
@ -270,35 +270,39 @@ public class AutoconfTokenizer {
|
|||
String text = buffer.toString();
|
||||
|
||||
if (!isM4Context) {
|
||||
// detect sh tokens
|
||||
if ("case".equals(text))
|
||||
return makeToken(ITokenConstants.SH_CASE, text);
|
||||
if ("in".equals(text))
|
||||
return makeToken(ITokenConstants.SH_IN, text);
|
||||
if ("esac".equals(text))
|
||||
return makeToken(ITokenConstants.SH_ESAC, text);
|
||||
if ("while".equals(text))
|
||||
return makeToken(ITokenConstants.SH_WHILE, text);
|
||||
if ("select".equals(text))
|
||||
return makeToken(ITokenConstants.SH_SELECT, text);
|
||||
if ("until".equals(text))
|
||||
return makeToken(ITokenConstants.SH_UNTIL, text);
|
||||
if ("for".equals(text))
|
||||
return makeToken(ITokenConstants.SH_FOR, text);
|
||||
if ("do".equals(text))
|
||||
return makeToken(ITokenConstants.SH_DO, text);
|
||||
if ("done".equals(text))
|
||||
return makeToken(ITokenConstants.SH_DONE, text);
|
||||
if ("if".equals(text))
|
||||
return makeToken(ITokenConstants.SH_IF, text);
|
||||
if ("then".equals(text))
|
||||
return makeToken(ITokenConstants.SH_THEN, text);
|
||||
if ("else".equals(text))
|
||||
return makeToken(ITokenConstants.SH_ELSE, text);
|
||||
if ("elif".equals(text))
|
||||
return makeToken(ITokenConstants.SH_ELIF, text);
|
||||
if ("fi".equals(text))
|
||||
return makeToken(ITokenConstants.SH_FI, text);
|
||||
if (text != null) {
|
||||
// detect sh tokens
|
||||
switch (text) {
|
||||
case "case": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_CASE, text);
|
||||
case "in": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_IN, text);
|
||||
case "esac": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_ESAC, text);
|
||||
case "while": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_WHILE, text);
|
||||
case "select": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_SELECT, text);
|
||||
case "until": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_UNTIL, text);
|
||||
case "for": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_FOR, text);
|
||||
case "do": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_DO, text);
|
||||
case "done": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_DONE, text);
|
||||
case "if": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_IF, text);
|
||||
case "then": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_THEN, text);
|
||||
case "else": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_ELSE, text);
|
||||
case "elif": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_ELIF, text);
|
||||
case "fi": //$NON-NLS-1$
|
||||
return makeToken(ITokenConstants.SH_FI, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// other identifier-looking word
|
||||
|
@ -360,7 +364,7 @@ public class AutoconfTokenizer {
|
|||
}
|
||||
|
||||
if (ch != terminal) {
|
||||
handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNTERMINATED_STRING, "" + ch));
|
||||
handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNTERMINATED_STRING, "" + ch)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return makeToken(type, buffer.toString());
|
||||
|
|
|
@ -82,7 +82,7 @@ public class Token implements ITokenConstants {
|
|||
char[] text = document.get().toCharArray();
|
||||
if (offset == 0)
|
||||
return false;
|
||||
return (" \t\r\n\f".indexOf(text[offset - 1]) >= 0);
|
||||
return (" \t\r\n\f".indexOf(text[offset - 1]) >= 0); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -359,7 +359,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
|||
for (String arg : argumentList) {
|
||||
command1.append(' ').append(arg);
|
||||
}
|
||||
newArgumentList = new String[] { "-c", command1.toString() };
|
||||
newArgumentList = new String[] { "-c", command1.toString() }; //$NON-NLS-1$
|
||||
|
||||
OutputStream stdout = consoleOutStream;
|
||||
OutputStream stderr = consoleOutStream;
|
||||
|
|
|
@ -28,6 +28,6 @@ public class AutomakeConfigMacro extends Directive {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name + "\n";
|
||||
return name + "\n"; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,14 +27,14 @@ import org.eclipse.jface.text.source.AnnotationModel;
|
|||
import org.eclipse.ui.IEditorInput;
|
||||
|
||||
public class AutomakeErrorHandler {
|
||||
public static final String AUTOMAKE_ERROR_MARKER_ID = AutotoolsUIPlugin.PLUGIN_ID + ".parsefileerror";
|
||||
public static final String AUTOMAKE_ERROR_MARKER_ID = AutotoolsUIPlugin.PLUGIN_ID + ".parsefileerror"; //$NON-NLS-1$
|
||||
|
||||
private IDocument document;
|
||||
private AnnotationModel fAnnotationModel;
|
||||
|
||||
public static final String CDT_ANNOTATION_INFO = "org.eclipse.cdt.ui.info";
|
||||
public static final String CDT_ANNOTATION_WARNING = "org.eclipse.cdt.ui.warning";
|
||||
public static final String CDT_ANNOTATION_ERROR = "org.eclipse.cdt.ui.error";
|
||||
public static final String CDT_ANNOTATION_INFO = "org.eclipse.cdt.ui.info"; //$NON-NLS-1$
|
||||
public static final String CDT_ANNOTATION_WARNING = "org.eclipse.cdt.ui.warning"; //$NON-NLS-1$
|
||||
public static final String CDT_ANNOTATION_ERROR = "org.eclipse.cdt.ui.error"; //$NON-NLS-1$
|
||||
|
||||
// TODO: no quickfixes yet implemented, but maybe in the future
|
||||
private static class AutomakeAnnotation extends Annotation implements IQuickFixableAnnotation {
|
||||
|
|
|
@ -54,13 +54,13 @@ public class AutomakeTextHover implements ITextHover, ITextHoverExtension {
|
|||
}
|
||||
|
||||
// Automatic variables
|
||||
if (hoverText.startsWith("$")) {
|
||||
if (hoverText.startsWith("$")) { //$NON-NLS-1$
|
||||
IDirective containingDirective = makefile.getDirectiveContainingLine(hoverLine);
|
||||
if (containingDirective instanceof TargetRule) {
|
||||
target = (TargetRule) containingDirective;
|
||||
}
|
||||
if (target == null)
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
switch (hoverText.charAt(1)) {
|
||||
case '@':
|
||||
return target.getTarget().toString();
|
||||
|
@ -103,7 +103,7 @@ public class AutomakeTextHover implements ITextHover, ITextHoverExtension {
|
|||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,20 +33,17 @@ import org.eclipse.jface.text.rules.WordRule;
|
|||
|
||||
public class AutomakefileCodeScanner extends AbstractMakefileCodeScanner {
|
||||
|
||||
private final static String[] keywords = { "define", "endef", "ifdef", "ifndef", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"ifeq", "ifneq", "else", "endif", "include", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
|
||||
"-include", "sinclude", "override", "endef", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"export", "unexport", "vpath", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"if", "@if", "@endif" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@SuppressWarnings("nls")
|
||||
private final static String[] keywords = { "define", "endef", "ifdef", "ifndef", "ifeq", "ifneq", "else", "endif",
|
||||
"include", "-include", "sinclude", "override", "endef", "export", "unexport", "vpath", "if", "@if",
|
||||
"@endif" };
|
||||
|
||||
private final static String[] functions = { "subst", "patsubst", "strip", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"findstring", "filter", "sort", "dir", "notdir", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
|
||||
"suffix", "basename", "addsuffix", "addprefix", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"join", "word", "words", "wordlist", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"firstword", "wildcard", "error", "warning", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"shell", "origin", "foreach", "call" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
};
|
||||
@SuppressWarnings("nls")
|
||||
private final static String[] functions = { "subst", "patsubst", "strip", "findstring", "filter", "sort", "dir",
|
||||
"notdir", "suffix", "basename", "addsuffix", "addprefix", "join", "word", "words", "wordlist", "firstword",
|
||||
"wildcard", "error", "warning", "shell", "origin", "foreach", "call" };
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
private final static String[] automaticVariables = { "$<", "$*", "$@", "$?", "$%" };
|
||||
|
||||
static final String[] fTokenProperties = new String[] { ColorManager.MAKE_COMMENT_COLOR,
|
||||
|
@ -117,7 +114,7 @@ public class AutomakefileCodeScanner extends AbstractMakefileCodeScanner {
|
|||
rules.add(new AutoconfIdentifierRule(other));
|
||||
|
||||
// Make sure we don't treat "\#" as comment start.
|
||||
rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED));
|
||||
rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED)); //$NON-NLS-1$
|
||||
|
||||
rules.add(new WhitespaceRule(new AutoconfWhitespaceDetector()));
|
||||
|
||||
|
|
|
@ -189,10 +189,10 @@ public class AutomakefileContentOutlinePage extends ContentOutlinePage {
|
|||
} else if (element instanceof AutomakeIfElse) {
|
||||
AutomakeIfElse ifelse = (AutomakeIfElse) element;
|
||||
// FIXME: make this not a string comparison
|
||||
if (ifelse.getType().equals("if")) {
|
||||
name = "if " + ifelse.getCondition();
|
||||
if (ifelse.getType().equals("if")) { //$NON-NLS-1$
|
||||
name = "if " + ifelse.getCondition(); //$NON-NLS-1$
|
||||
} else
|
||||
name = "else";
|
||||
name = "else"; //$NON-NLS-1$
|
||||
} else if (element instanceof AutomakeConfigMacro) {
|
||||
AutomakeConfigMacro macro = (AutomakeConfigMacro) element;
|
||||
name = macro.getName();
|
||||
|
|
|
@ -573,7 +573,7 @@ public class GNUAutomakefile extends AbstractMakefile implements IGNUMakefile {
|
|||
* An Autoconf directive of the form @xxx@
|
||||
*/
|
||||
protected AutomakeConfigMacro parseConfigMacro(String line) {
|
||||
String extraChars = "_-";
|
||||
String extraChars = "_-"; //$NON-NLS-1$
|
||||
char[] ch = line.toCharArray();
|
||||
int i = 1;
|
||||
while (Character.isLetterOrDigit(ch[i]) || extraChars.indexOf(ch[i]) >= 0) {
|
||||
|
@ -646,7 +646,7 @@ public class GNUAutomakefile extends AbstractMakefile implements IGNUMakefile {
|
|||
}
|
||||
directories = dirs.toArray(new String[0]);
|
||||
if (pattern == null) {
|
||||
pattern = "";
|
||||
pattern = ""; //$NON-NLS-1$
|
||||
}
|
||||
return new VPath(this, pattern, directories);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class MakefilePartitionScanner extends RuleBasedPartitionScanner {
|
|||
rules.add(new MultiLineRule("ifnneq", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
// Last rule must be supplied with default token!
|
||||
rules.add(new MacroDefinitionRule(tMacro, tOther)); //$NON-NLS-1$
|
||||
rules.add(new MacroDefinitionRule(tMacro, tOther));
|
||||
|
||||
IPredicateRule[] result = new IPredicateRule[rules.size()];
|
||||
rules.toArray(result);
|
||||
|
|
|
@ -59,7 +59,7 @@ public class NullMakefile extends AbstractMakefile {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -217,9 +217,9 @@ public abstract class AbstractEditorPreferencePage extends PreferencePage implem
|
|||
try {
|
||||
int value = Integer.parseInt(number);
|
||||
if (value < 0)
|
||||
status.setError(MessageFormat.format(errorMessages[1], new Object[] { number })); //$NON-NLS-1$
|
||||
status.setError(MessageFormat.format(errorMessages[1], new Object[] { number }));
|
||||
} catch (NumberFormatException e) {
|
||||
status.setError(MessageFormat.format(errorMessages[1], new Object[] { number })); //$NON-NLS-1$
|
||||
status.setError(MessageFormat.format(errorMessages[1], new Object[] { number }));
|
||||
}
|
||||
}
|
||||
return status;
|
||||
|
|
|
@ -52,9 +52,11 @@ import org.eclipse.ui.model.WorkbenchViewerComparator;
|
|||
*/
|
||||
public class AutoconfEditorPreferencePage extends AbstractEditorPreferencePage {
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
private static String[] fACVersions = { "2.13", "2.59", "2.61", "2.68" };
|
||||
public static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1];
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
private static String[] fAMVersions = { "1.4-p6", "1.9.5", "1.9.6", "1.11.1" };
|
||||
public static final String LATEST_AM_VERSION = fAMVersions[fAMVersions.length - 1];
|
||||
|
||||
|
|
|
@ -59,9 +59,9 @@ public class AutotoolsEditorPreferenceConstants {
|
|||
|
||||
public static final String EDITOR_FOLDING_ENABLED = "editor_folding_enabled"; //$NON-NLS-1$
|
||||
|
||||
public static final String AUTOCONF_VERSION = "autoconf_version";
|
||||
public static final String AUTOCONF_VERSION = "autoconf_version"; //$NON-NLS-1$
|
||||
|
||||
public static final String AUTOMAKE_VERSION = "automake_version";
|
||||
public static final String AUTOMAKE_VERSION = "automake_version"; //$NON-NLS-1$
|
||||
|
||||
public static void initializeDefaultValues(IPreferenceStore store) {
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public class AutotoolsBuildPropertyPage extends AbstractCBuildPropertyTab {
|
|||
composite.setLayout(layout);
|
||||
|
||||
Group g = new Group(composite, SWT.SHADOW_ETCHED_IN);
|
||||
g.setText(AutotoolsPropertyMessages.getString("CleanBehavior.title"));
|
||||
g.setText(AutotoolsPropertyMessages.getString("CleanBehavior.title")); //$NON-NLS-1$
|
||||
gd = new GridData(
|
||||
GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
|
||||
gd.horizontalSpan = 2;
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.eclipse.swt.widgets.Text;
|
|||
public class AutotoolsCategoryPropertyOptionPage extends AbstractConfigurePropertyOptionsPage {
|
||||
|
||||
private static final int MARGIN = 3;
|
||||
private String catName = "";
|
||||
private String catName = ""; //$NON-NLS-1$
|
||||
private IAConfiguration cfg;
|
||||
|
||||
// Label class for a preference page.
|
||||
|
@ -153,7 +153,7 @@ public class AutotoolsCategoryPropertyOptionPage extends AbstractConfigureProper
|
|||
@Override
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(AutotoolsPropertyMessages.getString("NewEnvVarDialog.title"));
|
||||
newShell.setText(AutotoolsPropertyMessages.getString("NewEnvVarDialog.title")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -171,7 +171,7 @@ public class AutotoolsCategoryPropertyOptionPage extends AbstractConfigureProper
|
|||
int fieldWidthHint = convertWidthInCharsToPixels(metrics, 50);
|
||||
|
||||
Label label = new Label(composite, SWT.NONE);
|
||||
label.setText(AutotoolsPropertyMessages.getString("NewEnvVarDialog.name_field"));
|
||||
label.setText(AutotoolsPropertyMessages.getString("NewEnvVarDialog.name_field")); //$NON-NLS-1$
|
||||
fTextName = new Text(composite, SWT.SINGLE | SWT.BORDER);
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.grabExcessHorizontalSpace = true;
|
||||
|
@ -188,7 +188,7 @@ public class AutotoolsCategoryPropertyOptionPage extends AbstractConfigureProper
|
|||
}
|
||||
});
|
||||
label = new Label(composite, SWT.NONE);
|
||||
label.setText(AutotoolsPropertyMessages.getString("NewEnvVarDialog.value_field"));
|
||||
label.setText(AutotoolsPropertyMessages.getString("NewEnvVarDialog.value_field")); //$NON-NLS-1$
|
||||
fTextValue = new Text(composite, SWT.SINGLE | SWT.BORDER);
|
||||
gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.grabExcessHorizontalSpace = true;
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
|
|||
*/
|
||||
public class AutotoolsConfigurePrefStore implements IPreferenceStore {
|
||||
|
||||
public final static String EMPTY_STRING = "";
|
||||
public final static String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||
public final static String ALL_OPTIONS_ID = EMPTY_STRING;
|
||||
|
||||
private static AutotoolsConfigurePrefStore instance = null;
|
||||
|
|
|
@ -120,7 +120,7 @@ public class AutotoolsConfigurePropertyTab extends AbstractAutotoolsCPropertyTab
|
|||
fTree.addSelectionChangedListener(event -> handleOptionSelection());
|
||||
fTree.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
// Create a temporary default AutotoolsConfiguration to use for label info
|
||||
IAConfiguration tmp = AutotoolsConfigurationManager.getInstance().createDefaultConfiguration("");
|
||||
IAConfiguration tmp = AutotoolsConfigurationManager.getInstance().createDefaultConfiguration(""); //$NON-NLS-1$
|
||||
fTree.setLabelProvider(new ToolListLabelProvider(tmp));
|
||||
}
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ public class AutotoolsEditorPropertyTab extends AbstractAutotoolsCPropertyTab {
|
|||
acVer = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
|
||||
amVer = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
|
||||
} catch (CoreException e) {
|
||||
acVer = "";
|
||||
amVer = "";
|
||||
acVer = ""; //$NON-NLS-1$
|
||||
amVer = ""; //$NON-NLS-1$
|
||||
}
|
||||
int index = fACVersionCombo.getSelectionIndex();
|
||||
String acVerSelected = fACVersionCombo.getItem(index);
|
||||
|
@ -179,7 +179,7 @@ public class AutotoolsEditorPropertyTab extends AbstractAutotoolsCPropertyTab {
|
|||
}
|
||||
|
||||
void initializeACVersion() {
|
||||
String version = "";
|
||||
String version = ""; //$NON-NLS-1$
|
||||
try {
|
||||
version = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
|
||||
if (version == null)
|
||||
|
@ -202,7 +202,7 @@ public class AutotoolsEditorPropertyTab extends AbstractAutotoolsCPropertyTab {
|
|||
}
|
||||
|
||||
void initializeAMVersion() {
|
||||
String version = "";
|
||||
String version = ""; //$NON-NLS-1$
|
||||
try {
|
||||
version = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
|
||||
if (version == null)
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Composite;
|
|||
public class AutotoolsToolPropertyOptionPage extends AbstractConfigurePropertyOptionsPage {
|
||||
|
||||
private static final int MARGIN = 3;
|
||||
private String toolName = "";
|
||||
private String toolName = ""; //$NON-NLS-1$
|
||||
private IAConfiguration cfg;
|
||||
|
||||
public AutotoolsToolPropertyOptionPage(ToolListElement element, IAConfiguration cfg) {
|
||||
|
|
|
@ -89,7 +89,7 @@ public class AutotoolsToolsPropertyTab extends AbstractAutotoolsCPropertyTab {
|
|||
|
||||
/* text window for automake path */
|
||||
fAutomakePath = new Text(composite, SWT.BORDER | SWT.SINGLE);
|
||||
fAutomakePath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.automakePath.tooltip")); //$NON-NLS-1#
|
||||
fAutomakePath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.automakePath.tooltip")); //$NON-NLS-1$
|
||||
gd = new GridData(
|
||||
GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
|
||||
fAutomakePath.setLayoutData(gd);
|
||||
|
|
|
@ -73,8 +73,8 @@ import org.xml.sax.SAXException;
|
|||
|
||||
public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
||||
|
||||
public static final String LOCAL_AUTOCONF_MACROS_DOC_NAME = "macros/acmacros";
|
||||
public static final String LOCAL_AUTOMAKE_MACROS_DOC_NAME = "macros/ammacros";
|
||||
public static final String LOCAL_AUTOCONF_MACROS_DOC_NAME = "macros/acmacros"; //$NON-NLS-1$
|
||||
public static final String LOCAL_AUTOMAKE_MACROS_DOC_NAME = "macros/ammacros"; //$NON-NLS-1$
|
||||
public static final String AUTOCONF_MACROS_DOC_NAME = "http://www.sourceware.org/eclipse/autotools/acmacros"; //$NON-NLS-1$
|
||||
public static final String AUTOMAKE_MACROS_DOC_NAME = "http://www.sourceware.org/eclipse/autotools/ammacros"; //$NON-NLS-1$
|
||||
|
||||
|
@ -296,7 +296,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
|||
Element elem = document.getElementById(name);
|
||||
if (null != elem) {
|
||||
int prototypeCount = 0;
|
||||
buffer.append("<B>Macro:</B> ").append(name);
|
||||
buffer.append("<B>Macro:</B> ").append(name); //$NON-NLS-1$
|
||||
NodeList nl = elem.getChildNodes();
|
||||
for (int i = 0; i < nl.getLength(); ++i) {
|
||||
Node n = nl.item(i);
|
||||
|
@ -305,11 +305,11 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
|||
StringBuilder prototype = new StringBuilder();
|
||||
++prototypeCount;
|
||||
if (prototypeCount == 1) {
|
||||
buffer.append(" (");
|
||||
buffer.append(" ("); //$NON-NLS-1$
|
||||
} else {
|
||||
buffer.append(" <B>or</B> "); //$NON-NLS-2$
|
||||
buffer.append(" <B>or</B> "); //$NON-NLS-1$
|
||||
buffer.append(name);
|
||||
buffer.append(" (<I>"); //$NON-NLS-2$
|
||||
buffer.append(" (<I>"); //$NON-NLS-1$
|
||||
}
|
||||
NodeList varList = n.getChildNodes();
|
||||
for (int j = 0; j < varList.getLength(); ++j) {
|
||||
|
@ -322,14 +322,14 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
|||
if (prototype.length() == 0)
|
||||
prototype.append(parm);
|
||||
else
|
||||
prototype.append(", ").append(parm);
|
||||
prototype.append(", ").append(parm); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
buffer.append(prototype).append("</I>)<br>"); //$NON-NLS-1$
|
||||
}
|
||||
if (nodeName.equals("synopsis")) { //$NON-NLS-1$
|
||||
Node textNode = n.getLastChild();
|
||||
buffer.append("<br><B>Synopsis:</B> ");
|
||||
buffer.append("<br><B>Synopsis:</B> "); //$NON-NLS-1$
|
||||
buffer.append(textNode.getNodeValue());
|
||||
}
|
||||
}
|
||||
|
@ -444,11 +444,11 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
|||
String parm = parmNode.getNodeValue();
|
||||
// Check for first optional parameter which means
|
||||
// we know the minimum number of parameters needed.
|
||||
if (minParmCount < 0 && (parm.charAt(0) == '[' || parm.startsWith("...")))
|
||||
if (minParmCount < 0 && (parm.charAt(0) == '[' || parm.startsWith("..."))) //$NON-NLS-1$
|
||||
minParmCount = parmCount - 1;
|
||||
// Old style documentation sometimes had '[' in
|
||||
// prototypes so look for one at end of a parm too.
|
||||
else if (minParmCount < 0 && parm.endsWith("["))
|
||||
else if (minParmCount < 0 && parm.endsWith("[")) //$NON-NLS-1$
|
||||
minParmCount = parmCount;
|
||||
p.setParmName(prototypeCount, parmCount - 1, parm);
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@ public class AutotoolsProjectImportWizardPage extends NewMakeProjFromExistingPag
|
|||
private Button langcpp;
|
||||
|
||||
protected AutotoolsProjectImportWizardPage() {
|
||||
setTitle(AutotoolsWizardMessages.getResourceString("ImportWizardPage.title"));
|
||||
setDescription(AutotoolsWizardMessages.getResourceString("ImportWizardPage.description"));
|
||||
setTitle(AutotoolsWizardMessages.getResourceString("ImportWizardPage.title")); //$NON-NLS-1$
|
||||
setDescription(AutotoolsWizardMessages.getResourceString("ImportWizardPage.description")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
protected IProjectType getProjectType() {
|
||||
|
@ -110,10 +110,10 @@ public class AutotoolsProjectImportWizardPage extends NewMakeProjFromExistingPag
|
|||
AutotoolsUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 7); //$NON-NLS-1$
|
||||
IConfiguration defaultCfg = null;
|
||||
try {
|
||||
monitor.subTask(AutotoolsUIPlugin.getResourceString("adding project nature"));
|
||||
monitor.subTask(AutotoolsUIPlugin.getResourceString("adding project nature")); //$NON-NLS-1$
|
||||
ManagedCProjectNature.addManagedNature(project, SubMonitor.convert(monitor, 1));
|
||||
AutotoolsNewProjectNature.addAutotoolsNature(project, SubMonitor.convert(monitor, 1));
|
||||
monitor.subTask(AutotoolsUIPlugin.getResourceString("adding builder"));
|
||||
monitor.subTask(AutotoolsUIPlugin.getResourceString("adding builder")); //$NON-NLS-1$
|
||||
AutotoolsNewProjectNature.addAutotoolsBuilder(project, SubMonitor.convert(monitor, 1));
|
||||
project.setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W,
|
||||
AutotoolsPropertyConstants.TRUE);
|
||||
|
@ -167,7 +167,7 @@ public class AutotoolsProjectImportWizardPage extends NewMakeProjFromExistingPag
|
|||
}
|
||||
|
||||
// Save the build options
|
||||
monitor.subTask(AutotoolsUIPlugin.getResourceString("saving project"));
|
||||
monitor.subTask(AutotoolsUIPlugin.getResourceString("saving project")); //$NON-NLS-1$
|
||||
if (info != null) {
|
||||
info.setValid(true);
|
||||
ManagedBuildManager.saveBuildInfo(project, true);
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ConfigurationLabelProvider extends LabelProvider implements ITableL
|
|||
else
|
||||
return (tmpConfig.getName() + " ( " + tmpConfig.getDescription() + " )"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,9 +55,9 @@ import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
|
|||
*/
|
||||
public class ConvertToAutotoolsProjectWizardPage extends ConvertProjectWizardPage {
|
||||
|
||||
private static final String WZ_TITLE = "WizardAutotoolsProjectConversion.title"; //$NON-NLS-1$
|
||||
private static final String WZ_DESC = "WizardAutotoolsProjectConversion.description"; //$NON-NLS-1$
|
||||
private static final String PREFIX = "WizardAutotoolsProjectConversion";
|
||||
private static final String PREFIX = "WizardAutotoolsProjectConversion"; //$NON-NLS-1$
|
||||
private static final String WZ_TITLE = PREFIX + ".title"; //$NON-NLS-1$
|
||||
private static final String WZ_DESC = PREFIX + ".description"; //$NON-NLS-1$
|
||||
protected static final String MSG_ADD_NATURE = PREFIX + ".message.add_nature"; //$NON-NLS-1$
|
||||
protected static final String MSG_ADD_BUILDER = PREFIX + ".message.add_builder"; //$NON-NLS-1$
|
||||
protected static final String MSG_SAVE = PREFIX + ".message.save"; //$NON-NLS-1$
|
||||
|
|
|
@ -171,7 +171,7 @@ public class ReferenceBlock extends AbstractCOptionPage {
|
|||
if (monitor == null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
monitor.beginTask(AutotoolsWizardMessages.getResourceString("ReferenceBlock_task_ReferenceProjects"), 1);
|
||||
monitor.beginTask(AutotoolsWizardMessages.getResourceString("ReferenceBlock_task_ReferenceProjects"), 1); //$NON-NLS-1$
|
||||
try {
|
||||
IProjectDescription description = project.getDescription();
|
||||
description.setReferencedProjects(refProjects);
|
||||
|
|
|
@ -77,10 +77,10 @@ public class GCCPathToolChainProvider implements IToolChainProvider {
|
|||
break;
|
||||
default:
|
||||
switch (tuple[2]) {
|
||||
case "linux":
|
||||
case "linux": //$NON-NLS-1$
|
||||
gcc.setProperty(IToolChain.ATTR_OS, Platform.OS_LINUX);
|
||||
break;
|
||||
case "elf":
|
||||
case "elf": //$NON-NLS-1$
|
||||
gcc.setProperty(IToolChain.ATTR_OS, tuple[1]);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ public class CMakePropertyPage extends PropertyPage {
|
|||
if (launcher instanceof ICBuildCommandLauncher) {
|
||||
((ICBuildCommandLauncher) launcher).setBuildConfiguration(cconfig);
|
||||
}
|
||||
IPath buildPath = project.getLocation().append("build")
|
||||
IPath buildPath = project.getLocation().append("build") //$NON-NLS-1$
|
||||
.append(((CBuildConfiguration) cconfig).getName());
|
||||
Process p = launcher.execute(new Path("cmake"), new String[] { "-LAH", "." }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
new String[0], buildPath, new NullProgressMonitor());
|
||||
|
@ -153,7 +153,7 @@ public class CMakePropertyPage extends PropertyPage {
|
|||
args.add("-LAH"); //$NON-NLS-1$
|
||||
for (ICMakePropertyPageControl control : componentList) {
|
||||
if (control.isValueChanged()) {
|
||||
args.add(control.getConfiguredString()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
args.add(control.getConfiguredString());
|
||||
}
|
||||
}
|
||||
if (args.size() == 2) {
|
||||
|
@ -170,7 +170,7 @@ public class CMakePropertyPage extends PropertyPage {
|
|||
if (launcher instanceof ICBuildCommandLauncher) {
|
||||
((ICBuildCommandLauncher) launcher).setBuildConfiguration(buildConfig);
|
||||
}
|
||||
args.add(".");
|
||||
args.add("."); //$NON-NLS-1$
|
||||
Process p = launcher.execute(new Path("cmake"), args.toArray(new String[0]), new String[0], buildDir, //$NON-NLS-1$
|
||||
new NullProgressMonitor());
|
||||
int rc = -1;
|
||||
|
@ -259,19 +259,19 @@ public class CMakePropertyPage extends PropertyPage {
|
|||
String optionString = optionMatcher.group(1).trim();
|
||||
String[] options = optionString.split("\\s+"); //$NON-NLS-1$
|
||||
for (int i = 0; i < options.length; ++i) {
|
||||
options[i] = options[i].replaceAll("\\(.*?\\)", "").trim(); //$NON-NLS-1$
|
||||
options[i] = options[i].replaceAll("\\(.*?\\)", "").trim(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
ICMakePropertyPageControl control = new CMakePropertyCombo(composite, name, options,
|
||||
initialValue, lastComment);
|
||||
controls.add(control);
|
||||
} else {
|
||||
if ("BOOL".equals(type)) {
|
||||
if ("ON".equals(initialValue) || ("OFF".equals(initialValue))) {
|
||||
if ("BOOL".equals(type)) { //$NON-NLS-1$
|
||||
if ("ON".equals(initialValue) || ("OFF".equals(initialValue))) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
ICMakePropertyPageControl control = new CMakePropertyCombo(composite, name,
|
||||
new String[] { "ON", "OFF" }, //$NON-NLS-1$ //$NON-NLS-2$
|
||||
initialValue, lastComment);
|
||||
controls.add(control);
|
||||
} else if ("YES".equals(initialValue) || "NO".equals(initialValue)) {
|
||||
} else if ("YES".equals(initialValue) || "NO".equals(initialValue)) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
ICMakePropertyPageControl control = new CMakePropertyCombo(composite, name,
|
||||
new String[] { "YES", "NO" }, //$NON-NLS-1$ //$NON-NLS-2$
|
||||
initialValue, lastComment);
|
||||
|
|
|
@ -80,7 +80,7 @@ public class AutotoolsProjectGenerator extends FMProjectGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
entries.add(CoreModel.newOutputEntry(getProject().getFullPath())); //$NON-NLS-1$
|
||||
entries.add(CoreModel.newOutputEntry(getProject().getFullPath()));
|
||||
CoreModel.getDefault().create(project).setRawPathEntries(entries.toArray(new IPathEntry[entries.size()]),
|
||||
monitor);
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import junit.framework.Test;
|
|||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public class CDataProviderTests extends TestCase {
|
||||
/**
|
||||
* @param name
|
||||
|
|
|
@ -39,6 +39,7 @@ import junit.framework.Test;
|
|||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public class StandardBuildTests extends TestCase {
|
||||
private static final boolean OFF = false;
|
||||
private static final boolean ON = true;
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.osgi.framework.BundleContext;
|
|||
/**
|
||||
* The main plugin class to be used in the desktop.
|
||||
*/
|
||||
@SuppressWarnings("nls")
|
||||
public class MakeTestsPlugin extends Plugin {
|
||||
//The shared instance.
|
||||
private static MakeTestsPlugin plugin;
|
||||
|
|
|
@ -39,6 +39,7 @@ import junit.framework.Test;
|
|||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public class MakefileReaderProviderTests extends TestCase {
|
||||
private String[] inclDirs;
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.eclipse.core.runtime.Path;
|
|||
|
||||
import junit.framework.Assert;
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public class StandardBuildTestHelper {
|
||||
/* (non-Javadoc)
|
||||
* Create a new project named <code>name</code> or return the project in
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.core.runtime.Path;
|
|||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
public class GCCPerFileBOPConsoleParserTests extends BaseBOPConsoleParserTests {
|
||||
private final static IMarkerGenerator MARKER_GENERATOR = new IMarkerGenerator() {
|
||||
@Override
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
|
|||
*
|
||||
* @author vhirsl
|
||||
*/
|
||||
@SuppressWarnings("nls")
|
||||
public class ScannerConfigDiscoveryTests extends BaseTestCase {
|
||||
private IProject fCProject = null;
|
||||
private IFile fCFile = null;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
|
|||
/**
|
||||
* This class tests ScannerConfigProfileManager
|
||||
*/
|
||||
@SuppressWarnings("nls")
|
||||
public class ScannerConfigProfileTests extends BaseTestCase {
|
||||
private IProject fCProject = null;
|
||||
private IFile fCFile = null;
|
||||
|
|
|
@ -54,10 +54,10 @@ import org.eclipse.core.runtime.Status;
|
|||
import org.osgi.framework.Version;
|
||||
|
||||
public class Option extends BuildObject implements IOption, IBuildPropertiesRestriction {
|
||||
private static final String IS_BUILTIN_EMPTY = "IS_BUILTIN_EMPTY";
|
||||
private static final String IS_VALUE_EMPTY = "IS_VALUE_EMPTY";
|
||||
private static final String IS_BUILTIN_EMPTY = "IS_BUILTIN_EMPTY"; //$NON-NLS-1$
|
||||
private static final String IS_VALUE_EMPTY = "IS_VALUE_EMPTY"; //$NON-NLS-1$
|
||||
// Static default return values
|
||||
public static final String EMPTY_STRING = "";
|
||||
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||
public static final String[] EMPTY_STRING_ARRAY = new String[0];
|
||||
public static final OptionStringValue[] EMPTY_LV_ARRAY = new OptionStringValue[0];
|
||||
|
||||
|
|
|
@ -355,7 +355,6 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
|
|||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
mProj = null;
|
||||
}
|
||||
|
||||
if (mProj == null) {
|
||||
|
|
|
@ -103,7 +103,7 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
|
|||
+ IManagedBuilderMakefileGenerator.WHITESPACE + "-n" //$NON-NLS-1$
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE).append(depRule)
|
||||
.append(IManagedBuilderMakefileGenerator.WHITESPACE + "$(dir $@)" //$NON-NLS-1$
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE + ">"
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE + ">" //$NON-NLS-1$
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE)
|
||||
.append(depRule)
|
||||
.append(IManagedBuilderMakefileGenerator.WHITESPACE + IManagedBuilderMakefileGenerator.LOGICAL_AND
|
||||
|
|
|
@ -250,7 +250,7 @@ public class CygwinPathResolver implements IBuildPathResolver {
|
|||
}
|
||||
} catch (IOException e) {
|
||||
GnuUIPlugin.getDefault()
|
||||
.log(new Status(IStatus.ERROR, GnuUIPlugin.PLUGIN_ID, "Error executing program [" + cmd + "]", e));
|
||||
.log(new Status(IStatus.ERROR, GnuUIPlugin.PLUGIN_ID, "Error executing program [" + cmd + "]", e)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -466,31 +466,44 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
|||
boolean prj = page.isForProject();
|
||||
if (prj || tool != null) {
|
||||
for (ICConfigurationDescription cf : page.getCfgsEditable()) {
|
||||
IConfiguration c = null;
|
||||
ITool t = null;
|
||||
String s = null;
|
||||
if (prj) {
|
||||
c = getCfg(cf);
|
||||
IConfiguration c = getCfg(cf);
|
||||
switch (field) {
|
||||
case PRECMD:
|
||||
s = c.getPrebuildStep();
|
||||
break;
|
||||
case PREANN:
|
||||
s = c.getPreannouncebuildStep();
|
||||
break;
|
||||
case PSTCMD:
|
||||
s = c.getPostbuildStep();
|
||||
break;
|
||||
case PSTANN:
|
||||
s = c.getPostannouncebuildStep();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ITool t = null;
|
||||
ICResourceDescription r = cf.getResourceDescription(cfgdescr.getPath(), true);
|
||||
if (r != null && r instanceof ICFileDescription)
|
||||
t = getRcbsTool((IFileInfo) getResCfg(r));
|
||||
if (t == null)
|
||||
continue; // there's no specific resconfig for this configuration
|
||||
}
|
||||
String s = null;
|
||||
switch (field) {
|
||||
case PRECMD:
|
||||
s = prj ? c.getPrebuildStep() : getInputTypes(t);
|
||||
break;
|
||||
case PREANN:
|
||||
s = prj ? c.getPreannouncebuildStep() : getOutputNames(t);
|
||||
break;
|
||||
case PSTCMD:
|
||||
s = prj ? c.getPostbuildStep() : t.getToolCommand();
|
||||
break;
|
||||
case PSTANN:
|
||||
s = prj ? c.getPostannouncebuildStep() : t.getAnnouncement();
|
||||
break;
|
||||
switch (field) {
|
||||
case PRECMD:
|
||||
s = getInputTypes(t);
|
||||
break;
|
||||
case PREANN:
|
||||
s = getOutputNames(t);
|
||||
break;
|
||||
case PSTCMD:
|
||||
s = t.getToolCommand();
|
||||
break;
|
||||
case PSTANN:
|
||||
s = t.getAnnouncement();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (s != null && s.trim().length() > 0)
|
||||
set.add(s.trim());
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
|
@ -31,7 +32,6 @@ import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySu
|
|||
import org.eclipse.cdt.core.model.util.CDTListComparator;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
|
||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||
|
@ -734,13 +734,13 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
}
|
||||
|
||||
private boolean settingsEqual(IScannerConfigBuilderInfo2 info1, IScannerConfigBuilderInfo2 info2) {
|
||||
if (!CDataUtil.objectsEqual(info1.getSelectedProfileId(), info2.getSelectedProfileId()))
|
||||
if (!Objects.equals(info1.getSelectedProfileId(), info2.getSelectedProfileId()))
|
||||
return false;
|
||||
if (!CDataUtil.objectsEqual(info1.getBuildOutputFilePath(), info2.getBuildOutputFilePath()))
|
||||
if (!Objects.equals(info1.getBuildOutputFilePath(), info2.getBuildOutputFilePath()))
|
||||
return false;
|
||||
if (!CDataUtil.objectsEqual(info1.getContext(), info2.getContext()))
|
||||
if (!Objects.equals(info1.getContext(), info2.getContext()))
|
||||
return false;
|
||||
if (!CDataUtil.objectsEqual(info1.getSelectedProfileId(), info2.getSelectedProfileId()))
|
||||
if (!Objects.equals(info1.getSelectedProfileId(), info2.getSelectedProfileId()))
|
||||
return false;
|
||||
if (info1.isAutoDiscoveryEnabled() != info2.isAutoDiscoveryEnabled()
|
||||
|| info1.isBuildOutputFileActionEnabled() != info2.isBuildOutputFileActionEnabled()
|
||||
|
|
|
@ -159,11 +159,11 @@ public class MesonBuildConfiguration extends CBuildConfiguration {
|
|||
|
||||
String userArgs = getProperty(IMesonConstants.MESON_ARGUMENTS);
|
||||
if (userArgs != null && !userArgs.isEmpty()) {
|
||||
commandList.addAll(Arrays.asList(userArgs.split(" ")));
|
||||
commandList.addAll(Arrays.asList(userArgs.split(" "))); //$NON-NLS-1$
|
||||
}
|
||||
String projOptions = getProperty(IMesonConstants.MESON_PROJECT_OPTIONS);
|
||||
if (projOptions != null && !projOptions.isEmpty()) {
|
||||
commandList.addAll(Arrays.asList(projOptions.split(" ")));
|
||||
commandList.addAll(Arrays.asList(projOptions.split(" "))); //$NON-NLS-1$
|
||||
}
|
||||
commandList.add(getBuildDirectory().toString());
|
||||
|
||||
|
|
|
@ -81,8 +81,7 @@ public class MesonProjectGenerator extends FMProjectGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
entries.add(CoreModel.newOutputEntry(buildFolder.getFullPath(), // $NON-NLS-1$
|
||||
new IPath[] {})); //$NON-NLS-1$
|
||||
entries.add(CoreModel.newOutputEntry(buildFolder.getFullPath(), new IPath[] {}));
|
||||
CoreModel.getDefault().create(project).setRawPathEntries(entries.toArray(new IPathEntry[entries.size()]),
|
||||
monitor);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name.0
|
||||
Bundle-SymbolicName: org.eclipse.cdt.meson.ui;singleton:=true
|
||||
Bundle-Version: 1.0.400.qualifier
|
||||
Bundle-Version: 1.0.500.qualifier
|
||||
Bundle-Vendor: %vendorName
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-Activator: org.eclipse.cdt.meson.ui.Activator
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Text;
|
|||
|
||||
public class MesonBuildTab extends CommonBuildTab {
|
||||
|
||||
private static final String NINJA = "Ninja";
|
||||
private static final String NINJA = "Ninja"; //$NON-NLS-1$
|
||||
private Button unixGenButton;
|
||||
private Button ninjaGenButton;
|
||||
private Text mesonArgsText;
|
||||
|
@ -135,7 +135,7 @@ public class MesonBuildTab extends CommonBuildTab {
|
|||
}
|
||||
|
||||
private void updateGeneratorButtons(String generator) {
|
||||
if (generator == null || generator.equals(NINJA)) { //$NON-NLS-1$
|
||||
if (generator == null || generator.equals(NINJA)) {
|
||||
ninjaGenButton.setSelection(true);
|
||||
} else {
|
||||
unixGenButton.setSelection(true);
|
||||
|
@ -149,7 +149,7 @@ public class MesonBuildTab extends CommonBuildTab {
|
|||
ICBuildConfiguration buildConfig = getBuildConfiguration();
|
||||
|
||||
buildConfig.setProperty(IMesonConstants.MESON_GENERATOR,
|
||||
ninjaGenButton.getSelection() ? NINJA : "Unix Makefiles"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
ninjaGenButton.getSelection() ? NINJA : "Unix Makefiles"); //$NON-NLS-1$
|
||||
|
||||
String mesonArgs = mesonArgsText.getText().trim();
|
||||
if (!mesonArgs.isEmpty()) {
|
||||
|
@ -176,7 +176,7 @@ public class MesonBuildTab extends CommonBuildTab {
|
|||
@Override
|
||||
protected void saveProperties(Map<String, String> properties) {
|
||||
super.saveProperties(properties);
|
||||
properties.put(IMesonConstants.MESON_GENERATOR, ninjaGenButton.getSelection() ? NINJA : "Unix Makefiles"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
properties.put(IMesonConstants.MESON_GENERATOR, ninjaGenButton.getSelection() ? NINJA : "Unix Makefiles"); //$NON-NLS-1$
|
||||
|
||||
properties.put(IMesonConstants.MESON_ARGUMENTS, mesonArgsText.getText().trim());
|
||||
properties.put(IMesonConstants.BUILD_COMMAND, buildCommandText.getText().trim());
|
||||
|
@ -190,7 +190,7 @@ public class MesonBuildTab extends CommonBuildTab {
|
|||
String gen = properties.get(IMesonConstants.MESON_GENERATOR);
|
||||
if (gen != null) {
|
||||
switch (gen) {
|
||||
case NINJA: //$NON-NLS-1$
|
||||
case NINJA:
|
||||
ninjaGenButton.setSelection(true);
|
||||
unixGenButton.setSelection(false);
|
||||
break;
|
||||
|
|
|
@ -40,7 +40,7 @@ public class SWTImagesFactory {
|
|||
private static final String NAME_PREFIX = Activator.PLUGIN_ID + '.';
|
||||
private static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
|
||||
public static final String IMG_MESON = NAME_PREFIX + "meson-logo.png"; //$NON-NLS-1$
|
||||
public static final ImageDescriptor DESC_MESON = createManaged("", IMG_MESON);
|
||||
public static final ImageDescriptor DESC_MESON = createManaged("", IMG_MESON); //$NON-NLS-1$
|
||||
|
||||
private static ImageDescriptor createManaged(String prefix, String name) {
|
||||
return createManaged(imageRegistry, prefix, name);
|
||||
|
|
|
@ -79,7 +79,7 @@ public class RunNinjaCommandHandler extends AbstractMesonCommandHandler {
|
|||
String[] ninjaArgs = null;
|
||||
if (argString != null) {
|
||||
List<String> ninjaArgList = new ArrayList<>();
|
||||
Matcher m = Pattern.compile("([^\"]\\S*|\".+?\")\\s*").matcher(argString);
|
||||
Matcher m = Pattern.compile("([^\"]\\S*|\".+?\")\\s*").matcher(argString); //$NON-NLS-1$
|
||||
while (m.find()) {
|
||||
ninjaArgList.add(m.group(1));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue