mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 259768: "Use optimal jobs number" highly misleading.
Encode "optimal" as negative number and "unlimited" as Integer.MAX_VALUE Based on patch by Mohamed Hussein <mohamed_hussein@mentor.com>
This commit is contained in:
parent
bdd3e82216
commit
7f438e269a
14 changed files with 1107 additions and 581 deletions
|
@ -76,12 +76,15 @@ public interface IBuilder extends IHoldsOptions, IMakeBuilderInfo {
|
||||||
static final String ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS = "customizedErrorParsers"; //$NON-NLS-1$
|
static final String ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS = "customizedErrorParsers"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_CUSTOM_PROPS = "customBuilderProperties"; //$NON-NLS-1$
|
static final String ATTRIBUTE_CUSTOM_PROPS = "customBuilderProperties"; //$NON-NLS-1$
|
||||||
|
|
||||||
// static final String ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS = "customizedErrorParsers"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
static final String ATTRIBUTE_IGNORE_ERR_CMD = "ignoreErrCmd"; //$NON-NLS-1$
|
static final String ATTRIBUTE_IGNORE_ERR_CMD = "ignoreErrCmd"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_STOP_ON_ERR = "stopOnErr"; //$NON-NLS-1$
|
static final String ATTRIBUTE_STOP_ON_ERR = "stopOnErr"; //$NON-NLS-1$
|
||||||
|
|
||||||
static final String ATTRIBUTE_PARALLEL_BUILD_CMD = "parallelBuildCmd"; //$NON-NLS-1$
|
static final String ATTRIBUTE_PARALLEL_BUILD_CMD = "parallelBuildCmd"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_PARALLELIZATION_NUMBER = "parallelizationNumber"; //$NON-NLS-1$
|
static final String ATTRIBUTE_PARALLELIZATION_NUMBER = "parallelizationNumber"; //$NON-NLS-1$
|
||||||
|
/** @since 8.1 */
|
||||||
|
static final String VALUE_OPTIMAL = "optimal"; //$NON-NLS-1$
|
||||||
|
/** @since 8.1 */
|
||||||
|
static final String VALUE_UNLIMITED = "unlimited"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_PARALLEL_BUILD_ON = "parallelBuildOn"; //$NON-NLS-1$
|
static final String ATTRIBUTE_PARALLEL_BUILD_ON = "parallelBuildOn"; //$NON-NLS-1$
|
||||||
static final String PARALLEL_PATTERN_NUM = "*"; //$NON-NLS-1$
|
static final String PARALLEL_PATTERN_NUM = "*"; //$NON-NLS-1$
|
||||||
static final String PARALLEL_PATTERN_NUM_START = "["; //$NON-NLS-1$
|
static final String PARALLEL_PATTERN_NUM_START = "["; //$NON-NLS-1$
|
||||||
|
@ -92,15 +95,9 @@ public interface IBuilder extends IHoldsOptions, IMakeBuilderInfo {
|
||||||
static final String DEFAULT_TARGET_INCREMENTAL = "all"; //$NON-NLS-1$
|
static final String DEFAULT_TARGET_INCREMENTAL = "all"; //$NON-NLS-1$
|
||||||
static final String DEFAULT_TARGET_CLEAN = "clean"; //$NON-NLS-1$
|
static final String DEFAULT_TARGET_CLEAN = "clean"; //$NON-NLS-1$
|
||||||
static final String DEFAULT_TARGET_AUTO = "all"; //$NON-NLS-1$
|
static final String DEFAULT_TARGET_AUTO = "all"; //$NON-NLS-1$
|
||||||
|
/** @since 6.0 */
|
||||||
/**
|
|
||||||
* @since 6.0
|
|
||||||
*/
|
|
||||||
static final String ATTRIBUTE_COMMAND_LAUNCHER = "commandLauncher"; //$NON-NLS-1$
|
static final String ATTRIBUTE_COMMAND_LAUNCHER = "commandLauncher"; //$NON-NLS-1$
|
||||||
|
/** @since 8.0 */
|
||||||
/**
|
|
||||||
* @since 8.0
|
|
||||||
*/
|
|
||||||
static final String ATTRIBUTE_BUILD_RUNNER = "buildRunner"; //$NON-NLS-1$
|
static final String ATTRIBUTE_BUILD_RUNNER = "buildRunner"; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2010 Intel Corporation and others.
|
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,19 +13,62 @@ package org.eclipse.cdt.managedbuilder.core;
|
||||||
import org.eclipse.cdt.core.settings.model.ICMultiItemsHolder;
|
import org.eclipse.cdt.core.settings.model.ICMultiItemsHolder;
|
||||||
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty;
|
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty;
|
||||||
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
|
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
|
||||||
|
import org.eclipse.cdt.managedbuilder.internal.core.Builder;
|
||||||
|
import org.eclipse.cdt.newmake.core.IMakeCommonBuildInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* This class is to combine multiple configurations to one to support
|
||||||
|
* selection of multiple configurations on property pages.
|
||||||
|
*
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IMultiConfiguration extends IConfiguration, ICMultiItemsHolder {
|
public interface IMultiConfiguration extends IConfiguration, ICMultiItemsHolder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the configuration's builder is operating in parallel mode.
|
||||||
|
* @return {@code true} if parallel mode is enabled, {@code false} otherwise.
|
||||||
|
*/
|
||||||
boolean getParallelDef();
|
boolean getParallelDef();
|
||||||
void setParallelDef(boolean def);
|
/**
|
||||||
|
* Set parallel execution mode for the configuration's builder.
|
||||||
|
* @see Builder#setParallelBuildOn(boolean)
|
||||||
|
*
|
||||||
|
* @param parallel - the flag to enable or disable parallel mode.
|
||||||
|
*/
|
||||||
|
void setParallelDef(boolean parallel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns maximum number of parallel threads/jobs used by the configuration's builder.
|
||||||
|
* Note that this function can return negative value to indicate "optimal" number.
|
||||||
|
*
|
||||||
|
* @see #setParallelDef(boolean)
|
||||||
|
* @see Builder#getParallelizationNum()
|
||||||
|
*
|
||||||
|
* @return - maximum number of parallel threads or jobs used by the builder or negative number.
|
||||||
|
* For exact interpretation see table in {@link IMakeCommonBuildInfo#getParallelizationNum()}
|
||||||
|
*/
|
||||||
int getParallelNumber();
|
int getParallelNumber();
|
||||||
void setParallelNumber(int num);
|
/**
|
||||||
|
* Sets maximum number of parallel threads/jobs to be used by builder.
|
||||||
|
* Note that the number will be set only if the builder is in "parallel"
|
||||||
|
* mode.
|
||||||
|
*
|
||||||
|
* @param jobs - maximum number of jobs or threads. If the number is 0
|
||||||
|
* or negative, negative "optimal" number will be set, see
|
||||||
|
* {@link Builder#getOptimalParallelJobNum()}.
|
||||||
|
*/
|
||||||
|
void setParallelNumber(int jobs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the Internal Builder parallel mode
|
||||||
|
* if true, internal builder will work in parallel mode
|
||||||
|
* otherwise it will use only one thread
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @deprecated since CDT 9.0. Use {@link #getParallelDef()}
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
boolean getInternalBuilderParallel();
|
boolean getInternalBuilderParallel();
|
||||||
|
|
||||||
boolean isInternalBuilderEnabled();
|
boolean isInternalBuilderEnabled();
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class InternalBuildRunner extends AbstractBuildRunner {
|
||||||
public boolean invokeBuild(int kind, IProject project, IConfiguration configuration,
|
public boolean invokeBuild(int kind, IProject project, IConfiguration configuration,
|
||||||
IBuilder builder, IConsole console, IMarkerGenerator markerGenerator,
|
IBuilder builder, IConsole console, IMarkerGenerator markerGenerator,
|
||||||
IncrementalProjectBuilder projectBuilder, IProgressMonitor monitor) throws CoreException {
|
IncrementalProjectBuilder projectBuilder, IProgressMonitor monitor) throws CoreException {
|
||||||
boolean isParallel = builder.isParallelBuildOn() && builder.getParallelizationNum() > 1;
|
boolean isParallel = Math.abs(builder.getParallelizationNum()) > 1;
|
||||||
// boolean buildIncrementaly = true;
|
// boolean buildIncrementaly = true;
|
||||||
boolean resumeOnErr = !builder.isStopOnError();
|
boolean resumeOnErr = !builder.isStopOnError();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 Intel Corporation and others.
|
* Copyright (c) 2006, 2011 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -11,10 +11,6 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.managedbuilder.internal.buildmodel;
|
package org.eclipse.cdt.managedbuilder.internal.buildmodel;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -23,9 +19,6 @@ import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildCommand;
|
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildCommand;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
|
||||||
import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
|
|
||||||
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
|
||||||
|
@ -42,11 +35,6 @@ public class BuildProcessManager {
|
||||||
protected ProcessLauncher[] processes;
|
protected ProcessLauncher[] processes;
|
||||||
protected int maxProcesses;
|
protected int maxProcesses;
|
||||||
|
|
||||||
// Number of CPUs is not dependent of object instance.
|
|
||||||
// But user can change UI settings for processes number.
|
|
||||||
// So we cannot set procNumber directly to maxProcesses.
|
|
||||||
static int procNumber = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes process manager
|
* Initializes process manager
|
||||||
*
|
*
|
||||||
|
@ -152,40 +140,10 @@ public class BuildProcessManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Number of processors detected
|
* @return Number of processors detected
|
||||||
|
* @deprecated since CDT 9.0 - just use Runtime.getRuntime().availableProcessors()
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
static public int checkCPUNumber() {
|
static public int checkCPUNumber() {
|
||||||
if (procNumber > 0) return procNumber;
|
return Runtime.getRuntime().availableProcessors();
|
||||||
|
|
||||||
procNumber = 1;
|
|
||||||
int x = 0;
|
|
||||||
String os = System.getProperty("os.name"); //$NON-NLS-1$
|
|
||||||
if (os != null) {
|
|
||||||
if (os.startsWith("Win")) { //$NON-NLS-1$
|
|
||||||
IEnvironmentVariableProvider evp = ManagedBuildManager.getEnvironmentVariableProvider();
|
|
||||||
if (evp != null) {
|
|
||||||
IBuildEnvironmentVariable var = evp.getVariable("NUMBER_OF_PROCESSORS", null, false, false); //$NON-NLS-1$
|
|
||||||
if (var != null) {
|
|
||||||
try {
|
|
||||||
x = new Integer(var.getValue()).intValue();
|
|
||||||
if (x > 0) { procNumber = x; }
|
|
||||||
} catch (NumberFormatException e) {} // fallthrough and return default
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else { // linux
|
|
||||||
String p = "/proc/cpuinfo"; //$NON-NLS-1$
|
|
||||||
try {
|
|
||||||
BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(p)));
|
|
||||||
String s;
|
|
||||||
while ((s = r.readLine() ) != null )
|
|
||||||
{ if (s.startsWith("processor\t:")) x++; } //$NON-NLS-1$
|
|
||||||
r.close();
|
|
||||||
if (x > 0) { procNumber = x; }
|
|
||||||
}
|
|
||||||
catch (IOException e) {} // fallthrough and return default
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(DbgUtil.DEBUG)
|
|
||||||
DbgUtil.trace("Number of processors detected: " + procNumber); //$NON-NLS-1$
|
|
||||||
return procNumber;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006 Intel Corporation and others.
|
* Copyright (c) 2006, 2011 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -91,6 +91,7 @@ public class ParallelBuilder {
|
||||||
return step.hashCode();
|
return step.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int compareTo(BuildQueueElement elem) {
|
public int compareTo(BuildQueueElement elem) {
|
||||||
if (elem == null)
|
if (elem == null)
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
|
@ -205,10 +206,7 @@ public class ParallelBuilder {
|
||||||
if(cwd == null) cwd = des.getDefaultBuildDirLocation();
|
if(cwd == null) cwd = des.getDefaultBuildDirLocation();
|
||||||
int threads = 1;
|
int threads = 1;
|
||||||
if (cfg instanceof Configuration) {
|
if (cfg instanceof Configuration) {
|
||||||
if (((Configuration)cfg).getParallelDef())
|
threads = Math.abs(((Configuration)cfg).getParallelNumber());
|
||||||
threads = BuildProcessManager.checkCPUNumber();
|
|
||||||
else
|
|
||||||
threads = ((Configuration)cfg).getParallelNumber();
|
|
||||||
}
|
}
|
||||||
ParallelBuilder builder = new ParallelBuilder(cwd, dirs, out, err, monitor, resumeOnErrors, buildIncrementally);
|
ParallelBuilder builder = new ParallelBuilder(cwd, dirs, out, err, monitor, resumeOnErrors, buildIncrementally);
|
||||||
builder.enqueueAll(des);
|
builder.enqueueAll(des);
|
||||||
|
|
|
@ -40,10 +40,10 @@ import org.eclipse.cdt.core.settings.model.extension.CBuildData;
|
||||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||||
import org.eclipse.cdt.core.settings.model.util.LanguageSettingEntriesSerializer;
|
import org.eclipse.cdt.core.settings.model.util.LanguageSettingEntriesSerializer;
|
||||||
import org.eclipse.cdt.internal.core.SafeStringInterner;
|
import org.eclipse.cdt.internal.core.SafeStringInterner;
|
||||||
|
import org.eclipse.cdt.managedbuilder.core.AbstractBuildRunner;
|
||||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ExternalBuildRunner;
|
import org.eclipse.cdt.managedbuilder.core.ExternalBuildRunner;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
||||||
import org.eclipse.cdt.managedbuilder.core.AbstractBuildRunner;
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
|
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
|
||||||
|
@ -64,6 +64,7 @@ import org.eclipse.cdt.managedbuilder.macros.IReservedMacroNameSupplier;
|
||||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
|
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
|
||||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2;
|
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2;
|
||||||
import org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator;
|
import org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator;
|
||||||
|
import org.eclipse.cdt.newmake.core.IMakeCommonBuildInfo;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -79,7 +80,6 @@ import org.eclipse.core.variables.VariablesPlugin;
|
||||||
import org.osgi.framework.Version;
|
import org.osgi.framework.Version;
|
||||||
|
|
||||||
public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider<Builder>, IRealBuildObjectAssociation {
|
public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider<Builder>, IRealBuildObjectAssociation {
|
||||||
|
|
||||||
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
// Superclass
|
// Superclass
|
||||||
|
@ -119,10 +119,12 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
private HashMap<String, String> customBuildProperties;
|
private HashMap<String, String> customBuildProperties;
|
||||||
// private Boolean isWorkspaceBuildPath;
|
// private Boolean isWorkspaceBuildPath;
|
||||||
private String ignoreErrCmd;
|
private String ignoreErrCmd;
|
||||||
private String parallelBuildCmd;
|
|
||||||
private Boolean stopOnErr;
|
private Boolean stopOnErr;
|
||||||
private Integer parallelNum;
|
// parallelization
|
||||||
private Boolean parallelBuildOn;
|
private String parallelBuildCmd;
|
||||||
|
private Boolean isParallelBuildEnabled;
|
||||||
|
private Integer parallelJobsNumber; // negative number denotes "optimal" value, see getOptimalParallelJobNum()
|
||||||
|
|
||||||
private boolean isTest;
|
private boolean isTest;
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
|
@ -327,9 +329,10 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
|
|
||||||
stopOnErr = builder.stopOnErr;
|
stopOnErr = builder.stopOnErr;
|
||||||
ignoreErrCmd = builder.ignoreErrCmd;
|
ignoreErrCmd = builder.ignoreErrCmd;
|
||||||
|
|
||||||
|
isParallelBuildEnabled = builder.isParallelBuildEnabled;
|
||||||
|
parallelJobsNumber = builder.parallelJobsNumber;
|
||||||
parallelBuildCmd = builder.parallelBuildCmd;
|
parallelBuildCmd = builder.parallelBuildCmd;
|
||||||
parallelNum = builder.parallelNum;
|
|
||||||
parallelBuildOn = builder.parallelBuildOn;
|
|
||||||
|
|
||||||
if(builder.outputEntries != null){
|
if(builder.outputEntries != null){
|
||||||
outputEntries = builder.outputEntries.clone();
|
outputEntries = builder.outputEntries.clone();
|
||||||
|
@ -372,17 +375,15 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(getParallelizationNum() != builder.getParallelizationNum()
|
if (isParallelBuildOn() != builder.isParallelBuildOn() && supportsParallelBuild()) {
|
||||||
&& supportsParallelBuild()){
|
|
||||||
try {
|
try {
|
||||||
setParallelizationNum(builder.getParallelizationNum());
|
setParallelBuildOn(builder.isParallelBuildOn());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(isParallelBuildOn() != builder.isParallelBuildOn()
|
if (getParallelizationNum() != builder.getParallelizationNum() && supportsParallelBuild()) {
|
||||||
&& supportsParallelBuild()){
|
|
||||||
try {
|
try {
|
||||||
setParallelBuildOn(builder.isParallelBuildOn());
|
setParallelizationNum(builder.getParallelizationNum());
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -556,18 +557,18 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
if (tmp != null)
|
if (tmp != null)
|
||||||
stopOnErr = Boolean.valueOf(tmp);
|
stopOnErr = Boolean.valueOf(tmp);
|
||||||
|
|
||||||
parallelBuildCmd = SafeStringInterner.safeIntern(element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD));
|
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER);
|
|
||||||
if(tmp != null){
|
|
||||||
try {
|
|
||||||
parallelNum = Integer.decode(tmp);
|
|
||||||
} catch (NumberFormatException e){
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_ON);
|
|
||||||
if (tmp != null)
|
if (tmp != null)
|
||||||
parallelBuildOn = Boolean.valueOf(tmp);
|
parallelBuildCmd = SafeStringInterner.safeIntern(tmp);
|
||||||
|
|
||||||
|
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_ON);
|
||||||
|
if (tmp != null) {
|
||||||
|
isParallelBuildEnabled = Boolean.valueOf(tmp);
|
||||||
|
if (isParallelBuildEnabled) {
|
||||||
|
tmp = element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER);
|
||||||
|
decodeParallelizationNumber(element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the semicolon separated list of IDs of the error parsers
|
// Get the semicolon separated list of IDs of the error parsers
|
||||||
errorParserIds = SafeStringInterner.safeIntern(element.getAttribute(IToolChain.ERROR_PARSERS));
|
errorParserIds = SafeStringInterner.safeIntern(element.getAttribute(IToolChain.ERROR_PARSERS));
|
||||||
|
@ -618,6 +619,46 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
fBuildRunnerElement = ((DefaultManagedConfigElement)element).getConfigurationElement();
|
fBuildRunnerElement = ((DefaultManagedConfigElement)element).getConfigurationElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String encodeParallelizationNumber(Integer jobsNumber) {
|
||||||
|
if (jobsNumber <= 0)
|
||||||
|
return VALUE_OPTIMAL;
|
||||||
|
|
||||||
|
if (jobsNumber.equals(Integer.MAX_VALUE))
|
||||||
|
return VALUE_UNLIMITED;
|
||||||
|
|
||||||
|
return jobsNumber.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void decodeParallelizationNumber(String value) {
|
||||||
|
if (VALUE_OPTIMAL.equals(value)) {
|
||||||
|
parallelJobsNumber = -getOptimalParallelJobNum();
|
||||||
|
} else if (VALUE_UNLIMITED.equals(value)) {
|
||||||
|
if (!isInternalBuilder()) {
|
||||||
|
parallelJobsNumber = Integer.MAX_VALUE;
|
||||||
|
} else {
|
||||||
|
ManagedBuilderCorePlugin.error("'unlimited' number of jobs is not allowed for Internal Builder, switching to 'optimal'");
|
||||||
|
parallelJobsNumber = -getOptimalParallelJobNum();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
parallelJobsNumber = Integer.decode(value);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
ManagedBuilderCorePlugin.log(e);
|
||||||
|
parallelJobsNumber = getOptimalParallelJobNum();
|
||||||
|
}
|
||||||
|
if (parallelJobsNumber <= 0) {
|
||||||
|
// compatibility with legacy representation - it was that inconsistent
|
||||||
|
if (isInternalBuilder()) {
|
||||||
|
// "optimal" for Internal Builder
|
||||||
|
parallelJobsNumber = -getOptimalParallelJobNum();
|
||||||
|
} else {
|
||||||
|
// unlimited for External Builder
|
||||||
|
parallelJobsNumber = Integer.MAX_VALUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the builder information from the XML element
|
* Initialize the builder information from the XML element
|
||||||
* specified in the argument
|
* specified in the argument
|
||||||
|
@ -752,20 +793,18 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
if (tmp != null)
|
if (tmp != null)
|
||||||
stopOnErr = Boolean.valueOf(tmp);
|
stopOnErr = Boolean.valueOf(tmp);
|
||||||
|
|
||||||
if(element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD) != null)
|
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD);
|
||||||
parallelBuildCmd = SafeStringInterner.safeIntern(element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD));
|
if (tmp != null)
|
||||||
|
parallelBuildCmd = SafeStringInterner.safeIntern(tmp);
|
||||||
tmp = element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER);
|
|
||||||
if(tmp != null){
|
|
||||||
try {
|
|
||||||
parallelNum = Integer.decode(tmp);
|
|
||||||
} catch (NumberFormatException e){
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_ON);
|
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_ON);
|
||||||
if(tmp != null)
|
if (tmp != null) {
|
||||||
parallelBuildOn = Boolean.valueOf(tmp);
|
isParallelBuildEnabled = Boolean.valueOf(tmp);
|
||||||
|
if (isParallelBuildEnabled) {
|
||||||
|
tmp = element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER);
|
||||||
|
decodeParallelizationNumber(element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ICStorageElement[] children = element.getChildren();
|
ICStorageElement[] children = element.getChildren();
|
||||||
for(int i = 0; i < children.length; i++){
|
for(int i = 0; i < children.length; i++){
|
||||||
|
@ -873,12 +912,15 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
element.setAttribute(ATTRIBUTE_IGNORE_ERR_CMD, ignoreErrCmd);
|
element.setAttribute(ATTRIBUTE_IGNORE_ERR_CMD, ignoreErrCmd);
|
||||||
if (stopOnErr != null)
|
if (stopOnErr != null)
|
||||||
element.setAttribute(ATTRIBUTE_STOP_ON_ERR, stopOnErr.toString());
|
element.setAttribute(ATTRIBUTE_STOP_ON_ERR, stopOnErr.toString());
|
||||||
|
|
||||||
if (parallelBuildCmd != null)
|
if (parallelBuildCmd != null)
|
||||||
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD, parallelBuildCmd);
|
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD, parallelBuildCmd);
|
||||||
if(parallelNum != null)
|
|
||||||
element.setAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER, parallelNum.toString());
|
if (isParallelBuildEnabled != null)
|
||||||
if(parallelBuildOn != null)
|
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_ON, isParallelBuildEnabled.toString());
|
||||||
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_ON, parallelBuildOn.toString());
|
if (isParallelBuildOn() && parallelJobsNumber != null)
|
||||||
|
element.setAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER, encodeParallelizationNumber(parallelJobsNumber));
|
||||||
|
|
||||||
// Note: build file generator cannot be specified in a project file because
|
// Note: build file generator cannot be specified in a project file because
|
||||||
// an IConfigurationElement is needed to load it!
|
// an IConfigurationElement is needed to load it!
|
||||||
if (buildFileGeneratorElement != null) {
|
if (buildFileGeneratorElement != null) {
|
||||||
|
@ -968,10 +1010,15 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
if (getIgnoreErrCmdAttribute() != null)
|
if (getIgnoreErrCmdAttribute() != null)
|
||||||
element.setAttribute(ATTRIBUTE_IGNORE_ERR_CMD, getIgnoreErrCmdAttribute());
|
element.setAttribute(ATTRIBUTE_IGNORE_ERR_CMD, getIgnoreErrCmdAttribute());
|
||||||
element.setAttribute(ATTRIBUTE_STOP_ON_ERR, Boolean.valueOf(isStopOnError()).toString());
|
element.setAttribute(ATTRIBUTE_STOP_ON_ERR, Boolean.valueOf(isStopOnError()).toString());
|
||||||
if(getParrallelBuildCmd() != null)
|
|
||||||
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD, getParrallelBuildCmd());
|
if (parallelBuildCmd != null)
|
||||||
element.setAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER, new Integer(getParallelizationNumAttribute()).toString());
|
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD, parallelBuildCmd);
|
||||||
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_ON, Boolean.valueOf(isParallelBuildOn()).toString());
|
|
||||||
|
if (isParallelBuildEnabled != null)
|
||||||
|
element.setAttribute(ATTRIBUTE_PARALLEL_BUILD_ON, isParallelBuildEnabled.toString());
|
||||||
|
if (isParallelBuildOn() && parallelJobsNumber != null)
|
||||||
|
element.setAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER, encodeParallelizationNumber(parallelJobsNumber));
|
||||||
|
|
||||||
// Note: build file generator cannot be specified in a project file because
|
// Note: build file generator cannot be specified in a project file because
|
||||||
// an IConfigurationElement is needed to load it!
|
// an IConfigurationElement is needed to load it!
|
||||||
if (buildFileGeneratorElement != null) {
|
if (buildFileGeneratorElement != null) {
|
||||||
|
@ -995,6 +1042,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
* P A R E N T A N D C H I L D H A N D L I N G
|
* P A R E N T A N D C H I L D H A N D L I N G
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public IToolChain getParent() {
|
public IToolChain getParent() {
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
@ -1003,6 +1051,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
* M O D E L A T T R I B U T E A C C E S S O R S
|
* M O D E L A T T R I B U T E A C C E S S O R S
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBuilder getSuperClass() {
|
public IBuilder getSuperClass() {
|
||||||
return (IBuilder)superClass;
|
return (IBuilder)superClass;
|
||||||
}
|
}
|
||||||
|
@ -1012,6 +1061,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return (name == null && superClass != null) ? superClass.getName() : name;
|
return (name == null && superClass != null) ? superClass.getName() : name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isAbstract() {
|
public boolean isAbstract() {
|
||||||
if (isAbstract != null) {
|
if (isAbstract != null) {
|
||||||
return isAbstract.booleanValue();
|
return isAbstract.booleanValue();
|
||||||
|
@ -1020,6 +1070,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getUnusedChildren() {
|
public String getUnusedChildren() {
|
||||||
if (unusedChildren != null) {
|
if (unusedChildren != null) {
|
||||||
return unusedChildren;
|
return unusedChildren;
|
||||||
|
@ -1027,6 +1078,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return EMPTY_STRING; // Note: no inheritance from superClass
|
return EMPTY_STRING; // Note: no inheritance from superClass
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getCommand() {
|
public String getCommand() {
|
||||||
if (command == null) {
|
if (command == null) {
|
||||||
// If I have a superClass, ask it
|
// If I have a superClass, ask it
|
||||||
|
@ -1039,10 +1091,11 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getArguments() {
|
public String getArguments() {
|
||||||
String args = getArgumentsAttribute();
|
String args = getArgumentsAttribute();
|
||||||
String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
|
String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
|
||||||
String parallelBuildCmd = isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
String parallelCmd = isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
||||||
|
|
||||||
String reversedStopOnErrCmd = getStopOnErrCmd(!isStopOnError());
|
String reversedStopOnErrCmd = getStopOnErrCmd(!isStopOnError());
|
||||||
String reversedParallelBuildCmd = !isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
String reversedParallelBuildCmd = !isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
||||||
|
@ -1051,7 +1104,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
args = removeCmd(args, reversedParallelBuildCmd);
|
args = removeCmd(args, reversedParallelBuildCmd);
|
||||||
|
|
||||||
args = addCmd(args, stopOnErrCmd);
|
args = addCmd(args, stopOnErrCmd);
|
||||||
args = addCmd(args, parallelBuildCmd);
|
args = addCmd(args, parallelCmd);
|
||||||
|
|
||||||
return args != null ? args.trim() : null;
|
return args != null ? args.trim() : null;
|
||||||
}
|
}
|
||||||
|
@ -1121,10 +1174,19 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}if(num == 0){
|
}if(num == 0){
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
}
|
}
|
||||||
|
// "unlimited" number of jobs results in not adding the number to parallelization cmd
|
||||||
return processParallelPattern(pattern, num < 0, num);
|
// that behavior corresponds that of "make" flag "-j".
|
||||||
|
return processParallelPattern(pattern, num == Integer.MAX_VALUE, Math.abs(num));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method turns the supplied pattern to parallelization command
|
||||||
|
*
|
||||||
|
* It supports 2 kinds of pattern where "*" is replaced with number of jobs:
|
||||||
|
* <li>Pattern 1 (supports "<b>-j*</b>"): "text*text" -> "text#text"</li>
|
||||||
|
* <li>Pattern 2 (supports "<b>-[j*]</b>"): "text[text*text]text" -> "texttext#texttext</li>
|
||||||
|
* <br>Where # is num or empty if {@code empty} is {@code true})
|
||||||
|
*/
|
||||||
private String processParallelPattern(String pattern, boolean empty, int num){
|
private String processParallelPattern(String pattern, boolean empty, int num){
|
||||||
int start = pattern.indexOf(PARALLEL_PATTERN_NUM_START);
|
int start = pattern.indexOf(PARALLEL_PATTERN_NUM_START);
|
||||||
int end = -1;
|
int end = -1;
|
||||||
|
@ -1190,6 +1252,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getErrorParserIds() {
|
public String getErrorParserIds() {
|
||||||
String ids = errorParserIds;
|
String ids = errorParserIds;
|
||||||
if (ids == null) {
|
if (ids == null) {
|
||||||
|
@ -1201,6 +1264,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getErrorParserList() {
|
public String[] getErrorParserList() {
|
||||||
String parserIDs = getErrorParserIds();
|
String parserIDs = getErrorParserIds();
|
||||||
String[] errorParsers = null;
|
String[] errorParsers = null;
|
||||||
|
@ -1223,6 +1287,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return errorParsers;
|
return errorParsers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setCommand(String cmd) {
|
public void setCommand(String cmd) {
|
||||||
if(getCommand().equals(cmd)) return;
|
if(getCommand().equals(cmd)) return;
|
||||||
if (cmd == null && command == null) return;
|
if (cmd == null && command == null) return;
|
||||||
|
@ -1232,16 +1297,17 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setArguments(String newArgs) {
|
public void setArguments(String newArgs) {
|
||||||
if(getArguments().equals(newArgs))
|
if(getArguments().equals(newArgs))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(newArgs != null){
|
if(newArgs != null){
|
||||||
String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
|
String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
|
||||||
String parallelBuildCmd = isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
String parallelCmd = isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
||||||
|
|
||||||
newArgs = removeCmd(newArgs, stopOnErrCmd);
|
newArgs = removeCmd(newArgs, stopOnErrCmd);
|
||||||
newArgs = removeCmd(newArgs, parallelBuildCmd);
|
newArgs = removeCmd(newArgs, parallelCmd);
|
||||||
}
|
}
|
||||||
setArgumentsAttribute(newArgs);
|
setArgumentsAttribute(newArgs);
|
||||||
}
|
}
|
||||||
|
@ -1254,6 +1320,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setErrorParserIds(String ids) {
|
public void setErrorParserIds(String ids) {
|
||||||
String currentIds = getErrorParserIds();
|
String currentIds = getErrorParserIds();
|
||||||
if (ids == null && currentIds == null) return;
|
if (ids == null && currentIds == null) return;
|
||||||
|
@ -1263,11 +1330,13 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setIsAbstract(boolean b) {
|
public void setIsAbstract(boolean b) {
|
||||||
isAbstract = new Boolean(b);
|
isAbstract = new Boolean(b);
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IConfigurationElement getBuildFileGeneratorElement() {
|
public IConfigurationElement getBuildFileGeneratorElement() {
|
||||||
if (buildFileGeneratorElement == null) {
|
if (buildFileGeneratorElement == null) {
|
||||||
if (superClass != null) {
|
if (superClass != null) {
|
||||||
|
@ -1277,6 +1346,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return buildFileGeneratorElement;
|
return buildFileGeneratorElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IManagedBuilderMakefileGenerator getBuildFileGenerator(){
|
public IManagedBuilderMakefileGenerator getBuildFileGenerator(){
|
||||||
IConfigurationElement element = getBuildFileGeneratorElement();
|
IConfigurationElement element = getBuildFileGeneratorElement();
|
||||||
if (element != null) {
|
if (element != null) {
|
||||||
|
@ -1299,6 +1369,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildFileGeneratorElement(IConfigurationElement element) {
|
public void setBuildFileGeneratorElement(IConfigurationElement element) {
|
||||||
buildFileGeneratorElement = element;
|
buildFileGeneratorElement = element;
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
|
@ -1344,6 +1415,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getConvertToId() {
|
public String getConvertToId() {
|
||||||
if (convertToId == null) {
|
if (convertToId == null) {
|
||||||
// If I have a superClass, ask it
|
// If I have a superClass, ask it
|
||||||
|
@ -1356,6 +1428,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return convertToId;
|
return convertToId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setConvertToId(String convertToId) {
|
public void setConvertToId(String convertToId) {
|
||||||
if (convertToId == null && this.convertToId == null) return;
|
if (convertToId == null && this.convertToId == null) return;
|
||||||
if (convertToId == null || this.convertToId == null || !convertToId.equals(this.convertToId)) {
|
if (convertToId == null || this.convertToId == null || !convertToId.equals(this.convertToId)) {
|
||||||
|
@ -1365,6 +1438,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getVersionsSupported() {
|
public String getVersionsSupported() {
|
||||||
if (versionsSupported == null) {
|
if (versionsSupported == null) {
|
||||||
// If I have a superClass, ask it
|
// If I have a superClass, ask it
|
||||||
|
@ -1377,6 +1451,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return versionsSupported;
|
return versionsSupported;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setVersionsSupported(String versionsSupported) {
|
public void setVersionsSupported(String versionsSupported) {
|
||||||
if (versionsSupported == null && this.versionsSupported == null) return;
|
if (versionsSupported == null && this.versionsSupported == null) return;
|
||||||
if (versionsSupported == null || this.versionsSupported == null || !versionsSupported.equals(this.versionsSupported)) {
|
if (versionsSupported == null || this.versionsSupported == null || !versionsSupported.equals(this.versionsSupported)) {
|
||||||
|
@ -1386,18 +1461,21 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFileContextBuildMacroValues getFileContextBuildMacroValues(){
|
public IFileContextBuildMacroValues getFileContextBuildMacroValues(){
|
||||||
if(fileContextBuildMacroValues == null && superClass != null)
|
if(fileContextBuildMacroValues == null && superClass != null)
|
||||||
return getSuperClass().getFileContextBuildMacroValues();
|
return getSuperClass().getFileContextBuildMacroValues();
|
||||||
return fileContextBuildMacroValues;
|
return fileContextBuildMacroValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getBuilderVariablePattern(){
|
public String getBuilderVariablePattern(){
|
||||||
if(builderVariablePattern == null && superClass != null)
|
if(builderVariablePattern == null && superClass != null)
|
||||||
return getSuperClass().getBuilderVariablePattern();
|
return getSuperClass().getBuilderVariablePattern();
|
||||||
return builderVariablePattern;
|
return builderVariablePattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isVariableCaseSensitive(){
|
public boolean isVariableCaseSensitive(){
|
||||||
if(isVariableCaseSensitive == null){
|
if(isVariableCaseSensitive == null){
|
||||||
if(superClass != null)
|
if(superClass != null)
|
||||||
|
@ -1407,12 +1485,14 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return isVariableCaseSensitive.booleanValue();
|
return isVariableCaseSensitive.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getReservedMacroNames(){
|
public String[] getReservedMacroNames(){
|
||||||
if(reservedMacroNames == null && superClass != null)
|
if(reservedMacroNames == null && superClass != null)
|
||||||
return getSuperClass().getReservedMacroNames();
|
return getSuperClass().getReservedMacroNames();
|
||||||
return reservedMacroNames;
|
return reservedMacroNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IReservedMacroNameSupplier getReservedMacroNameSupplier(){
|
public IReservedMacroNameSupplier getReservedMacroNameSupplier(){
|
||||||
if(reservedMacroNameSupplier == null && reservedMacroNameSupplierElement != null){
|
if(reservedMacroNameSupplier == null && reservedMacroNameSupplierElement != null){
|
||||||
try{
|
try{
|
||||||
|
@ -1617,6 +1697,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return currentMbsVersionConversionElement;
|
return currentMbsVersionConversionElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public CBuildData getBuildData() {
|
public CBuildData getBuildData() {
|
||||||
return fBuildData;
|
return fBuildData;
|
||||||
}
|
}
|
||||||
|
@ -1627,6 +1708,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getErrorParsers() {
|
public String[] getErrorParsers() {
|
||||||
if(isCustomBuilder() && customizedErrorParserIds != null)
|
if(isCustomBuilder() && customizedErrorParserIds != null)
|
||||||
return customizedErrorParserIds.clone();
|
return customizedErrorParserIds.clone();
|
||||||
|
@ -1646,6 +1728,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
customizedErrorParserIds = ids != null ? (String[])ids.clone() : ids;
|
customizedErrorParserIds = ids != null ? (String[])ids.clone() : ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setErrorParsers(String[] parsers) throws CoreException {
|
public void setErrorParsers(String[] parsers) throws CoreException {
|
||||||
if(isCustomBuilder()){
|
if(isCustomBuilder()){
|
||||||
customizedErrorParserIds = (parsers != null && parsers.length != 0) ? (String[])parsers.clone() : parsers;
|
customizedErrorParserIds = (parsers != null && parsers.length != 0) ? (String[])parsers.clone() : parsers;
|
||||||
|
@ -1660,6 +1743,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return this;//!isExtensionBuilder ? (Object)this : (Object)getParent().getParent();
|
return this;//!isExtensionBuilder ? (Object)this : (Object)getParent().getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getBuildArguments() {
|
public String getBuildArguments() {
|
||||||
String args = getArguments();
|
String args = getArguments();
|
||||||
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
|
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
|
||||||
|
@ -1672,6 +1756,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getBuildCommand() {
|
public IPath getBuildCommand() {
|
||||||
String command = getCommand();
|
String command = getCommand();
|
||||||
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
|
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
|
||||||
|
@ -1697,6 +1782,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return buildPath;
|
return buildPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildPath(String path){
|
public void setBuildPath(String path){
|
||||||
setBuildPathAttribute(path);
|
setBuildPathAttribute(path);
|
||||||
}
|
}
|
||||||
|
@ -1706,6 +1792,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getBuildPath(){
|
public String getBuildPath(){
|
||||||
if(isManagedBuildOn())
|
if(isManagedBuildOn())
|
||||||
return getDefaultBuildPath();
|
return getDefaultBuildPath();
|
||||||
|
@ -1791,6 +1878,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return isWorkspaceBuildPath.booleanValue();
|
return isWorkspaceBuildPath.booleanValue();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getBuildLocation() {
|
public IPath getBuildLocation() {
|
||||||
String path = getBuildPath();
|
String path = getBuildPath();
|
||||||
|
|
||||||
|
@ -1804,10 +1892,12 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return new Path(path);
|
return new Path(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isDefaultBuildCmd() {
|
public boolean isDefaultBuildCmd() {
|
||||||
return isExtensionBuilder || (command == null && args == null /*&& stopOnErr == null && parallelBuildOn == null && parallelNum == null */ && superClass != null);
|
return isExtensionBuilder || (command == null && args == null /*&& stopOnErr == null && parallelBuildOn == null && parallelNum == null */ && superClass != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStopOnError() {
|
public boolean isStopOnError() {
|
||||||
if(stopOnErr == null){
|
if(stopOnErr == null){
|
||||||
if(superClass != null){
|
if(superClass != null){
|
||||||
|
@ -1818,20 +1908,24 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return stopOnErr.booleanValue();
|
return stopOnErr.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildArguments(String args) throws CoreException {
|
public void setBuildArguments(String args) throws CoreException {
|
||||||
setArguments(args);
|
setArguments(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildCommand(IPath command) throws CoreException {
|
public void setBuildCommand(IPath command) throws CoreException {
|
||||||
String cmd = command != null ? command.toString() : null;
|
String cmd = command != null ? command.toString() : null;
|
||||||
setCommand(cmd);
|
setCommand(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildLocation(IPath location) throws CoreException {
|
public void setBuildLocation(IPath location) throws CoreException {
|
||||||
String path = location != null ? location.toString() : null;
|
String path = location != null ? location.toString() : null;
|
||||||
setBuildPath(path);
|
setBuildPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setStopOnError(boolean on) throws CoreException {
|
public void setStopOnError(boolean on) throws CoreException {
|
||||||
if(isStopOnError() == on)
|
if(isStopOnError() == on)
|
||||||
return;
|
return;
|
||||||
|
@ -1847,6 +1941,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setUseDefaultBuildCmd(boolean on) throws CoreException {
|
public void setUseDefaultBuildCmd(boolean on) throws CoreException {
|
||||||
if(!isExtensionBuilder && superClass != null){
|
if(!isExtensionBuilder && superClass != null){
|
||||||
if(on){
|
if(on){
|
||||||
|
@ -1870,6 +1965,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return autoBuildTarget;
|
return autoBuildTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getAutoBuildTarget() {
|
public String getAutoBuildTarget() {
|
||||||
String attr = getAutoBuildTargetAttribute();
|
String attr = getAutoBuildTargetAttribute();
|
||||||
|
|
||||||
|
@ -1898,6 +1994,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return cleanBuildTarget;
|
return cleanBuildTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getCleanBuildTarget() {
|
public String getCleanBuildTarget() {
|
||||||
String attr = getCleanBuildTargetAttribute();
|
String attr = getCleanBuildTargetAttribute();
|
||||||
|
|
||||||
|
@ -1917,6 +2014,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFullBuildTarget() {
|
public String getFullBuildTarget() {
|
||||||
return getIncrementalBuildTarget();
|
return getIncrementalBuildTarget();
|
||||||
}
|
}
|
||||||
|
@ -1930,6 +2028,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return incrementalBuildTarget;
|
return incrementalBuildTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getIncrementalBuildTarget() {
|
public String getIncrementalBuildTarget() {
|
||||||
String attr = getIncrementalBuildTargetAttribute();
|
String attr = getIncrementalBuildTargetAttribute();
|
||||||
|
|
||||||
|
@ -1948,6 +2047,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isAutoBuildEnable() {
|
public boolean isAutoBuildEnable() {
|
||||||
if(autoBuildEnabled == null){
|
if(autoBuildEnabled == null){
|
||||||
if(superClass != null)
|
if(superClass != null)
|
||||||
|
@ -1957,6 +2057,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return autoBuildEnabled.booleanValue();
|
return autoBuildEnabled.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCleanBuildEnabled() {
|
public boolean isCleanBuildEnabled() {
|
||||||
if(cleanBuildEnabled == null){
|
if(cleanBuildEnabled == null){
|
||||||
if(superClass != null)
|
if(superClass != null)
|
||||||
|
@ -1966,10 +2067,12 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return cleanBuildEnabled.booleanValue();
|
return cleanBuildEnabled.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isFullBuildEnabled() {
|
public boolean isFullBuildEnabled() {
|
||||||
return isIncrementalBuildEnabled();
|
return isIncrementalBuildEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isIncrementalBuildEnabled() {
|
public boolean isIncrementalBuildEnabled() {
|
||||||
if(incrementalBuildEnabled == null){
|
if(incrementalBuildEnabled == null){
|
||||||
if(superClass != null)
|
if(superClass != null)
|
||||||
|
@ -1979,38 +2082,47 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return incrementalBuildEnabled.booleanValue();
|
return incrementalBuildEnabled.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setAutoBuildEnable(boolean enabled) throws CoreException {
|
public void setAutoBuildEnable(boolean enabled) throws CoreException {
|
||||||
autoBuildEnabled = Boolean.valueOf(enabled);
|
autoBuildEnabled = Boolean.valueOf(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setAutoBuildTarget(String target) throws CoreException {
|
public void setAutoBuildTarget(String target) throws CoreException {
|
||||||
autoBuildTarget = target;
|
autoBuildTarget = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setCleanBuildEnable(boolean enabled) throws CoreException {
|
public void setCleanBuildEnable(boolean enabled) throws CoreException {
|
||||||
cleanBuildEnabled = Boolean.valueOf(enabled);
|
cleanBuildEnabled = Boolean.valueOf(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setCleanBuildTarget(String target) throws CoreException {
|
public void setCleanBuildTarget(String target) throws CoreException {
|
||||||
cleanBuildTarget = target;
|
cleanBuildTarget = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setFullBuildEnable(boolean enabled) throws CoreException {
|
public void setFullBuildEnable(boolean enabled) throws CoreException {
|
||||||
setIncrementalBuildEnable(enabled);
|
setIncrementalBuildEnable(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setFullBuildTarget(String target) throws CoreException {
|
public void setFullBuildTarget(String target) throws CoreException {
|
||||||
setIncrementalBuildTarget(target);
|
setIncrementalBuildTarget(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setIncrementalBuildEnable(boolean enabled) throws CoreException {
|
public void setIncrementalBuildEnable(boolean enabled) throws CoreException {
|
||||||
incrementalBuildEnabled = Boolean.valueOf(enabled);
|
incrementalBuildEnabled = Boolean.valueOf(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setIncrementalBuildTarget(String target) throws CoreException {
|
public void setIncrementalBuildTarget(String target) throws CoreException {
|
||||||
incrementalBuildTarget = target;
|
incrementalBuildTarget = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean appendEnvironment() {
|
public boolean appendEnvironment() {
|
||||||
if(appendEnvironment == null){
|
if(appendEnvironment == null){
|
||||||
if(superClass != null){
|
if(superClass != null){
|
||||||
|
@ -2021,6 +2133,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return appendEnvironment.booleanValue();
|
return appendEnvironment.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getBuildAttribute(String name, String defaultValue) {
|
public String getBuildAttribute(String name, String defaultValue) {
|
||||||
String result = null;
|
String result = null;
|
||||||
if(BUILD_TARGET_INCREMENTAL.equals(name)){
|
if(BUILD_TARGET_INCREMENTAL.equals(name)){
|
||||||
|
@ -2156,12 +2269,14 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<String, String> getEnvironment() {
|
public Map<String, String> getEnvironment() {
|
||||||
if(customizedEnvironment != null)
|
if(customizedEnvironment != null)
|
||||||
return cloneMap(customizedEnvironment);
|
return cloneMap(customizedEnvironment);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<String, String> getExpandedEnvironment() throws CoreException {
|
public Map<String, String> getExpandedEnvironment() throws CoreException {
|
||||||
if(customizedEnvironment != null){
|
if(customizedEnvironment != null){
|
||||||
Map<String, String> expanded = cloneMap(customizedEnvironment);
|
Map<String, String> expanded = cloneMap(customizedEnvironment);
|
||||||
|
@ -2183,10 +2298,12 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setAppendEnvironment(boolean append) throws CoreException {
|
public void setAppendEnvironment(boolean append) throws CoreException {
|
||||||
appendEnvironment = Boolean.valueOf(append);
|
appendEnvironment = Boolean.valueOf(append);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildAttribute(String name, String value)
|
public void setBuildAttribute(String name, String value)
|
||||||
throws CoreException {
|
throws CoreException {
|
||||||
if(BUILD_TARGET_INCREMENTAL.equals(name)){
|
if(BUILD_TARGET_INCREMENTAL.equals(name)){
|
||||||
|
@ -2255,10 +2372,12 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return customBuildProperties;
|
return customBuildProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setEnvironment(Map<String, String> env) throws CoreException {
|
public void setEnvironment(Map<String, String> env) throws CoreException {
|
||||||
customizedEnvironment = new HashMap<String, String>(env);
|
customizedEnvironment = new HashMap<String, String>(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCustomBuilder() {
|
public boolean isCustomBuilder() {
|
||||||
if(!isExtensionBuilder && getParent().getBuilder() != this)
|
if(!isExtensionBuilder && getParent().getBuilder() != this)
|
||||||
return true;
|
return true;
|
||||||
|
@ -2271,6 +2390,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isManagedBuildOn() {
|
public boolean isManagedBuildOn() {
|
||||||
IConfiguration cfg = getConfguration();
|
IConfiguration cfg = getConfguration();
|
||||||
if(cfg != null){
|
if(cfg != null){
|
||||||
|
@ -2295,14 +2415,17 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return managedBuildOn;
|
return managedBuildOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setManagedBuildOn(boolean on) throws CoreException {
|
public void setManagedBuildOn(boolean on) throws CoreException {
|
||||||
managedBuildOn = Boolean.valueOf(on);
|
managedBuildOn = Boolean.valueOf(on);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canKeepEnvironmentVariablesInBuildfile() {
|
public boolean canKeepEnvironmentVariablesInBuildfile() {
|
||||||
return BuildMacroProvider.canKeepMacrosInBuildfile(this);
|
return BuildMacroProvider.canKeepMacrosInBuildfile(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean keepEnvironmentVariablesInBuildfile() {
|
public boolean keepEnvironmentVariablesInBuildfile() {
|
||||||
if(keepEnvVarInBuildfile == null){
|
if(keepEnvVarInBuildfile == null){
|
||||||
if(superClass != null)
|
if(superClass != null)
|
||||||
|
@ -2312,10 +2435,12 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return keepEnvVarInBuildfile.booleanValue();
|
return keepEnvVarInBuildfile.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setKeepEnvironmentVariablesInBuildfile(boolean keep) {
|
public void setKeepEnvironmentVariablesInBuildfile(boolean keep) {
|
||||||
keepEnvVarInBuildfile = Boolean.valueOf(keep);
|
keepEnvVarInBuildfile = Boolean.valueOf(keep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean supportsCustomizedBuild() {
|
public boolean supportsCustomizedBuild() {
|
||||||
if(fSupportsCustomizedBuild == null){
|
if(fSupportsCustomizedBuild == null){
|
||||||
IManagedBuilderMakefileGenerator makeGen = getBuildFileGenerator();
|
IManagedBuilderMakefileGenerator makeGen = getBuildFileGenerator();
|
||||||
|
@ -2327,6 +2452,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return fSupportsCustomizedBuild.booleanValue();
|
return fSupportsCustomizedBuild.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean supportsBuild(boolean managed) {
|
public boolean supportsBuild(boolean managed) {
|
||||||
if(supportsManagedBuild == null){
|
if(supportsManagedBuild == null){
|
||||||
if(superClass != null)
|
if(superClass != null)
|
||||||
|
@ -2340,6 +2466,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
parent = toolChain;
|
parent = toolChain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean matches(IBuilder builder){
|
public boolean matches(IBuilder builder){
|
||||||
if(builder == this)
|
if(builder == this)
|
||||||
return true;
|
return true;
|
||||||
|
@ -2351,6 +2478,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return rBld == ManagedBuildManager.getRealBuilder(builder);
|
return rBld == ManagedBuildManager.getRealBuilder(builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public MatchKey<Builder> getMatchKey() {
|
public MatchKey<Builder> getMatchKey() {
|
||||||
if(isAbstract())
|
if(isAbstract())
|
||||||
return null;
|
return null;
|
||||||
|
@ -2359,6 +2487,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return new MatchKey<Builder>(this);
|
return new MatchKey<Builder>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setIdenticalList(List<Builder> list) {
|
public void setIdenticalList(List<Builder> list) {
|
||||||
identicalList = list;
|
identicalList = list;
|
||||||
}
|
}
|
||||||
|
@ -2372,10 +2501,12 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public List<Builder> getIdenticalList() {
|
public List<Builder> getIdenticalList() {
|
||||||
return identicalList;
|
return identicalList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isInternalBuilder() {
|
public boolean isInternalBuilder() {
|
||||||
IBuilder internalBuilder = ManagedBuildManager.getInternalBuilder();
|
IBuilder internalBuilder = ManagedBuildManager.getInternalBuilder();
|
||||||
for(IBuilder builder = this; builder != null; builder = builder.getSuperClass()){
|
for(IBuilder builder = this; builder != null; builder = builder.getSuperClass()){
|
||||||
|
@ -2385,42 +2516,86 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the optimal number of parallel jobs.
|
||||||
|
* The number is the number of available processors on the machine.
|
||||||
|
*
|
||||||
|
* The function never returns number smaller than 1.
|
||||||
|
*/
|
||||||
|
public int getOptimalParallelJobNum() {
|
||||||
|
return Runtime.getRuntime().availableProcessors();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*
|
||||||
|
* Returns the number of parallel jobs to be used for a build.
|
||||||
|
* Note that "optimal" value is represented by negative number.
|
||||||
|
* See the table at {@link IMakeCommonBuildInfo#getParallelizationNum()}.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public int getParallelizationNum() {
|
public int getParallelizationNum() {
|
||||||
if(supportsParallelBuild())
|
if (!isParallelBuildOn())
|
||||||
return getParallelizationNumAttribute();
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if(parallelJobsNumber == null){
|
||||||
|
if(superClass != null){
|
||||||
|
return ((Builder)superClass).getParallelizationNum();
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return parallelJobsNumber.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getParallelizationNumAttribute(){
|
public int getParallelizationNumAttribute(){
|
||||||
if(parallelNum == null){
|
if(parallelJobsNumber == null){
|
||||||
if(superClass != null){
|
if(superClass != null){
|
||||||
return ((Builder)superClass).getParallelizationNumAttribute();
|
return ((Builder)superClass).getParallelizationNumAttribute();
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return parallelNum.intValue();
|
return parallelJobsNumber.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParallelizationNum(int num) throws CoreException {
|
/**
|
||||||
// if(num == 0 || supportsParallelBuild()){
|
* {@inheritDoc}
|
||||||
Integer newParallelNum = new Integer(num);
|
*
|
||||||
|
* @param jobs - maximum number of jobs or threads. If the number is 0
|
||||||
|
* or negative, negative "optimal" number will be set, see
|
||||||
|
* {@link #getOptimalParallelJobNum()}.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setParallelizationNum(int jobs) throws CoreException {
|
||||||
|
if (isParallelBuildOn() && (parallelJobsNumber == null || parallelJobsNumber != jobs)) {
|
||||||
String curCmd = getParallelizationCmd(getParallelizationNum());
|
String curCmd = getParallelizationCmd(getParallelizationNum());
|
||||||
String args = getArgumentsAttribute();
|
String args = getArgumentsAttribute();
|
||||||
String updatedArgs = removeCmd(args, curCmd);
|
String updatedArgs = removeCmd(args, curCmd);
|
||||||
if (!updatedArgs.equals(args)) {
|
if (!updatedArgs.equals(args)) {
|
||||||
setArgumentsAttribute(updatedArgs);
|
setArgumentsAttribute(updatedArgs);
|
||||||
}
|
}
|
||||||
parallelNum = newParallelNum;
|
|
||||||
|
if (jobs == Integer.MAX_VALUE && isInternalBuilder()) {
|
||||||
|
// Internal Builder does not support "unlimited" jobs, switching to "optimal"
|
||||||
|
jobs = -1;
|
||||||
|
}
|
||||||
|
if (jobs > 0) {
|
||||||
|
parallelJobsNumber = jobs;
|
||||||
|
} else {
|
||||||
|
// "optimal"
|
||||||
|
parallelJobsNumber = -getOptimalParallelJobNum();
|
||||||
|
}
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean supportsParallelBuild() {
|
public boolean supportsParallelBuild() {
|
||||||
if(isInternalBuilder())
|
if(isInternalBuilder())
|
||||||
return true;
|
return true;
|
||||||
return getParrallelBuildCmd().length() != 0;
|
return getParrallelBuildCmd().length() != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean supportsStopOnError(boolean on) {
|
public boolean supportsStopOnError(boolean on) {
|
||||||
if(isInternalBuilder())
|
if(isInternalBuilder())
|
||||||
return true;
|
return true;
|
||||||
|
@ -2456,16 +2631,26 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return parallelBuildCmd;
|
return parallelBuildCmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isParallelBuildOn() {
|
public boolean isParallelBuildOn() {
|
||||||
if(parallelBuildOn == null){
|
if (isParallelBuildEnabled == null) {
|
||||||
if (superClass != null) {
|
if (superClass != null) {
|
||||||
return getSuperClass().isParallelBuildOn();
|
return getSuperClass().isParallelBuildOn();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return parallelBuildOn.booleanValue();
|
return isParallelBuildEnabled.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*
|
||||||
|
* @param on - the flag to enable or disable parallel mode.
|
||||||
|
* <br>{@code true} to enable, in this case the maximum number of jobs
|
||||||
|
* will be set to negative "optimal" number, see {@link #getOptimalParallelJobNum()}.
|
||||||
|
* <br>{@code false} to disable, the number of jobs will be set to 1.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void setParallelBuildOn(boolean on) throws CoreException {
|
public void setParallelBuildOn(boolean on) throws CoreException {
|
||||||
if (isParallelBuildOn() == on)
|
if (isParallelBuildOn() == on)
|
||||||
return;
|
return;
|
||||||
|
@ -2478,7 +2663,15 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
if (!updatedArgs.equals(args)) {
|
if (!updatedArgs.equals(args)) {
|
||||||
setArgumentsAttribute(updatedArgs);
|
setArgumentsAttribute(updatedArgs);
|
||||||
}
|
}
|
||||||
parallelBuildOn = Boolean.valueOf(on);
|
|
||||||
|
isParallelBuildEnabled = on;
|
||||||
|
|
||||||
|
if (isParallelBuildEnabled) {
|
||||||
|
// "optimal"
|
||||||
|
parallelJobsNumber = -getOptimalParallelJobNum();
|
||||||
|
} else {
|
||||||
|
parallelJobsNumber = 1;
|
||||||
|
}
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2521,6 +2714,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSystemObject() {
|
public boolean isSystemObject() {
|
||||||
if(isTest)
|
if(isTest)
|
||||||
return true;
|
return true;
|
||||||
|
@ -2533,6 +2727,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getUniqueRealName() {
|
public String getUniqueRealName() {
|
||||||
String name = getName();
|
String name = getName();
|
||||||
if(name == null){
|
if(name == null){
|
||||||
|
@ -2604,6 +2799,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int compareTo(Builder other) {
|
public int compareTo(Builder other) {
|
||||||
if(other.isSystemObject() != isSystemObject())
|
if(other.isSystemObject() != isSystemObject())
|
||||||
return isSystemObject() ? 1 : -1;
|
return isSystemObject() ? 1 : -1;
|
||||||
|
@ -2611,30 +2807,37 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return getSuperClassNum() - other.getSuperClassNum();
|
return getSuperClassNum() - other.getSuperClassNum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation getExtensionObject() {
|
public IRealBuildObjectAssociation getExtensionObject() {
|
||||||
return (Builder)ManagedBuildManager.getExtensionBuilder(this);
|
return (Builder)ManagedBuildManager.getExtensionBuilder(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation[] getIdenticBuildObjects() {
|
public IRealBuildObjectAssociation[] getIdenticBuildObjects() {
|
||||||
return (IRealBuildObjectAssociation[])ManagedBuildManager.findIdenticalBuilders(this);
|
return (IRealBuildObjectAssociation[])ManagedBuildManager.findIdenticalBuilders(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation getRealBuildObject() {
|
public IRealBuildObjectAssociation getRealBuildObject() {
|
||||||
return (Builder)ManagedBuildManager.getRealBuilder(this);
|
return (Builder)ManagedBuildManager.getRealBuilder(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation getSuperClassObject() {
|
public IRealBuildObjectAssociation getSuperClassObject() {
|
||||||
return (Builder)getSuperClass();
|
return (Builder)getSuperClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getType() {
|
public final int getType() {
|
||||||
return OBJECT_BUILDER;
|
return OBJECT_BUILDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isRealBuildObject() {
|
public boolean isRealBuildObject() {
|
||||||
return ManagedBuildManager.getRealBuilder(this) == this;
|
return ManagedBuildManager.getRealBuilder(this) == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isExtensionBuildObject() {
|
public boolean isExtensionBuildObject() {
|
||||||
return isExtensionElement();
|
return isExtensionElement();
|
||||||
}
|
}
|
||||||
|
@ -2643,6 +2846,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return getUniqueRealName();
|
return getUniqueRealName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICommandLauncher getCommandLauncher() {
|
public ICommandLauncher getCommandLauncher() {
|
||||||
if(fCommandLauncher != null)
|
if(fCommandLauncher != null)
|
||||||
return fCommandLauncher;
|
return fCommandLauncher;
|
||||||
|
@ -2664,6 +2868,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
return fCommandLauncher;
|
return fCommandLauncher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public AbstractBuildRunner getBuildRunner() throws CoreException {
|
public AbstractBuildRunner getBuildRunner() throws CoreException {
|
||||||
// Already defined
|
// Already defined
|
||||||
if (fBuildRunner != null)
|
if (fBuildRunner != null)
|
||||||
|
|
|
@ -81,6 +81,7 @@ import org.eclipse.cdt.managedbuilder.internal.macros.OptionContextData;
|
||||||
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
|
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
|
||||||
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
|
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
|
||||||
import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
||||||
|
import org.eclipse.cdt.newmake.core.IMakeCommonBuildInfo;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IResourceDelta;
|
import org.eclipse.core.resources.IResourceDelta;
|
||||||
|
@ -752,7 +753,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
* E L E M E N T A T T R I B U T E R E A D E R S A N D W R I T E R S
|
* E L E M E N T A T T R I B U T E R E A D E R S A N D W R I T E R S
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/**
|
||||||
* Initialize the configuration information from an element in the
|
* Initialize the configuration information from an element in the
|
||||||
* manifest file or provided by a dynamicElementProvider
|
* manifest file or provided by a dynamicElementProvider
|
||||||
*
|
*
|
||||||
|
@ -803,7 +804,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
isTest = Boolean.valueOf(tmp).booleanValue();
|
isTest = Boolean.valueOf(tmp).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/**
|
||||||
* Initialize the configuration information from the XML element
|
* Initialize the configuration information from the XML element
|
||||||
* specified in the argument
|
* specified in the argument
|
||||||
*
|
*
|
||||||
|
@ -970,6 +971,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getParent()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getParent()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IConfiguration getParent() {
|
public IConfiguration getParent() {
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
@ -977,6 +979,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getOwner()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getOwner()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResource getOwner() {
|
public IResource getOwner() {
|
||||||
if (managedProject != null)
|
if (managedProject != null)
|
||||||
return managedProject.getOwner();
|
return managedProject.getOwner();
|
||||||
|
@ -988,6 +991,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getProjectType()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getProjectType()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IProjectType getProjectType() {
|
public IProjectType getProjectType() {
|
||||||
return projectType;
|
return projectType;
|
||||||
}
|
}
|
||||||
|
@ -995,6 +999,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getManagedProject()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getManagedProject()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IManagedProject getManagedProject() {
|
public IManagedProject getManagedProject() {
|
||||||
return managedProject;
|
return managedProject;
|
||||||
}
|
}
|
||||||
|
@ -1002,6 +1007,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getToolChain(IToolChain, String, String, boolean)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getToolChain(IToolChain, String, String, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IToolChain createToolChain(IToolChain superClass, String Id, String name, boolean isExtensionElement) {
|
public IToolChain createToolChain(IToolChain superClass, String Id, String name, boolean isExtensionElement) {
|
||||||
if(rootFolderInfo == null){
|
if(rootFolderInfo == null){
|
||||||
createRootFolderInfo();
|
createRootFolderInfo();
|
||||||
|
@ -1030,6 +1036,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getToolChain()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getToolChain()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IToolChain getToolChain() {
|
public IToolChain getToolChain() {
|
||||||
return rootFolderInfo.getToolChain();
|
return rootFolderInfo.getToolChain();
|
||||||
}
|
}
|
||||||
|
@ -1037,6 +1044,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getResourceConfigurations()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getResourceConfigurations()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceConfiguration[] getResourceConfigurations() {
|
public IResourceConfiguration[] getResourceConfigurations() {
|
||||||
return (IResourceConfiguration[])rcInfos.getResourceInfos(ICSettingBase.SETTING_FILE, IResourceConfiguration.class);
|
return (IResourceConfiguration[])rcInfos.getResourceInfos(ICSettingBase.SETTING_FILE, IResourceConfiguration.class);
|
||||||
}
|
}
|
||||||
|
@ -1044,6 +1052,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceConfiguration(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceConfiguration(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceConfiguration getResourceConfiguration(String resPath) {
|
public IResourceConfiguration getResourceConfiguration(String resPath) {
|
||||||
return rcInfos.getFileInfo(new Path(resPath).removeFirstSegments(1));
|
return rcInfos.getFileInfo(new Path(resPath).removeFirstSegments(1));
|
||||||
}
|
}
|
||||||
|
@ -1051,6 +1060,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getFilteredTools()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getFilteredTools()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool[] getFilteredTools() {
|
public ITool[] getFilteredTools() {
|
||||||
return rootFolderInfo.getFilteredTools();
|
return rootFolderInfo.getFilteredTools();
|
||||||
}
|
}
|
||||||
|
@ -1058,6 +1068,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getTools()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getTools()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool[] getTools() {
|
public ITool[] getTools() {
|
||||||
return rootFolderInfo.getTools();
|
return rootFolderInfo.getTools();
|
||||||
}
|
}
|
||||||
|
@ -1065,6 +1076,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTool(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTool(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool getTool(String id) {
|
public ITool getTool(String id) {
|
||||||
return rootFolderInfo.getTool(id);
|
return rootFolderInfo.getTool(id);
|
||||||
}
|
}
|
||||||
|
@ -1072,6 +1084,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolsBySuperClassId(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolsBySuperClassId(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool[] getToolsBySuperClassId(String id) {
|
public ITool[] getToolsBySuperClassId(String id) {
|
||||||
return rootFolderInfo.getToolsBySuperClassId(id);
|
return rootFolderInfo.getToolsBySuperClassId(id);
|
||||||
}
|
}
|
||||||
|
@ -1079,6 +1092,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTargetTool()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTargetTool()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool getTargetTool() {
|
public ITool getTargetTool() {
|
||||||
String[] targetToolIds = rootFolderInfo.getToolChain().getTargetToolList();
|
String[] targetToolIds = rootFolderInfo.getToolChain().getTargetToolList();
|
||||||
if (targetToolIds == null || targetToolIds.length == 0) return null;
|
if (targetToolIds == null || targetToolIds.length == 0) return null;
|
||||||
|
@ -1106,6 +1120,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setToolCommand(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setToolCommand(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getToolCommand(ITool tool) {
|
public String getToolCommand(ITool tool) {
|
||||||
// TODO: Do we need to verify that the tool is part of the configuration?
|
// TODO: Do we need to verify that the tool is part of the configuration?
|
||||||
return tool.getToolCommand();
|
return tool.getToolCommand();
|
||||||
|
@ -1114,6 +1129,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setToolCommand(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setToolCommand(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setToolCommand(ITool tool, String command) {
|
public void setToolCommand(ITool tool, String command) {
|
||||||
// TODO: Do we need to verify that the tool is part of the configuration?
|
// TODO: Do we need to verify that the tool is part of the configuration?
|
||||||
tool.setToolCommand(command);
|
tool.setToolCommand(command);
|
||||||
|
@ -1122,6 +1138,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setOption(org.eclipse.cdt.core.build.managed.IOption, boolean)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setOption(org.eclipse.cdt.core.build.managed.IOption, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IOption setOption(IHoldsOptions holder, IOption option, boolean value) throws BuildException {
|
public IOption setOption(IHoldsOptions holder, IOption option, boolean value) throws BuildException {
|
||||||
return getRootFolderInfo().setOption(holder, option, value);
|
return getRootFolderInfo().setOption(holder, option, value);
|
||||||
}
|
}
|
||||||
|
@ -1129,6 +1146,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setOption(org.eclipse.cdt.core.build.managed.IOption, java.lang.String)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setOption(org.eclipse.cdt.core.build.managed.IOption, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IOption setOption(IHoldsOptions holder, IOption option, String value) throws BuildException {
|
public IOption setOption(IHoldsOptions holder, IOption option, String value) throws BuildException {
|
||||||
return getRootFolderInfo().setOption(holder, option, value);
|
return getRootFolderInfo().setOption(holder, option, value);
|
||||||
}
|
}
|
||||||
|
@ -1136,6 +1154,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setOption(org.eclipse.cdt.core.build.managed.IOption, java.lang.String[])
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setOption(org.eclipse.cdt.core.build.managed.IOption, java.lang.String[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IOption setOption(IHoldsOptions holder, IOption option, String[] value) throws BuildException {
|
public IOption setOption(IHoldsOptions holder, IOption option, String[] value) throws BuildException {
|
||||||
return getRootFolderInfo().setOption(holder, option, value);
|
return getRootFolderInfo().setOption(holder, option, value);
|
||||||
}
|
}
|
||||||
|
@ -1153,6 +1172,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
// rebuildNeeded = true;
|
// rebuildNeeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeResourceConfiguration(IResourceInfo resConfig) {
|
public void removeResourceConfiguration(IResourceInfo resConfig) {
|
||||||
ManagedBuildManager.performValueHandlerEvent(resConfig,
|
ManagedBuildManager.performValueHandlerEvent(resConfig,
|
||||||
IManagedOptionValueHandler.EVENT_CLOSE);
|
IManagedOptionValueHandler.EVENT_CLOSE);
|
||||||
|
@ -1178,6 +1198,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getArtifactExtension()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getArtifactExtension()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getArtifactExtension() {
|
public String getArtifactExtension() {
|
||||||
String ext = getArtifactExtensionAttribute(true);
|
String ext = getArtifactExtensionAttribute(true);
|
||||||
return ext != null ? ext : EMPTY_STRING;
|
return ext != null ? ext : EMPTY_STRING;
|
||||||
|
@ -1197,6 +1218,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getArtifactName()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getArtifactName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getArtifactName() {
|
public String getArtifactName() {
|
||||||
if (artifactName == null) {
|
if (artifactName == null) {
|
||||||
// If I have a parent, ask it
|
// If I have a parent, ask it
|
||||||
|
@ -1214,6 +1236,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getBuildArguments()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getBuildArguments()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBuildArguments() {
|
public String getBuildArguments() {
|
||||||
IToolChain tc = getToolChain();
|
IToolChain tc = getToolChain();
|
||||||
IBuilder builder = tc.getBuilder();
|
IBuilder builder = tc.getBuilder();
|
||||||
|
@ -1226,6 +1249,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getBuildCommand()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getBuildCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBuildCommand() {
|
public String getBuildCommand() {
|
||||||
IToolChain tc = getToolChain();
|
IToolChain tc = getToolChain();
|
||||||
IBuilder builder = tc.getBuilder();
|
IBuilder builder = tc.getBuilder();
|
||||||
|
@ -1240,6 +1264,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPrebuildStep()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPrebuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPrebuildStep() {
|
public String getPrebuildStep() {
|
||||||
if (prebuildStep == null) {
|
if (prebuildStep == null) {
|
||||||
// If I have a parent, ask it
|
// If I have a parent, ask it
|
||||||
|
@ -1259,6 +1284,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPostbuildStep()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPostbuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPostbuildStep() {
|
public String getPostbuildStep() {
|
||||||
if (postbuildStep == null) {
|
if (postbuildStep == null) {
|
||||||
// If I have a parent, ask it
|
// If I have a parent, ask it
|
||||||
|
@ -1278,6 +1304,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPreannouncebuildStep()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPreannouncebuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPreannouncebuildStep() {
|
public String getPreannouncebuildStep() {
|
||||||
if (preannouncebuildStep == null) {
|
if (preannouncebuildStep == null) {
|
||||||
// If I have a parent, ask it
|
// If I have a parent, ask it
|
||||||
|
@ -1297,6 +1324,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPostannouncebuildStep()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getPostannouncebuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPostannouncebuildStep() {
|
public String getPostannouncebuildStep() {
|
||||||
if (postannouncebuildStep == null) {
|
if (postannouncebuildStep == null) {
|
||||||
// If I have a parent, ask it
|
// If I have a parent, ask it
|
||||||
|
@ -1316,6 +1344,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getCleanCommand()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getCleanCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getCleanCommand() {
|
public String getCleanCommand() {
|
||||||
// Return the command used to remove files
|
// Return the command used to remove files
|
||||||
if (cleanCommand == null) {
|
if (cleanCommand == null) {
|
||||||
|
@ -1338,6 +1367,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getDescription()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getDescription()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
if (description == null) {
|
if (description == null) {
|
||||||
// If I have a parent, ask it
|
// If I have a parent, ask it
|
||||||
|
@ -1357,6 +1387,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserIds()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserIds()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getErrorParserIds() {
|
public String getErrorParserIds() {
|
||||||
if (errorParserIds != null) {
|
if (errorParserIds != null) {
|
||||||
return errorParserIds;
|
return errorParserIds;
|
||||||
|
@ -1392,6 +1423,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserList()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserList()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getErrorParserList() {
|
public String[] getErrorParserList() {
|
||||||
Set<String> set = contributeErrorParsers(null, true);
|
Set<String> set = contributeErrorParsers(null, true);
|
||||||
if(set != null){
|
if(set != null){
|
||||||
|
@ -1428,6 +1460,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactExtension(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactExtension(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setArtifactExtension(String extension) {
|
public void setArtifactExtension(String extension) {
|
||||||
if (extension == null && artifactExtension == null) return;
|
if (extension == null && artifactExtension == null) return;
|
||||||
if (artifactExtension == null || extension == null || !artifactExtension.equals(extension)) {
|
if (artifactExtension == null || extension == null || !artifactExtension.equals(extension)) {
|
||||||
|
@ -1449,6 +1482,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setArtifactName(java.lang.String)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setArtifactName(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setArtifactName(String name) {
|
public void setArtifactName(String name) {
|
||||||
if (name == null && artifactName == null) return;
|
if (name == null && artifactName == null) return;
|
||||||
if (artifactName == null || name == null || !artifactName.equals(name)) {
|
if (artifactName == null || name == null || !artifactName.equals(name)) {
|
||||||
|
@ -1490,6 +1524,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setErrorParserIds()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setErrorParserIds()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setErrorParserIds(String ids) {
|
public void setErrorParserIds(String ids) {
|
||||||
String currentIds = getErrorParserIds();
|
String currentIds = getErrorParserIds();
|
||||||
if (ids == null && currentIds == null) return;
|
if (ids == null && currentIds == null) return;
|
||||||
|
@ -1502,6 +1537,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setCleanCommand()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setCleanCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setCleanCommand(String command) {
|
public void setCleanCommand(String command) {
|
||||||
if (command == null && cleanCommand == null) return;
|
if (command == null && cleanCommand == null) return;
|
||||||
if (cleanCommand == null || command == null || !cleanCommand.equals(command)) {
|
if (cleanCommand == null || command == null || !cleanCommand.equals(command)) {
|
||||||
|
@ -1513,6 +1549,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setDescription(java.lang.String)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setDescription(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
if (description == null && this.description == null) return;
|
if (description == null && this.description == null) return;
|
||||||
if (this.description == null || description == null || !description.equals(this.description)) {
|
if (this.description == null || description == null || !description.equals(this.description)) {
|
||||||
|
@ -1524,6 +1561,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildArguments()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildArguments()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setBuildArguments(String makeArgs) {
|
public void setBuildArguments(String makeArgs) {
|
||||||
IToolChain tc = getToolChain();
|
IToolChain tc = getToolChain();
|
||||||
IBuilder builder = tc.getBuilder();
|
IBuilder builder = tc.getBuilder();
|
||||||
|
@ -1546,6 +1584,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildCommand()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setBuildCommand(String command) {
|
public void setBuildCommand(String command) {
|
||||||
IToolChain tc = getToolChain();
|
IToolChain tc = getToolChain();
|
||||||
IBuilder builder = tc.getBuilder();
|
IBuilder builder = tc.getBuilder();
|
||||||
|
@ -1568,6 +1607,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPrebuildStep(java.lang.String)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPrebuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPrebuildStep(String step) {
|
public void setPrebuildStep(String step) {
|
||||||
if (step == null && prebuildStep == null) return;
|
if (step == null && prebuildStep == null) return;
|
||||||
if (prebuildStep == null || step == null || !prebuildStep.equals(step)) {
|
if (prebuildStep == null || step == null || !prebuildStep.equals(step)) {
|
||||||
|
@ -1581,6 +1621,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPostbuildStep(java.lang.String)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPostbuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPostbuildStep(String step) {
|
public void setPostbuildStep(String step) {
|
||||||
if (step == null && postbuildStep == null) return;
|
if (step == null && postbuildStep == null) return;
|
||||||
if (postbuildStep == null || step == null || !postbuildStep.equals(step)) {
|
if (postbuildStep == null || step == null || !postbuildStep.equals(step)) {
|
||||||
|
@ -1593,6 +1634,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPreannouncebuildStep(java.lang.String)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPreannouncebuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPreannouncebuildStep(String announceStep) {
|
public void setPreannouncebuildStep(String announceStep) {
|
||||||
if (announceStep == null && preannouncebuildStep == null) return;
|
if (announceStep == null && preannouncebuildStep == null) return;
|
||||||
if (preannouncebuildStep == null || announceStep == null || !preannouncebuildStep.equals(announceStep)) {
|
if (preannouncebuildStep == null || announceStep == null || !preannouncebuildStep.equals(announceStep)) {
|
||||||
|
@ -1605,6 +1647,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPostannouncebuildStep(java.lang.String)
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#setPostannouncebuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPostannouncebuildStep(String announceStep) {
|
public void setPostannouncebuildStep(String announceStep) {
|
||||||
if (announceStep == null && postannouncebuildStep == null) return;
|
if (announceStep == null && postannouncebuildStep == null) return;
|
||||||
if (postannouncebuildStep == null || announceStep == null || !postannouncebuildStep.equals(announceStep)) {
|
if (postannouncebuildStep == null || announceStep == null || !postannouncebuildStep.equals(announceStep)) {
|
||||||
|
@ -1617,6 +1660,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isSupported()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isSupported()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSupported(){
|
public boolean isSupported(){
|
||||||
IFolderInfo foInfo = getRootFolderInfo();
|
IFolderInfo foInfo = getRootFolderInfo();
|
||||||
if(foInfo != null)
|
if(foInfo != null)
|
||||||
|
@ -1627,6 +1671,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isHeaderFile(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isHeaderFile(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isHeaderFile(String ext) {
|
public boolean isHeaderFile(String ext) {
|
||||||
return getRootFolderInfo().isHeaderFile(ext);
|
return getRootFolderInfo().isHeaderFile(ext);
|
||||||
}
|
}
|
||||||
|
@ -1638,6 +1683,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isExtensionElement()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isExtensionElement()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isExtensionElement() {
|
public boolean isExtensionElement() {
|
||||||
return isExtensionConfig;
|
return isExtensionConfig;
|
||||||
}
|
}
|
||||||
|
@ -1645,6 +1691,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isDirty()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isDirty()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isDirty() {
|
public boolean isDirty() {
|
||||||
// This shouldn't be called for an extension configuration
|
// This shouldn't be called for an extension configuration
|
||||||
if (isExtensionConfig) return false;
|
if (isExtensionConfig) return false;
|
||||||
|
@ -1665,10 +1712,12 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#needsRebuild()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#needsRebuild()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean needsRebuild() {
|
public boolean needsRebuild() {
|
||||||
return needsRebuild(true);
|
return needsRebuild(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean needsFullRebuild() {
|
public boolean needsFullRebuild() {
|
||||||
return needsRebuild(false);
|
return needsRebuild(false);
|
||||||
}
|
}
|
||||||
|
@ -1692,6 +1741,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setDirty(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setDirty(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDirty(boolean isDirty) {
|
public void setDirty(boolean isDirty) {
|
||||||
// Override the dirty flag
|
// Override the dirty flag
|
||||||
this.isDirty = isDirty;
|
this.isDirty = isDirty;
|
||||||
|
@ -1708,6 +1758,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setRebuildState(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setRebuildState(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setRebuildState(boolean rebuild) {
|
public void setRebuildState(boolean rebuild) {
|
||||||
if(isExtensionElement() && rebuild)
|
if(isExtensionElement() && rebuild)
|
||||||
return;
|
return;
|
||||||
|
@ -1731,6 +1782,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#hasOverriddenBuildCommand()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#hasOverriddenBuildCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasOverriddenBuildCommand() {
|
public boolean hasOverriddenBuildCommand() {
|
||||||
IBuilder builder = getToolChain().getBuilder();
|
IBuilder builder = getToolChain().getBuilder();
|
||||||
if (builder != null) {
|
if (builder != null) {
|
||||||
|
@ -1785,21 +1837,24 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
((FolderInfo)getRootFolderInfo()).resetOptionSettings();
|
((FolderInfo)getRootFolderInfo()).resetOptionSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Create a resource configuration object for the passed-in file
|
* Create a resource configuration object for the passed-in file
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceConfiguration createResourceConfiguration(IFile file)
|
public IResourceConfiguration createResourceConfiguration(IFile file)
|
||||||
{
|
{
|
||||||
return createFileInfo(file.getFullPath().removeFirstSegments(1));
|
return createFileInfo(file.getFullPath().removeFirstSegments(1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path){
|
public IFileInfo createFileInfo(IPath path){
|
||||||
String resourceName = path.lastSegment();
|
String resourceName = path.lastSegment();
|
||||||
String id = ManagedBuildManager.calculateChildId(getId(), path.toString());
|
String id = ManagedBuildManager.calculateChildId(getId(), path.toString());
|
||||||
return createFileInfo(path, id, resourceName);
|
return createFileInfo(path, id, resourceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path, String id, String name){
|
public IFileInfo createFileInfo(IPath path, String id, String name){
|
||||||
IResourceInfo info = getResourceInfo(path, false);
|
IResourceInfo info = getResourceInfo(path, false);
|
||||||
IFileInfo fileInfo = null;
|
IFileInfo fileInfo = null;
|
||||||
|
@ -1812,6 +1867,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return fileInfo;
|
return fileInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path, IFolderInfo base, ITool baseTool, String id, String name){
|
public IFileInfo createFileInfo(IPath path, IFolderInfo base, ITool baseTool, String id, String name){
|
||||||
if(base.getPath().equals(path))
|
if(base.getPath().equals(path))
|
||||||
return null;
|
return null;
|
||||||
|
@ -1823,6 +1879,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return fileInfo;
|
return fileInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name){
|
public IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name){
|
||||||
if(base.getPath().equals(path))
|
if(base.getPath().equals(path))
|
||||||
return null;
|
return null;
|
||||||
|
@ -1837,6 +1894,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getEnvironmentVariableSupplier()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getEnvironmentVariableSupplier()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier(){
|
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier(){
|
||||||
IToolChain toolChain = getToolChain();
|
IToolChain toolChain = getToolChain();
|
||||||
if(toolChain != null)
|
if(toolChain != null)
|
||||||
|
@ -1865,6 +1923,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildMacroSupplier()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildMacroSupplier()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IConfigurationBuildMacroSupplier getBuildMacroSupplier(){
|
public IConfigurationBuildMacroSupplier getBuildMacroSupplier(){
|
||||||
IToolChain toolChain = getToolChain();
|
IToolChain toolChain = getToolChain();
|
||||||
if(toolChain != null)
|
if(toolChain != null)
|
||||||
|
@ -1876,6 +1935,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isTemporary()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isTemporary()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isTemporary(){
|
public boolean isTemporary(){
|
||||||
return isTemporary;
|
return isTemporary;
|
||||||
}
|
}
|
||||||
|
@ -1902,6 +1962,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ITool calculateTargetTool(){
|
public ITool calculateTargetTool(){
|
||||||
ITool tool = getTargetTool();
|
ITool tool = getTargetTool();
|
||||||
|
|
||||||
|
@ -1924,15 +1985,17 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return tool;
|
return tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ITool getToolFromOutputExtension(String extension) {
|
public ITool getToolFromOutputExtension(String extension) {
|
||||||
return getRootFolderInfo().getToolFromOutputExtension(extension);
|
return getRootFolderInfo().getToolFromOutputExtension(extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ITool getToolFromInputExtension(String sourceExtension) {
|
public ITool getToolFromInputExtension(String sourceExtension) {
|
||||||
return getRootFolderInfo().getToolFromInputExtension(sourceExtension);
|
return getRootFolderInfo().getToolFromInputExtension(sourceExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* The resource delta passed to the builder is not always up-to-date
|
* The resource delta passed to the builder is not always up-to-date
|
||||||
* for the given configuration because between two builds of the same configuration
|
* for the given configuration because between two builds of the same configuration
|
||||||
* any number of other configuration builds may occur
|
* any number of other configuration builds may occur
|
||||||
|
@ -2004,7 +2067,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
prefs.getBoolean(pref, false) : defaultValue;
|
prefs.getBoolean(pref, false) : defaultValue;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/*
|
/**
|
||||||
* this method is used for enabling/disabling the internal builder
|
* this method is used for enabling/disabling the internal builder
|
||||||
* for the given configuration
|
* for the given configuration
|
||||||
*
|
*
|
||||||
|
@ -2121,7 +2184,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns whether the internal builder is enabled
|
* returns whether the internal builder is enabled
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@ -2129,7 +2192,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return getBuilder().isInternalBuilder();
|
return getBuilder().isInternalBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
*
|
*
|
||||||
* sets the Internal Builder mode
|
* sets the Internal Builder mode
|
||||||
*
|
*
|
||||||
|
@ -2144,7 +2207,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns the Internal Builder mode
|
* returns the Internal Builder mode
|
||||||
* if true, internal builder will ignore build errors while building,
|
* if true, internal builder will ignore build errors while building,
|
||||||
* otherwise it will stop at the first build error
|
* otherwise it will stop at the first build error
|
||||||
|
@ -2156,73 +2219,80 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* sets the Internal Builder Parallel mode
|
* sets the Internal Builder Parallel mode
|
||||||
*
|
|
||||||
* @param parallel if true, internal builder will use parallel mode
|
* @param parallel if true, internal builder will use parallel mode
|
||||||
|
*
|
||||||
|
* @deprecated since CDT 9.0. Use {@link #setParallelDef(boolean)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void setInternalBuilderParallel(boolean parallel){
|
public void setInternalBuilderParallel(boolean parallel){
|
||||||
if(getInternalBuilderParallel() == parallel)
|
setParallelDef(parallel);
|
||||||
return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
getEditableBuilder().setParallelBuildOn(parallel);
|
|
||||||
} catch (CoreException e) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the Internal Builder parallel mode
|
* returns the Internal Builder parallel mode
|
||||||
* if true, internal builder will work in parallel mode
|
* if true, internal builder will work in parallel mode
|
||||||
* otherwise it will use only one thread
|
* otherwise it will use only one thread
|
||||||
*
|
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @deprecated since CDT 9.0. Use {@link #getParallelDef()}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public boolean getInternalBuilderParallel(){
|
public boolean getInternalBuilderParallel(){
|
||||||
return getBuilder().isParallelBuildOn();
|
return getParallelDef();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parallel if true, internal builder will use parallel mode
|
* Set parallel execution mode for the configuration's builder.
|
||||||
|
* @see Builder#setParallelBuildOn(boolean)
|
||||||
|
*
|
||||||
|
* @param parallel - the flag to enable or disable parallel mode.
|
||||||
*/
|
*/
|
||||||
public void setParallelDef(boolean parallel){
|
public void setParallelDef(boolean parallel){
|
||||||
if(getParallelDef() == parallel)
|
if(getParallelDef() == parallel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int num = getParallelNumber();
|
try {
|
||||||
if(num != 0){
|
getEditableBuilder().setParallelBuildOn(parallel);
|
||||||
setParallelNumber(-num);
|
} catch (CoreException e) {
|
||||||
} else {
|
ManagedBuilderCorePlugin.log(e);
|
||||||
if(parallel){
|
|
||||||
setParallelNumber(-1);
|
|
||||||
} else {
|
|
||||||
setParallelNumber(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return boolean
|
* Check if the configuration's builder is operating in parallel mode.
|
||||||
|
* @return {@code true} if parallel mode is enabled, {@code false} otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean getParallelDef(){
|
public boolean getParallelDef(){
|
||||||
int num = getBuilder().getParallelizationNum();
|
return getBuilder().isParallelBuildOn();
|
||||||
return num <= 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets number of Parallel threads
|
* Sets maximum number of parallel threads/jobs to be used by builder.
|
||||||
*/
|
* Note that the number will be set only if the builder is in "parallel"
|
||||||
public void setParallelNumber(int n){
|
* mode.
|
||||||
try {
|
|
||||||
getEditableBuilder().setParallelizationNum(n);
|
|
||||||
} catch (CoreException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* returns number of Parallel threads
|
|
||||||
*
|
*
|
||||||
* @return int
|
* @param jobs - maximum number of jobs or threads. If the number is 0
|
||||||
|
* or negative, negative "optimal" number will be set, see
|
||||||
|
* {@link Builder#getOptimalParallelJobNum()}.
|
||||||
|
*/
|
||||||
|
public void setParallelNumber(int jobs){
|
||||||
|
try {
|
||||||
|
getEditableBuilder().setParallelizationNum(jobs);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
ManagedBuilderCorePlugin.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns maximum number of parallel threads/jobs used by the configuration's builder.
|
||||||
|
* Note that this function can return negative value to indicate "optimal" number.
|
||||||
|
*
|
||||||
|
* @see #setParallelDef(boolean)
|
||||||
|
* @see Builder#getParallelizationNum()
|
||||||
|
*
|
||||||
|
* @return - maximum number of parallel threads or jobs used by the builder or negative number.
|
||||||
|
* For exact interpretation see table in {@link IMakeCommonBuildInfo#getParallelizationNum()}
|
||||||
*/
|
*/
|
||||||
public int getParallelNumber(){
|
public int getParallelNumber(){
|
||||||
return getBuilder().getParallelizationNum();
|
return getBuilder().getParallelizationNum();
|
||||||
|
@ -2246,14 +2316,17 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
// return prefs;
|
// return prefs;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
public IResourceInfo[] getResourceInfos() {
|
public IResourceInfo[] getResourceInfos() {
|
||||||
return rcInfos.getResourceInfos();
|
return rcInfos.getResourceInfos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IResourceInfo getResourceInfo(IPath path, boolean exactPath) {
|
public IResourceInfo getResourceInfo(IPath path, boolean exactPath) {
|
||||||
return rcInfos.getResourceInfo(path, exactPath);
|
return rcInfos.getResourceInfo(path, exactPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IResourceInfo getResourceInfoById(String id) {
|
public IResourceInfo getResourceInfoById(String id) {
|
||||||
IResourceInfo infos[] = rcInfos.getResourceInfos();
|
IResourceInfo infos[] = rcInfos.getResourceInfos();
|
||||||
for(int i = 0; i < infos.length; i++){
|
for(int i = 0; i < infos.length; i++){
|
||||||
|
@ -2263,6 +2336,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFolderInfo getRootFolderInfo() {
|
public IFolderInfo getRootFolderInfo() {
|
||||||
return rootFolderInfo;
|
return rootFolderInfo;
|
||||||
}
|
}
|
||||||
|
@ -2272,22 +2346,26 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return new ResourceInfoContainer(cr, false);
|
return new ResourceInfoContainer(cr, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public CConfigurationData getConfigurationData(){
|
public CConfigurationData getConfigurationData(){
|
||||||
return fCfgData;
|
return fCfgData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeResourceInfo(IPath path) {
|
public void removeResourceInfo(IPath path) {
|
||||||
IResourceInfo info = getResourceInfo(path, true);
|
IResourceInfo info = getResourceInfo(path, true);
|
||||||
if(info != null)
|
if(info != null)
|
||||||
removeResourceConfiguration(info);
|
removeResourceConfiguration(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFolderInfo createFolderInfo(IPath path) {
|
public IFolderInfo createFolderInfo(IPath path) {
|
||||||
String resourceName = path.lastSegment();
|
String resourceName = path.lastSegment();
|
||||||
String id = ManagedBuildManager.calculateChildId(getId(), path.toString());
|
String id = ManagedBuildManager.calculateChildId(getId(), path.toString());
|
||||||
return createFolderInfo(path, id, resourceName);
|
return createFolderInfo(path, id, resourceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFolderInfo createFolderInfo(IPath path, String id, String name) {
|
public IFolderInfo createFolderInfo(IPath path, String id, String name) {
|
||||||
IResourceInfo info = getResourceInfo(path, false);
|
IResourceInfo info = getResourceInfo(path, false);
|
||||||
IFolderInfo folderInfo = null;
|
IFolderInfo folderInfo = null;
|
||||||
|
@ -2300,6 +2378,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return folderInfo;
|
return folderInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name) {
|
public IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name) {
|
||||||
if(base.getPath().equals(path))
|
if(base.getPath().equals(path))
|
||||||
return null;
|
return null;
|
||||||
|
@ -2312,6 +2391,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return folderInfo;
|
return folderInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICSourceEntry[] getSourceEntries() {
|
public ICSourceEntry[] getSourceEntries() {
|
||||||
if(sourceEntries == null || sourceEntries.length == 0){
|
if(sourceEntries == null || sourceEntries.length == 0){
|
||||||
if(parent != null && sourceEntries == null)
|
if(parent != null && sourceEntries == null)
|
||||||
|
@ -2322,6 +2402,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return sourceEntries.clone();
|
return sourceEntries.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setSourceEntries(ICSourceEntry[] entries) {
|
public void setSourceEntries(ICSourceEntry[] entries) {
|
||||||
setSourceEntries(entries, true);
|
setSourceEntries(entries, true);
|
||||||
}
|
}
|
||||||
|
@ -2355,6 +2436,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setErrorParserList(String[] ids) {
|
public void setErrorParserList(String[] ids) {
|
||||||
if(ids == null){
|
if(ids == null){
|
||||||
//reset
|
//reset
|
||||||
|
@ -2394,10 +2476,12 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public CBuildData getBuildData() {
|
public CBuildData getBuildData() {
|
||||||
return getEditableBuilder().getBuildData();
|
return getEditableBuilder().getBuildData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBuilder getEditableBuilder(){
|
public IBuilder getEditableBuilder(){
|
||||||
IToolChain tc = getToolChain();
|
IToolChain tc = getToolChain();
|
||||||
IBuilder builder = tc.getBuilder();
|
IBuilder builder = tc.getBuilder();
|
||||||
|
@ -2409,10 +2493,12 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBuilder getBuilder(){
|
public IBuilder getBuilder(){
|
||||||
return getToolChain().getBuilder();
|
return getToolChain().getBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getOutputPrefix(String outputExtension) {
|
public String getOutputPrefix(String outputExtension) {
|
||||||
// Treat null extensions as empty string
|
// Treat null extensions as empty string
|
||||||
String ext = outputExtension == null ? new String() : outputExtension;
|
String ext = outputExtension == null ? new String() : outputExtension;
|
||||||
|
@ -2437,6 +2523,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
fCfgDes = cfgDes;
|
fCfgDes = cfgDes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBuildObjectProperties getBuildProperties() {
|
public IBuildObjectProperties getBuildProperties() {
|
||||||
if(buildProperties == null){
|
if(buildProperties == null){
|
||||||
BuildObjectProperties parentProps = findBuildProperties();
|
BuildObjectProperties parentProps = findBuildProperties();
|
||||||
|
@ -2467,6 +2554,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return supportsValue(type.getId(), value.getId());
|
return supportsValue(type.getId(), value.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void propertiesChanged() {
|
public void propertiesChanged() {
|
||||||
if(isExtensionConfig)
|
if(isExtensionConfig)
|
||||||
return;
|
return;
|
||||||
|
@ -2490,6 +2578,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return booleanExpressionCalculator;
|
return booleanExpressionCalculator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSystemObject() {
|
public boolean isSystemObject() {
|
||||||
if(isTest)
|
if(isTest)
|
||||||
return true;
|
return true;
|
||||||
|
@ -2500,10 +2589,12 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getOutputExtension(String resourceExtension) {
|
public String getOutputExtension(String resourceExtension) {
|
||||||
return getRootFolderInfo().getOutputExtension(resourceExtension);
|
return getRootFolderInfo().getOutputExtension(resourceExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getOutputFlag(String outputExt) {
|
public String getOutputFlag(String outputExt) {
|
||||||
// Treat null extension as an empty string
|
// Treat null extension as an empty string
|
||||||
String ext = outputExt == null ? new String() : outputExt;
|
String ext = outputExt == null ? new String() : outputExt;
|
||||||
|
@ -2521,6 +2612,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IManagedCommandLineInfo generateToolCommandLineInfo( String sourceExtension, String[] flags,
|
public IManagedCommandLineInfo generateToolCommandLineInfo( String sourceExtension, String[] flags,
|
||||||
String outputFlag, String outputPrefix, String outputName, String[] inputResources, IPath inputLocation, IPath outputLocation ){
|
String outputFlag, String outputPrefix, String outputName, String[] inputResources, IPath inputLocation, IPath outputLocation ){
|
||||||
ITool[] tools = getFilteredTools();
|
ITool[] tools = getFilteredTools();
|
||||||
|
@ -2573,6 +2665,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getUserObjects(String extension) {
|
public String[] getUserObjects(String extension) {
|
||||||
Vector<String> objs = new Vector<String>();
|
Vector<String> objs = new Vector<String>();
|
||||||
ITool tool = calculateTargetTool();
|
ITool tool = calculateTargetTool();
|
||||||
|
@ -2614,6 +2707,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return objs.toArray(new String[objs.size()]);
|
return objs.toArray(new String[objs.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getLibs(String extension) {
|
public String[] getLibs(String extension) {
|
||||||
Vector<String> libs = new Vector<String>();
|
Vector<String> libs = new Vector<String>();
|
||||||
ITool tool = calculateTargetTool();
|
ITool tool = calculateTargetTool();
|
||||||
|
@ -2668,6 +2762,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return libs.toArray(new String[libs.size()]);
|
return libs.toArray(new String[libs.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean buildsFileType(String srcExt) {
|
public boolean buildsFileType(String srcExt) {
|
||||||
return getRootFolderInfo().buildsFileType(srcExt);
|
return getRootFolderInfo().buildsFileType(srcExt);
|
||||||
}
|
}
|
||||||
|
@ -2735,6 +2830,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean supportsBuild(boolean managed) {
|
public boolean supportsBuild(boolean managed) {
|
||||||
return supportsBuild(managed, true);
|
return supportsBuild(managed, true);
|
||||||
}
|
}
|
||||||
|
@ -2755,6 +2851,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean supportsType(String typeId) {
|
public boolean supportsType(String typeId) {
|
||||||
SupportedProperties props = findSupportedProperties();
|
SupportedProperties props = findSupportedProperties();
|
||||||
boolean supports = false;
|
boolean supports = false;
|
||||||
|
@ -2768,6 +2865,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return supports;
|
return supports;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean supportsValue(String typeId, String valueId) {
|
public boolean supportsValue(String typeId, String valueId) {
|
||||||
SupportedProperties props = findSupportedProperties();
|
SupportedProperties props = findSupportedProperties();
|
||||||
boolean supports = false;
|
boolean supports = false;
|
||||||
|
@ -2794,6 +2892,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
supportedProperties = new SupportedProperties(el);
|
supportedProperties = new SupportedProperties(el);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getRequiredTypeIds() {
|
public String[] getRequiredTypeIds() {
|
||||||
SupportedProperties props = findSupportedProperties();
|
SupportedProperties props = findSupportedProperties();
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
|
@ -2806,6 +2905,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getSupportedTypeIds() {
|
public String[] getSupportedTypeIds() {
|
||||||
SupportedProperties props = findSupportedProperties();
|
SupportedProperties props = findSupportedProperties();
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
|
@ -2818,6 +2918,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getSupportedValueIds(String typeId) {
|
public String[] getSupportedValueIds(String typeId) {
|
||||||
SupportedProperties props = findSupportedProperties();
|
SupportedProperties props = findSupportedProperties();
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
|
@ -2830,6 +2931,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean requiresType(String typeId) {
|
public boolean requiresType(String typeId) {
|
||||||
SupportedProperties props = findSupportedProperties();
|
SupportedProperties props = findSupportedProperties();
|
||||||
boolean requires = false;
|
boolean requires = false;
|
||||||
|
@ -2843,10 +2945,12 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return requires;
|
return requires;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isManagedBuildOn() {
|
public boolean isManagedBuildOn() {
|
||||||
return getBuilder().isManagedBuildOn();
|
return getBuilder().isManagedBuildOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setManagedBuildOn(boolean on) throws BuildException {
|
public void setManagedBuildOn(boolean on) throws BuildException {
|
||||||
try {
|
try {
|
||||||
getEditableBuilder().setManagedBuildOn(on);
|
getEditableBuilder().setManagedBuildOn(on);
|
||||||
|
@ -2855,6 +2959,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void changeBuilder(IBuilder newBuilder, String id, String name){
|
public void changeBuilder(IBuilder newBuilder, String id, String name){
|
||||||
changeBuilder(newBuilder, id, name, false);
|
changeBuilder(newBuilder, id, name, false);
|
||||||
}
|
}
|
||||||
|
@ -2884,6 +2989,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isBuilderCompatible(IBuilder builder){
|
public boolean isBuilderCompatible(IBuilder builder){
|
||||||
return builder.supportsBuild(isManagedBuildOn());
|
return builder.supportsBuild(isManagedBuildOn());
|
||||||
}
|
}
|
||||||
|
@ -2964,6 +3070,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return isPreferenceConfig;
|
return isPreferenceConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBuildPropertyValue getBuildArtefactType() {
|
public IBuildPropertyValue getBuildArtefactType() {
|
||||||
IBuildObjectProperties props = findBuildProperties();
|
IBuildObjectProperties props = findBuildProperties();
|
||||||
if(props != null){
|
if(props != null){
|
||||||
|
@ -2974,6 +3081,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildArtefactType(String id) throws BuildException {
|
public void setBuildArtefactType(String id) throws BuildException {
|
||||||
IBuildObjectProperties props = getBuildProperties();
|
IBuildObjectProperties props = getBuildProperties();
|
||||||
try {
|
try {
|
||||||
|
@ -3026,34 +3134,42 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation getExtensionObject() {
|
public IRealBuildObjectAssociation getExtensionObject() {
|
||||||
return isExtensionConfig ? this : (Configuration)getParent();
|
return isExtensionConfig ? this : (Configuration)getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation[] getIdenticBuildObjects() {
|
public IRealBuildObjectAssociation[] getIdenticBuildObjects() {
|
||||||
return new Configuration[]{(Configuration)getExtensionObject()};
|
return new Configuration[]{(Configuration)getExtensionObject()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation getRealBuildObject() {
|
public IRealBuildObjectAssociation getRealBuildObject() {
|
||||||
return getExtensionObject();
|
return getExtensionObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRealBuildObjectAssociation getSuperClassObject() {
|
public IRealBuildObjectAssociation getSuperClassObject() {
|
||||||
return (IRealBuildObjectAssociation)getParent();
|
return (IRealBuildObjectAssociation)getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
return OBJECT_CONFIGURATION;
|
return OBJECT_CONFIGURATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isRealBuildObject() {
|
public boolean isRealBuildObject() {
|
||||||
return getRealBuildObject() == this;
|
return getRealBuildObject() == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getUniqueRealName() {
|
public String getUniqueRealName() {
|
||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isExtensionBuildObject() {
|
public boolean isExtensionBuildObject() {
|
||||||
return isExtensionElement();
|
return isExtensionElement();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2010 IBM Corporation and others.
|
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -151,6 +151,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
return fullBuildNeeded;
|
return fullBuildNeeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(IResourceDelta delta) throws CoreException {
|
public boolean visit(IResourceDelta delta) throws CoreException {
|
||||||
IResource resource = delta.getResource();
|
IResource resource = delta.getResource();
|
||||||
// If the project has changed, then a build is needed and we can stop
|
// If the project has changed, then a build is needed and we can stop
|
||||||
|
@ -231,6 +232,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(IResourceDelta delta) throws CoreException {
|
public boolean visit(IResourceDelta delta) throws CoreException {
|
||||||
|
|
||||||
IResource rc = delta.getResource();
|
IResource rc = delta.getResource();
|
||||||
|
@ -906,7 +908,6 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPath makeCommand = new Path(makeCmd);
|
IPath makeCommand = new Path(makeCmd);
|
||||||
if (makeCommand != null) {
|
|
||||||
String[] msgs = new String[2];
|
String[] msgs = new String[2];
|
||||||
msgs[0] = makeCommand.toString();
|
msgs[0] = makeCommand.toString();
|
||||||
msgs[1] = currentProject.getName();
|
msgs[1] = currentProject.getName();
|
||||||
|
@ -1144,7 +1145,6 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
addBuilderMarkers(epm);
|
addBuilderMarkers(epm);
|
||||||
consoleOutStream.close();
|
consoleOutStream.close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
forgetLastBuiltState();
|
forgetLastBuiltState();
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1196,7 +1196,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
boolean resumeOnErr,
|
boolean resumeOnErr,
|
||||||
IProgressMonitor monitor) {
|
IProgressMonitor monitor) {
|
||||||
|
|
||||||
boolean isParallel = ((Configuration)cfg).getInternalBuilderParallel();
|
boolean isParallel = ((Configuration)cfg).getParallelDef();
|
||||||
|
|
||||||
// Get the project and make sure there's a monitor to cancel the build
|
// Get the project and make sure there's a monitor to cancel the build
|
||||||
IProject currentProject = cfg.getOwner().getProject();
|
IProject currentProject = cfg.getOwner().getProject();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2010 Intel Corporation and others.
|
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -44,6 +44,7 @@ import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSu
|
||||||
import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
import org.eclipse.core.runtime.Assert;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.osgi.framework.Version;
|
import org.osgi.framework.Version;
|
||||||
|
@ -91,6 +92,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#buildsFileType(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#buildsFileType(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean buildsFileType(String srcExt) {
|
public boolean buildsFileType(String srcExt) {
|
||||||
return curr().buildsFileType(srcExt);
|
return curr().buildsFileType(srcExt);
|
||||||
}
|
}
|
||||||
|
@ -98,6 +100,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#calculateTargetTool()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#calculateTargetTool()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool calculateTargetTool() {
|
public ITool calculateTargetTool() {
|
||||||
return curr().calculateTargetTool();
|
return curr().calculateTargetTool();
|
||||||
}
|
}
|
||||||
|
@ -105,6 +108,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#changeBuilder(org.eclipse.cdt.managedbuilder.core.IBuilder, java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#changeBuilder(org.eclipse.cdt.managedbuilder.core.IBuilder, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void changeBuilder(IBuilder newBuilder, String id, String name) {
|
public void changeBuilder(IBuilder newBuilder, String id, String name) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].changeBuilder(newBuilder, id, name);
|
fCfgs[i].changeBuilder(newBuilder, id, name);
|
||||||
|
@ -113,6 +117,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path) {
|
public IFileInfo createFileInfo(IPath path) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.createFileInfo(1)"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.createFileInfo(1)"); //$NON-NLS-1$
|
||||||
|
@ -122,6 +127,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath, java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path, String id, String name) {
|
public IFileInfo createFileInfo(IPath path, String id, String name) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.createFileInfo(3)"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.createFileInfo(3)"); //$NON-NLS-1$
|
||||||
|
@ -131,6 +137,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath, org.eclipse.cdt.managedbuilder.core.IFolderInfo, org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath, org.eclipse.cdt.managedbuilder.core.IFolderInfo, org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path, IFolderInfo base,
|
public IFileInfo createFileInfo(IPath path, IFolderInfo base,
|
||||||
ITool baseTool, String id, String name) {
|
ITool baseTool, String id, String name) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
|
@ -141,6 +148,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath, org.eclipse.cdt.managedbuilder.core.IFileInfo, java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFileInfo(org.eclipse.core.runtime.IPath, org.eclipse.cdt.managedbuilder.core.IFileInfo, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name) {
|
public IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.createFileInfo(4)"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.createFileInfo(4)"); //$NON-NLS-1$
|
||||||
|
@ -150,6 +158,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFolderInfo(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFolderInfo(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFolderInfo createFolderInfo(IPath path) {
|
public IFolderInfo createFolderInfo(IPath path) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.createFolderInfo()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.createFolderInfo()"); //$NON-NLS-1$
|
||||||
|
@ -159,6 +168,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFolderInfo(org.eclipse.core.runtime.IPath, java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFolderInfo(org.eclipse.core.runtime.IPath, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFolderInfo createFolderInfo(IPath path, String id, String name) {
|
public IFolderInfo createFolderInfo(IPath path, String id, String name) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.createFolderInfo(3)"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.createFolderInfo(3)"); //$NON-NLS-1$
|
||||||
|
@ -168,6 +178,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFolderInfo(org.eclipse.core.runtime.IPath, org.eclipse.cdt.managedbuilder.core.IFolderInfo, java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createFolderInfo(org.eclipse.core.runtime.IPath, org.eclipse.cdt.managedbuilder.core.IFolderInfo, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name) {
|
public IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.createFolderInfo(4)"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.createFolderInfo(4)"); //$NON-NLS-1$
|
||||||
|
@ -177,6 +188,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createResourceConfiguration(org.eclipse.core.resources.IFile)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createResourceConfiguration(org.eclipse.core.resources.IFile)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceConfiguration createResourceConfiguration(IFile file) {
|
public IResourceConfiguration createResourceConfiguration(IFile file) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.createResourceConfiguration()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.createResourceConfiguration()"); //$NON-NLS-1$
|
||||||
|
@ -186,6 +198,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createToolChain(org.eclipse.cdt.managedbuilder.core.IToolChain, java.lang.String, java.lang.String, boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#createToolChain(org.eclipse.cdt.managedbuilder.core.IToolChain, java.lang.String, java.lang.String, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IToolChain createToolChain(IToolChain superClass, String Id,
|
public IToolChain createToolChain(IToolChain superClass, String Id,
|
||||||
String name, boolean isExtensionElement) {
|
String name, boolean isExtensionElement) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
|
@ -196,6 +209,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#generateToolCommandLineInfo(java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String[], org.eclipse.core.runtime.IPath, org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#generateToolCommandLineInfo(java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String[], org.eclipse.core.runtime.IPath, org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IManagedCommandLineInfo generateToolCommandLineInfo(
|
public IManagedCommandLineInfo generateToolCommandLineInfo(
|
||||||
String sourceExtension,
|
String sourceExtension,
|
||||||
String[] flags,
|
String[] flags,
|
||||||
|
@ -221,6 +235,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getArtifactExtension()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getArtifactExtension()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getArtifactExtension() {
|
public String getArtifactExtension() {
|
||||||
String s = fCfgs[0].getArtifactExtension();
|
String s = fCfgs[0].getArtifactExtension();
|
||||||
for (int i=1; i<fCfgs.length; i++)
|
for (int i=1; i<fCfgs.length; i++)
|
||||||
|
@ -239,6 +254,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getArtifactName()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getArtifactName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getArtifactName() {
|
public String getArtifactName() {
|
||||||
String s = fCfgs[0].getArtifactName();
|
String s = fCfgs[0].getArtifactName();
|
||||||
for (int i=1; i<fCfgs.length; i++)
|
for (int i=1; i<fCfgs.length; i++)
|
||||||
|
@ -253,20 +269,30 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/**
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildArguments()
|
* @return build arguments if the arguments for all configurations match
|
||||||
|
* or {@code null} otherwise.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBuildArguments() {
|
public String getBuildArguments() {
|
||||||
String s = fCfgs[0].getBuildArguments();
|
String args0 = fCfgs[0].getBuildArguments();
|
||||||
for (int i=1; i<fCfgs.length; i++)
|
if (args0 == null)
|
||||||
if (! s.equals(fCfgs[i].getBuildArguments()))
|
args0 = EMPTY_STR;
|
||||||
return EMPTY_STR;
|
|
||||||
return s;
|
for (IConfiguration cfg : fCfgs) {
|
||||||
|
String args = cfg.getBuildArguments();
|
||||||
|
if (args == null)
|
||||||
|
args = EMPTY_STR;
|
||||||
|
if (!args0.equals(args))
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return args0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildArtefactType()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildArtefactType()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuildPropertyValue getBuildArtefactType() {
|
public IBuildPropertyValue getBuildArtefactType() {
|
||||||
IBuildPropertyValue b = fCfgs[0].getBuildArtefactType();
|
IBuildPropertyValue b = fCfgs[0].getBuildArtefactType();
|
||||||
if (b == null)
|
if (b == null)
|
||||||
|
@ -280,6 +306,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildCommand()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBuildCommand() {
|
public String getBuildCommand() {
|
||||||
String s = fCfgs[0].getBuildCommand();
|
String s = fCfgs[0].getBuildCommand();
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -293,6 +320,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildData()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildData()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public CBuildData getBuildData() {
|
public CBuildData getBuildData() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getBuildData()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getBuildData()"); //$NON-NLS-1$
|
||||||
|
@ -302,6 +330,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildMacroSupplier()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuildMacroSupplier()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IConfigurationBuildMacroSupplier getBuildMacroSupplier() {
|
public IConfigurationBuildMacroSupplier getBuildMacroSupplier() {
|
||||||
IConfigurationBuildMacroSupplier ms = fCfgs[0].getBuildMacroSupplier();
|
IConfigurationBuildMacroSupplier ms = fCfgs[0].getBuildMacroSupplier();
|
||||||
if (ms == null)
|
if (ms == null)
|
||||||
|
@ -315,6 +344,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuilder()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getBuilder()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuilder getBuilder() {
|
public IBuilder getBuilder() {
|
||||||
IBuilder b = fCfgs[0].getBuilder();
|
IBuilder b = fCfgs[0].getBuilder();
|
||||||
if (b == null)
|
if (b == null)
|
||||||
|
@ -328,6 +358,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getCleanCommand()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getCleanCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getCleanCommand() {
|
public String getCleanCommand() {
|
||||||
String s = fCfgs[0].getCleanCommand();
|
String s = fCfgs[0].getCleanCommand();
|
||||||
for (int i=1; i<fCfgs.length; i++)
|
for (int i=1; i<fCfgs.length; i++)
|
||||||
|
@ -339,6 +370,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getConfigurationData()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getConfigurationData()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public CConfigurationData getConfigurationData() {
|
public CConfigurationData getConfigurationData() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getConfigurationData()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getConfigurationData()"); //$NON-NLS-1$
|
||||||
|
@ -348,6 +380,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getDescription()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getDescription()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
String s = fCfgs[0].getDescription();
|
String s = fCfgs[0].getDescription();
|
||||||
for (int i=1; i<fCfgs.length; i++)
|
for (int i=1; i<fCfgs.length; i++)
|
||||||
|
@ -359,6 +392,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getEditableBuilder()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getEditableBuilder()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuilder getEditableBuilder() {
|
public IBuilder getEditableBuilder() {
|
||||||
return curr().getEditableBuilder();
|
return curr().getEditableBuilder();
|
||||||
}
|
}
|
||||||
|
@ -366,6 +400,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getEnvironmentVariableSupplier()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getEnvironmentVariableSupplier()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier() {
|
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier() {
|
||||||
IConfigurationEnvironmentVariableSupplier vs = fCfgs[0].getEnvironmentVariableSupplier();
|
IConfigurationEnvironmentVariableSupplier vs = fCfgs[0].getEnvironmentVariableSupplier();
|
||||||
if (vs == null)
|
if (vs == null)
|
||||||
|
@ -380,6 +415,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserIds()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserIds()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getErrorParserIds() {
|
public String getErrorParserIds() {
|
||||||
String s = fCfgs[0].getErrorParserIds();
|
String s = fCfgs[0].getErrorParserIds();
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -393,6 +429,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserList()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserList()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getErrorParserList() {
|
public String[] getErrorParserList() {
|
||||||
String[] s = fCfgs[0].getErrorParserList();
|
String[] s = fCfgs[0].getErrorParserList();
|
||||||
if (s == null || s.length == 0)
|
if (s == null || s.length == 0)
|
||||||
|
@ -406,6 +443,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getFilteredTools()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getFilteredTools()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool[] getFilteredTools() {
|
public ITool[] getFilteredTools() {
|
||||||
ITool[] ts = curr().getFilteredTools();
|
ITool[] ts = curr().getFilteredTools();
|
||||||
return ts;
|
return ts;
|
||||||
|
@ -414,6 +452,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getLibs(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getLibs(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getLibs(String extension) {
|
public String[] getLibs(String extension) {
|
||||||
String[] s = fCfgs[0].getLibs(extension);
|
String[] s = fCfgs[0].getLibs(extension);
|
||||||
if (s == null || s.length == 0)
|
if (s == null || s.length == 0)
|
||||||
|
@ -427,6 +466,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getManagedProject()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getManagedProject()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IManagedProject getManagedProject() {
|
public IManagedProject getManagedProject() {
|
||||||
IManagedProject s = fCfgs[0].getManagedProject();
|
IManagedProject s = fCfgs[0].getManagedProject();
|
||||||
if (s == null)
|
if (s == null)
|
||||||
|
@ -440,6 +480,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOutputExtension(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOutputExtension(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getOutputExtension(String resourceExtension) {
|
public String getOutputExtension(String resourceExtension) {
|
||||||
String s = fCfgs[0].getOutputExtension(resourceExtension);
|
String s = fCfgs[0].getOutputExtension(resourceExtension);
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -453,6 +494,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOutputFlag(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOutputFlag(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getOutputFlag(String outputExt) {
|
public String getOutputFlag(String outputExt) {
|
||||||
String s = fCfgs[0].getOutputFlag(outputExt);
|
String s = fCfgs[0].getOutputFlag(outputExt);
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -466,6 +508,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOutputPrefix(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOutputPrefix(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getOutputPrefix(String outputExtension) {
|
public String getOutputPrefix(String outputExtension) {
|
||||||
String s = fCfgs[0].getOutputPrefix(outputExtension);
|
String s = fCfgs[0].getOutputPrefix(outputExtension);
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -479,6 +522,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOwner()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getOwner()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResource getOwner() {
|
public IResource getOwner() {
|
||||||
IResource s = fCfgs[0].getOwner();
|
IResource s = fCfgs[0].getOwner();
|
||||||
if (s == null)
|
if (s == null)
|
||||||
|
@ -492,6 +536,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getParent()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getParent()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IConfiguration getParent() {
|
public IConfiguration getParent() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.getParent()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.getParent()"); //$NON-NLS-1$
|
||||||
|
@ -501,6 +546,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPostannouncebuildStep()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPostannouncebuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPostannouncebuildStep() {
|
public String getPostannouncebuildStep() {
|
||||||
String s = fCfgs[0].getPostannouncebuildStep();
|
String s = fCfgs[0].getPostannouncebuildStep();
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -514,6 +560,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPostbuildStep()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPostbuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPostbuildStep() {
|
public String getPostbuildStep() {
|
||||||
String s = fCfgs[0].getPostbuildStep();
|
String s = fCfgs[0].getPostbuildStep();
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -527,6 +574,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPreannouncebuildStep()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPreannouncebuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPreannouncebuildStep() {
|
public String getPreannouncebuildStep() {
|
||||||
String s = fCfgs[0].getPreannouncebuildStep();
|
String s = fCfgs[0].getPreannouncebuildStep();
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -540,6 +588,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPrebuildStep()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getPrebuildStep()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getPrebuildStep() {
|
public String getPrebuildStep() {
|
||||||
String s = fCfgs[0].getPrebuildStep();
|
String s = fCfgs[0].getPrebuildStep();
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -553,6 +602,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getProjectType()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getProjectType()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IProjectType getProjectType() {
|
public IProjectType getProjectType() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getProjectType()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getProjectType()"); //$NON-NLS-1$
|
||||||
|
@ -562,6 +612,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceConfiguration(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceConfiguration(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceConfiguration getResourceConfiguration(String path) {
|
public IResourceConfiguration getResourceConfiguration(String path) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.getResourceConfiguration()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.getResourceConfiguration()"); //$NON-NLS-1$
|
||||||
|
@ -571,6 +622,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceConfigurations()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceConfigurations()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceConfiguration[] getResourceConfigurations() {
|
public IResourceConfiguration[] getResourceConfigurations() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.getResourceConfigurations()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.getResourceConfigurations()"); //$NON-NLS-1$
|
||||||
|
@ -580,6 +632,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceInfo(org.eclipse.core.runtime.IPath, boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceInfo(org.eclipse.core.runtime.IPath, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceInfo getResourceInfo(IPath path, boolean exactPath) {
|
public IResourceInfo getResourceInfo(IPath path, boolean exactPath) {
|
||||||
IResourceInfo ris[] = new IResourceInfo[fCfgs.length];
|
IResourceInfo ris[] = new IResourceInfo[fCfgs.length];
|
||||||
boolean isFolder = true;
|
boolean isFolder = true;
|
||||||
|
@ -599,6 +652,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceInfoById(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceInfoById(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceInfo getResourceInfoById(String id) {
|
public IResourceInfo getResourceInfoById(String id) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiConfiguration.getResourceInfoById()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiConfiguration.getResourceInfoById()"); //$NON-NLS-1$
|
||||||
|
@ -608,6 +662,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceInfos()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getResourceInfos()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceInfo[] getResourceInfos() {
|
public IResourceInfo[] getResourceInfos() {
|
||||||
ArrayList<IResourceInfo> ri = new ArrayList<IResourceInfo>();
|
ArrayList<IResourceInfo> ri = new ArrayList<IResourceInfo>();
|
||||||
for (int i=0; i<fCfgs.length; i++) {
|
for (int i=0; i<fCfgs.length; i++) {
|
||||||
|
@ -620,6 +675,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getRootFolderInfo()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getRootFolderInfo()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFolderInfo getRootFolderInfo() {
|
public IFolderInfo getRootFolderInfo() {
|
||||||
IFolderInfo ris[] = new IFolderInfo[fCfgs.length];
|
IFolderInfo ris[] = new IFolderInfo[fCfgs.length];
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
|
@ -630,6 +686,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getSourceEntries()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getSourceEntries()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICSourceEntry[] getSourceEntries() {
|
public ICSourceEntry[] getSourceEntries() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getSourceEntries()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getSourceEntries()"); //$NON-NLS-1$
|
||||||
|
@ -639,6 +696,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTargetTool()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTargetTool()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool getTargetTool() {
|
public ITool getTargetTool() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getTargetTool()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getTargetTool()"); //$NON-NLS-1$
|
||||||
|
@ -648,6 +706,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTool(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTool(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool getTool(String id) {
|
public ITool getTool(String id) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getTool()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getTool()"); //$NON-NLS-1$
|
||||||
|
@ -657,6 +716,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolChain()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolChain()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IToolChain getToolChain() {
|
public IToolChain getToolChain() {
|
||||||
return curr().getToolChain();
|
return curr().getToolChain();
|
||||||
}
|
}
|
||||||
|
@ -664,6 +724,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolCommand(org.eclipse.cdt.managedbuilder.core.ITool)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolCommand(org.eclipse.cdt.managedbuilder.core.ITool)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getToolCommand(ITool tool) {
|
public String getToolCommand(ITool tool) {
|
||||||
return curr().getToolCommand(tool);
|
return curr().getToolCommand(tool);
|
||||||
}
|
}
|
||||||
|
@ -671,6 +732,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolFromInputExtension(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolFromInputExtension(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool getToolFromInputExtension(String sourceExtension) {
|
public ITool getToolFromInputExtension(String sourceExtension) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getToolFromInputExtension()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getToolFromInputExtension()"); //$NON-NLS-1$
|
||||||
|
@ -680,6 +742,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolFromOutputExtension(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolFromOutputExtension(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool getToolFromOutputExtension(String extension) {
|
public ITool getToolFromOutputExtension(String extension) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getToolFromOutputExtension()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getToolFromOutputExtension()"); //$NON-NLS-1$
|
||||||
|
@ -689,6 +752,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTools()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getTools()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool[] getTools() {
|
public ITool[] getTools() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getTools()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getTools()"); //$NON-NLS-1$
|
||||||
|
@ -698,6 +762,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolsBySuperClassId(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getToolsBySuperClassId(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITool[] getToolsBySuperClassId(String id) {
|
public ITool[] getToolsBySuperClassId(String id) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getToolsBySuperClassId()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getToolsBySuperClassId()"); //$NON-NLS-1$
|
||||||
|
@ -707,6 +772,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getUserObjects(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getUserObjects(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getUserObjects(String extension) {
|
public String[] getUserObjects(String extension) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getUserObjects()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getUserObjects()"); //$NON-NLS-1$
|
||||||
|
@ -716,6 +782,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#hasOverriddenBuildCommand()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#hasOverriddenBuildCommand()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasOverriddenBuildCommand() {
|
public boolean hasOverriddenBuildCommand() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i].hasOverriddenBuildCommand())
|
if (fCfgs[i].hasOverriddenBuildCommand())
|
||||||
|
@ -726,6 +793,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isBuilderCompatible(org.eclipse.cdt.managedbuilder.core.IBuilder)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isBuilderCompatible(org.eclipse.cdt.managedbuilder.core.IBuilder)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isBuilderCompatible(IBuilder builder) {
|
public boolean isBuilderCompatible(IBuilder builder) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (! fCfgs[i].isBuilderCompatible(builder))
|
if (! fCfgs[i].isBuilderCompatible(builder))
|
||||||
|
@ -736,6 +804,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isDirty()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isDirty()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isDirty() {
|
public boolean isDirty() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i].isDirty())
|
if (fCfgs[i].isDirty())
|
||||||
|
@ -746,6 +815,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isExtensionElement()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isExtensionElement()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isExtensionElement() {
|
public boolean isExtensionElement() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.isExtensionElement()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.isExtensionElement()"); //$NON-NLS-1$
|
||||||
|
@ -755,6 +825,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isHeaderFile(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isHeaderFile(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isHeaderFile(String ext) {
|
public boolean isHeaderFile(String ext) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.isHeaderFile()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.isHeaderFile()"); //$NON-NLS-1$
|
||||||
|
@ -764,6 +835,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isManagedBuildOn()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isManagedBuildOn()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isManagedBuildOn() {
|
public boolean isManagedBuildOn() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (! fCfgs[i].isManagedBuildOn())
|
if (! fCfgs[i].isManagedBuildOn())
|
||||||
|
@ -781,6 +853,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isSupported()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isSupported()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i].isSupported())
|
if (fCfgs[i].isSupported())
|
||||||
|
@ -791,6 +864,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isSystemObject()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isSystemObject()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSystemObject() {
|
public boolean isSystemObject() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (! fCfgs[i].isSystemObject())
|
if (! fCfgs[i].isSystemObject())
|
||||||
|
@ -801,6 +875,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isTemporary()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#isTemporary()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isTemporary() {
|
public boolean isTemporary() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (! fCfgs[i].isTemporary())
|
if (! fCfgs[i].isTemporary())
|
||||||
|
@ -811,6 +886,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#needsFullRebuild()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#needsFullRebuild()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean needsFullRebuild() {
|
public boolean needsFullRebuild() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i].needsFullRebuild())
|
if (fCfgs[i].needsFullRebuild())
|
||||||
|
@ -821,6 +897,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#needsRebuild()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#needsRebuild()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean needsRebuild() {
|
public boolean needsRebuild() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i].needsRebuild())
|
if (fCfgs[i].needsRebuild())
|
||||||
|
@ -831,6 +908,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#removeResourceConfiguration(org.eclipse.cdt.managedbuilder.core.IResourceInfo)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#removeResourceConfiguration(org.eclipse.cdt.managedbuilder.core.IResourceInfo)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeResourceConfiguration(IResourceInfo resConfig) {
|
public void removeResourceConfiguration(IResourceInfo resConfig) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].removeResourceConfiguration(resConfig);
|
fCfgs[i].removeResourceConfiguration(resConfig);
|
||||||
|
@ -839,6 +917,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#removeResourceInfo(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#removeResourceInfo(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeResourceInfo(IPath path) {
|
public void removeResourceInfo(IPath path) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].removeResourceInfo(path);
|
fCfgs[i].removeResourceInfo(path);
|
||||||
|
@ -847,6 +926,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactExtension(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactExtension(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setArtifactExtension(String extension) {
|
public void setArtifactExtension(String extension) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setArtifactExtension(extension);
|
fCfgs[i].setArtifactExtension(extension);
|
||||||
|
@ -855,6 +935,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactName(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactName(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setArtifactName(String name) {
|
public void setArtifactName(String name) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setArtifactName(name);
|
fCfgs[i].setArtifactName(name);
|
||||||
|
@ -863,6 +944,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildArguments(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildArguments(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setBuildArguments(String makeArgs) {
|
public void setBuildArguments(String makeArgs) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setBuildArguments(makeArgs);
|
fCfgs[i].setBuildArguments(makeArgs);
|
||||||
|
@ -871,6 +953,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildArtefactType(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildArtefactType(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setBuildArtefactType(String id) throws BuildException {
|
public void setBuildArtefactType(String id) throws BuildException {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setBuildArtefactType(id);
|
fCfgs[i].setBuildArtefactType(id);
|
||||||
|
@ -879,6 +962,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildCommand(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setBuildCommand(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setBuildCommand(String command) {
|
public void setBuildCommand(String command) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setBuildCommand(command);
|
fCfgs[i].setBuildCommand(command);
|
||||||
|
@ -887,6 +971,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setCleanCommand(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setCleanCommand(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setCleanCommand(String command) {
|
public void setCleanCommand(String command) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setCleanCommand(command);
|
fCfgs[i].setCleanCommand(command);
|
||||||
|
@ -895,6 +980,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setDescription(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setDescription(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setDescription(description);
|
fCfgs[i].setDescription(description);
|
||||||
|
@ -903,6 +989,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setDirty(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setDirty(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDirty(boolean isDirty) {
|
public void setDirty(boolean isDirty) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setDirty(isDirty);
|
fCfgs[i].setDirty(isDirty);
|
||||||
|
@ -911,6 +998,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setErrorParserIds(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setErrorParserIds(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setErrorParserIds(String ids) {
|
public void setErrorParserIds(String ids) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setErrorParserIds(ids);
|
fCfgs[i].setErrorParserIds(ids);
|
||||||
|
@ -919,6 +1007,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setErrorParserList(java.lang.String[])
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setErrorParserList(java.lang.String[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setErrorParserList(String[] ids) {
|
public void setErrorParserList(String[] ids) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setErrorParserList(ids);
|
fCfgs[i].setErrorParserList(ids);
|
||||||
|
@ -927,6 +1016,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setManagedBuildOn(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setManagedBuildOn(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setManagedBuildOn(boolean on) throws BuildException {
|
public void setManagedBuildOn(boolean on) throws BuildException {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setManagedBuildOn(on);
|
fCfgs[i].setManagedBuildOn(on);
|
||||||
|
@ -935,11 +1025,13 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setName(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setName(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setName(String name) {} // do nothing
|
public void setName(String name) {} // do nothing
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
|
public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
|
||||||
throws BuildException {
|
throws BuildException {
|
||||||
IOption op = null;
|
IOption op = null;
|
||||||
|
@ -951,6 +1043,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IOption setOption(IHoldsOptions parent, IOption option, String value)
|
public IOption setOption(IHoldsOptions parent, IOption option, String value)
|
||||||
throws BuildException {
|
throws BuildException {
|
||||||
IOption op = null;
|
IOption op = null;
|
||||||
|
@ -962,6 +1055,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, java.lang.String[])
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, java.lang.String[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IOption setOption(IHoldsOptions parent, IOption option,
|
public IOption setOption(IHoldsOptions parent, IOption option,
|
||||||
String[] value) throws BuildException {
|
String[] value) throws BuildException {
|
||||||
IOption op = null;
|
IOption op = null;
|
||||||
|
@ -973,6 +1067,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPostannouncebuildStep(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPostannouncebuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPostannouncebuildStep(String announceStep) {
|
public void setPostannouncebuildStep(String announceStep) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setPostannouncebuildStep(announceStep);
|
fCfgs[i].setPostannouncebuildStep(announceStep);
|
||||||
|
@ -981,6 +1076,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPostbuildStep(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPostbuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPostbuildStep(String step) {
|
public void setPostbuildStep(String step) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setPostbuildStep(step);
|
fCfgs[i].setPostbuildStep(step);
|
||||||
|
@ -989,6 +1085,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPreannouncebuildStep(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPreannouncebuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPreannouncebuildStep(String announceStep) {
|
public void setPreannouncebuildStep(String announceStep) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setPreannouncebuildStep(announceStep);
|
fCfgs[i].setPreannouncebuildStep(announceStep);
|
||||||
|
@ -997,6 +1094,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPrebuildStep(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setPrebuildStep(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setPrebuildStep(String step) {
|
public void setPrebuildStep(String step) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setPrebuildStep(step);
|
fCfgs[i].setPrebuildStep(step);
|
||||||
|
@ -1005,6 +1103,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setRebuildState(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setRebuildState(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setRebuildState(boolean rebuild) {
|
public void setRebuildState(boolean rebuild) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setRebuildState(rebuild);
|
fCfgs[i].setRebuildState(rebuild);
|
||||||
|
@ -1013,6 +1112,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setSourceEntries(org.eclipse.cdt.core.settings.model.ICSourceEntry[])
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setSourceEntries(org.eclipse.cdt.core.settings.model.ICSourceEntry[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setSourceEntries(ICSourceEntry[] entries) {
|
public void setSourceEntries(ICSourceEntry[] entries) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setSourceEntries(entries);
|
fCfgs[i].setSourceEntries(entries);
|
||||||
|
@ -1021,6 +1121,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setToolCommand(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setToolCommand(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setToolCommand(ITool tool, String command) {
|
public void setToolCommand(ITool tool, String command) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].setToolCommand(tool, command);
|
fCfgs[i].setToolCommand(tool, command);
|
||||||
|
@ -1029,6 +1130,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#supportsBuild(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#supportsBuild(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean supportsBuild(boolean managed) {
|
public boolean supportsBuild(boolean managed) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (! fCfgs[i].supportsBuild(managed))
|
if (! fCfgs[i].supportsBuild(managed))
|
||||||
|
@ -1039,6 +1141,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getBaseId()
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getBaseId()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBaseId() {
|
public String getBaseId() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getBaseId()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getBaseId()"); //$NON-NLS-1$
|
||||||
|
@ -1048,6 +1151,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getId()
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getId()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return curr().getId() + "_etc"; //$NON-NLS-1$
|
return curr().getId() + "_etc"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -1055,6 +1159,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getManagedBuildRevision()
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getManagedBuildRevision()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getManagedBuildRevision() {
|
public String getManagedBuildRevision() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getMngBuildRevision()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getMngBuildRevision()"); //$NON-NLS-1$
|
||||||
|
@ -1064,6 +1169,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getName()
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Multiple configurations"; //$NON-NLS-1$
|
return "Multiple configurations"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -1071,6 +1177,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getVersion()
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#getVersion()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Version getVersion() {
|
public Version getVersion() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.getVersion()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.getVersion()"); //$NON-NLS-1$
|
||||||
|
@ -1080,61 +1187,69 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#setVersion(org.eclipse.core.runtime.PluginVersionIdentifier)
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildObject#setVersion(org.eclipse.core.runtime.PluginVersionIdentifier)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setVersion(Version version) {} // do nothing
|
public void setVersion(Version version) {} // do nothing
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildObjectPropertiesContainer#getBuildProperties()
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildObjectPropertiesContainer#getBuildProperties()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuildObjectProperties getBuildProperties() {
|
public IBuildObjectProperties getBuildProperties() {
|
||||||
return curr().getBuildProperties();
|
return curr().getBuildProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getParallelDef() {
|
public boolean getParallelDef() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (IConfiguration cfg : fCfgs) {
|
||||||
if (fCfgs[i] instanceof Configuration) {
|
if (cfg instanceof Configuration) {
|
||||||
if (!((Configuration)fCfgs[i]).getParallelDef())
|
if (!((Configuration)cfg).getParallelDef())
|
||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
return true; // all cfgs report true
|
return true; // all cfgs report true
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParallelDef(boolean def) {
|
@Override
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
public void setParallelDef(boolean parallel) {
|
||||||
if (fCfgs[i] instanceof Configuration)
|
for (IConfiguration cfg : fCfgs) {
|
||||||
((Configuration)fCfgs[i]).setParallelDef(def);
|
if (cfg instanceof Configuration)
|
||||||
|
((Configuration)cfg).setParallelDef(parallel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getParallelNumber() {
|
public int getParallelNumber() {
|
||||||
int res = -1;
|
int res = 0;
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (IConfiguration cfg : fCfgs) {
|
||||||
if (fCfgs[i] instanceof Configuration) {
|
if (cfg instanceof Configuration) {
|
||||||
int x = ((Configuration)fCfgs[i]).getParallelNumber();
|
int num = ((Configuration)cfg).getParallelNumber();
|
||||||
if (res == -1)
|
Assert.isTrue(num != 0); // can't be 0, see IMakeCommonBuildInfo.getParallelizationNum()
|
||||||
res = x;
|
|
||||||
else if (res != x)
|
if (res == 0)
|
||||||
|
res = num;
|
||||||
|
else if (res != num)
|
||||||
return 0; // values are different !
|
return 0; // values are different !
|
||||||
} else
|
} else
|
||||||
return 0;
|
return 0;
|
||||||
return (res == -1 ? 0: res); // all cfgs report true
|
}
|
||||||
|
return res; // all cfgs report same value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setParallelNumber(int num) {
|
public void setParallelNumber(int num) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (IConfiguration cfg : fCfgs) {
|
||||||
if (fCfgs[i] instanceof Configuration)
|
if (cfg instanceof Configuration)
|
||||||
((Configuration)fCfgs[i]).setParallelNumber(num);
|
((Configuration)cfg).setParallelNumber(num);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getInternalBuilderParallel() {
|
public boolean getInternalBuilderParallel() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
return getParallelDef();
|
||||||
if (fCfgs[i] instanceof Configuration) {
|
|
||||||
if (!((Configuration)fCfgs[i]).getInternalBuilderParallel())
|
|
||||||
return false;
|
|
||||||
} else
|
|
||||||
return false;
|
|
||||||
return true; // all cfgs report true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isInternalBuilderEnabled() {
|
public boolean isInternalBuilderEnabled() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i] instanceof Configuration) {
|
if (fCfgs[i] instanceof Configuration) {
|
||||||
|
@ -1145,6 +1260,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return true; // all cfgs report true
|
return true; // all cfgs report true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canEnableInternalBuilder(boolean v) {
|
public boolean canEnableInternalBuilder(boolean v) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i] instanceof Configuration) {
|
if (fCfgs[i] instanceof Configuration) {
|
||||||
|
@ -1155,6 +1271,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return true; // all cfgs report true
|
return true; // all cfgs report true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void enableInternalBuilder(boolean v) {
|
public void enableInternalBuilder(boolean v) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i] instanceof Configuration)
|
if (fCfgs[i] instanceof Configuration)
|
||||||
|
@ -1168,6 +1285,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return fCfgs[curr];
|
return fCfgs[curr];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getToolOutputPrefix() {
|
public String getToolOutputPrefix() {
|
||||||
String s = fCfgs[0].calculateTargetTool().getOutputPrefix();
|
String s = fCfgs[0].calculateTargetTool().getOutputPrefix();
|
||||||
if (s == null || s.length() == 0)
|
if (s == null || s.length() == 0)
|
||||||
|
@ -1178,11 +1296,13 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setOutputPrefixForPrimaryOutput(String pref) {
|
public void setOutputPrefixForPrimaryOutput(String pref) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
fCfgs[i].calculateTargetTool().setOutputPrefixForPrimaryOutput(pref);
|
fCfgs[i].calculateTargetTool().setOutputPrefixForPrimaryOutput(pref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBuildProperty getBuildProperty(String id) {
|
public IBuildProperty getBuildProperty(String id) {
|
||||||
IBuildProperty b = fCfgs[0].getBuildProperties().getProperty(id);
|
IBuildProperty b = fCfgs[0].getBuildProperties().getProperty(id);
|
||||||
if (b == null )
|
if (b == null )
|
||||||
|
@ -1196,6 +1316,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
}
|
}
|
||||||
|
|
||||||
// Performing conjunction of supported values for each cfg
|
// Performing conjunction of supported values for each cfg
|
||||||
|
@Override
|
||||||
public IBuildPropertyValue[] getSupportedValues(String id) {
|
public IBuildPropertyValue[] getSupportedValues(String id) {
|
||||||
IBuildPropertyValue[] a = fCfgs[0].getBuildProperties().getSupportedValues(id);
|
IBuildPropertyValue[] a = fCfgs[0].getBuildProperties().getSupportedValues(id);
|
||||||
if (a == null || a.length == 0)
|
if (a == null || a.length == 0)
|
||||||
|
@ -1232,6 +1353,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setBuildProperty(String id, String val) {
|
public void setBuildProperty(String id, String val) {
|
||||||
try {
|
try {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2010 QNX Software Systems and others.
|
* Copyright (c) 2004, 2011 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.newmake.core;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.managedbuilder.internal.core.Builder;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
|
||||||
|
@ -42,10 +43,45 @@ public interface IMakeCommonBuildInfo {
|
||||||
void setStopOnError(boolean on) throws CoreException;
|
void setStopOnError(boolean on) throws CoreException;
|
||||||
boolean supportsStopOnError(boolean on);
|
boolean supportsStopOnError(boolean on);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the current number of parallel jobs.
|
||||||
|
* The value of the number is encoded as follows:
|
||||||
|
* <pre>
|
||||||
|
* Status Returns
|
||||||
|
* No parallel 1
|
||||||
|
* Unlimited Integer.MAX (N/A for Internal Builder)
|
||||||
|
* Optimal -CPU# (negative number of processors)
|
||||||
|
* Specific >0 (positive number)
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
int getParallelizationNum();
|
int getParallelizationNum();
|
||||||
void setParallelizationNum(int num) throws CoreException;
|
|
||||||
|
/**
|
||||||
|
* Sets maximum number of parallel threads/jobs to be used by builder.
|
||||||
|
* Note that the number will be set only if the builder is in "parallel"
|
||||||
|
* mode.
|
||||||
|
*
|
||||||
|
* @param jobs - number of jobs according table {@link #getParallelizationNum()}.
|
||||||
|
* Any number <=0 is treated as setting "optimal" property,
|
||||||
|
* the value of the number itself is ignored.
|
||||||
|
*/
|
||||||
|
void setParallelizationNum(int jobs) throws CoreException;
|
||||||
|
/**
|
||||||
|
* @return {@code true} if builder supports parallel build,
|
||||||
|
* {@code false} otherwise.
|
||||||
|
*/
|
||||||
boolean supportsParallelBuild();
|
boolean supportsParallelBuild();
|
||||||
|
/**
|
||||||
|
* @return {@code true} if builder support for parallel build is enabled,
|
||||||
|
* {@code false} otherwise.
|
||||||
|
*/
|
||||||
boolean isParallelBuildOn();
|
boolean isParallelBuildOn();
|
||||||
|
/**
|
||||||
|
* Set parallel execution mode for the builder.
|
||||||
|
* @see Builder#setParallelBuildOn(boolean)
|
||||||
|
*
|
||||||
|
* @param on - the flag to enable or disable parallel mode.
|
||||||
|
*/
|
||||||
void setParallelBuildOn(boolean on) throws CoreException;
|
void setParallelBuildOn(boolean on) throws CoreException;
|
||||||
|
|
||||||
boolean isDefaultBuildCmd();
|
boolean isDefaultBuildCmd();
|
||||||
|
|
|
@ -27,9 +27,10 @@ public class Messages extends NLS {
|
||||||
public static String BuilderSettingsTab_0;
|
public static String BuilderSettingsTab_0;
|
||||||
public static String BuilderSettingsTab_1;
|
public static String BuilderSettingsTab_1;
|
||||||
public static String BuilderSettingsTab_10;
|
public static String BuilderSettingsTab_10;
|
||||||
public static String BuilderSettingsTab_11;
|
public static String BuilderSettingsTab_EnableParallelBuild;
|
||||||
public static String BuilderSettingsTab_12;
|
public static String BuilderSettingsTab_UseOptimalJobs;
|
||||||
public static String BuilderSettingsTab_13;
|
public static String BuilderSettingsTab_UseUnlimitedJobs;
|
||||||
|
public static String BuilderSettingsTab_UseParallelJobs;
|
||||||
public static String BuilderSettingsTab_14;
|
public static String BuilderSettingsTab_14;
|
||||||
public static String BuilderSettingsTab_15;
|
public static String BuilderSettingsTab_15;
|
||||||
public static String BuilderSettingsTab_16;
|
public static String BuilderSettingsTab_16;
|
||||||
|
|
|
@ -31,9 +31,10 @@ BuilderSettingsTab_7=&Generate Makefiles automatically
|
||||||
BuilderSettingsTab_8=&Expand Env. Variable Refs in Makefiles
|
BuilderSettingsTab_8=&Expand Env. Variable Refs in Makefiles
|
||||||
BuilderSettingsTab_9=Build settings
|
BuilderSettingsTab_9=Build settings
|
||||||
BuilderSettingsTab_10=Stop on first build error
|
BuilderSettingsTab_10=Stop on first build error
|
||||||
BuilderSettingsTab_11=Use parallel build
|
BuilderSettingsTab_EnableParallelBuild=Enable parallel build
|
||||||
BuilderSettingsTab_12=Use optimal jobs number
|
BuilderSettingsTab_UseOptimalJobs=Use number of processors ({0})
|
||||||
BuilderSettingsTab_13=Use parallel jobs:
|
BuilderSettingsTab_UseParallelJobs=Use parallel jobs:
|
||||||
|
BuilderSettingsTab_UseUnlimitedJobs=Use unlimited jobs
|
||||||
BuilderSettingsTab_14=Workbench Build Behavior
|
BuilderSettingsTab_14=Workbench Build Behavior
|
||||||
BuilderSettingsTab_15=Workbench build type:
|
BuilderSettingsTab_15=Workbench build type:
|
||||||
BuilderSettingsTab_16=Make build target:
|
BuilderSettingsTab_16=Make build target:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2010 Intel Corporation and others.
|
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -11,6 +11,8 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.managedbuilder.ui.properties;
|
package org.eclipse.cdt.managedbuilder.ui.properties;
|
||||||
|
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICMultiConfigDescription;
|
import org.eclipse.cdt.core.settings.model.ICMultiConfigDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICMultiItemsHolder;
|
import org.eclipse.cdt.core.settings.model.ICMultiItemsHolder;
|
||||||
|
@ -18,12 +20,12 @@ import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildProcessManager;
|
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Builder;
|
import org.eclipse.cdt.managedbuilder.internal.core.Builder;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.MultiConfiguration;
|
import org.eclipse.cdt.managedbuilder.internal.core.MultiConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||||
import org.eclipse.cdt.newmake.core.IMakeBuilderInfo;
|
import org.eclipse.cdt.newmake.core.IMakeBuilderInfo;
|
||||||
|
import org.eclipse.cdt.newmake.core.IMakeCommonBuildInfo;
|
||||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||||
import org.eclipse.cdt.ui.newui.ICPropertyProvider;
|
import org.eclipse.cdt.ui.newui.ICPropertyProvider;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -51,6 +53,7 @@ import org.eclipse.swt.widgets.Widget;
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
*/
|
*/
|
||||||
public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
|
private static final int SPINNER_MAX_VALUE = 10000;
|
||||||
|
|
||||||
private static final int TRI_STATES_SIZE = 4;
|
private static final int TRI_STATES_SIZE = 4;
|
||||||
// Widgets
|
// Widgets
|
||||||
|
@ -58,9 +61,10 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
private Button b_stopOnError; // 3
|
private Button b_stopOnError; // 3
|
||||||
private Button b_parallel; // 3
|
private Button b_parallel; // 3
|
||||||
|
|
||||||
private Button b_parallelOpt;
|
private Button b_parallelOptimal;
|
||||||
private Button b_parallelNum;
|
private Button b_parallelSpecific;
|
||||||
private Spinner parallelProcesses;
|
private Button b_parallelUnlimited;
|
||||||
|
private Spinner s_parallelNumber;
|
||||||
|
|
||||||
private Label title2;
|
private Label title2;
|
||||||
private Button b_autoBuild; //3
|
private Button b_autoBuild; //3
|
||||||
|
@ -70,11 +74,11 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
private Button b_cmdClean; // 3
|
private Button b_cmdClean; // 3
|
||||||
private Text t_cmdClean;
|
private Text t_cmdClean;
|
||||||
|
|
||||||
private IBuilder bldr;
|
private Builder bldr;
|
||||||
private IConfiguration icfg;
|
private IConfiguration icfg;
|
||||||
private boolean canModify = true;
|
private boolean canModify = true;
|
||||||
|
|
||||||
protected final int cpuNumber = BuildProcessManager.checkCPUNumber();
|
protected final int cpuNumber = Runtime.getRuntime().availableProcessors();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createControls(Composite parent) {
|
public void createControls(Composite parent) {
|
||||||
|
@ -110,7 +114,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
gl.marginHeight = 0;
|
gl.marginHeight = 0;
|
||||||
c2.setLayout(gl);
|
c2.setLayout(gl);
|
||||||
|
|
||||||
b_parallel = setupCheck(c2, Messages.BuilderSettingsTab_11, 1, GridData.BEGINNING);
|
b_parallel = setupCheck(c2, Messages.BuilderSettingsTab_EnableParallelBuild, 1, GridData.BEGINNING);
|
||||||
|
|
||||||
Composite c3 = new Composite(g3, SWT.NONE);
|
Composite c3 = new Composite(g3, SWT.NONE);
|
||||||
setupControl(c3, 1, GridData.FILL_BOTH);
|
setupControl(c3, 1, GridData.FILL_BOTH);
|
||||||
|
@ -120,39 +124,60 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
gl.marginHeight = 0;
|
gl.marginHeight = 0;
|
||||||
c3.setLayout(gl);
|
c3.setLayout(gl);
|
||||||
|
|
||||||
b_parallelOpt= new Button(c3, SWT.RADIO);
|
b_parallelOptimal= new Button(c3, SWT.RADIO);
|
||||||
b_parallelOpt.setText(Messages.BuilderSettingsTab_12);
|
b_parallelOptimal.setText(MessageFormat.format(Messages.BuilderSettingsTab_UseOptimalJobs, 1));
|
||||||
setupControl(b_parallelOpt, 2, GridData.BEGINNING);
|
setupControl(b_parallelOptimal, 2, GridData.BEGINNING);
|
||||||
((GridData)(b_parallelOpt.getLayoutData())).horizontalIndent = 15;
|
((GridData)(b_parallelOptimal.getLayoutData())).horizontalIndent = 15;
|
||||||
b_parallelOpt.addSelectionListener(new SelectionAdapter() {
|
b_parallelOptimal.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
setParallelDef(b_parallelOpt.getSelection());
|
if (b_parallelOptimal.getSelection()) {
|
||||||
|
setParallelDef(true);
|
||||||
|
setParallelNumber(-1);
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
}
|
||||||
}});
|
}});
|
||||||
|
|
||||||
b_parallelNum= new Button(c3, SWT.RADIO);
|
b_parallelSpecific= new Button(c3, SWT.RADIO);
|
||||||
b_parallelNum.setText(Messages.BuilderSettingsTab_13);
|
b_parallelSpecific.setText(Messages.BuilderSettingsTab_UseParallelJobs);
|
||||||
setupControl(b_parallelNum, 1, GridData.BEGINNING);
|
setupControl(b_parallelSpecific, 1, GridData.BEGINNING);
|
||||||
((GridData)(b_parallelNum.getLayoutData())).horizontalIndent = 15;
|
((GridData)(b_parallelSpecific.getLayoutData())).horizontalIndent = 15;
|
||||||
b_parallelNum.addSelectionListener(new SelectionAdapter() {
|
b_parallelSpecific.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
setParallelDef(!b_parallelNum.getSelection());
|
if (b_parallelSpecific.getSelection()) {
|
||||||
|
setParallelDef(true);
|
||||||
|
setParallelNumber(s_parallelNumber.getSelection());
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
}
|
||||||
}});
|
}});
|
||||||
|
|
||||||
parallelProcesses = new Spinner(c3, SWT.BORDER);
|
s_parallelNumber = new Spinner(c3, SWT.BORDER);
|
||||||
setupControl(parallelProcesses, 1, GridData.BEGINNING);
|
setupControl(s_parallelNumber, 1, GridData.BEGINNING);
|
||||||
parallelProcesses.setValues(cpuNumber, 1, 10000, 0, 1, 10);
|
s_parallelNumber.setValues(cpuNumber, 1, SPINNER_MAX_VALUE, 0, 1, 10);
|
||||||
parallelProcesses.addSelectionListener(new SelectionAdapter () {
|
s_parallelNumber.addSelectionListener(new SelectionAdapter () {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
setParallelNumber(parallelProcesses.getSelection());
|
setParallelDef(true);
|
||||||
|
setParallelNumber(s_parallelNumber.getSelection());
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
b_parallelUnlimited= new Button(c3, SWT.RADIO);
|
||||||
|
b_parallelUnlimited.setText(Messages.BuilderSettingsTab_UseUnlimitedJobs);
|
||||||
|
setupControl(b_parallelUnlimited, 2, GridData.BEGINNING);
|
||||||
|
((GridData)(b_parallelUnlimited.getLayoutData())).horizontalIndent = 15;
|
||||||
|
b_parallelUnlimited.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@Override
|
||||||
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
if (b_parallelUnlimited.getSelection()) {
|
||||||
|
setParallelDef(true);
|
||||||
|
setParallelNumber(Integer.MAX_VALUE);
|
||||||
|
updateButtons();
|
||||||
|
}
|
||||||
|
}});
|
||||||
|
|
||||||
// Workbench behaviour group
|
// Workbench behaviour group
|
||||||
AccessibleListener makeTargetLabelAccessibleListener = new AccessibleAdapter() {
|
AccessibleListener makeTargetLabelAccessibleListener = new AccessibleAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -166,6 +191,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
b_autoBuild = setupCheck(g4, Messages.BuilderSettingsTab_17, 1, GridData.BEGINNING);
|
b_autoBuild = setupCheck(g4, Messages.BuilderSettingsTab_17, 1, GridData.BEGINNING);
|
||||||
t_autoBuild = setupBlock(g4, b_autoBuild);
|
t_autoBuild = setupBlock(g4, b_autoBuild);
|
||||||
t_autoBuild.addModifyListener(new ModifyListener() {
|
t_autoBuild.addModifyListener(new ModifyListener() {
|
||||||
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if (canModify)
|
if (canModify)
|
||||||
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_AUTO, t_autoBuild.getText());
|
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_AUTO, t_autoBuild.getText());
|
||||||
|
@ -175,6 +201,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
b_cmdBuild = setupCheck(g4, Messages.BuilderSettingsTab_19, 1, GridData.BEGINNING);
|
b_cmdBuild = setupCheck(g4, Messages.BuilderSettingsTab_19, 1, GridData.BEGINNING);
|
||||||
t_cmdBuild = setupBlock(g4, b_cmdBuild);
|
t_cmdBuild = setupBlock(g4, b_cmdBuild);
|
||||||
t_cmdBuild.addModifyListener(new ModifyListener() {
|
t_cmdBuild.addModifyListener(new ModifyListener() {
|
||||||
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if (canModify)
|
if (canModify)
|
||||||
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL, t_cmdBuild.getText());
|
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL, t_cmdBuild.getText());
|
||||||
|
@ -183,6 +210,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
b_cmdClean = setupCheck(g4, Messages.BuilderSettingsTab_20, 1, GridData.BEGINNING);
|
b_cmdClean = setupCheck(g4, Messages.BuilderSettingsTab_20, 1, GridData.BEGINNING);
|
||||||
t_cmdClean = setupBlock(g4, b_cmdClean);
|
t_cmdClean = setupBlock(g4, b_cmdClean);
|
||||||
t_cmdClean.addModifyListener(new ModifyListener() {
|
t_cmdClean.addModifyListener(new ModifyListener() {
|
||||||
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if (canModify)
|
if (canModify)
|
||||||
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_CLEAN, t_cmdClean.getText());
|
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_CLEAN, t_cmdClean.getText());
|
||||||
|
@ -191,6 +219,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calculate enablements when multiple configurations selected on property page.
|
||||||
*
|
*
|
||||||
* @return:
|
* @return:
|
||||||
* Mode 0:
|
* Mode 0:
|
||||||
|
@ -202,55 +231,54 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
* 0: isStopOnError
|
* 0: isStopOnError
|
||||||
* 1: supportsStopOnError(true)
|
* 1: supportsStopOnError(true)
|
||||||
* 2: bld.supportsStopOnError(false)
|
* 2: bld.supportsStopOnError(false)
|
||||||
* 3: cfg.getInternalBuilderParallel()
|
* 3: cfg.getParallelDef()
|
||||||
* Mode 2:
|
* Mode 2:
|
||||||
* 0: b.isAutoBuildEnable()
|
* 0: b.isAutoBuildEnable()
|
||||||
* 1: b.isIncrementalBuildEnabled()
|
* 1: b.isIncrementalBuildEnabled()
|
||||||
* 2: b.isCleanBuildEnabled()
|
* 2: b.isCleanBuildEnabled()
|
||||||
* 3: getParallelDef()
|
* 3: getParallelDef()
|
||||||
*/
|
*/
|
||||||
static int[] calc3states(ICPropertyProvider p,
|
static int[] calc3states(ICPropertyProvider p, IConfiguration mcfg, int mode) {
|
||||||
IConfiguration c,
|
if (p.isMultiCfg() && mcfg instanceof ICMultiItemsHolder) {
|
||||||
int mode) {
|
boolean m0 = (mode == 0);
|
||||||
if (p.isMultiCfg() &&
|
boolean m1 = (mode == 1);
|
||||||
c instanceof ICMultiItemsHolder)
|
|
||||||
{
|
|
||||||
boolean p0 = (mode == 0);
|
|
||||||
boolean p1 = (mode == 1);
|
|
||||||
|
|
||||||
IConfiguration[] cfs = (IConfiguration[])((ICMultiItemsHolder)c).getItems();
|
IConfiguration[] cfgs = (IConfiguration[])((ICMultiItemsHolder)mcfg).getItems();
|
||||||
IBuilder b = cfs[0].getBuilder();
|
IBuilder bldr0 = cfgs[0].getBuilder();
|
||||||
int[] res = new int[TRI_STATES_SIZE];
|
int[] res = new int[TRI_STATES_SIZE];
|
||||||
boolean[] x = new boolean[TRI_STATES_SIZE];
|
boolean[] b = new boolean[TRI_STATES_SIZE];
|
||||||
x[0] = p0 ? b.isManagedBuildOn() :
|
b[0] = m0 ? bldr0.isManagedBuildOn() :
|
||||||
(p1 ? b.isStopOnError() : b.isAutoBuildEnable());
|
(m1 ? bldr0.isStopOnError() : bldr0.isAutoBuildEnable());
|
||||||
x[1] = p0 ? b.isDefaultBuildCmd():
|
b[1] = m0 ? bldr0.isDefaultBuildCmd():
|
||||||
(p1 ? b.supportsStopOnError(true) : b.isIncrementalBuildEnabled() );
|
(m1 ? bldr0.supportsStopOnError(true) : bldr0.isIncrementalBuildEnabled() );
|
||||||
x[2] = p0 ? b.canKeepEnvironmentVariablesInBuildfile() :
|
b[2] = m0 ? bldr0.canKeepEnvironmentVariablesInBuildfile() :
|
||||||
(p1 ? b.supportsStopOnError(false) : b.isCleanBuildEnabled());
|
(m1 ? bldr0.supportsStopOnError(false) : bldr0.isCleanBuildEnabled());
|
||||||
x[3] = p0 ? b.keepEnvironmentVariablesInBuildfile() :
|
b[3] = m0 ? bldr0.keepEnvironmentVariablesInBuildfile() :
|
||||||
( p1 ? ((Configuration)cfs[0]).getInternalBuilderParallel() : getParallelDef(c));
|
(m1 ? ((Configuration)cfgs[0]).getParallelDef() : getParallelDef(mcfg));
|
||||||
for (int i=1; i<cfs.length; i++) {
|
for (int i=1; i<cfgs.length; i++) {
|
||||||
b = cfs[i].getBuilder();
|
IBuilder bldr = cfgs[i].getBuilder();
|
||||||
if (x[0] != (p0 ? b.isManagedBuildOn() :
|
if (b[0] != (m0 ? bldr.isManagedBuildOn() :
|
||||||
(p1 ? b.isStopOnError() : b.isAutoBuildEnable())))
|
(m1 ? bldr.isStopOnError() : bldr.isAutoBuildEnable())))
|
||||||
res[0] = TRI_UNKNOWN;
|
res[0] = TRI_UNKNOWN;
|
||||||
if (x[1] != (p0 ? b.isDefaultBuildCmd() :
|
if (b[1] != (m0 ? bldr.isDefaultBuildCmd() :
|
||||||
(p1 ? b.supportsStopOnError(true) : b.isIncrementalBuildEnabled())))
|
(m1 ? bldr.supportsStopOnError(true) : bldr.isIncrementalBuildEnabled())))
|
||||||
res[1] = TRI_UNKNOWN;
|
res[1] = TRI_UNKNOWN;
|
||||||
if (x[2] != (p0 ? b.canKeepEnvironmentVariablesInBuildfile() :
|
if (b[2] != (m0 ? bldr.canKeepEnvironmentVariablesInBuildfile() :
|
||||||
(p1 ? b.supportsStopOnError(false) : b.isCleanBuildEnabled())))
|
(m1 ? bldr.supportsStopOnError(false) : bldr.isCleanBuildEnabled())))
|
||||||
res[2] = TRI_UNKNOWN;
|
res[2] = TRI_UNKNOWN;
|
||||||
if (x[3] != (p0 ? b.keepEnvironmentVariablesInBuildfile() :
|
if ((b[3] != (m0 ? bldr.keepEnvironmentVariablesInBuildfile() :
|
||||||
(p1 ? ((Configuration)cfs[i]).getInternalBuilderParallel() : getParallelDef(c))))
|
(m1 ? ((Configuration)cfgs[i]).getParallelDef() : getParallelDef(mcfg))))
|
||||||
|
|| ((IMultiConfiguration) mcfg).getParallelNumber() == 0) {
|
||||||
res[3] = TRI_UNKNOWN;
|
res[3] = TRI_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (int i=0; i<TRI_STATES_SIZE; i++) {
|
for (int i=0; i<TRI_STATES_SIZE; i++) {
|
||||||
if (res[i] != TRI_UNKNOWN)
|
if (res[i] != TRI_UNKNOWN)
|
||||||
res[i] = x[i] ? TRI_YES : TRI_NO;
|
res[i] = b[i] ? TRI_YES : TRI_NO;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
} else
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,10 +287,11 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void updateButtons() {
|
protected void updateButtons() {
|
||||||
bldr = icfg.getEditableBuilder();
|
bldr = (Builder) icfg.getEditableBuilder();
|
||||||
canModify = false;
|
canModify = false;
|
||||||
int[] extStates = calc3states(page, icfg, 1);
|
int[] extStates = calc3states(page, icfg, 1);
|
||||||
|
|
||||||
|
// Stop on error
|
||||||
if (extStates != null) {
|
if (extStates != null) {
|
||||||
setTriSelection(b_stopOnError, extStates[0]);
|
setTriSelection(b_stopOnError, extStates[0]);
|
||||||
b_stopOnError.setEnabled(
|
b_stopOnError.setEnabled(
|
||||||
|
@ -274,41 +303,61 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
bldr.supportsStopOnError(true) &&
|
bldr.supportsStopOnError(true) &&
|
||||||
bldr.supportsStopOnError(false));
|
bldr.supportsStopOnError(false));
|
||||||
}
|
}
|
||||||
// parallel
|
|
||||||
if (extStates == null) // no extended states
|
// Parallel build
|
||||||
setTriSelection(b_parallel, getInternalBuilderParallel());
|
boolean isParallelSupported = bldr.supportsParallelBuild();
|
||||||
else
|
boolean isExternalBuilder = ! isInternalBuilderEnabled();
|
||||||
|
|
||||||
|
b_parallel.setVisible(isParallelSupported);
|
||||||
|
b_parallelOptimal.setVisible(isParallelSupported);
|
||||||
|
b_parallelSpecific.setVisible(isParallelSupported);
|
||||||
|
b_parallelUnlimited.setVisible(isParallelSupported && isExternalBuilder);
|
||||||
|
s_parallelNumber.setVisible(isParallelSupported);
|
||||||
|
|
||||||
|
if (isParallelSupported) {
|
||||||
|
if (extStates == null) {
|
||||||
|
setTriSelection(b_parallel, getParallelDef());
|
||||||
|
} else {
|
||||||
setTriSelection(b_parallel, extStates[3]);
|
setTriSelection(b_parallel, extStates[3]);
|
||||||
|
}
|
||||||
|
boolean isParallelSelected = b_parallel.getSelection();
|
||||||
|
int optimalParallelNumber = bldr.getOptimalParallelJobNum();
|
||||||
|
|
||||||
int n = getParallelNumber();
|
b_parallelOptimal.setText(MessageFormat.format(Messages.BuilderSettingsTab_UseOptimalJobs, optimalParallelNumber));
|
||||||
if (n < 0) n = -n;
|
b_parallelOptimal.setEnabled(isParallelSelected);
|
||||||
parallelProcesses.setSelection(n);
|
b_parallelSpecific.setEnabled(isParallelSelected);
|
||||||
|
b_parallelUnlimited.setEnabled(isParallelSelected && isExternalBuilder);
|
||||||
b_parallel.setVisible(bldr.supportsParallelBuild());
|
|
||||||
b_parallelOpt.setVisible(bldr.supportsParallelBuild());
|
|
||||||
b_parallelNum.setVisible(bldr.supportsParallelBuild());
|
|
||||||
parallelProcesses.setVisible(bldr.supportsParallelBuild());
|
|
||||||
|
|
||||||
extStates = calc3states(page, icfg, 2);
|
extStates = calc3states(page, icfg, 2);
|
||||||
if (extStates == null) {
|
if (extStates == null) {
|
||||||
setTriSelection(b_autoBuild, bldr.isAutoBuildEnable());
|
setTriSelection(b_autoBuild, bldr.isAutoBuildEnable());
|
||||||
setTriSelection(b_cmdBuild, bldr.isIncrementalBuildEnabled());
|
setTriSelection(b_cmdBuild, bldr.isIncrementalBuildEnabled());
|
||||||
setTriSelection(b_cmdClean, bldr.isCleanBuildEnabled());
|
setTriSelection(b_cmdClean, bldr.isCleanBuildEnabled());
|
||||||
b_parallelOpt.setSelection(getParallelDef(icfg));
|
} else { // multiple configurations selected
|
||||||
b_parallelNum.setSelection(!getParallelDef(icfg));
|
|
||||||
} else {
|
|
||||||
setTriSelection(b_autoBuild, extStates[0]);
|
setTriSelection(b_autoBuild, extStates[0]);
|
||||||
setTriSelection(b_cmdBuild, extStates[1]);
|
setTriSelection(b_cmdBuild, extStates[1]);
|
||||||
setTriSelection(b_cmdClean, extStates[2]);
|
setTriSelection(b_cmdClean, extStates[2]);
|
||||||
if (extStates[3] == TRI_UNKNOWN) {
|
}
|
||||||
b_parallelOpt.setSelection(false);
|
if ((extStates == null || extStates[3] != TRI_UNKNOWN) && isParallelSelected) {
|
||||||
b_parallelNum.setSelection(false);
|
// single configuration or matching multiple configurations here
|
||||||
|
int parallelNumber = getParallelNumber();
|
||||||
|
boolean isOptimal = parallelNumber <= 0;
|
||||||
|
boolean isUnlimited = parallelNumber == Integer.MAX_VALUE;
|
||||||
|
b_parallelOptimal.setSelection(isOptimal);
|
||||||
|
b_parallelSpecific.setSelection(!isOptimal && !isUnlimited);
|
||||||
|
b_parallelUnlimited.setSelection(isUnlimited);
|
||||||
|
s_parallelNumber.setEnabled(b_parallelSpecific.getEnabled() && b_parallelSpecific.getSelection());
|
||||||
|
s_parallelNumber.setSelection(s_parallelNumber.isEnabled() ? parallelNumber : optimalParallelNumber);
|
||||||
} else {
|
} else {
|
||||||
b_parallelOpt.setSelection(getParallelDef(icfg));
|
b_parallelOptimal.setSelection(true);
|
||||||
b_parallelNum.setSelection(!getParallelDef(icfg));
|
b_parallelSpecific.setSelection(false);
|
||||||
|
b_parallelUnlimited.setSelection(false);
|
||||||
|
s_parallelNumber.setEnabled(false);
|
||||||
|
s_parallelNumber.setSelection(optimalParallelNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Build commands
|
||||||
if (page.isMultiCfg()) {
|
if (page.isMultiCfg()) {
|
||||||
MultiConfiguration mc = (MultiConfiguration)icfg;
|
MultiConfiguration mc = (MultiConfiguration)icfg;
|
||||||
t_autoBuild.setText(mc.getBuildAttribute(IBuilder.BUILD_TARGET_AUTO, EMPTY_STR));
|
t_autoBuild.setText(mc.getBuildAttribute(IBuilder.BUILD_TARGET_AUTO, EMPTY_STR));
|
||||||
|
@ -321,12 +370,6 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean external = ! isInternalBuilderEnabled();
|
boolean external = ! isInternalBuilderEnabled();
|
||||||
boolean parallel = b_parallel.getSelection();
|
|
||||||
|
|
||||||
b_parallelNum.setEnabled(parallel);
|
|
||||||
b_parallelOpt.setEnabled(parallel);
|
|
||||||
parallelProcesses.setEnabled(parallel & b_parallelNum.getSelection());
|
|
||||||
|
|
||||||
title2.setVisible(external);
|
title2.setVisible(external);
|
||||||
t_autoBuild.setVisible(external);
|
t_autoBuild.setVisible(external);
|
||||||
((Control)t_autoBuild.getData()).setVisible(external);
|
((Control)t_autoBuild.getData()).setVisible(external);
|
||||||
|
@ -496,6 +539,14 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean getParallelDef() {
|
||||||
|
if (icfg instanceof Configuration)
|
||||||
|
return ((Configuration)icfg).getParallelDef();
|
||||||
|
if (icfg instanceof IMultiConfiguration)
|
||||||
|
return ((IMultiConfiguration)icfg).getParallelDef();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private void setParallelDef(boolean def) {
|
private void setParallelDef(boolean def) {
|
||||||
if (icfg instanceof Configuration)
|
if (icfg instanceof Configuration)
|
||||||
((Configuration)icfg).setParallelDef(def);
|
((Configuration)icfg).setParallelDef(def);
|
||||||
|
@ -503,6 +554,9 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
((IMultiConfiguration)icfg).setParallelDef(def);
|
((IMultiConfiguration)icfg).setParallelDef(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see IMakeCommonBuildInfo#getParallelizationNum() for interpretation of the number.
|
||||||
|
*/
|
||||||
private int getParallelNumber() {
|
private int getParallelNumber() {
|
||||||
if (icfg instanceof Configuration)
|
if (icfg instanceof Configuration)
|
||||||
return ((Configuration)icfg).getParallelNumber();
|
return ((Configuration)icfg).getParallelNumber();
|
||||||
|
@ -517,14 +571,6 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
((IMultiConfiguration)icfg).setParallelNumber(num);
|
((IMultiConfiguration)icfg).setParallelNumber(num);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean getInternalBuilderParallel() {
|
|
||||||
if (icfg instanceof Configuration)
|
|
||||||
return ((Configuration)icfg).getInternalBuilderParallel();
|
|
||||||
if (icfg instanceof IMultiConfiguration)
|
|
||||||
return ((IMultiConfiguration)icfg).getInternalBuilderParallel();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isInternalBuilderEnabled() {
|
private boolean isInternalBuilderEnabled() {
|
||||||
if (icfg instanceof Configuration)
|
if (icfg instanceof Configuration)
|
||||||
return ((Configuration)icfg).isInternalBuilderEnabled();
|
return ((Configuration)icfg).isInternalBuilderEnabled();
|
||||||
|
|
|
@ -171,7 +171,7 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
canEnableInternalBuilder(true) &&
|
canEnableInternalBuilder(true) &&
|
||||||
canEnableInternalBuilder(false));
|
canEnableInternalBuilder(false));
|
||||||
|
|
||||||
t_buildCmd.setText(getMC());
|
t_buildCmd.setText(getMakeCommand());
|
||||||
|
|
||||||
if (page.isMultiCfg()) {
|
if (page.isMultiCfg()) {
|
||||||
group_dir.setVisible(false);
|
group_dir.setVisible(false);
|
||||||
|
@ -293,11 +293,14 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
/**
|
/**
|
||||||
* @return make command
|
* @return make command
|
||||||
*/
|
*/
|
||||||
private String getMC() {
|
private String getMakeCommand() {
|
||||||
String makeCommand = bldr.getCommand();
|
String makeCommand = icfg.getBuildCommand();
|
||||||
String makeArgs = bldr.getArguments();
|
String makeArgs = icfg.getBuildArguments();
|
||||||
if (makeArgs != null) { makeCommand += " " + makeArgs; } //$NON-NLS-1$
|
|
||||||
return makeCommand;
|
if (!makeCommand.isEmpty() && makeArgs != null) {
|
||||||
|
return makeCommand + " " + makeArgs; //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
return EMPTY_STR;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Performs common settings for all controls
|
* Performs common settings for all controls
|
||||||
|
|
Loading…
Add table
Reference in a new issue