diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsEnvironmentVariableSupplier.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsEnvironmentVariableSupplier.java index ad37a2f5658..763cf01ec86 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsEnvironmentVariableSupplier.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsEnvironmentVariableSupplier.java @@ -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); diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java index 9d765ee3a8a..296fbfdf692 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java @@ -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 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 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 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 diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsPropertyConstants.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsPropertyConstants.java index 314e7ecf232..147d142afd7 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsPropertyConstants.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsPropertyConstants.java @@ -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]; diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java index 5873edf923d..a8c2ed8a5da 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java @@ -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; diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/PkgconfigErrorResolution.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/PkgconfigErrorResolution.java index 8fb79eb627e..624b401a1db 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/PkgconfigErrorResolution.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/PkgconfigErrorResolution.java @@ -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$ } } diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/VersionComparator.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/VersionComparator.java index b980ec8dfc2..8160469bbd3 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/VersionComparator.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/VersionComparator.java @@ -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]); diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AbstractConfigurationOption.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AbstractConfigurationOption.java index 38916f0d45b..97d7e2a2ba2 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AbstractConfigurationOption.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AbstractConfigurationOption.java @@ -64,7 +64,7 @@ public abstract class AbstractConfigurationOption implements IConfigureOption { } public String getParameterName() { - return "--" + getName(); + return "--" + getName(); //$NON-NLS-1$ } @Override diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java index 6e3ce526df5..0e5514fcbd5 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java @@ -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(); } diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfigurationManager.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfigurationManager.java index c86e682eb0e..aa418c7c7a6 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfigurationManager.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfigurationManager.java @@ -417,19 +417,19 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener { String childName = children.get(k); IConfigureOption childopt = cfg.getOption(childName); p.println(""); //$NON-NLS-3$ + + xmlEscape(childopt.getValue()) + "\"/>"); //$NON-NLS-1$ } p.println(""); //$NON-NLS-1$ } else if (!opt.isCategory() && !opt.isFlagValue()) p.println("