From 170e654b4796bad1453ae85a427b97317d67a69a Mon Sep 17 00:00:00 2001
From: Jonah Graham
Date: Tue, 20 Nov 2018 16:20:42 +0000
Subject: Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Format source code
- Remove trailing white spaces on all lines
and completing the wizard
Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
---
.../cdt/make/internal/core/BuildInfoFactory.java | 51 +-
.../cdt/make/internal/core/ListenerList.java | 4 +-
.../cdt/make/internal/core/MakeMessages.java | 12 +-
.../eclipse/cdt/make/internal/core/MakeRecon.java | 14 +-
.../eclipse/cdt/make/internal/core/MakeTarget.java | 33 +-
.../cdt/make/internal/core/MakeTargetManager.java | 49 +-
.../make/internal/core/PreferenceInitializer.java | 54 +-
.../cdt/make/internal/core/ProjectTargets.java | 14 +-
.../core/dataprovider/MakeCDataFactory.java | 19 +-
.../MakeConfigurationDataProvider.java | 13 +-
.../dataprovider/MakeDiscoveredInfoProcessor.java | 11 +-
.../core/dataprovider/MakeLanguageData.java | 19 +-
.../internal/core/makefile/AbstractMakefile.java | 2 +-
.../cdt/make/internal/core/makefile/Command.java | 4 +-
.../internal/core/makefile/MacroDefinition.java | 2 +-
.../internal/core/makefile/MakeFileConstants.java | 15 +-
.../internal/core/makefile/MakefileMessages.java | 23 +-
.../internal/core/makefile/MakefileReader.java | 4 +-
.../make/internal/core/makefile/NullMakefile.java | 1 +
.../cdt/make/internal/core/makefile/Util.java | 4 +-
.../core/makefile/gnu/AutomaticVariable.java | 3 +-
.../core/makefile/gnu/BuiltinFunction.java | 1 -
.../internal/core/makefile/gnu/Conditional.java | 3 +-
.../internal/core/makefile/gnu/DefineVariable.java | 1 -
.../cdt/make/internal/core/makefile/gnu/Else.java | 1 -
.../cdt/make/internal/core/makefile/gnu/Endef.java | 7 +-
.../cdt/make/internal/core/makefile/gnu/Endif.java | 8 +-
.../internal/core/makefile/gnu/ExportVariable.java | 1 -
.../internal/core/makefile/gnu/GNUMakefile.java | 116 +-
.../core/makefile/gnu/GNUMakefileChecker.java | 5 +-
.../core/makefile/gnu/GNUMakefileConstants.java | 55 +-
.../core/makefile/gnu/GNUMakefileUtil.java | 50 +-
.../core/makefile/gnu/GNUMakefileValidator.java | 24 +-
.../internal/core/makefile/gnu/GNUTargetRule.java | 4 +-
.../cdt/make/internal/core/makefile/gnu/Ifdef.java | 5 +-
.../cdt/make/internal/core/makefile/gnu/Ifeq.java | 1 -
.../make/internal/core/makefile/gnu/Ifndef.java | 4 +-
.../cdt/make/internal/core/makefile/gnu/Ifneq.java | 1 -
.../make/internal/core/makefile/gnu/Include.java | 6 +-
.../internal/core/makefile/gnu/OverrideDefine.java | 4 +-
.../core/makefile/gnu/OverrideVariable.java | 1 -
.../core/makefile/gnu/StaticTargetRule.java | 4 +-
.../internal/core/makefile/gnu/TargetVariable.java | 3 +-
.../core/makefile/gnu/VariableDefinition.java | 4 +-
.../core/makefile/posix/PosixMakefile.java | 15 +-
.../CDataDiscoveredInfoCalculator.java | 606 ++++----
.../CDataDiscoveredInfoProcessor.java | 88 +-
.../scannerconfig/DiscoveredPathContainer.java | 97 +-
.../core/scannerconfig/DiscoveredPathInfo.java | 25 +-
.../scannerconfig/DiscoveredPathInitializer.java | 36 +-
.../core/scannerconfig/DiscoveredPathManager.java | 417 +++---
.../scannerconfig/DiscoveredScannerInfoStore.java | 414 +++---
.../PerFileDiscoveredPathContainer.java | 3 +-
.../scannerconfig/ScannerConfigInfoFactory.java | 46 +-
.../core/scannerconfig/ScannerConfigUtil.java | 62 +-
.../ScannerInfoConsoleParserFactory.java | 155 +--
.../gnu/AbstractGCCBOPConsoleParser.java | 364 +++--
.../gnu/AbstractGCCBOPConsoleParserUtility.java | 330 +++--
.../gnu/GCCPerFileBOPConsoleParser.java | 177 ++-
.../gnu/GCCPerFileBOPConsoleParserUtility.java | 465 ++++---
.../gnu/GCCPerFileSIPConsoleParser.java | 180 ++-
.../scannerconfig/gnu/GCCScannerConfigUtil.java | 11 +-
.../gnu/GCCScannerInfoConsoleParser.java | 296 ++--
.../scannerconfig/gnu/GCCSpecsConsoleParser.java | 20 +-
.../gnu/ScannerInfoConsoleParserUtility.java | 78 +-
.../scannerconfig/jobs/BuildOutputReaderJob.java | 57 +-
.../core/scannerconfig/jobs/SCJobsUtil.java | 304 ++---
.../core/scannerconfig/util/CCommandDSC.java | 528 ++++---
.../core/scannerconfig/util/CygpathTranslator.java | 29 +-
.../core/scannerconfig/util/KVStringPair.java | 13 +-
.../core/scannerconfig/util/LogWriter.java | 44 +-
.../util/PathInfoToLangSettingsConverter.java | 31 +-
.../core/scannerconfig/util/SCDOptionsEnum.java | 113 +-
.../core/scannerconfig/util/SymbolEntry.java | 34 +-
.../core/scannerconfig/util/TraceUtil.java | 41 +-
.../core/scannerconfig2/DefaultRunSIProvider.java | 64 +-
.../core/scannerconfig2/DefaultSIFileReader.java | 169 ++-
.../core/scannerconfig2/GCCSpecsRunSIProvider.java | 119 +-
.../MakeConfigurationDataProviderMessages.java | 3 +-
.../core/scannerconfig2/PerFileSICollector.java | 1443 ++++++++++----------
.../core/scannerconfig2/PerProjectSICollector.java | 465 ++++---
.../core/scannerconfig2/SCDMakefileGenerator.java | 225 ++-
.../core/scannerconfig2/SCMarkerGenerator.java | 34 +-
.../core/scannerconfig2/SCProfileInstance.java | 82 +-
.../scannerconfig2/ScannerConfigInfoFactory2.java | 960 +++++++------
.../core/scannerconfig2/ScannerConfigProfile.java | 149 +-
.../ScannerConfigProfileManager.java | 152 ++-
.../core/templateengine/AddMakeTarget.java | 23 +-
88 files changed, 4783 insertions(+), 4844 deletions(-)
(limited to 'build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal')
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
index 709c3936515..50507fe40a3 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
@@ -88,7 +88,7 @@ public class BuildInfoFactory {
@Override
public String getBuildAttribute(String name, String defaultValue) {
String value = getString(name);
- if (value == null ) {
+ if (value == null) {
if (IMakeCommonBuildInfo.BUILD_COMMAND.equals(name)) {
value = getString(BuildInfoFactory.BUILD_COMMAND);
} else if (IMakeCommonBuildInfo.BUILD_ARGUMENTS.equals(name)) {
@@ -127,7 +127,8 @@ public class BuildInfoFactory {
// translate any string substitution variables
String translated = value;
try {
- translated = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(value, false);
+ translated = VariablesPlugin.getDefault().getStringVariableManager()
+ .performStringSubstitution(value, false);
} catch (CoreException e) {
}
envMap.put(key, translated);
@@ -150,9 +151,11 @@ public class BuildInfoFactory {
}
return new Path(command);
}
- String result = getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, getString(BuildInfoFactory.BUILD_COMMAND));
+ String result = getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND,
+ getString(BuildInfoFactory.BUILD_COMMAND));
try {
- result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result, false);
+ result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result,
+ false);
} catch (CoreException e) {
}
return new Path(result);
@@ -187,9 +190,11 @@ public class BuildInfoFactory {
@Override
public IPath getBuildLocation() {
- String result = getBuildAttribute(IMakeCommonBuildInfo.BUILD_LOCATION, getString(BuildInfoFactory.BUILD_LOCATION));
+ String result = getBuildAttribute(IMakeCommonBuildInfo.BUILD_LOCATION,
+ getString(BuildInfoFactory.BUILD_LOCATION));
try {
- result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result, false);
+ result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result,
+ false);
} catch (CoreException e) {
}
return new Path(result);
@@ -197,12 +202,14 @@ public class BuildInfoFactory {
@Override
public String getBuildArguments() {
- String result = getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, getString(BuildInfoFactory.BUILD_ARGUMENTS));
+ String result = getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS,
+ getString(BuildInfoFactory.BUILD_ARGUMENTS));
if (result == null) {
return ""; //$NON-NLS-1$
}
try {
- result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result, false);
+ result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result,
+ false);
} catch (CoreException e) {
}
return result;
@@ -232,9 +239,11 @@ public class BuildInfoFactory {
@Override
public String getAutoBuildTarget() {
- String result = getBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_AUTO, getString(BuildInfoFactory.BUILD_TARGET_AUTO));
+ String result = getBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_AUTO,
+ getString(BuildInfoFactory.BUILD_TARGET_AUTO));
try {
- result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result, false);
+ result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result,
+ false);
} catch (CoreException e) {
}
return result;
@@ -251,7 +260,8 @@ public class BuildInfoFactory {
String result = getBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL,
getString(BuildInfoFactory.BUILD_TARGET_INCREMENTAL));
try {
- result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result, false);
+ result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result,
+ false);
} catch (CoreException e) {
}
return result;
@@ -264,9 +274,11 @@ public class BuildInfoFactory {
@Override
public String getFullBuildTarget() {
- String result = getBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL, getString(BuildInfoFactory.BUILD_TARGET_INCREMENTAL));
+ String result = getBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL,
+ getString(BuildInfoFactory.BUILD_TARGET_INCREMENTAL));
try {
- result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result, false);
+ result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result,
+ false);
} catch (CoreException e) {
}
return result;
@@ -280,9 +292,11 @@ public class BuildInfoFactory {
@Override
public String getCleanBuildTarget() {
- String result = getBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_CLEAN, getString(BuildInfoFactory.BUILD_TARGET_CLEAN));
+ String result = getBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_CLEAN,
+ getString(BuildInfoFactory.BUILD_TARGET_CLEAN));
try {
- result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result, false);
+ result = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(result,
+ false);
} catch (CoreException e) {
}
return result;
@@ -446,8 +460,9 @@ public class BuildInfoFactory {
}
protected abstract void putString(String name, String value) throws CoreException;
+
protected abstract String getString(String property);
- }
+ }
private static class BuildInfoPreference extends AbstractBuildInfo {
@@ -507,7 +522,7 @@ public class BuildInfoFactory {
// first, give the build-system a chance to return the build-command overlayed with data managed by it
ICProjectDescription cProjectDescription = CoreModel.getDefault().getProjectDescription(project, false);
- if(cProjectDescription != null) {
+ if (cProjectDescription != null) {
ICConfigurationDescription cConfigDescription = cProjectDescription.getActiveConfiguration();
CConfigurationData configurationData = cConfigDescription.getConfigurationData();
if (configurationData != null) {
@@ -518,7 +533,7 @@ public class BuildInfoFactory {
}
}
- if(builder == null) {
+ if (builder == null) {
builder = MakeProjectNature.getBuildSpec(project.getDescription(), builderID);
if (builder == null) {
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ListenerList.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ListenerList.java
index 3d24d9cc264..d49945a2071 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ListenerList.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ListenerList.java
@@ -20,7 +20,7 @@ package org.eclipse.cdt.make.internal.core;
* It is a fairly lightweight object, occupying minimal space when
* no listeners are registered.
*
- * Note that the add method checks for and eliminates
+ * Note that the add method checks for and eliminates
* duplicates based on identity (not equality). Likewise, the
* remove method compares based on identity.
*
@@ -72,7 +72,7 @@ public class ListenerList {
/**
* Creates a listener list with the given initial capacity.
*
- * @param capacity the number of listeners which this list can initially accept
+ * @param capacity the number of listeners which this list can initially accept
* without growing its internal representation; must be at least 1
*/
public ListenerList(int capacity) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java
index f8e2a685ccc..5d154052fca 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java
@@ -19,7 +19,7 @@ import java.util.ResourceBundle;
public class MakeMessages {
- private static final String RESOURCE_BUNDLE= MakeMessages.class.getName();
+ private static final String RESOURCE_BUNDLE = MakeMessages.class.getName();
private static ResourceBundle fgResourceBundle;
static {
try {
@@ -28,10 +28,10 @@ public class MakeMessages {
fgResourceBundle = null;
}
}
-
+
private MakeMessages() {
}
-
+
public static String getString(String key) {
try {
return fgResourceBundle.getString(key);
@@ -41,10 +41,10 @@ public class MakeMessages {
return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
-
+
/**
* Gets a string from the resource bundle and formats it with the argument
- *
+ *
* @param key the string used to get the bundle value, must not be null
*/
public static String getFormattedString(String key, Object arg) {
@@ -53,7 +53,7 @@ public class MakeMessages {
/**
* Gets a string from the resource bundle and formats it with arguments
- */
+ */
public static String getFormattedString(String key, Object[] args) {
return MessageFormat.format(getString(key), args);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java
index 63ced2109c3..47cd1297388 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java
@@ -38,24 +38,24 @@ public class MakeRecon extends OutputStream {
class MyList extends ArrayList {
private static final long serialVersionUID = 1L;
- public void removeInterval (int start, int len) {
+ public void removeInterval(int start, int len) {
removeRange(start, len);
}
}
- public MakeRecon(IPath buildCommand, String[] buildArguments,
- String[] env, IPath workingDirectory, IProgressMonitor mon, OutputStream cos) {
- this(buildCommand, new String[]{"-n"}, buildArguments, env, workingDirectory, mon, cos); //$NON-NLS-1$
+ public MakeRecon(IPath buildCommand, String[] buildArguments, String[] env, IPath workingDirectory,
+ IProgressMonitor mon, OutputStream cos) {
+ this(buildCommand, new String[] { "-n" }, buildArguments, env, workingDirectory, mon, cos); //$NON-NLS-1$
}
- public MakeRecon(IPath buildCommand, String[] options, String[] buildArguments,
- String[] env, IPath workingDirectory, IProgressMonitor mon, OutputStream cos) {
+ public MakeRecon(IPath buildCommand, String[] options, String[] buildArguments, String[] env,
+ IPath workingDirectory, IProgressMonitor mon, OutputStream cos) {
make = buildCommand;
args = new String[0];
if (options != null) {
- String[]array = new String[args.length + options.length];
+ String[] array = new String[args.length + options.length];
System.arraycopy(args, 0, array, 0, args.length);
System.arraycopy(options, 0, array, args.length, options.length);
args = array;
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java
index 73f44215043..3648088fa56 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java
@@ -54,14 +54,17 @@ public class MakeTarget extends PlatformObject implements IMakeTarget {
private Map buildEnvironment = new HashMap<>();
private final Map targetAttributes = new HashMap<>();
- public MakeTarget(MakeTargetManager manager, IProject project, String targetBuilderID, String name) throws CoreException {
+ public MakeTarget(MakeTargetManager manager, IProject project, String targetBuilderID, String name)
+ throws CoreException {
this.manager = manager;
this.project = project;
this.targetBuilderID = targetBuilderID;
this.name = name;
IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(project, manager.getBuilderID(targetBuilderID));
- setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, info.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make")); //$NON-NLS-1$
- setBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, info.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, "")); //$NON-NLS-1$
+ setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND,
+ info.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make")); //$NON-NLS-1$
+ setBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS,
+ info.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, "")); //$NON-NLS-1$
isDefaultBuildCmd = info.isDefaultBuildCmd();
isStopOnError = info.isStopOnError();
}
@@ -253,7 +256,8 @@ public class MakeTarget extends PlatformObject implements IMakeTarget {
String value = entry.getValue();
// translate any string substitution variables
String translated = value;
- translated = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(value, false);
+ translated = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(value,
+ false);
envMap.put(key, translated);
}
return envMap;
@@ -288,7 +292,7 @@ public class MakeTarget extends PlatformObject implements IMakeTarget {
@Override
public boolean appendEnvironment() {
- return appendEnvironment == USE_PROJECT_ENV_SETTING ? getProjectEnvSetting(): appendEnvironment == 1;
+ return appendEnvironment == USE_PROJECT_ENV_SETTING ? getProjectEnvSetting() : appendEnvironment == 1;
}
private boolean getProjectEnvSetting() {
@@ -311,15 +315,16 @@ public class MakeTarget extends PlatformObject implements IMakeTarget {
if (obj == this)
return true;
if (obj instanceof MakeTarget) {
- MakeTarget other = (MakeTarget)obj;
- return (container != null ? container.equals(other.getContainer()) : other.getContainer() == null) && name.equals(other.getName());
+ MakeTarget other = (MakeTarget) obj;
+ return (container != null ? container.equals(other.getContainer()) : other.getContainer() == null)
+ && name.equals(other.getName());
}
return false;
}
@Override
public int hashCode() {
- return container.hashCode() * 17 + name != null ? name.hashCode(): 0;
+ return container.hashCode() * 17 + name != null ? name.hashCode() : 0;
}
@Override
@@ -328,12 +333,15 @@ public class MakeTarget extends PlatformObject implements IMakeTarget {
final HashMap infoMap = new HashMap<>();
IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(infoMap, builderID);
- info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make")); //$NON-NLS-1$
- info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, "")); //$NON-NLS-1$
+ info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND,
+ getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make")); //$NON-NLS-1$
+ info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS,
+ getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, "")); //$NON-NLS-1$
info.setUseDefaultBuildCmd(isDefaultBuildCmd());
info.setStopOnError(isStopOnError());
info.setIncrementalBuildEnable(true);
- info.setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL, getBuildAttribute(IMakeTarget.BUILD_TARGET, "")); //$NON-NLS-1$
+ info.setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL,
+ getBuildAttribute(IMakeTarget.BUILD_TARGET, "")); //$NON-NLS-1$
info.setCleanBuildEnable(false);
info.setEnvironment(getExpandedEnvironment());
info.setAppendEnvironment(appendEnvironment());
@@ -356,7 +364,8 @@ public class MakeTarget extends PlatformObject implements IMakeTarget {
SubMonitor subMonitor = SubMonitor.convert(monitor, commands.length);
for (ICommand command : commands) {
if (command.getBuilderName().equals(builderID)) {
- project.build(IncrementalProjectBuilder.FULL_BUILD, builderID, infoMap, subMonitor.newChild(1));
+ project.build(IncrementalProjectBuilder.FULL_BUILD, builderID, infoMap,
+ subMonitor.newChild(1));
} else {
project.build(IncrementalProjectBuilder.FULL_BUILD, command.getBuilderName(),
command.getArguments(), subMonitor.newChild(1));
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
index 51474b5409b..ef8a33ccb67 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
@@ -71,7 +71,8 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
@Override
public void addTarget(IContainer container, IMakeTarget target) throws CoreException {
if (container instanceof IWorkspaceRoot) {
- throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeMessages.getString("MakeTargetManager.add_to_workspace_root"), null)); //$NON-NLS-1$
+ throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
+ MakeMessages.getString("MakeTargetManager.add_to_workspace_root"), null)); //$NON-NLS-1$
}
ProjectTargets projectTargets = projectMap.get(target.getProject());
if (projectTargets == null) {
@@ -91,7 +92,8 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
@Override
public void setTargets(IContainer container, IMakeTarget[] targets) throws CoreException {
if (container instanceof IWorkspaceRoot) {
- throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeMessages.getString("MakeTargetManager.add_to_workspace_root"), null)); //$NON-NLS-1$
+ throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
+ MakeMessages.getString("MakeTargetManager.add_to_workspace_root"), null)); //$NON-NLS-1$
}
ProjectTargets projectTargets = projectMap.get(targets[0].getProject());
if (projectTargets == null) {
@@ -251,39 +253,45 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
}
IResource resource = delta.getResource();
if (resource.getType() == IResource.PROJECT) {
- IProject project = (IProject)resource;
+ IProject project = (IProject) resource;
int flags = delta.getFlags();
int deltaKind = delta.getKind();
if (deltaKind == IResourceDelta.ADDED) {
if (hasTargetBuilder(project) && !fProjects.contains(project)) {
fProjects.add(project);
- notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED, project));
+ notifyListeners(
+ new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED, project));
}
} else if (deltaKind == IResourceDelta.REMOVED) {
if (fProjects.contains(project)) {
deleteTargets(project);
fProjects.remove(project);
- notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_REMOVED, project));
+ notifyListeners(
+ new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_REMOVED, project));
}
} else if (deltaKind == IResourceDelta.CHANGED) {
if (0 != (flags & IResourceDelta.DESCRIPTION)) {
if (fProjects.contains(project) && !hasTargetBuilder(project)) {
fProjects.remove(project);
projectMap.remove(project);
- notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_REMOVED, project));
+ notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_REMOVED,
+ project));
} else if (!fProjects.contains(project) && hasTargetBuilder(project)) {
fProjects.add(project);
- notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED, project));
+ notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED,
+ project));
}
}
if (0 != (flags & IResourceDelta.OPEN)) {
if (!project.isOpen() && fProjects.contains(project)) {
fProjects.remove(project);
projectMap.remove(project);
- notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_REMOVED, project));
+ notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_REMOVED,
+ project));
} else if (project.isOpen() && hasTargetBuilder(project) && !fProjects.contains(project)) {
fProjects.add(project);
- notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED, project));
+ notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED,
+ project));
}
}
}
@@ -294,14 +302,14 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
}
protected void updateTarget(IMakeTarget target) throws CoreException {
- if (target.getContainer() != null ) { // target has not been added to manager.
+ if (target.getContainer() != null) { // target has not been added to manager.
ProjectTargets projectTargets = projectMap.get(target.getProject());
- if (projectTargets == null || !projectTargets.contains(target)) {
- return; // target has not been added to manager.
- }
- writeTargets(projectTargets);
- notifyListeners(new MakeTargetEvent(this, MakeTargetEvent.TARGET_CHANGED, target));
- }
+ if (projectTargets == null || !projectTargets.contains(target)) {
+ return; // target has not been added to manager.
+ }
+ writeTargets(projectTargets);
+ notifyListeners(new MakeTargetEvent(this, MakeTargetEvent.TARGET_CHANGED, target));
+ }
}
protected void writeTargets(ProjectTargets projectTargets) throws CoreException {
@@ -316,8 +324,8 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
protected void deleteTargets(IProject project) {
//Historical: We clean up after all other parts.
- IPath targetFilePath =
- MakeCorePlugin.getDefault().getStateLocation().append(project.getName()).addFileExtension(TARGETS_EXT);
+ IPath targetFilePath = MakeCorePlugin.getDefault().getStateLocation().append(project.getName())
+ .addFileExtension(TARGETS_EXT);
File targetFile = targetFilePath.toFile();
if (targetFile.exists()) {
targetFile.delete();
@@ -327,7 +335,8 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
protected void initializeBuilders() {
builderMap = new HashMap();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.PLUGIN_ID, MakeTargetManager.TARGET_BUILD_EXT);
+ IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.PLUGIN_ID,
+ MakeTargetManager.TARGET_BUILD_EXT);
IExtension[] extensions = point.getExtensions();
for (IExtension extension : extensions) {
IConfigurationElement[] cfgElements = extension.getConfigurationElements();
@@ -343,7 +352,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
protected void notifyListeners(MakeTargetEvent event) {
for (Object listener : listeners.getListeners()) {
- ((IMakeTargetListener)listener).targetChanged(event);
+ ((IMakeTargetListener) listener).targetChanged(event);
}
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/PreferenceInitializer.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/PreferenceInitializer.java
index d332338a392..31b5022031f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/PreferenceInitializer.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/PreferenceInitializer.java
@@ -27,7 +27,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-
public class PreferenceInitializer extends AbstractPreferenceInitializer {
/* (non-Javadoc)
@@ -35,7 +34,8 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
*/
@Override
public void initializeDefaultPreferences() {
- IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID, true);
+ IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(MakeCorePlugin.getDefault().getPluginPreferences(),
+ MakeBuilder.BUILDER_ID, true);
try {
info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make"); //$NON-NLS-1$
info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_LOCATION, ""); //$NON-NLS-1$
@@ -52,45 +52,45 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
info.setErrorParsers(CCorePlugin.getDefault().getAllErrorParsersIDs());
} catch (CoreException e) {
}
- MakeCorePlugin.getDefault().getPluginPreferences().setDefault(CCorePlugin.PREF_BINARY_PARSER, CCorePlugin.PLUGIN_ID + ".ELF"); //$NON-NLS-1$
+ MakeCorePlugin.getDefault().getPluginPreferences().setDefault(CCorePlugin.PREF_BINARY_PARSER,
+ CCorePlugin.PLUGIN_ID + ".ELF"); //$NON-NLS-1$
// default plugin preferences for scanner configuration discovery
- IScannerConfigBuilderInfo scInfo = MakeCorePlugin.createScannerConfigBuildInfo(MakeCorePlugin.getDefault().getPluginPreferences(), ScannerConfigBuilder.BUILDER_ID, true);
+ IScannerConfigBuilderInfo scInfo = MakeCorePlugin.createScannerConfigBuildInfo(
+ MakeCorePlugin.getDefault().getPluginPreferences(), ScannerConfigBuilder.BUILDER_ID, true);
try {
scInfo.setAutoDiscoveryEnabled(true);
scInfo.setMakeBuilderConsoleParserEnabled(true);
scInfo.setESIProviderCommandEnabled(true);
scInfo.setUseDefaultESIProviderCmd(true);
scInfo.setESIProviderCommand(new Path("gcc")); //$NON-NLS-1$
- scInfo.setESIProviderArguments("-E -P -v -dD ${plugin_state_location}/${specs_file}"); //$NON-NLS-1$
+ scInfo.setESIProviderArguments("-E -P -v -dD ${plugin_state_location}/${specs_file}"); //$NON-NLS-1$
scInfo.setESIProviderConsoleParserId(MakeCorePlugin.GCC_SPECS_CONSOLE_PARSER_ID);
scInfo.setMakeBuilderConsoleParserId(MakeCorePlugin.GCC_SCANNER_INFO_CONSOLE_PARSER_ID);
scInfo.setSIProblemGenerationEnabled(true);
} catch (CoreException e) {
}
- // default plugin preferences for new scanner configuration discovery
- IScannerConfigBuilderInfo2 scInfo2 = ScannerConfigProfileManager.
- createScannerConfigBuildInfo2(MakeCorePlugin.getDefault().getPluginPreferences(),
- ScannerConfigProfileManager.NULL_PROFILE_ID, true);
- scInfo2.setAutoDiscoveryEnabled(true);
- scInfo2.setProblemReportingEnabled(true);
- scInfo2.setSelectedProfileId(ScannerConfigProfileManager.DEFAULT_SI_PROFILE_ID);
- scInfo2.setBuildOutputFileActionEnabled(true);
- scInfo2.setBuildOutputFilePath(""); //$NON-NLS-1$
- scInfo2.setBuildOutputParserEnabled(true);
- String providerId = "specsFile"; //$NON-NLS-1$
- scInfo2.setProviderOpenFilePath(providerId, "");//$NON-NLS-1$
- scInfo2.setProviderRunCommand(providerId, "gcc"); //$NON-NLS-1$
- scInfo2.setProviderRunArguments(providerId, "-E -P -v -dD ${plugin_state_location}/${specs_file}");//$NON-NLS-1$
- scInfo2.setProviderOutputParserEnabled(providerId, true);
- scInfo2.setProblemReportingEnabled(true);
- try {
- scInfo2.save();
- }
- catch (CoreException e) {
- }
-
+ // default plugin preferences for new scanner configuration discovery
+ IScannerConfigBuilderInfo2 scInfo2 = ScannerConfigProfileManager.createScannerConfigBuildInfo2(
+ MakeCorePlugin.getDefault().getPluginPreferences(), ScannerConfigProfileManager.NULL_PROFILE_ID, true);
+ scInfo2.setAutoDiscoveryEnabled(true);
+ scInfo2.setProblemReportingEnabled(true);
+ scInfo2.setSelectedProfileId(ScannerConfigProfileManager.DEFAULT_SI_PROFILE_ID);
+ scInfo2.setBuildOutputFileActionEnabled(true);
+ scInfo2.setBuildOutputFilePath(""); //$NON-NLS-1$
+ scInfo2.setBuildOutputParserEnabled(true);
+ String providerId = "specsFile"; //$NON-NLS-1$
+ scInfo2.setProviderOpenFilePath(providerId, "");//$NON-NLS-1$
+ scInfo2.setProviderRunCommand(providerId, "gcc"); //$NON-NLS-1$
+ scInfo2.setProviderRunArguments(providerId, "-E -P -v -dD ${plugin_state_location}/${specs_file}");//$NON-NLS-1$
+ scInfo2.setProviderOutputParserEnabled(providerId, true);
+ scInfo2.setProblemReportingEnabled(true);
+ try {
+ scInfo2.save();
+ } catch (CoreException e) {
+ }
+
// Store default for makefile
MakeCorePlugin.getDefault().getPluginPreferences().setDefault(MakeCorePlugin.MAKEFILE_STYLE, "GNU"); //$NON-NLS-1$
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
index cad5db05273..47258024a0c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
@@ -76,8 +76,8 @@ public class ProjectTargets {
//Historical ... fall back to the workspace and look in previous XML file location
if (rootElement.getChildren().length == 0) {
- IPath targetFilePath = MakeCorePlugin.getDefault().getStateLocation().append(project.getName()).addFileExtension(
- TARGETS_EXT);
+ IPath targetFilePath = MakeCorePlugin.getDefault().getStateLocation().append(project.getName())
+ .addFileExtension(TARGETS_EXT);
targetFile = targetFilePath.toFile();
try {
InputStream input = new FileInputStream(targetFile);
@@ -174,7 +174,7 @@ public class ProjectTargets {
/**
* Persist the MakeTarget as a child of parent
- *
+ *
* @return created ICStorageElement
*/
private ICStorageElement createTargetElement(ICStorageElement parent, IMakeTarget target) {
@@ -186,7 +186,7 @@ public class ProjectTargets {
elem.setValue(target.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make")); //$NON-NLS-1$
String targetAttr = target.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, null);
- if ( targetAttr != null) {
+ if (targetAttr != null) {
elem = targetElem.createChild(TARGET_ARGUMENTS);
elem.setValue(targetAttr);
}
@@ -232,7 +232,7 @@ public class ProjectTargets {
/**
* This method loads an old style XML document provided in the input stream
* and returns an ICStorageElemnt wrapping it.
- *
+ *
* @return ICStorageElement or null
*/
protected ICStorageElement translateInputStreamToDocument(InputStream input) {
@@ -272,11 +272,11 @@ public class ProjectTargets {
if (option.length > 0) {
target.setStopOnError(Boolean.valueOf(option[0].getValue()).booleanValue());
}
- option = node.getChildrenByName(TARGET_USE_DEFAULT_CMD);
+ option = node.getChildrenByName(TARGET_USE_DEFAULT_CMD);
if (option.length > 0) {
target.setUseDefaultBuildCmd(Boolean.valueOf(option[0].getValue()).booleanValue());
}
- option = node.getChildrenByName(TARGET_COMMAND);
+ option = node.getChildrenByName(TARGET_COMMAND);
if (option.length > 0) {
target.setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, option[0].getValue());
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeCDataFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeCDataFactory.java
index 023a4d08288..e0fe16e5b63 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeCDataFactory.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeCDataFactory.java
@@ -21,27 +21,26 @@ import org.eclipse.cdt.core.settings.model.util.CDataUtil;
public class MakeCDataFactory extends CDataFactory {
private static MakeCDataFactory fInstance;
-
- public static CDataFactory getDefault(){
- if(fInstance == null){
+
+ public static CDataFactory getDefault() {
+ if (fInstance == null) {
fInstance = new MakeCDataFactory();
}
return fInstance;
}
@Override
- public CLanguageData createLanguageData(CConfigurationData cfg,
- CResourceData rcBase, CLanguageData base, String id, boolean clone) {
- if(id == null)
+ public CLanguageData createLanguageData(CConfigurationData cfg, CResourceData rcBase, CLanguageData base, String id,
+ boolean clone) {
+ if (id == null)
id = clone ? base.getId() : CDataUtil.genId(rcBase.getId());
return new MakeLanguageData(id, base);
}
@Override
- public CLanguageData createLanguageData(CConfigurationData cfg,
- CResourceData rcBase, String id, String name, String languageId,
- int supportedKinds, String[] rcTypes, boolean isContentTypes) {
- if(id == null)
+ public CLanguageData createLanguageData(CConfigurationData cfg, CResourceData rcBase, String id, String name,
+ String languageId, int supportedKinds, String[] rcTypes, boolean isContentTypes) {
+ if (id == null)
id = CDataUtil.genId(rcBase.getId());
MakeLanguageData lData = new MakeLanguageData(id, name, languageId, supportedKinds, rcTypes, isContentTypes);
return lData;
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeConfigurationDataProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeConfigurationDataProvider.java
index a9143f4124d..1e547d93e5c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeConfigurationDataProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeConfigurationDataProvider.java
@@ -46,19 +46,20 @@ public class MakeConfigurationDataProvider extends CDefaultConfigurationDataProv
@Override
public CConfigurationData applyConfiguration(ICConfigurationDescription cfgDescription,
- ICConfigurationDescription baseCfgDescription, CConfigurationData baseData,
- IProgressMonitor monitor) throws CoreException {
+ ICConfigurationDescription baseCfgDescription, CConfigurationData baseData, IProgressMonitor monitor)
+ throws CoreException {
CConfigurationData result = super.applyConfiguration(cfgDescription, baseCfgDescription, baseData, monitor);
- if(!cfgDescription.isPreferenceConfiguration())
+ if (!cfgDescription.isPreferenceConfiguration())
updateDiscoveredInfo(cfgDescription.getProjectDescription().getProject(), result);
return result;
}
@Override
- public CConfigurationData loadConfiguration(ICConfigurationDescription cfgDescription, IProgressMonitor monitor) throws CoreException {
+ public CConfigurationData loadConfiguration(ICConfigurationDescription cfgDescription, IProgressMonitor monitor)
+ throws CoreException {
CConfigurationData result = super.loadConfiguration(cfgDescription, monitor);
- if(!cfgDescription.isPreferenceConfiguration())
+ if (!cfgDescription.isPreferenceConfiguration())
updateDiscoveredInfo(cfgDescription.getProjectDescription().getProject(), result);
return result;
}
@@ -74,7 +75,7 @@ public class MakeConfigurationDataProvider extends CDefaultConfigurationDataProv
processor.applyDiscoveredInfo(cfgData, dsInfo);
}
- protected CDataDiscoveredInfoProcessor getInfoProcessor( ){
+ protected CDataDiscoveredInfoProcessor getInfoProcessor() {
return MakeDiscoveredInfoProcessor.getDefault();
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeDiscoveredInfoProcessor.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeDiscoveredInfoProcessor.java
index 42d6896a4ac..dbb30bb59f1 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeDiscoveredInfoProcessor.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeDiscoveredInfoProcessor.java
@@ -21,18 +21,17 @@ import org.eclipse.cdt.make.internal.core.scannerconfig.CDataDiscoveredInfoProce
public class MakeDiscoveredInfoProcessor extends CDataDiscoveredInfoProcessor {
private static MakeDiscoveredInfoProcessor fInstance;
-
- public static MakeDiscoveredInfoProcessor getDefault(){
- if(fInstance == null)
+
+ public static MakeDiscoveredInfoProcessor getDefault() {
+ if (fInstance == null)
fInstance = new MakeDiscoveredInfoProcessor();
return fInstance;
}
@Override
- protected void setInfoForData(CConfigurationData cfgData,
- CResourceData rcData, CLanguageData data, PathInfo pi,
+ protected void setInfoForData(CConfigurationData cfgData, CResourceData rcData, CLanguageData data, PathInfo pi,
CResourceData baseRcData, CLanguageData baseLangData) {
- MakeLanguageData mld = (MakeLanguageData)data;
+ MakeLanguageData mld = (MakeLanguageData) data;
mld.setDiscoveredInfo(pi);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeLanguageData.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeLanguageData.java
index 67b9ae1fc85..6ee4e67a1ec 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeLanguageData.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/dataprovider/MakeLanguageData.java
@@ -21,7 +21,7 @@ import org.eclipse.cdt.make.internal.core.scannerconfig.util.PathInfoToLangSetti
public class MakeLanguageData extends UserAndDiscoveredEntryLanguageData {
private PathInfo fDiscoveredCache;
-
+
public MakeLanguageData() {
super();
}
@@ -40,25 +40,22 @@ public class MakeLanguageData extends UserAndDiscoveredEntryLanguageData {
@Override
protected void copySettingsFrom(CLanguageData data) {
super.copySettingsFrom(data);
- if(data instanceof MakeLanguageData){
- fDiscoveredCache = ((MakeLanguageData)data).fDiscoveredCache;
+ if (data instanceof MakeLanguageData) {
+ fDiscoveredCache = ((MakeLanguageData) data).fDiscoveredCache;
}
}
@Override
protected ICLanguageSettingEntry[] getAllDiscoveredEntries(int kind) {
- if(fDiscoveredCache != null){
+ if (fDiscoveredCache != null) {
int roFlag = canDisableDiscoveredEntries(kind) ? 0 : ICLanguageSettingEntry.READONLY;
- return PathInfoToLangSettingsConverter.entriesForKind(kind,
- roFlag
- | ICLanguageSettingEntry.BUILTIN
- | ICLanguageSettingEntry.RESOLVED,
- fDiscoveredCache);
+ return PathInfoToLangSettingsConverter.entriesForKind(kind,
+ roFlag | ICLanguageSettingEntry.BUILTIN | ICLanguageSettingEntry.RESOLVED, fDiscoveredCache);
}
return null;
}
-
- protected void setDiscoveredInfo(PathInfo info){
+
+ protected void setDiscoveredInfo(PathInfo info) {
fDiscoveredCache = info;
}
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
index c8c9d9356c3..d61d5947e53 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
@@ -226,7 +226,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
StringBuilder macroName = new StringBuilder();
for (int i = 0; i < len; i++) {
char c = line.charAt(i);
- switch(c) {
+ switch (c) {
case '$':
// '$$' --> '$'
if (foundDollar) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java
index 7feadb00a31..69f4e9d92b9 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java
@@ -84,7 +84,7 @@ public class Command extends Directive implements ICommand {
@Override
public String toString() {
StringBuilder cmd = new StringBuilder();
- cmd.append( '\t');
+ cmd.append('\t');
if (getPrefix() != 0) {
cmd.append(getPrefix());
}
@@ -116,7 +116,7 @@ public class Command extends Directive implements ICommand {
*/
@Override
public Process execute(String shell, String[] envp, File dir) throws IOException {
- String[] cmdArray = new String[] { shell, "-c", command}; //$NON-NLS-1$
+ String[] cmdArray = new String[] { shell, "-c", command }; //$NON-NLS-1$
return Runtime.getRuntime().exec(cmdArray, envp, dir);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MacroDefinition.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MacroDefinition.java
index c230cf5f6a3..f435da77ca5 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MacroDefinition.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MacroDefinition.java
@@ -38,7 +38,7 @@ public class MacroDefinition extends Directive implements IMacroDefinition {
}
public void setName(String n) {
- name = (n == null) ? "" : n.trim() ; //$NON-NLS-1$
+ name = (n == null) ? "" : n.trim(); //$NON-NLS-1$
}
@Override
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakeFileConstants.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakeFileConstants.java
index ab873b2c053..fe44c962603 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakeFileConstants.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakeFileConstants.java
@@ -13,15 +13,14 @@
*******************************************************************************/
package org.eclipse.cdt.make.internal.core.makefile;
-
public class MakeFileConstants {
- public static final String RULE_DEFAULT = ".DEFAULT"; //$NON-NLS-1$
- public static final String RULE_IGNORE =".IGNORE"; //$NON-NLS-1$
- public static final String RULE_POSIX = ".POSIX"; //$NON-NLS-1$
- public static final String RULE_PRECIOUS = ".PRECIOUS"; //$NON-NLS-1$
- public static final String RULE_SCCS_GET = ".SCCS_GET"; //$NON-NLS-1$
- public static final String RULE_SILENT = ".SILENT"; //$NON-NLS-1$
- public static final String RULE_SUFFIXES = ".SUFFIXES"; //$NON-NLS-1$
+ public static final String RULE_DEFAULT = ".DEFAULT"; //$NON-NLS-1$
+ public static final String RULE_IGNORE = ".IGNORE"; //$NON-NLS-1$
+ public static final String RULE_POSIX = ".POSIX"; //$NON-NLS-1$
+ public static final String RULE_PRECIOUS = ".PRECIOUS"; //$NON-NLS-1$
+ public static final String RULE_SCCS_GET = ".SCCS_GET"; //$NON-NLS-1$
+ public static final String RULE_SILENT = ".SILENT"; //$NON-NLS-1$
+ public static final String RULE_SUFFIXES = ".SUFFIXES"; //$NON-NLS-1$
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileMessages.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileMessages.java
index a93360addd7..f9079b416c0 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileMessages.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileMessages.java
@@ -18,19 +18,18 @@ import java.util.ResourceBundle;
public class MakefileMessages {
- private static final String BUNDLE_NAME = "org.eclipse.cdt.make.internal.core.makefile.MakeFileResources";//$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.make.internal.core.makefile.MakeFileResources";//$NON-NLS-1$
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
- private MakefileMessages() {
- }
+ private MakefileMessages() {
+ }
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java
index 37e95bb189d..601a186bdb4 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java
@@ -21,7 +21,6 @@ import java.io.Reader;
*/
public class MakefileReader extends LineNumberReader {
-
public MakefileReader(Reader reader) {
super(reader);
}
@@ -30,7 +29,6 @@ public class MakefileReader extends LineNumberReader {
super(reader, sz);
}
-
@Override
public String readLine() throws IOException {
boolean done = false;
@@ -47,7 +45,7 @@ public class MakefileReader extends LineNumberReader {
// Eat the spaces at the beginning.
int i = 0;
while (i < line.length() && (Util.isSpace(line.charAt(i)))) {
- i++ ;
+ i++;
}
line = line.substring(i);
} else if (escapedCommand && line.length() > 0) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java
index 52f15dbd29b..58970fc0805 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java
@@ -79,6 +79,7 @@ public class NullMakefile extends AbstractMakefile {
public void parse(String name, IMakefileReaderProvider makefileReaderProvider) throws IOException {
}
+
@Override
public void parse(URI fileURI, Reader makefile) throws IOException {
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Util.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Util.java
index 238321687d6..40af6a7b6b7 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Util.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Util.java
@@ -45,7 +45,7 @@ public class Util {
}
public static boolean isSpace(char c) {
- return (c == ' ' || c == '\t' || c == '\r' || c == '\n');
+ return (c == ' ' || c == '\t' || c == '\r' || c == '\n');
}
public static int indexOf(String line, char c) {
@@ -65,7 +65,7 @@ public class Util {
char ch = line.charAt(i);
if (ch == '(' && prev == '$' && pprev != '\\') {
paren++;
- } else if (ch == '{' && prev == '$' && pprev != '\\') {
+ } else if (ch == '{' && prev == '$' && pprev != '\\') {
bracket++;
} else if (ch == ')' && prev != '\\') {
if (paren > 0) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/AutomaticVariable.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/AutomaticVariable.java
index 47ad418802f..bd32d5afc77 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/AutomaticVariable.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/AutomaticVariable.java
@@ -16,11 +16,10 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.core.makefile.IAutomaticVariable;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
/**
* Represents an automatic variable. Automatic variables are implicit and
* computed for each rule that is applied.
- *
+ *
* @author Sebastian Bauer
* @see "http://www.gnu.org/software/make/manual/make.html#Automatic-Variables"
*/
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/BuiltinFunction.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/BuiltinFunction.java
index 21c512c0b2e..4a92e580d38 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/BuiltinFunction.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/BuiltinFunction.java
@@ -18,7 +18,6 @@ import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
/**
* Represents GNUmakefile built-in internal functions.
*/
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Conditional.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Conditional.java
index 7e519dacd30..28f6041ea21 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Conditional.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Conditional.java
@@ -19,7 +19,7 @@ import org.eclipse.cdt.make.internal.core.makefile.Parent;
public abstract class Conditional extends Parent implements IConditional {
- private static final String EMPTY = ""; //$NON-NLS-1$
+ private static final String EMPTY = ""; //$NON-NLS-1$
String cond;
String arg1;
String arg2;
@@ -41,7 +41,6 @@ public abstract class Conditional extends Parent implements IConditional {
cond = conditional;
}
-
@Override
public String getConditional() {
return cond;
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/DefineVariable.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/DefineVariable.java
index 6958122c513..417f7de4103 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/DefineVariable.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/DefineVariable.java
@@ -15,7 +15,6 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class DefineVariable extends VariableDefinition {
public DefineVariable(Directive parent, String name, StringBuffer value) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Else.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Else.java
index 8b04ca05004..084f37af7a7 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Else.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Else.java
@@ -15,7 +15,6 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class Else extends Conditional {
public Else(Directive parent) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endef.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endef.java
index 3139689af63..6a4bad09da2 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endef.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endef.java
@@ -17,7 +17,6 @@ import org.eclipse.cdt.make.internal.core.makefile.Directive;
public class Endef extends Terminal {
-
public Endef(Directive parent) {
super(parent);
}
@@ -26,9 +25,9 @@ public class Endef extends Terminal {
public boolean isEndef() {
return true;
}
-
+
@Override
public String toString() {
- return GNUMakefileConstants.TERMINAL_ENDEF;
- }
+ return GNUMakefileConstants.TERMINAL_ENDEF;
+ }
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endif.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endif.java
index fed01dde7b8..6694633cf06 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endif.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Endif.java
@@ -25,9 +25,9 @@ public class Endif extends Terminal {
public boolean isEndif() {
return true;
}
-
- @Override
+
+ @Override
public String toString() {
- return GNUMakefileConstants.TERMINAL_ENDIF;
- }
+ return GNUMakefileConstants.TERMINAL_ENDIF;
+ }
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/ExportVariable.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/ExportVariable.java
index 8bd7b088e79..d3d3a35b059 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/ExportVariable.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/ExportVariable.java
@@ -15,7 +15,6 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class ExportVariable extends VariableDefinition {
public ExportVariable(Directive parent, String name, StringBuffer value, int type) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
index 234948257d8..c173fe8aee2 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
@@ -81,68 +81,46 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
private String[] includeDirectories = new String[0];
private IDirective[] builtins = new IDirective[0];
@SuppressWarnings("nls")
- private IAutomaticVariable[] autoVariables = new IAutomaticVariable[]{
- new AutomaticVariable(this, "@", MakefileMessages.getString("GNUMakefile.automaticVariable.at")),
- new AutomaticVariable(this, "%", MakefileMessages.getString("GNUMakefile.automaticVariable.percent")),
- new AutomaticVariable(this, "<", MakefileMessages.getString("GNUMakefile.automaticVariable.less")),
- new AutomaticVariable(this, "?", MakefileMessages.getString("GNUMakefile.automaticVariable.question")),
- new AutomaticVariable(this, "^", MakefileMessages.getString("GNUMakefile.automaticVariable.carrot")),
- new AutomaticVariable(this, "+", MakefileMessages.getString("GNUMakefile.automaticVariable.plus")),
- new AutomaticVariable(this, "|", MakefileMessages.getString("GNUMakefile.automaticVariable.pipe")),
- new AutomaticVariable(this, "*", MakefileMessages.getString("GNUMakefile.automaticVariable.star")),
- };
+ private IAutomaticVariable[] autoVariables = new IAutomaticVariable[] {
+ new AutomaticVariable(this, "@", MakefileMessages.getString("GNUMakefile.automaticVariable.at")),
+ new AutomaticVariable(this, "%", MakefileMessages.getString("GNUMakefile.automaticVariable.percent")),
+ new AutomaticVariable(this, "<", MakefileMessages.getString("GNUMakefile.automaticVariable.less")),
+ new AutomaticVariable(this, "?", MakefileMessages.getString("GNUMakefile.automaticVariable.question")),
+ new AutomaticVariable(this, "^", MakefileMessages.getString("GNUMakefile.automaticVariable.carrot")),
+ new AutomaticVariable(this, "+", MakefileMessages.getString("GNUMakefile.automaticVariable.plus")),
+ new AutomaticVariable(this, "|", MakefileMessages.getString("GNUMakefile.automaticVariable.pipe")),
+ new AutomaticVariable(this, "*", MakefileMessages.getString("GNUMakefile.automaticVariable.star")), };
@SuppressWarnings("nls")
- private final static String[] functions = {
- "subst", "patsubst", "strip", "findstring",
- "filter", "filter-out", "sort",
- "word", "words", "wordlist", "firstword", "lastword",
- "dir", "notdir",
- "suffix", "basename", "addsuffix", "addprefix",
- "join", "wildcard", "realpath", "abspath",
- "if", "or", "and", "foreach",
- "call", "value", "eval", "origin", "flavor",
- "shell", "error", "warning", "info",
- };
+ private final static String[] functions = { "subst", "patsubst", "strip", "findstring", "filter", "filter-out",
+ "sort", "word", "words", "wordlist", "firstword", "lastword", "dir", "notdir", "suffix", "basename",
+ "addsuffix", "addprefix", "join", "wildcard", "realpath", "abspath", "if", "or", "and", "foreach", "call",
+ "value", "eval", "origin", "flavor", "shell", "error", "warning", "info", };
@SuppressWarnings("nls")
- private IBuiltinFunction[] builtinFunctions = new IBuiltinFunction[]{
- new BuiltinFunction(this, "$(subst from,to,text)"),
- new BuiltinFunction(this, "$(patsubst pattern,replacement,text)"),
- new BuiltinFunction(this, "$(strip string)"),
- new BuiltinFunction(this, "$(findstring find,in)"),
- new BuiltinFunction(this, "$(filter pattern,text)"),
- new BuiltinFunction(this, "$(filter-out pattern,text)"),
- new BuiltinFunction(this, "$(sort list)"),
- new BuiltinFunction(this, "$(word n,text)"),
- new BuiltinFunction(this, "$(words text)"),
- new BuiltinFunction(this, "$(wordlist s,e,text)"),
- new BuiltinFunction(this, "$(firstword names)"),
- new BuiltinFunction(this, "$(lastword names)"),
- new BuiltinFunction(this, "$(dir names)"),
- new BuiltinFunction(this, "$(notdir names)"),
- new BuiltinFunction(this, "$(suffix names)"),
- new BuiltinFunction(this, "$(basename names)"),
- new BuiltinFunction(this, "$(addsuffix suffix,names)"),
- new BuiltinFunction(this, "$(addprefix prefix,names)"),
- new BuiltinFunction(this, "$(join list1,list2)"),
- new BuiltinFunction(this, "$(wildcard pattern)"),
- new BuiltinFunction(this, "$(realpath names)"),
- new BuiltinFunction(this, "$(abspath names)"),
- new BuiltinFunction(this, "$(if condition,then-part,else-part)"),
- new BuiltinFunction(this, "$(or condition1,condition2,...)"),
- new BuiltinFunction(this, "$(and condition1,condition2,...)"),
- new BuiltinFunction(this, "$(foreach var,list,text)"),
- new BuiltinFunction(this, "$(call variable,param,...)"),
- new BuiltinFunction(this, "$(value variable)"),
- new BuiltinFunction(this, "$(eval expression)"),
- new BuiltinFunction(this, "$(origin variable)"),
- new BuiltinFunction(this, "$(flavor variable)"),
- new BuiltinFunction(this, "$(shell command)"),
- new BuiltinFunction(this, "$(error error: text)"),
- new BuiltinFunction(this, "$(warning warning: text)"),
- new BuiltinFunction(this, "$(info info: text)"),
- };
+ private IBuiltinFunction[] builtinFunctions = new IBuiltinFunction[] {
+ new BuiltinFunction(this, "$(subst from,to,text)"),
+ new BuiltinFunction(this, "$(patsubst pattern,replacement,text)"),
+ new BuiltinFunction(this, "$(strip string)"), new BuiltinFunction(this, "$(findstring find,in)"),
+ new BuiltinFunction(this, "$(filter pattern,text)"),
+ new BuiltinFunction(this, "$(filter-out pattern,text)"), new BuiltinFunction(this, "$(sort list)"),
+ new BuiltinFunction(this, "$(word n,text)"), new BuiltinFunction(this, "$(words text)"),
+ new BuiltinFunction(this, "$(wordlist s,e,text)"), new BuiltinFunction(this, "$(firstword names)"),
+ new BuiltinFunction(this, "$(lastword names)"), new BuiltinFunction(this, "$(dir names)"),
+ new BuiltinFunction(this, "$(notdir names)"), new BuiltinFunction(this, "$(suffix names)"),
+ new BuiltinFunction(this, "$(basename names)"), new BuiltinFunction(this, "$(addsuffix suffix,names)"),
+ new BuiltinFunction(this, "$(addprefix prefix,names)"), new BuiltinFunction(this, "$(join list1,list2)"),
+ new BuiltinFunction(this, "$(wildcard pattern)"), new BuiltinFunction(this, "$(realpath names)"),
+ new BuiltinFunction(this, "$(abspath names)"),
+ new BuiltinFunction(this, "$(if condition,then-part,else-part)"),
+ new BuiltinFunction(this, "$(or condition1,condition2,...)"),
+ new BuiltinFunction(this, "$(and condition1,condition2,...)"),
+ new BuiltinFunction(this, "$(foreach var,list,text)"),
+ new BuiltinFunction(this, "$(call variable,param,...)"), new BuiltinFunction(this, "$(value variable)"),
+ new BuiltinFunction(this, "$(eval expression)"), new BuiltinFunction(this, "$(origin variable)"),
+ new BuiltinFunction(this, "$(flavor variable)"), new BuiltinFunction(this, "$(shell command)"),
+ new BuiltinFunction(this, "$(error error: text)"), new BuiltinFunction(this, "$(warning warning: text)"),
+ new BuiltinFunction(this, "$(info info: text)"), };
private IMakefileReaderProvider makefileReaderProvider;
@@ -161,8 +139,7 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
}
@Override
- public void parse(URI fileURI,
- IMakefileReaderProvider makefileReaderProvider) throws IOException {
+ public void parse(URI fileURI, IMakefileReaderProvider makefileReaderProvider) throws IOException {
this.makefileReaderProvider = makefileReaderProvider;
MakefileReader reader;
if (makefileReaderProvider == null) {
@@ -173,8 +150,7 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
throw new IOException();
}
- reader = new MakefileReader(new InputStreamReader(
- store.openInputStream(EFS.NONE, null)));
+ reader = new MakefileReader(new InputStreamReader(store.openInputStream(EFS.NONE, null)));
} catch (CoreException e) {
MakeCorePlugin.log(e);
throw new IOException(e.getMessage());
@@ -190,7 +166,6 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
parse(filePath, new MakefileReader(reader));
}
-
protected void parse(URI fileURI, MakefileReader reader) throws IOException {
String line;
Rule[] rules = null;
@@ -485,7 +460,7 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
protected SpecialRule parseSpecialRule(String line) {
line = line.trim();
- String keyword = null;
+ String keyword = null;
String[] reqs = null;
SpecialRule special = null;
int index = Util.indexOf(line, ':');
@@ -693,7 +668,8 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
GNUTargetRule[] rules = new GNUTargetRule[targetNames.length];
for (int i = 0; i < targetNames.length; i++) {
- rules[i] = new GNUTargetRule(this, new Target(targetNames[i]), doubleColon, normalReqs, orderReqs, new Command[0]);
+ rules[i] = new GNUTargetRule(this, new Target(targetNames[i]), doubleColon, normalReqs, orderReqs,
+ new Command[0]);
if (cmd != null) {
rules[i].addDirective(new Command(this, cmd));
}
@@ -773,8 +749,7 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
// Check for "+=", ":=", "?="
if (index > 0) {
type = line.charAt(index - 1);
- if (type == VariableDefinition.TYPE_SIMPLE_EXPAND
- || type == VariableDefinition.TYPE_APPEND
+ if (type == VariableDefinition.TYPE_SIMPLE_EXPAND || type == VariableDefinition.TYPE_APPEND
|| type == VariableDefinition.TYPE_CONDITIONAL) {
separator = index - 1;
} else {
@@ -836,7 +811,8 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
StaticTargetRule[] staticRules = new StaticTargetRule[targets.length];
for (int i = 0; i < targets.length; i++) {
- staticRules[i] = new StaticTargetRule(this, new Target(targets[i]), targetPattern, prereqPatterns, new Command[0]);
+ staticRules[i] = new StaticTargetRule(this, new Target(targets[i]), targetPattern, prereqPatterns,
+ new Command[0]);
}
return staticRules;
}
@@ -861,12 +837,12 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
public IAutomaticVariable[] getAutomaticVariables() {
return autoVariables;
}
-
+
@Override
public IBuiltinFunction[] getBuiltinFunctions() {
return builtinFunctions;
}
-
+
@Override
public void setIncludeDirectories(String[] dirs) {
includeDirectories = dirs;
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
index 74d189d6d59..c22fa966e3a 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
@@ -70,7 +70,8 @@ public class GNUMakefileChecker extends ACBuilder {
* @see IncrementalProjectBuilder#build
*/
@Override
- protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor) throws CoreException {
+ protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor)
+ throws CoreException {
if (DEBUG_EVENTS) {
@SuppressWarnings("unchecked")
Map pargs = args;
@@ -135,7 +136,7 @@ public class GNUMakefileChecker extends ACBuilder {
// FIXME: Find the candidate in the store somewhere.
IFile defaultMakefile = proj.getFile(new Path("Makefile")); //$NON-NLS-1$
if (defaultMakefile.exists()) {
- return new IFile[] {defaultMakefile};
+ return new IFile[] { defaultMakefile };
}
return new IFile[0];
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileConstants.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileConstants.java
index 5144963fded..a33dc7ee27e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileConstants.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileConstants.java
@@ -15,33 +15,32 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.MakeFileConstants;
-
public class GNUMakefileConstants extends MakeFileConstants {
- public static final String CONDITIONAL_ELSE = "else"; //$NON-NLS-1$
- public static final String CONDITIONAL_IFNEQ = "ifneq"; //$NON-NLS-1$
- public static final String CONDITIONAL_IFNDEF = "ifndef"; //$NON-NLS-1$
- public static final String CONDITIONAL_IFEQ = "ifeq"; //$NON-NLS-1$
- public static final String CONDITIONAL_IFDEF = "ifdef"; //$NON-NLS-1$
-
- public static final String TERMINAL_ENDEF = "endef"; //$NON-NLS-1$
- public static final String TERMINAL_ENDIF = "endif"; //$NON-NLS-1$
-
- public static final String DIRECTIVE_VPATH = "vpath"; //$NON-NLS-1$
- public static final String DIRECTIVE_UNEXPORT = "unexport"; //$NON-NLS-1$
-
- public static final String VARIABLE_DEFINE = "define"; //$NON-NLS-1$
- public static final String VARIABLE_EXPORT = "export"; //$NON-NLS-1$
- public static final String VARIABLE_OVERRIDE = "override"; //$NON-NLS-1$
-
- public static final String FUNCTION_CALL = "call"; //$NON-NLS-1$
-
- public static final String DIRECTIVE_INCLUDE = "include"; //$NON-NLS-1$
-
- public static final String RULE_DELETE_ON_ERROR = ".DELETE_ON_ERROR"; //$NON-NLS-1$
- public static final String RULE_PHONY = ".PHONY"; //$NON-NLS-1$
- public static final String RULE_SECONDARY = ".SECONDARY"; //$NON-NLS-1$
- public static final String RULE_LOW_RESOLUTION_TIME = ".LOW_RESOLUTION_TIME"; //$NON-NLS-1$
- public static final String RULE_NOT_PARALLEL = ".NOTPARALLEL"; //$NON-NLS-1$
- public static final String RULE_EXPORT_ALL_VARIABLES = ".EXPORT_ALL_VARIABLES"; //$NON-NLS-1$
- public static final String RULE_INTERMEDIATE = ".INTERMEDIATE"; //$NON-NLS-1$
+ public static final String CONDITIONAL_ELSE = "else"; //$NON-NLS-1$
+ public static final String CONDITIONAL_IFNEQ = "ifneq"; //$NON-NLS-1$
+ public static final String CONDITIONAL_IFNDEF = "ifndef"; //$NON-NLS-1$
+ public static final String CONDITIONAL_IFEQ = "ifeq"; //$NON-NLS-1$
+ public static final String CONDITIONAL_IFDEF = "ifdef"; //$NON-NLS-1$
+
+ public static final String TERMINAL_ENDEF = "endef"; //$NON-NLS-1$
+ public static final String TERMINAL_ENDIF = "endif"; //$NON-NLS-1$
+
+ public static final String DIRECTIVE_VPATH = "vpath"; //$NON-NLS-1$
+ public static final String DIRECTIVE_UNEXPORT = "unexport"; //$NON-NLS-1$
+
+ public static final String VARIABLE_DEFINE = "define"; //$NON-NLS-1$
+ public static final String VARIABLE_EXPORT = "export"; //$NON-NLS-1$
+ public static final String VARIABLE_OVERRIDE = "override"; //$NON-NLS-1$
+
+ public static final String FUNCTION_CALL = "call"; //$NON-NLS-1$
+
+ public static final String DIRECTIVE_INCLUDE = "include"; //$NON-NLS-1$
+
+ public static final String RULE_DELETE_ON_ERROR = ".DELETE_ON_ERROR"; //$NON-NLS-1$
+ public static final String RULE_PHONY = ".PHONY"; //$NON-NLS-1$
+ public static final String RULE_SECONDARY = ".SECONDARY"; //$NON-NLS-1$
+ public static final String RULE_LOW_RESOLUTION_TIME = ".LOW_RESOLUTION_TIME"; //$NON-NLS-1$
+ public static final String RULE_NOT_PARALLEL = ".NOTPARALLEL"; //$NON-NLS-1$
+ public static final String RULE_EXPORT_ALL_VARIABLES = ".EXPORT_ALL_VARIABLES"; //$NON-NLS-1$
+ public static final String RULE_INTERMEDIATE = ".INTERMEDIATE"; //$NON-NLS-1$
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileUtil.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileUtil.java
index 2dda288c899..9f14100a01b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileUtil.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileUtil.java
@@ -23,30 +23,39 @@ public class GNUMakefileUtil extends PosixMakefileUtil {
public static boolean isInclude(String line) {
line = line.trim();
- boolean isInclude = line.startsWith(GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 7 && Character.isWhitespace(line.charAt(7));
- boolean isDashInclude = line.startsWith("-" + GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 8 && Character.isWhitespace(line.charAt(8)); //$NON-NLS-1$
- boolean isSInclude = line.startsWith("s" + GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 8 && Character.isWhitespace(line.charAt(8)); //$NON-NLS-1$
+ boolean isInclude = line.startsWith(GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 7
+ && Character.isWhitespace(line.charAt(7));
+ boolean isDashInclude = line.startsWith("-" + GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 8 //$NON-NLS-1$
+ && Character.isWhitespace(line.charAt(8));
+ boolean isSInclude = line.startsWith("s" + GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 8 //$NON-NLS-1$
+ && Character.isWhitespace(line.charAt(8));
return isInclude || isDashInclude || isSInclude;
}
public static boolean isVPath(String line) {
line = line.trim();
- return line.equals(GNUMakefileConstants.DIRECTIVE_VPATH) || line.startsWith(GNUMakefileConstants.DIRECTIVE_VPATH) && line.length() > 5 && Character.isWhitespace(line.charAt(5));
+ return line.equals(GNUMakefileConstants.DIRECTIVE_VPATH)
+ || line.startsWith(GNUMakefileConstants.DIRECTIVE_VPATH) && line.length() > 5
+ && Character.isWhitespace(line.charAt(5));
}
public static boolean isExport(String line) {
line = line.trim();
- return line.equals(GNUMakefileConstants.VARIABLE_EXPORT) || line.startsWith(GNUMakefileConstants.VARIABLE_EXPORT) && line.length() > 6 && Character.isWhitespace(line.charAt(6));
+ return line.equals(GNUMakefileConstants.VARIABLE_EXPORT)
+ || line.startsWith(GNUMakefileConstants.VARIABLE_EXPORT) && line.length() > 6
+ && Character.isWhitespace(line.charAt(6));
}
public static boolean isUnExport(String line) {
line = line.trim();
- return line.startsWith(GNUMakefileConstants.DIRECTIVE_UNEXPORT) && line.length() > 8 && Character.isWhitespace(line.charAt(8));
+ return line.startsWith(GNUMakefileConstants.DIRECTIVE_UNEXPORT) && line.length() > 8
+ && Character.isWhitespace(line.charAt(8));
}
public static boolean isDefine(String line) {
line = line.trim();
- return line.startsWith(GNUMakefileConstants.VARIABLE_DEFINE) && line.length() > 6 && Character.isWhitespace(line.charAt(6));
+ return line.startsWith(GNUMakefileConstants.VARIABLE_DEFINE) && line.length() > 6
+ && Character.isWhitespace(line.charAt(6));
}
public static boolean isEndef(String line) {
@@ -55,27 +64,32 @@ public class GNUMakefileUtil extends PosixMakefileUtil {
public static boolean isOverride(String line) {
line = line.trim();
- return line.startsWith(GNUMakefileConstants.VARIABLE_OVERRIDE) && line.length() > 8 && Character.isWhitespace(line.charAt(8));
+ return line.startsWith(GNUMakefileConstants.VARIABLE_OVERRIDE) && line.length() > 8
+ && Character.isWhitespace(line.charAt(8));
}
public static boolean isIfeq(String line) {
line = line.trim();
- return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFEQ) && line.length() > 4 && Character.isWhitespace(line.charAt(4));
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFEQ) && line.length() > 4
+ && Character.isWhitespace(line.charAt(4));
}
public static boolean isIfneq(String line) {
line = line.trim();
- return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFNEQ) && line.length() > 5 && Character.isWhitespace(line.charAt(5));
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFNEQ) && line.length() > 5
+ && Character.isWhitespace(line.charAt(5));
}
public static boolean isIfdef(String line) {
line = line.trim();
- return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFDEF) && line.length() > 5 && Character.isWhitespace(line.charAt(5));
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFDEF) && line.length() > 5
+ && Character.isWhitespace(line.charAt(5));
}
public static boolean isIfndef(String line) {
line = line.trim();
- return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFNDEF) && line.length() > 6 && Character.isWhitespace(line.charAt(6));
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFNDEF) && line.length() > 6
+ && Character.isWhitespace(line.charAt(6));
}
public static boolean isElse(String line) {
@@ -90,7 +104,7 @@ public class GNUMakefileUtil extends PosixMakefileUtil {
line = line.trim();
if (line.startsWith(GNUMakefileConstants.VARIABLE_OVERRIDE)) {
int i = 8;
- while(i < line.length() && Character.isWhitespace(line.charAt(i))) {
+ while (i < line.length() && Character.isWhitespace(line.charAt(i))) {
i++;
}
if (line.startsWith(GNUMakefileConstants.VARIABLE_DEFINE, i)) {
@@ -114,12 +128,8 @@ public class GNUMakefileUtil extends PosixMakefileUtil {
}
public static boolean isVariableDefinition(String line) {
- return isOverrideDefine(line)
- || isTargetVariable(line)
- || isDefine(line)
- || isOverride(line)
- || isExport(line)
- || isMacroDefinition(line);
+ return isOverrideDefine(line) || isTargetVariable(line) || isDefine(line) || isOverride(line) || isExport(line)
+ || isMacroDefinition(line);
}
public static boolean isStaticTargetRule(String line) {
@@ -128,7 +138,7 @@ public class GNUMakefileUtil extends PosixMakefileUtil {
if (colon1 > 0) {
// move pass colon1
line = line.substring(colon1 + 1);
- int colon2 = Util.indexOf(line, ':');
+ int colon2 = Util.indexOf(line, ':');
// Catch operator "::" not a static pattern rule
return (colon2 > 0);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java
index 49ebafc8034..d5ffa304e9c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java
@@ -55,12 +55,11 @@ public class GNUMakefileValidator implements IMakefileValidator {
@Override
public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
- ProblemMarkerInfo problemMarkerInfo = new ProblemMarkerInfo(file, lineNumber, errorDesc, severity, errorVar, null);
+ ProblemMarkerInfo problemMarkerInfo = new ProblemMarkerInfo(file, lineNumber, errorDesc, severity,
+ errorVar, null);
addMarker(problemMarkerInfo);
}
-
-
/* (non-Javadoc)
* @see org.eclipse.cdt.core.IMarkerGenerator#addMarker(org.eclipse.cdt.core.ProblemMarkerInfo)
*/
@@ -71,14 +70,15 @@ public class GNUMakefileValidator implements IMakefileValidator {
name = problemMarkerInfo.file.getName();
}
StringBuilder sb = new StringBuilder(name);
- sb.append(':').append(problemMarkerInfo.lineNumber).append(':').append(getSeverity(problemMarkerInfo.severity));
+ sb.append(':').append(problemMarkerInfo.lineNumber).append(':')
+ .append(getSeverity(problemMarkerInfo.severity));
if (problemMarkerInfo.description != null) {
sb.append(':').append(problemMarkerInfo.description);
}
- if (problemMarkerInfo.variableName != null ) {
+ if (problemMarkerInfo.variableName != null) {
sb.append(':').append(problemMarkerInfo.variableName);
}
- if (problemMarkerInfo.externalPath != null ) {
+ if (problemMarkerInfo.externalPath != null) {
sb.append(':').append(problemMarkerInfo.externalPath);
}
sb.append('\n');
@@ -86,8 +86,6 @@ public class GNUMakefileValidator implements IMakefileValidator {
}
-
-
public String getSeverity(int severity) {
if (severity == IMarkerGenerator.SEVERITY_ERROR_BUILD) {
return MakefileMessages.getString("MakefileValidator.errorBuild"); //$NON-NLS-1$
@@ -141,7 +139,7 @@ public class GNUMakefileValidator implements IMakefileValidator {
for (int i = 0; i < directives.length; i++) {
directive = directives[i];
if (directive instanceof IConditional) {
- IConditional condition = (IConditional)directive;
+ IConditional condition = (IConditional) directive;
validateCondition(condition);
if (!condition.isElse()) {
conditionCount++;
@@ -156,7 +154,7 @@ public class GNUMakefileValidator implements IMakefileValidator {
}
}
} else if (directive instanceof ITerminal) {
- ITerminal terminal = (ITerminal)directive;
+ ITerminal terminal = (ITerminal) directive;
if (terminal.isEndif()) {
if (conditionCount == 0) {
// ERROR missing condition.
@@ -181,7 +179,7 @@ public class GNUMakefileValidator implements IMakefileValidator {
}
}
} else if (directive instanceof IVariableDefinition) {
- IVariableDefinition definition = (IVariableDefinition)directive;
+ IVariableDefinition definition = (IVariableDefinition) directive;
if (definition.isMultiLine()) {
defineCount++;
}
@@ -193,7 +191,7 @@ public class GNUMakefileValidator implements IMakefileValidator {
String varName = directive.toString().trim();
marker.addMarker(res, startLine, msg, severity, varName);
} else if (directive instanceof ISpecialRule) {
- validateSpecialRule((ISpecialRule)directive);
+ validateSpecialRule((ISpecialRule) directive);
}
}
if (conditionCount > 0) {
@@ -218,7 +216,7 @@ public class GNUMakefileValidator implements IMakefileValidator {
int severity = IMarkerGenerator.SEVERITY_ERROR_RESOURCE;
for (int i = directives.length - 1; i >= 0; i--) {
if (directives[i] instanceof IVariableDefinition) {
- IVariableDefinition definition = (IVariableDefinition)directives[i];
+ IVariableDefinition definition = (IVariableDefinition) directives[i];
if (definition.isMultiLine()) {
startLine = definition.getStartLine();
varName = definition.toString().trim();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java
index 65678c3c968..e518ff0c2e0 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java
@@ -26,7 +26,8 @@ public class GNUTargetRule extends TargetRule {
String[] orderOnlyPrerequisites;
boolean doubleColon;
- public GNUTargetRule(Directive parent, Target target, boolean double_colon, String[] normal_prereqs, String[] order_prereqs, Command[] commands) {
+ public GNUTargetRule(Directive parent, Target target, boolean double_colon, String[] normal_prereqs,
+ String[] order_prereqs, Command[] commands) {
super(parent, target, normal_prereqs, commands);
orderOnlyPrerequisites = order_prereqs;
doubleColon = double_colon;
@@ -44,7 +45,6 @@ public class GNUTargetRule extends TargetRule {
return orderOnlyPrerequisites;
}
-
/**
* @see java.lang.Object#toString()
*/
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java
index 5189eefe781..4324e4a96b7 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java
@@ -15,10 +15,9 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class Ifdef extends Conditional {
- private static final String EMPTY = ""; //$NON-NLS-1$
-
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
public Ifdef(Directive parent, String var) {
super(parent, var, EMPTY, EMPTY);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java
index abad73fe7f7..9fd7cec7eb7 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java
@@ -15,7 +15,6 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class Ifeq extends Conditional {
public Ifeq(Directive parent, String cond) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java
index ac0bce611ff..d5fcfea45be 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java
@@ -15,10 +15,10 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class Ifndef extends Conditional {
- private static final String EMPTY = ""; //$NON-NLS-1$
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
public Ifndef(Directive parent, String var) {
super(parent, var, EMPTY, EMPTY);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java
index 4d6dc748091..51897b8b642 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java
@@ -15,7 +15,6 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class Ifneq extends Conditional {
public Ifneq(Directive parent, String cond) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
index 13c99a38bba..8ba67ddcae5 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
@@ -65,7 +65,6 @@ public class Include extends Parent implements IInclude {
return null;
}
-
@Override
public IDirective[] getDirectives() {
clearDirectives();
@@ -95,13 +94,14 @@ public class Include extends Parent implements IInclude {
} else if (dirs != null) {
for (int j = 0; j < dirs.length; j++) {
try {
- IPath testIncludeFilePath= new Path(dirs[j]).append(includeFilePath);
+ IPath testIncludeFilePath = new Path(dirs[j]).append(includeFilePath);
String uriPath = testIncludeFilePath.toString();
if (testIncludeFilePath.getDevice() != null) {
// special case: device prefix is seen as relative path by URI
uriPath = '/' + uriPath;
}
- URI includeURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), uriPath, null, null);
+ URI includeURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(),
+ uriPath, null, null);
if (!isAlreadyIncluded(includeURI)) {
GNUMakefile gnu = new GNUMakefile();
gnu.parse(includeURI, makefileReaderProvider);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideDefine.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideDefine.java
index 5e93da101f6..6209a23b647 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideDefine.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideDefine.java
@@ -15,7 +15,6 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class OverrideDefine extends DefineVariable {
public OverrideDefine(Directive parent, String name, StringBuffer value) {
@@ -24,7 +23,8 @@ public class OverrideDefine extends DefineVariable {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.VARIABLE_OVERRIDE + " " + GNUMakefileConstants.VARIABLE_DEFINE); //$NON-NLS-1$
+ StringBuffer sb = new StringBuffer(
+ GNUMakefileConstants.VARIABLE_OVERRIDE + " " + GNUMakefileConstants.VARIABLE_DEFINE); //$NON-NLS-1$
sb.append(getName()).append('\n');
sb.append(getValue());
sb.append(GNUMakefileConstants.TERMINAL_ENDEF);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideVariable.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideVariable.java
index 3e803e14246..747f392a2d2 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideVariable.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/OverrideVariable.java
@@ -15,7 +15,6 @@ package org.eclipse.cdt.make.internal.core.makefile.gnu;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
-
public class OverrideVariable extends VariableDefinition {
public OverrideVariable(Directive parent, String name, StringBuffer value, int type) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java
index 418821ed4b8..33f8e2d17f1 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java
@@ -20,7 +20,6 @@ import org.eclipse.cdt.make.internal.core.makefile.Directive;
import org.eclipse.cdt.make.internal.core.makefile.InferenceRule;
import org.eclipse.cdt.make.internal.core.makefile.Target;
-
/**
* Here is the syntax of a static pattern rule:
*
@@ -33,7 +32,8 @@ public class StaticTargetRule extends InferenceRule implements IInferenceRule {
String targetPattern;
String[] prereqPatterns;
- public StaticTargetRule(Directive parent, Target target, String target_pattern, String[] prereq_patterns, Command[] commands) {
+ public StaticTargetRule(Directive parent, Target target, String target_pattern, String[] prereq_patterns,
+ Command[] commands) {
super(parent, target, commands);
targetPattern = target_pattern;
prereqPatterns = prereq_patterns;
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/TargetVariable.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/TargetVariable.java
index 72835ee3593..6435d2ff295 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/TargetVariable.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/TargetVariable.java
@@ -25,7 +25,8 @@ public class TargetVariable extends VariableDefinition {
boolean override;
- public TargetVariable(Directive parent, String target, String name, StringBuffer value, boolean override, int type) {
+ public TargetVariable(Directive parent, String target, String name, StringBuffer value, boolean override,
+ int type) {
super(parent, target, name, value, type);
this.override = override;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VariableDefinition.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VariableDefinition.java
index 03501766ec4..52ed0318d2f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VariableDefinition.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VariableDefinition.java
@@ -19,7 +19,7 @@ import org.eclipse.cdt.make.internal.core.makefile.MacroDefinition;
/**
*/
-public class VariableDefinition extends MacroDefinition implements IVariableDefinition {
+public class VariableDefinition extends MacroDefinition implements IVariableDefinition {
/**
* ? is Conditional
@@ -39,7 +39,7 @@ public class VariableDefinition extends MacroDefinition implements IVariableDefi
}
public VariableDefinition(Directive parent, String name, StringBuffer value, int type) {
- this(parent, "", name, value, type); //$NON-NLS-1$
+ this(parent, "", name, value, type); //$NON-NLS-1$
}
public VariableDefinition(Directive parent, String target, String name, StringBuffer value, int type) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefile.java
index ad1e6664a05..18017728947 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefile.java
@@ -86,14 +86,13 @@ public class PosixMakefile extends AbstractMakefile {
}
@Override
- public void parse(URI fileURI,
- IMakefileReaderProvider makefileReaderProvider) throws IOException {
+ public void parse(URI fileURI, IMakefileReaderProvider makefileReaderProvider) throws IOException {
this.makefileReaderProvider = makefileReaderProvider;
MakefileReader reader;
if (makefileReaderProvider == null) {
try {
- reader = new MakefileReader(new InputStreamReader(
- EFS.getStore(fileURI).openInputStream(EFS.NONE, null)));
+ reader = new MakefileReader(
+ new InputStreamReader(EFS.getStore(fileURI).openInputStream(EFS.NONE, null)));
} catch (CoreException e) {
MakeCorePlugin.log(e);
throw new IOException(e.getMessage());
@@ -165,7 +164,7 @@ public class PosixMakefile extends AbstractMakefile {
// 3- Empty lines ?
if (Util.isEmptyLine(line)) {
- Directive empty = new EmptyLine(this);
+ Directive empty = new EmptyLine(this);
empty.setLines(startLine, endLine);
if (rules != null) {
for (Rule rule : rules) {
@@ -197,7 +196,7 @@ public class PosixMakefile extends AbstractMakefile {
InferenceRule irule = parseInferenceRule(line);
irule.setLines(startLine, endLine);
addDirective(irule);
- rules = new Rule[]{irule};
+ rules = new Rule[] { irule };
continue;
}
@@ -235,15 +234,15 @@ public class PosixMakefile extends AbstractMakefile {
public IDirective[] getBuiltins() {
return builtins;
}
+
@Override
public IAutomaticVariable[] getAutomaticVariables() {
return automaticVariables;
}
-
protected SpecialRule processSpecialRule(String line) {
line = line.trim();
- String keyword = null;
+ String keyword = null;
String[] reqs = null;
SpecialRule special = null;
int index = Util.indexOf(line, ':');
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
index 70be3adfd9d..68e7bbfb379 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
@@ -43,26 +43,25 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
-
public class CDataDiscoveredInfoCalculator {
- private static final String[] EMPTY_STRING_ARRAY = new String[0];
+ private static final String[] EMPTY_STRING_ARRAY = new String[0];
private static CDataDiscoveredInfoCalculator fInstance;
- public static class DiscoveredSettingInfo{
+ public static class DiscoveredSettingInfo {
private boolean fIsPerFileDiscovery;
private IRcSettingInfo[] fInfos;
- public DiscoveredSettingInfo(boolean isPerFileDiscovery, IRcSettingInfo[] infos){
+ public DiscoveredSettingInfo(boolean isPerFileDiscovery, IRcSettingInfo[] infos) {
fIsPerFileDiscovery = isPerFileDiscovery;
fInfos = infos;
}
- public boolean isPerFileDiscovery(){
+ public boolean isPerFileDiscovery() {
return fIsPerFileDiscovery;
}
- public IRcSettingInfo[] getRcSettingInfos(){
+ public IRcSettingInfo[] getRcSettingInfos() {
return fInfos;
}
}
@@ -79,17 +78,17 @@ public class CDataDiscoveredInfoCalculator {
PathInfo getFilePathInfo();
}
- private static class RcSettingInfo implements IRcSettingInfo{
+ private static class RcSettingInfo implements IRcSettingInfo {
private ArrayList fLangInfoList;
private CResourceData fRcData;
- RcSettingInfo(CResourceData rcData){
+ RcSettingInfo(CResourceData rcData) {
fRcData = rcData;
}
@Override
public ILangSettingInfo[] getLangInfos() {
- if(fLangInfoList != null && fLangInfoList.size() != 0)
+ if (fLangInfoList != null && fLangInfoList.size() != 0)
return fLangInfoList.toArray(new ILangSettingInfo[fLangInfoList.size()]);
return new ILangSettingInfo[0];
}
@@ -99,8 +98,8 @@ public class CDataDiscoveredInfoCalculator {
return fRcData;
}
- void add(ILangSettingInfo info){
- if(fLangInfoList == null)
+ void add(ILangSettingInfo info) {
+ if (fLangInfoList == null)
fLangInfoList = new ArrayList();
fLangInfoList.add(info);
}
@@ -110,7 +109,7 @@ public class CDataDiscoveredInfoCalculator {
private CLanguageData fLangData;
private PathInfo fPathInfo;
- LangSettingInfo(CLanguageData langData, PathInfo info){
+ LangSettingInfo(CLanguageData langData, PathInfo info) {
fLangData = langData;
fPathInfo = info;
}
@@ -131,8 +130,8 @@ public class CDataDiscoveredInfoCalculator {
private int fMaxIndex;
private List[] fStore;
- public ListIndexStore(int size){
- if(size < 0)
+ public ListIndexStore(int size) {
+ if (size < 0)
size = 0;
@SuppressWarnings("unchecked")
@@ -140,25 +139,25 @@ public class CDataDiscoveredInfoCalculator {
fStore = lists;
}
- public void add(int index, PathFilePathInfo value){
+ public void add(int index, PathFilePathInfo value) {
List list = checkResize(index) ? new ArrayList() : fStore[index];
- if(list == null){
+ if (list == null) {
list = new ArrayList();
fStore[index] = list;
}
- if(fMaxIndex < index)
+ if (fMaxIndex < index)
fMaxIndex = index;
list.add(value);
}
- private boolean checkResize(int index){
- if(index >= fStore.length){
+ private boolean checkResize(int index) {
+ if (index >= fStore.length) {
int newSize = ++index;
@SuppressWarnings("unchecked")
List resized[] = new List[newSize];
- if(fStore != null && fStore.length != 0){
+ if (fStore != null && fStore.length != 0) {
System.arraycopy(fStore, 0, resized, 0, fStore.length);
}
fStore = resized;
@@ -167,13 +166,13 @@ public class CDataDiscoveredInfoCalculator {
return false;
}
- public List[] getLists(){
+ public List[] getLists() {
int size = fMaxIndex + 1;
List> list = new ArrayList>(size);
List l;
- for(int i = 0; i < size; i++){
+ for (int i = 0; i < size; i++) {
l = fStore[i];
- if(l != null)
+ if (l != null)
list.add(l);
}
@@ -187,15 +186,15 @@ public class CDataDiscoveredInfoCalculator {
IPath fPath;
PathInfo fInfo;
- PathFilePathInfo(IPath path, PathInfo info){
+ PathFilePathInfo(IPath path, PathInfo info) {
fPath = path;
fInfo = info;
}
}
private static class ExtsSetSettings {
-// String[] fExts;
-// HashSet fExtsSet;
+ // String[] fExts;
+ // HashSet fExtsSet;
private ExtsSet fExtsSet;
Map> fPathFilePathInfoMap;
CLanguageData fBaseLangData;
@@ -210,8 +209,8 @@ public class CDataDiscoveredInfoCalculator {
fIsDerived = isDerived;
}
- void add(ExtsSetSettings setting){
- if(setting.fPathFilePathInfoMap != null){
+ void add(ExtsSetSettings setting) {
+ if (setting.fPathFilePathInfoMap != null) {
Collection> infoLists = setting.fPathFilePathInfoMap.values();
for (List infoList : infoLists) {
for (PathFilePathInfo info : infoList) {
@@ -221,26 +220,27 @@ public class CDataDiscoveredInfoCalculator {
}
}
- public void add(PathFilePathInfo pInfo){
- if(fPathFilePathInfoMap == null)
+ public void add(PathFilePathInfo pInfo) {
+ if (fPathFilePathInfoMap == null)
fPathFilePathInfoMap = new HashMap>(3);
PathInfo fileInfo = pInfo.fInfo;
- List list = fileInfo == fMaxMatchInfo ? fMaxMatchInfoList : fPathFilePathInfoMap.get(fileInfo);
- if(list == null){
+ List list = fileInfo == fMaxMatchInfo ? fMaxMatchInfoList
+ : fPathFilePathInfoMap.get(fileInfo);
+ if (list == null) {
list = new ArrayList();
fPathFilePathInfoMap.put(fileInfo, list);
- if(fMaxMatchInfo == null){
+ if (fMaxMatchInfo == null) {
fMaxMatchInfo = fileInfo;
fMaxMatchInfoList = list;
}
-// else {
-// fIsMultiple = true;
-// }
- } else if(fMaxMatchInfoList != list){
-// fIsMultiple = true;
+ // else {
+ // fIsMultiple = true;
+ // }
+ } else if (fMaxMatchInfoList != list) {
+ // fIsMultiple = true;
- if(fMaxMatchInfoList.size() == list.size()){
+ if (fMaxMatchInfoList.size() == list.size()) {
fMaxMatchInfoList = list;
fMaxMatchInfo = fileInfo;
}
@@ -248,29 +248,29 @@ public class CDataDiscoveredInfoCalculator {
list.add(pInfo);
}
- public boolean isMultiple(){
+ public boolean isMultiple() {
return fPathFilePathInfoMap != null && fPathFilePathInfoMap.size() > 1;
}
@Override
public boolean equals(Object obj) {
- if(obj == this)
+ if (obj == this)
return true;
- if(isMultiple())
+ if (isMultiple())
return false;
- if(!(obj instanceof ExtsSetSettings))
+ if (!(obj instanceof ExtsSetSettings))
return false;
- ExtsSetSettings other = (ExtsSetSettings)obj;
- if(other.isMultiple())
+ ExtsSetSettings other = (ExtsSetSettings) obj;
+ if (other.isMultiple())
return false;
- if(!fExtsSet.equals(other.fExtsSet))
+ if (!fExtsSet.equals(other.fExtsSet))
return false;
- if(!CDataUtil.objectsEqual(fMaxMatchInfo, other.fMaxMatchInfo))
+ if (!CDataUtil.objectsEqual(fMaxMatchInfo, other.fMaxMatchInfo))
return false;
return true;
@@ -279,13 +279,13 @@ public class CDataDiscoveredInfoCalculator {
@Override
public int hashCode() {
int hash = fHash;
- if(hash == 0){
- if(isMultiple())
+ if (hash == 0) {
+ if (isMultiple())
hash = super.hashCode();
else {
hash = fExtsSet.hashCode();
- if(fMaxMatchInfo != null)
+ if (fMaxMatchInfo != null)
hash += fMaxMatchInfo.hashCode();
}
@@ -301,27 +301,27 @@ public class CDataDiscoveredInfoCalculator {
private HashSet fExtsSet;
private int fHash;
- public ExtsSet(String[] exts){
- fExts = exts == null || exts.length == 0 ? EMPTY_STRING_ARRAY : (String[])exts.clone();
+ public ExtsSet(String[] exts) {
+ fExts = exts == null || exts.length == 0 ? EMPTY_STRING_ARRAY : (String[]) exts.clone();
}
@Override
public boolean equals(Object obj) {
- if(this == obj)
+ if (this == obj)
return true;
- if(!(obj instanceof ExtsSet))
+ if (!(obj instanceof ExtsSet))
return false;
- ExtsSet other = (ExtsSet)obj;
- if(fExts.length != other.fExts.length)
+ ExtsSet other = (ExtsSet) obj;
+ if (fExts.length != other.fExts.length)
return false;
- if(fExts.length != 0){
+ if (fExts.length != 0) {
@SuppressWarnings("unchecked")
- HashSet set = (HashSet)calcExtsSet().clone();
+ HashSet set = (HashSet) calcExtsSet().clone();
set.removeAll(other.calcExtsSet());
- if(set.size() != 0)
+ if (set.size() != 0)
return false;
}
return true;
@@ -330,9 +330,9 @@ public class CDataDiscoveredInfoCalculator {
@Override
public int hashCode() {
int hash = fHash;
- if(hash == 0){
+ if (hash == 0) {
hash = 47;
- for(int i = 0; i < fExts.length; i++){
+ for (int i = 0; i < fExts.length; i++) {
hash += fExts[i].hashCode();
}
fHash = hash;
@@ -340,21 +340,21 @@ public class CDataDiscoveredInfoCalculator {
return hash;
}
- private HashSet calcExtsSet(){
- if(fExtsSet == null)
+ private HashSet calcExtsSet() {
+ if (fExtsSet == null)
fExtsSet = new HashSet(Arrays.asList(fExts));
return fExtsSet;
}
@Override
public String toString() {
- if(fExts.length == 0)
+ if (fExts.length == 0)
return ""; //$NON-NLS-1$
StringBuilder buf = new StringBuilder();
- for(int i = 0; i < fExts.length; i++){
- if(i != 0)
+ for (int i = 0; i < fExts.length; i++) {
+ if (i != 0)
buf.append(","); //$NON-NLS-1$
buf.append(fExts[i]);
}
@@ -369,78 +369,78 @@ public class CDataDiscoveredInfoCalculator {
private PathSettingsContainer fContainer;
private boolean fIsDerived;
- RcSetSettings(PathSettingsContainer cr, CResourceData rcData, boolean isDerived){
+ RcSetSettings(PathSettingsContainer cr, CResourceData rcData, boolean isDerived) {
this.fContainer = cr;
this.fRcData = rcData;
this.fIsDerived = isDerived;
cr.setValue(this);
}
- public RcSetSettings getChild(IPath path, boolean exactPath){
+ public RcSetSettings getChild(IPath path, boolean exactPath) {
PathSettingsContainer cr = fContainer.getChildContainer(path, false, exactPath);
- if(cr != null)
- return (RcSetSettings)cr.getValue();
+ if (cr != null)
+ return (RcSetSettings) cr.getValue();
return null;
}
- public RcSetSettings getChild(IPath path){
+ public RcSetSettings getChild(IPath path) {
PathSettingsContainer cr = fContainer.getChildContainer(path, false, true);
- if(cr != null)
- return (RcSetSettings)cr.getValue();
+ if (cr != null)
+ return (RcSetSettings) cr.getValue();
return null;
}
- public RcSetSettings createChild(IPath path, CResourceData data, boolean isDerived){
+ public RcSetSettings createChild(IPath path, CResourceData data, boolean isDerived) {
PathSettingsContainer cr = fContainer.getChildContainer(path, true, true);
- RcSetSettings child = (RcSetSettings)cr.getValue();
- if(child == null){
+ RcSetSettings child = (RcSetSettings) cr.getValue();
+ if (child == null) {
child = new RcSetSettings(cr, data, isDerived);
-// cr.setValue(child);
+ // cr.setValue(child);
}
return child;
}
- void updateRcData(CResourceData data, boolean isDerived){
+ void updateRcData(CResourceData data, boolean isDerived) {
fRcData = data;
fIsDerived = data != null ? isDerived : false;
updateLangDatas();
}
- private void updateLangDatas(){
- if(fRcData.getType() == ICSettingBase.SETTING_FILE){
- CLanguageData lData = ((CFileData)fRcData).getLanguageData();
+ private void updateLangDatas() {
+ if (fRcData.getType() == ICSettingBase.SETTING_FILE) {
+ CLanguageData lData = ((CFileData) fRcData).getLanguageData();
ExtsSetSettings extSetting = fExtToExtsSetMap.get(getFileExt(fRcData.getPath()));
- if(extSetting != null){
+ if (extSetting != null) {
extSetting.fBaseLangData = lData;
extSetting.fIsDerived = lData != null ? fIsDerived : false;
}
- if(extSetting != null ?
- fExtsSetToExtsSetSettingsMap.size() > 1
- : fExtsSetToExtsSetSettingsMap.size() > 0){
+ if (extSetting != null ? fExtsSetToExtsSetSettingsMap.size() > 1
+ : fExtsSetToExtsSetSettingsMap.size() > 0) {
for (ExtsSetSettings s : fExtsSetToExtsSetSettingsMap.values()) {
- if(s != extSetting){
+ if (s != extSetting) {
s.fBaseLangData = null;
s.fIsDerived = false;
}
}
}
} else {
- CLanguageData[] lDatas = ((CFolderData)fRcData).getLanguageDatas();
+ CLanguageData[] lDatas = ((CFolderData) fRcData).getLanguageDatas();
@SuppressWarnings("unchecked")
- Map map = (HashMap)fExtsSetToExtsSetSettingsMap.clone();
+ Map map = (HashMap) fExtsSetToExtsSetSettingsMap
+ .clone();
CLanguageData lData;
- for(int i = 0; i < lDatas.length; i++){
+ for (int i = 0; i < lDatas.length; i++) {
lData = lDatas[i];
ExtsSetSettings extSetting = map.remove(new ExtsSet(lData.getSourceExtensions()));
- if(extSetting != null){
+ if (extSetting != null) {
extSetting.fBaseLangData = lData;
extSetting.fIsDerived = this.fIsDerived;
}
}
- if(map.size() != 0){
+ if (map.size() != 0) {
Collection extSettings = map.values();
for (ExtsSetSettings extSetting : extSettings) {
extSetting.fBaseLangData = null;
@@ -450,29 +450,29 @@ public class CDataDiscoveredInfoCalculator {
}
}
- public IPath getPath(){
+ public IPath getPath() {
return fContainer.getPath();
}
- public RcSetSettings getParent(){
+ public RcSetSettings getParent() {
PathSettingsContainer cr = fContainer.getParentContainer();
- if(cr != null)
- return (RcSetSettings)cr.getValue();
+ if (cr != null)
+ return (RcSetSettings) cr.getValue();
return null;
}
- void internalSetSettingsMap(HashMap map){
+ void internalSetSettingsMap(HashMap map) {
fExtsSetToExtsSetSettingsMap = map;
fExtToExtsSetMap = calcExtToExtSetSettingsMap(map);
}
- void internalAdd(ExtsSetSettings setting){
- if(fExtsSetToExtsSetSettingsMap == null){
+ void internalAdd(ExtsSetSettings setting) {
+ if (fExtsSetToExtsSetSettingsMap == null) {
fExtsSetToExtsSetSettingsMap = new HashMap();
}
ExtsSetSettings cur = fExtsSetToExtsSetSettingsMap.get(setting.fExtsSet);
- if(cur != null){
+ if (cur != null) {
cur.add(setting);
} else {
fExtsSetToExtsSetSettingsMap.put(setting.fExtsSet, setting);
@@ -480,29 +480,29 @@ public class CDataDiscoveredInfoCalculator {
}
}
- void internalAddSettingsMap(HashMap map){
+ void internalAddSettingsMap(HashMap map) {
Collection settings = map.values();
for (ExtsSetSettings setting : settings) {
internalAdd(setting);
-// ExtsSet extsSet;
-// extsSet = setting.fExtsSet;
-// thisSetting = (ExtsSetSettings)fExtsSetToExtsSetSettingsMap.get(extsSet);
-// if(thisSetting != null){
-// thisSetting.add(setting);
-// } else {
-// fExtsSetToExtsSetSettingsMap.put(extsSet, setting);
-// fExtToExtsSetMap = addExtsInfoToMap(setting, fExtToExtsSetMap);
-// }
+ // ExtsSet extsSet;
+ // extsSet = setting.fExtsSet;
+ // thisSetting = (ExtsSetSettings)fExtsSetToExtsSetSettingsMap.get(extsSet);
+ // if(thisSetting != null){
+ // thisSetting.add(setting);
+ // } else {
+ // fExtsSetToExtsSetSettingsMap.put(extsSet, setting);
+ // fExtToExtsSetMap = addExtsInfoToMap(setting, fExtToExtsSetMap);
+ // }
}
}
- public RcSetSettings[] getChildren(final boolean includeCurrent){
+ public RcSetSettings[] getChildren(final boolean includeCurrent) {
final List