From 12904409a3d93f4ef47fb40c47b44eb6c4ead01b Mon Sep 17 00:00:00 2001 From: Alex Blewitt Date: Sat, 23 Apr 2016 15:33:27 +0100 Subject: [PATCH] Bug 492304 - Fix NLS warnings Eclipse warns if a String literal does not have a `//$NON-NLS-$` entry at the end of the line. However, for historic or formatting reasons, many such occurrences in the CDT source have an intermediate whitespace, such as `// $NON-NLS-$` Fix these so that the whitespace is removed between the // and $ characters. Change-Id: Idc12398fe6e9d619af1d0b1b73fb8b6180da223c Signed-off-by: Alex Blewitt --- .../core/AutotoolsNewProjectNature.java | 4 +- .../core/AutotoolsOptionConstants.java | 92 +++++++++---------- .../core/AutotoolsNewMakeGenerator.java | 10 +- .../core/AutotoolsPropertyConstants.java | 42 ++++----- .../configure/AutotoolsConfiguration.java | 26 +++--- .../AutotoolsConfigurationManager.java | 34 +++---- .../AutotoolsOptionValueHandler.java | 6 +- .../core/configure/BinConfigureOption.java | 6 +- .../core/configure/ConfigureTool.java | 4 +- .../configure/InternalConfigureOption.java | 6 +- .../configure/MultiArgConfigureOption.java | 6 +- .../core/configure/StringConfigureOption.java | 8 +- .../configure/VariableConfigureOption.java | 6 +- .../autotools/tests/UpdateConfigureTest.java | 10 +- .../ui/tests/SetConfigurationParameter.java | 18 ++-- .../autotools/ui/AutotoolsUIPluginImages.java | 2 +- .../autotools/ui/OptionalMessageDialog.java | 4 +- .../ui/actions/AbstractAutotoolsHandler.java | 4 +- .../AutotoolsBuildPropertyPage.java | 18 ++-- .../properties/AutotoolsToolsPropertyTab.java | 26 +++--- .../autotools/ui/wizards/ReferenceBlock.java | 8 +- .../internal/GCCPathToolChainProvider.java | 4 +- .../internal/CMakeBuildConfiguration.java | 2 +- .../cdt/make/core/MakeScannerInfo.java | 4 +- .../internal/core/makefile/NullMakefile.java | 2 +- .../core/makefile/gnu/GNUMakefile.java | 2 +- .../core/scannerconfig/util/CCommandDSC.java | 6 +- .../testplugin/ManagedBuildTestHelper.java | 2 +- .../ManagedBuildCommandLineGenerator.java | 4 +- .../core/tests/ManagedProjectUpdateTests.java | 2 +- .../core/tests/ResourceBuildCoreTests.java | 2 +- .../tests/Test30_2_CommandLineGenerator.java | 4 +- .../core/ManagedBuildManager.java | 2 +- .../core/ManagedBuilderCorePlugin.java | 2 +- .../internal/buildmodel/BuildDescription.java | 2 +- .../internal/buildmodel/BuildStep.java | 2 +- .../internal/core/AdditionalInput.java | 2 +- .../internal/core/CommonBuilder.java | 10 +- .../internal/core/FolderInfo.java | 2 +- .../core/GeneratedMakefileBuilder.java | 2 +- .../internal/core/ManagedBuildInfo.java | 22 ++--- .../internal/core/OptionCategory.java | 2 +- .../internal/core/OptionReference.java | 8 +- .../internal/core/ResourceChangeHandler.java | 2 +- .../internal/core/ResourceConfiguration.java | 12 +-- .../managedbuilder/internal/core/Target.java | 2 +- .../internal/core/ToolReference.java | 24 ++--- .../enablement/CheckStringExpression.java | 4 +- .../DefaultGnuWinScannerInfoCollector.java | 2 +- ...faultGCCDependencyCalculator3Commands.java | 2 +- .../makegen/gnu/GnuMakefileGenerator.java | 26 +++--- .../cdt/newmake/core/MakeScannerInfo.java | 4 +- .../BuildOptionComboFieldEditor.java | 4 +- .../ui/properties/BuildStepsTab.java | 4 +- .../NewBuildConfigurationDialog.java | 10 +- .../ui/properties/NewCfgDialog.java | 4 +- .../ui/properties/NewVarDialog.java | 2 +- .../model/util/AbstractEntryStorage.java | 2 +- .../internal/core/model/BinaryFunction.java | 4 +- .../scanner/IncludeSearchPathElement.java | 4 +- .../utils/org/eclipse/cdt/utils/coff/PE.java | 2 +- .../eclipse/cdt/utils/debug/dwarf/Dwarf.java | 8 +- .../eclipse/cdt/utils/debug/stabs/Stabs.java | 2 +- .../cdt/utils/debug/stabs/StabsReader.java | 2 +- .../cdt/utils/debug/stabs/StringField.java | 2 +- .../ui/tests/chelp/CHelpProviderTester.java | 2 +- .../cdt/internal/ui/editor/IndentUtil.java | 2 +- .../CFileTypesPreferenceBlock.java | 2 +- .../cdt/internal/ui/search/CSearchUtil.java | 2 +- .../org/eclipse/cdt/ui/CDTSharedImages.java | 14 +-- .../cdt/ui/dialogs/ReferenceBlock.java | 8 +- .../cdt/ui/newui/NewConfigurationDialog.java | 10 +- .../ui/newui/RenameConfigurationDialog.java | 2 +- .../uitree/uiwidgets/UIStringListWidget.java | 2 +- .../uitree/uiwidgets/UITextWidget.java | 2 +- .../application/tests/StandaloneTest.java | 4 +- .../core/breakpoints/CEventBreakpoint.java | 4 +- .../service/command/commands/MICommand.java | 2 +- .../command/commands/MIDataDisassemble.java | 2 +- .../eclipse/cdt/dsf/ui/viewmodel/VMDelta.java | 2 +- .../docker/launcher/ContainerTab.java | 2 +- .../docker/launcher/GdbDebuggerPage.java | 4 +- .../cdt/launch/ui/CEnvironmentTab.java | 4 +- .../core/internal/board/ArduinoTool.java | 6 +- 84 files changed, 317 insertions(+), 317 deletions(-) diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsNewProjectNature.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsNewProjectNature.java index 161985bb075..dee3dad79e4 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsNewProjectNature.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsNewProjectNature.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2015 Red Hat Inc.. and others + * Copyright (c) 2008, 2016 Red Hat Inc. and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -42,7 +42,7 @@ public class AutotoolsNewProjectNature implements IProjectNature { /** * @since 1.3 */ - public static final String REMOTE_BUILDER_ID = "org.eclipse.ptp.rdt.sync.cdt.core.SyncBuilder"; // $NON-NLS-1$ + public static final String REMOTE_BUILDER_ID = "org.eclipse.ptp.rdt.sync.cdt.core.SyncBuilder"; //$NON-NLS-1$ public static final String OLD_AUTOTOOLS_BUILDER_ID = "org.eclipse.linuxtools.cdt.autotools.genmakebuilder"; //$NON-NLS-1$ private IProject project; diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsOptionConstants.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsOptionConstants.java index 171bdb0c0ae..44b916bc931 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsOptionConstants.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/autotools/core/AutotoolsOptionConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Red Hat Inc. and others. + * Copyright (c) 2012, 2016 Red Hat Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,59 +12,59 @@ package org.eclipse.cdt.autotools.core; */ public class AutotoolsOptionConstants { // IAutotoolOption Names - public static final String TOOL_CONFIGURE = "configure"; // $NON-NLS-1$ - public static final String CATEGORY_GENERAL = "general"; // $NON-NLS-1$ - public static final String OPT_CONFIGDIR = "configdir"; // $NON-NLS-1$ - public static final String OPT_CACHE_FILE = "cache-file"; // $NON-NLS-1$ - public static final String OPT_HELP = "help"; // $NON-NLS-1$ - public static final String OPT_NO_CREATE = "no-create"; // $NON-NLS-1$ - public static final String OPT_QUIET = "quiet"; // $NON-NLS-1$ - public static final String OPT_VERSION = "version"; // $NON-NLS-1$ - public static final String CATEGORY_PLATFORM = "platform"; // $NON-NLS-1$ - public static final String OPT_HOST = "host"; // $NON-NLS-1$ - public static final String OPT_BUILD = "build"; // $NON-NLS-1$ - public static final String OPT_TARGET = "target"; // $NON-NLS-1$ - public static final String CATEGORY_DIRECTORIES = "directories"; // $NON-NLS-1$ - public static final String OPT_PREFIX = "prefix"; // $NON-NLS-1$ - public static final String OPT_EXEC_PREFIX = "exec-prefix"; // $NON-NLS-1$ - public static final String OPT_LIBDIR = "libdir"; // $NON-NLS-1$ - public static final String OPT_BINDIR = "bindir"; // $NON-NLS-1$ - public static final String OPT_SBINDIR = "sbindir"; // $NON-NLS-1$ - public static final String OPT_INCLUDEDIR = "includedir"; // $NON-NLS-1$ - public static final String OPT_DATADIR = "datadir"; // $NON-NLS-1$ - public static final String OPT_SYSCONFDIR = "sysconfdir"; // $NON-NLS-1$ - public static final String OPT_INFODIR = "infodir"; // $NON-NLS-1$ - public static final String OPT_MANDIR = "mandir"; // $NON-NLS-1$ - public static final String OPT_SRCDIR = "srcdir"; // $NON-NLS-1$ - public static final String OPT_LOCALSTATEDIR = "localstatedir"; // $NON-NLS-1$ - public static final String OPT_SHAREDSTATEDIR = "sharedstatedir"; // $NON-NLS-1$ - public static final String OPT_LIBEXECDIR = "libexecdir"; // $NON-NLS-1$ - public static final String OPT_OLDINCLUDEDIR = "oldincludedir"; // $NON-NLS-1$ - public static final String CATEGORY_FILENAMES = "filenames"; // $NON-NLS-1$ - public static final String OPT_PROGRAM_PREFIX = "program-prefix"; // $NON-NLS-1$ - public static final String OPT_PROGRAM_SUFFIX = "program-suffix"; // $NON-NLS-1$ - public static final String OPT_PROGRAM_TRANSFORM_NAME = "program-transform-name"; // $NON-NLS-1$ - public static final String CATEGORY_FEATURES = "features"; // $NON-NLS-1$ - public static final String OPT_ENABLE_MAINTAINER_MODE = "enable-maintainer-mode"; // $NON-NLS-1$ - public static final String FLAG_CFLAGS = "CFLAGS"; // $NON-NLS-1$ + public static final String TOOL_CONFIGURE = "configure"; //$NON-NLS-1$ + public static final String CATEGORY_GENERAL = "general"; //$NON-NLS-1$ + public static final String OPT_CONFIGDIR = "configdir"; //$NON-NLS-1$ + public static final String OPT_CACHE_FILE = "cache-file"; //$NON-NLS-1$ + public static final String OPT_HELP = "help"; //$NON-NLS-1$ + public static final String OPT_NO_CREATE = "no-create"; //$NON-NLS-1$ + public static final String OPT_QUIET = "quiet"; //$NON-NLS-1$ + public static final String OPT_VERSION = "version"; //$NON-NLS-1$ + public static final String CATEGORY_PLATFORM = "platform"; //$NON-NLS-1$ + public static final String OPT_HOST = "host"; //$NON-NLS-1$ + public static final String OPT_BUILD = "build"; //$NON-NLS-1$ + public static final String OPT_TARGET = "target"; //$NON-NLS-1$ + public static final String CATEGORY_DIRECTORIES = "directories"; //$NON-NLS-1$ + public static final String OPT_PREFIX = "prefix"; //$NON-NLS-1$ + public static final String OPT_EXEC_PREFIX = "exec-prefix"; //$NON-NLS-1$ + public static final String OPT_LIBDIR = "libdir"; //$NON-NLS-1$ + public static final String OPT_BINDIR = "bindir"; //$NON-NLS-1$ + public static final String OPT_SBINDIR = "sbindir"; //$NON-NLS-1$ + public static final String OPT_INCLUDEDIR = "includedir"; //$NON-NLS-1$ + public static final String OPT_DATADIR = "datadir"; //$NON-NLS-1$ + public static final String OPT_SYSCONFDIR = "sysconfdir"; //$NON-NLS-1$ + public static final String OPT_INFODIR = "infodir"; //$NON-NLS-1$ + public static final String OPT_MANDIR = "mandir"; //$NON-NLS-1$ + public static final String OPT_SRCDIR = "srcdir"; //$NON-NLS-1$ + public static final String OPT_LOCALSTATEDIR = "localstatedir"; //$NON-NLS-1$ + public static final String OPT_SHAREDSTATEDIR = "sharedstatedir"; //$NON-NLS-1$ + public static final String OPT_LIBEXECDIR = "libexecdir"; //$NON-NLS-1$ + public static final String OPT_OLDINCLUDEDIR = "oldincludedir"; //$NON-NLS-1$ + public static final String CATEGORY_FILENAMES = "filenames"; //$NON-NLS-1$ + public static final String OPT_PROGRAM_PREFIX = "program-prefix"; //$NON-NLS-1$ + public static final String OPT_PROGRAM_SUFFIX = "program-suffix"; //$NON-NLS-1$ + public static final String OPT_PROGRAM_TRANSFORM_NAME = "program-transform-name"; //$NON-NLS-1$ + public static final String CATEGORY_FEATURES = "features"; //$NON-NLS-1$ + public static final String OPT_ENABLE_MAINTAINER_MODE = "enable-maintainer-mode"; //$NON-NLS-1$ + public static final String FLAG_CFLAGS = "CFLAGS"; //$NON-NLS-1$ /** * @since 1.4 */ - public static final String FLAG_CFLAGS_FLAGS = "CFLAGS|CXXFLAGS"; // $NON-NLS-1$ - public static final String OPT_CFLAGS_DEBUG = "cflags-debug"; // $NON-NLS-1$ - public static final String OPT_CFLAGS_GPROF = "cflags-gprof"; // $NON-NLS-1$ - public static final String OPT_CFLAGS_GCOV = "cflags-gcov"; // $NON-NLS-1$ - public static final String OPT_USER = "user"; // $NON-NLS-1$ - public static final String TOOL_AUTOGEN = "autogen"; // $NON-NLS-1$ - public static final String CATEGORY_OPTIONS = "options"; // $NON-NLS-1$ - public static final String OPT_AUTOGENOPTS = "autogenOpts"; // $NON-NLS-1$ + public static final String FLAG_CFLAGS_FLAGS = "CFLAGS|CXXFLAGS"; //$NON-NLS-1$ + public static final String OPT_CFLAGS_DEBUG = "cflags-debug"; //$NON-NLS-1$ + public static final String OPT_CFLAGS_GPROF = "cflags-gprof"; //$NON-NLS-1$ + public static final String OPT_CFLAGS_GCOV = "cflags-gcov"; //$NON-NLS-1$ + public static final String OPT_USER = "user"; //$NON-NLS-1$ + public static final String TOOL_AUTOGEN = "autogen"; //$NON-NLS-1$ + public static final String CATEGORY_OPTIONS = "options"; //$NON-NLS-1$ + public static final String OPT_AUTOGENOPTS = "autogenOpts"; //$NON-NLS-1$ /** * @since 2.0 */ - public static final String CATEGORY_ENVVAR = "cat_envvar"; // $NON-NLS-1$ + public static final String CATEGORY_ENVVAR = "cat_envvar"; //$NON-NLS-1$ /** * @since 2.0 */ - public final static String OPT_ENVVAR = "env_vars"; // $NON-NLS-1$ + public final static String OPT_ENVVAR = "env_vars"; //$NON-NLS-1$ } 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 2076cfd12d5..813fd3b4b50 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2016 Red Hat Inc.and others. + * Copyright (c) 2009, 2016 Red Hat Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -777,7 +777,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator { protected IPath getConfigurePath(List envVars, List cmdParms) { IPath configPath; IConfigureOption configOption = toolsCfg.getOption(CONFIGURE_TOOL_ID); - String command = "configure"; // $NON-NLS-1$ + String command = "configure"; //$NON-NLS-1$ if (configOption != null) command = stripEnvVars(configOption.getValue().trim(), envVars); @@ -809,7 +809,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator { protected IPath getAutogenPath(List envVars, List cmdParms) { IPath autogenPath; IConfigureOption autogenOption = toolsCfg.getOption(AUTOGEN_TOOL_ID); - String command = "autogen.sh"; // $NON-NLS-1$ + String command = "autogen.sh"; //$NON-NLS-1$ if (autogenOption != null) command = stripEnvVars(autogenOption.getValue().trim(), envVars); @@ -1219,14 +1219,14 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator { // For Windows/Mac, check for PWD environment variable being passed. // Remove it for now as it is causing errors in configuration. // Fix for bug #343879 - if (!removePWD || !variables[i].getName().equals("PWD")) { // $NON-NLS-1$ + if (!removePWD || !variables[i].getName().equals("PWD")) { //$NON-NLS-1$ String value = variables[i].getValue(); // The following is a work-around for bug #407580. Configure doesn't recognize // a directory with a trailing separator at the end is equivalent to the same // directory without that trailing separator. This problem can cause // configure to try and link a file to itself (e.g. projects with a GnuMakefile) and // obliterate the contents. Thus, we remove the trailing separator to be safe. - if (variables[i].getName().equals("PWD")) { // $NON-NLS-1$ + if (variables[i].getName().equals("PWD")) { //$NON-NLS-1$ if (value.charAt(value.length()-1) == IPath.SEPARATOR) value = value.substring(0, value.length() - 1); } 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 f66c2c3ab10..2d78a7e4a07 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2012 Red Hat Inc. + * Copyright (c) 2007, 2016 Red Hat Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -16,41 +16,41 @@ import org.eclipse.core.runtime.QualifiedName; public class AutotoolsPropertyConstants { - static final String PREFIX = AutotoolsPlugin.getUniqueIdentifier() + "."; // $NON-NLS-1$ - static final String PREFIX_COMPAT = "org.eclipse.linuxtools.cdt.autotools."; // $NON-NLS-1$ - public static final String AUTOMAKE_VERSION_STRING = "AutoconfEditorAutomakeVersion"; // $NON-NLS-1$ + static final String PREFIX = AutotoolsPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$ + static final String PREFIX_COMPAT = "org.eclipse.linuxtools.cdt.autotools."; //$NON-NLS-1$ + public static final String AUTOMAKE_VERSION_STRING = "AutoconfEditorAutomakeVersion"; //$NON-NLS-1$ public static final QualifiedName AUTOMAKE_VERSION = new QualifiedName(PREFIX, AUTOMAKE_VERSION_STRING); public static final QualifiedName AUTOMAKE_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT, AUTOMAKE_VERSION_STRING); - public static final String AUTOCONF_VERSION_STRING = "AutoconfEditorAutoconfVersion"; // $NON-NLS-1$ + public static final String AUTOCONF_VERSION_STRING = "AutoconfEditorAutoconfVersion"; //$NON-NLS-1$ public static final QualifiedName AUTOCONF_VERSION = new QualifiedName(PREFIX, AUTOCONF_VERSION_STRING); public static final QualifiedName AUTOCONF_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT, AUTOCONF_VERSION_STRING); - public static final String AUTOCONF_MACRO_VERSIONING = "AutoconfEditorMacroVersioning"; // $NON-NLS-1$ - public static final QualifiedName AUTOCONF_TOOL = new QualifiedName(PREFIX, "AutoconfToolPath"); // $NON-NLS-1$ - public static final QualifiedName AUTOMAKE_TOOL = new QualifiedName(PREFIX, "AutomakeToolPath"); // $NON-NLS-1$ - public static final QualifiedName ACLOCAL_TOOL = new QualifiedName(PREFIX, "AclocalToolPath"); // $NON-NLS-1$ - public static final QualifiedName AUTOHEADER_TOOL = new QualifiedName(PREFIX, "AutoheaderToolPath"); // $NON-NLS-1$ - public static final QualifiedName AUTORECONF_TOOL = new QualifiedName(PREFIX, "AutoreconfToolPath"); // $NON-NLS-1$ - 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 String AUTOCONF_MACRO_VERSIONING = "AutoconfEditorMacroVersioning"; //$NON-NLS-1$ + public static final QualifiedName AUTOCONF_TOOL = new QualifiedName(PREFIX, "AutoconfToolPath"); //$NON-NLS-1$ + public static final QualifiedName AUTOMAKE_TOOL = new QualifiedName(PREFIX, "AutomakeToolPath"); //$NON-NLS-1$ + public static final QualifiedName ACLOCAL_TOOL = new QualifiedName(PREFIX, "AclocalToolPath"); //$NON-NLS-1$ + public static final QualifiedName AUTOHEADER_TOOL = new QualifiedName(PREFIX, "AutoheaderToolPath"); //$NON-NLS-1$ + public static final QualifiedName AUTORECONF_TOOL = new QualifiedName(PREFIX, "AutoreconfToolPath"); //$NON-NLS-1$ + 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 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 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 String[] fACVersions = {"2.13", "2.59", "2.61", "2.68"}; // $NON-NLS-1$ + public static final String[] fACVersions = {"2.13", "2.59", "2.61", "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]; public static final String AC_VERSION_2_61 = fACVersions[2]; public static final String AC_VERSION_2_68 = fACVersions[3]; public static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1]; - public static final String[] fAMVersions = {"1.4-p6", "1.9.5", "1.9.6", "1.11.1"}; // $NON-NLS-1$ + 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]; - public static final String CLEAN_MAKE_TARGET_DEFAULT = "distclean"; // $NON-NLS-1$ + public static final String CLEAN_MAKE_TARGET_DEFAULT = "distclean"; //$NON-NLS-1$ - public static final String TRUE = "true"; // $NON-NLS-1$ - public static final String FALSE = "false"; // $NON-NLS-1$ + public static final String TRUE = "true"; //$NON-NLS-1$ + public static final String FALSE = "false"; //$NON-NLS-1$ } 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 065bd712b10..9e26fb89a80 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2016 Red Hat Inc. + * Copyright (c) 2009, 2016 Red Hat Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -73,9 +73,9 @@ public class AutotoolsConfiguration implements IAConfiguration { new Option(AutotoolsOptionConstants.TOOL_CONFIGURE, IConfigureOption.TOOL), new Option(AutotoolsOptionConstants.CATEGORY_GENERAL, IConfigureOption.CATEGORY), new Option(AutotoolsOptionConstants.OPT_CONFIGDIR, IConfigureOption.INTERNAL), - new Option(AutotoolsOptionConstants.OPT_CACHE_FILE, "cache_file", IConfigureOption.STRING), // $NON-NLS-1$ + new Option(AutotoolsOptionConstants.OPT_CACHE_FILE, "cache_file", IConfigureOption.STRING), //$NON-NLS-1$ new Option(AutotoolsOptionConstants.OPT_HELP, IConfigureOption.BIN), - new Option(AutotoolsOptionConstants.OPT_NO_CREATE, "no_create", IConfigureOption.BIN), // $NON-NLS-1$ + new Option(AutotoolsOptionConstants.OPT_NO_CREATE, "no_create", IConfigureOption.BIN), //$NON-NLS-1$ new Option(AutotoolsOptionConstants.OPT_QUIET, IConfigureOption.BIN), new Option(AutotoolsOptionConstants.OPT_VERSION, IConfigureOption.BIN), new Option(AutotoolsOptionConstants.CATEGORY_PLATFORM, IConfigureOption.CATEGORY), @@ -84,7 +84,7 @@ public class AutotoolsConfiguration implements IAConfiguration { new Option(AutotoolsOptionConstants.OPT_TARGET, IConfigureOption.STRING), new Option(AutotoolsOptionConstants.CATEGORY_DIRECTORIES, IConfigureOption.CATEGORY), new Option(AutotoolsOptionConstants.OPT_PREFIX, IConfigureOption.STRING), - new Option(AutotoolsOptionConstants.OPT_EXEC_PREFIX, "exec_prefix", IConfigureOption.STRING), // $NON-NLS-1$ + new Option(AutotoolsOptionConstants.OPT_EXEC_PREFIX, "exec_prefix", IConfigureOption.STRING), //$NON-NLS-1$ new Option(AutotoolsOptionConstants.OPT_LIBDIR, IConfigureOption.STRING), new Option(AutotoolsOptionConstants.OPT_BINDIR, IConfigureOption.STRING), new Option(AutotoolsOptionConstants.OPT_SBINDIR, IConfigureOption.STRING), @@ -99,19 +99,19 @@ public class AutotoolsConfiguration implements IAConfiguration { new Option(AutotoolsOptionConstants.OPT_LIBEXECDIR, IConfigureOption.STRING), new Option(AutotoolsOptionConstants.OPT_OLDINCLUDEDIR, IConfigureOption.STRING), new Option(AutotoolsOptionConstants.CATEGORY_FILENAMES, IConfigureOption.CATEGORY), - new Option(AutotoolsOptionConstants.OPT_PROGRAM_PREFIX, "program_prefix", IConfigureOption.STRING), // $NON-NLS-1$ - new Option(AutotoolsOptionConstants.OPT_PROGRAM_SUFFIX, "program_suffix", IConfigureOption.STRING), // $NON-NLS-1$ - new Option(AutotoolsOptionConstants.OPT_PROGRAM_TRANSFORM_NAME, "program_transform_name", IConfigureOption.STRING), // $NON-NLS-1$ + new Option(AutotoolsOptionConstants.OPT_PROGRAM_PREFIX, "program_prefix", IConfigureOption.STRING), //$NON-NLS-1$ + new Option(AutotoolsOptionConstants.OPT_PROGRAM_SUFFIX, "program_suffix", IConfigureOption.STRING), //$NON-NLS-1$ + new Option(AutotoolsOptionConstants.OPT_PROGRAM_TRANSFORM_NAME, "program_transform_name", IConfigureOption.STRING), //$NON-NLS-1$ new Option(AutotoolsOptionConstants.CATEGORY_ENVVAR, IConfigureOption.CATEGORY), new Option(AutotoolsOptionConstants.OPT_ENVVAR, IConfigureOption.ENVVAR), new Option(AutotoolsOptionConstants.CATEGORY_FEATURES, IConfigureOption.CATEGORY), - new Option(AutotoolsOptionConstants.OPT_ENABLE_MAINTAINER_MODE, "enable_maintainer_mode", IConfigureOption.BIN), // $NON-NLS-1$ - new Option(AutotoolsOptionConstants.FLAG_CFLAGS, "cflags", AutotoolsOptionConstants.FLAG_CFLAGS_FLAGS, IConfigureOption.FLAG), // $NON-NLS-1$ - 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_ENABLE_MAINTAINER_MODE, "enable_maintainer_mode", IConfigureOption.BIN), //$NON-NLS-1$ + new Option(AutotoolsOptionConstants.FLAG_CFLAGS, "cflags", AutotoolsOptionConstants.FLAG_CFLAGS_FLAGS, IConfigureOption.FLAG), //$NON-NLS-1$ + 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_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$ new Option(AutotoolsOptionConstants.CATEGORY_OPTIONS, IConfigureOption.CATEGORY), new Option(AutotoolsOptionConstants.OPT_AUTOGENOPTS, IConfigureOption.MULTIARG), }; 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 b8e0e3a4f26..fc1428746b5 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2015 Red Hat Inc. + * Copyright (c) 2009, 2016 Red Hat Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -202,15 +202,15 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener { Document d = db.parse(dirFile); Element e = d.getDocumentElement(); // Get the stored configuration data - NodeList cfgs = e.getElementsByTagName("configuration"); // $NON-NLS-1$ + NodeList cfgs = e.getElementsByTagName("configuration"); //$NON-NLS-1$ for (int x = 0; x < cfgs.getLength(); ++x) { Node n = cfgs.item(x); NamedNodeMap attrs = n.getAttributes(); // Originally we used the configuration name, but now we use // the ConfigurationDescription id which is unique. Check for // id first, but fall back to name for older .autotools files. - Node nameNode = attrs.getNamedItem("name"); // $NON-NLS-1$ - Node cfgIdNode = attrs.getNamedItem("id"); // $NON-NLS-1$ + Node nameNode = attrs.getNamedItem("name"); //$NON-NLS-1$ + Node cfgIdNode = attrs.getNamedItem("id"); //$NON-NLS-1$ String cfgId = null; if (cfgIdNode != null) cfgId = cfgIdNode.getNodeValue(); @@ -227,16 +227,16 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener { NodeList l = n.getChildNodes(); for (int y = 0; y < l.getLength(); ++y) { Node child = l.item(y); - if (child.getNodeName().equals("option")) { // $NON-NLS-1$ + if (child.getNodeName().equals("option")) { //$NON-NLS-1$ NamedNodeMap optionAttrs = child.getAttributes(); - Node id = optionAttrs.getNamedItem("id"); // $NON-NLS-1$ - Node value = optionAttrs.getNamedItem("value"); // $NON-NLS-1$ + Node id = optionAttrs.getNamedItem("id"); //$NON-NLS-1$ + Node value = optionAttrs.getNamedItem("value"); //$NON-NLS-1$ if (id != null && value != null) cfg.setOption(id.getNodeValue(), value.getNodeValue()); } else if (child.getNodeName().equals("flag")) { //$NON-NLS-1$ // read in flag values NamedNodeMap optionAttrs = child.getAttributes(); - Node id = optionAttrs.getNamedItem("id"); // $NON-NLS-1$ + Node id = optionAttrs.getNamedItem("id"); //$NON-NLS-1$ String idValue = id.getNodeValue(); IConfigureOption opt = cfg.getOption(idValue); if (opt instanceof FlagConfigureOption) { @@ -245,8 +245,8 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener { Node flagChild = l2.item(z); if (flagChild.getNodeName().equals("flagvalue")) { //$NON-NLS-1$ NamedNodeMap optionAttrs2 = flagChild.getAttributes(); - Node id2 = optionAttrs2.getNamedItem("id"); // $NON-NLS-1$ - Node value = optionAttrs2.getNamedItem("value"); // $NON-NLS-1$ + Node id2 = optionAttrs2.getNamedItem("id"); //$NON-NLS-1$ + Node value = optionAttrs2.getNamedItem("value"); //$NON-NLS-1$ cfg.setOption(id2.getNodeValue(), value.getNodeValue()); } } @@ -347,7 +347,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener { ITool tool = tools[j]; if (tool.getName().equals("configure")) { //$NON-NLS-1$ IOption option = - tool.getOptionBySuperClassId("org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"); // $NON-NLS-1$ + tool.getOptionBySuperClassId("org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"); //$NON-NLS-1$ IHoldsOptions h = tool; try { IOption optionToSet = h.getOptionToSet(option, false); @@ -379,7 +379,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener { try (PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(f)))) { Map cfgs = configs.get(projectName); p.println(""); //$NON-NLS-1$ - p.println(""); // $NON-NLS-1$ + p.println(""); //$NON-NLS-1$ Option[] optionList = AutotoolsConfiguration.getOptionList(); // Before saving, force any cloning to occur via the option // value handler. @@ -409,12 +409,12 @@ 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-3$ } p.println(""); //$NON-NLS-1$ } else if (!opt.isCategory() && !opt.isFlagValue()) p.println("