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
|
@ -75,13 +75,16 @@ 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.
|
||||||
int getParallelNumber();
|
* @see Builder#setParallelBuildOn(boolean)
|
||||||
void setParallelNumber(int num);
|
*
|
||||||
|
* @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();
|
||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||||
*
|
*
|
||||||
|
@ -874,8 +875,8 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
if (element.getAttribute(CLEAN_COMMAND) != null) {
|
if (element.getAttribute(CLEAN_COMMAND) != null) {
|
||||||
cleanCommand = SafeStringInterner.safeIntern(element.getAttribute(CLEAN_COMMAND));
|
cleanCommand = SafeStringInterner.safeIntern(element.getAttribute(CLEAN_COMMAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the pre-build and post-build commands
|
// Get the pre-build and post-build commands
|
||||||
if (element.getAttribute(PREBUILD_STEP) != null) {
|
if (element.getAttribute(PREBUILD_STEP) != null) {
|
||||||
prebuildStep = SafeStringInterner.safeIntern(element.getAttribute(PREBUILD_STEP));
|
prebuildStep = SafeStringInterner.safeIntern(element.getAttribute(PREBUILD_STEP));
|
||||||
}
|
}
|
||||||
|
@ -891,7 +892,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
|
|
||||||
if (element.getAttribute(POSTANNOUNCEBUILD_STEP) != null) {
|
if (element.getAttribute(POSTANNOUNCEBUILD_STEP) != null) {
|
||||||
postannouncebuildStep = SafeStringInterner.safeIntern(element.getAttribute(POSTANNOUNCEBUILD_STEP));
|
postannouncebuildStep = SafeStringInterner.safeIntern(element.getAttribute(POSTANNOUNCEBUILD_STEP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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,7 +1607,8 @@ 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)
|
||||||
*/
|
*/
|
||||||
public void setPrebuildStep(String step) {
|
@Override
|
||||||
|
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)) {
|
||||||
prebuildStep = step;
|
prebuildStep = step;
|
||||||
|
@ -1581,7 +1621,8 @@ 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)
|
||||||
*/
|
*/
|
||||||
public void setPostbuildStep(String step) {
|
@Override
|
||||||
|
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)) {
|
||||||
postbuildStep = step;
|
postbuildStep = step;
|
||||||
|
@ -1593,7 +1634,8 @@ 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)
|
||||||
*/
|
*/
|
||||||
public void setPreannouncebuildStep(String announceStep) {
|
@Override
|
||||||
|
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)) {
|
||||||
preannouncebuildStep = announceStep;
|
preannouncebuildStep = announceStep;
|
||||||
|
@ -1605,7 +1647,8 @@ 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)
|
||||||
*/
|
*/
|
||||||
public void setPostannouncebuildStep(String announceStep) {
|
@Override
|
||||||
|
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)) {
|
||||||
postannouncebuildStep = announceStep;
|
postannouncebuildStep = 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"
|
||||||
|
* 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()}.
|
||||||
*/
|
*/
|
||||||
public void setParallelNumber(int n){
|
public void setParallelNumber(int jobs){
|
||||||
try {
|
try {
|
||||||
getEditableBuilder().setParallelizationNum(n);
|
getEditableBuilder().setParallelizationNum(jobs);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
ManagedBuilderCorePlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns number of Parallel threads
|
* 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.
|
||||||
*
|
*
|
||||||
* @return int
|
* @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,244 +908,242 @@ 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();
|
monitor.subTask(ManagedMakeMessages.getFormattedString(MAKE, msgs));
|
||||||
monitor.subTask(ManagedMakeMessages.getFormattedString(MAKE, msgs));
|
|
||||||
|
|
||||||
// Get a build console for the project
|
// Get a build console for the project
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
IConsole console = CCorePlugin.getDefault().getConsole();
|
IConsole console = CCorePlugin.getDefault().getConsole();
|
||||||
console.start(currentProject);
|
console.start(currentProject);
|
||||||
ConsoleOutputStream consoleOutStream = console.getOutputStream();
|
ConsoleOutputStream consoleOutStream = console.getOutputStream();
|
||||||
String[] consoleHeader = new String[3];
|
String[] consoleHeader = new String[3];
|
||||||
|
switch (buildType) {
|
||||||
|
case FULL_BUILD:
|
||||||
|
case INCREMENTAL_BUILD:
|
||||||
|
consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_INC);
|
||||||
|
break;
|
||||||
|
case CLEAN_BUILD:
|
||||||
|
consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_CLEAN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
consoleHeader[1] = info.getConfigurationName();
|
||||||
|
consoleHeader[2] = currentProject.getName();
|
||||||
|
buf.append(NEWLINE);
|
||||||
|
buf.append(ManagedMakeMessages.getFormattedString(CONSOLE_HEADER, consoleHeader)).append(NEWLINE);
|
||||||
|
buf.append(NEWLINE);
|
||||||
|
|
||||||
|
IConfiguration cfg = info.getDefaultConfiguration();
|
||||||
|
if(!cfg.isSupported()){
|
||||||
|
String msg = ManagedMakeMessages.getFormattedString(WARNING_UNSUPPORTED_CONFIGURATION,new String[] {cfg.getName(),cfg.getToolChain().getName()});
|
||||||
|
buf.append(msg).append(NEWLINE);
|
||||||
|
buf.append(NEWLINE);
|
||||||
|
}
|
||||||
|
consoleOutStream.write(buf.toString().getBytes());
|
||||||
|
consoleOutStream.flush();
|
||||||
|
|
||||||
|
// Remove all markers for this project
|
||||||
|
removeAllMarkers(currentProject);
|
||||||
|
|
||||||
|
// Get a launcher for the make command
|
||||||
|
String errMsg = null;
|
||||||
|
IBuilder builder = info.getDefaultConfiguration().getBuilder();
|
||||||
|
ICommandLauncher launcher = builder.getCommandLauncher();
|
||||||
|
launcher.setProject(currentProject);
|
||||||
|
launcher.showCommand(true);
|
||||||
|
|
||||||
|
// Set the environmennt
|
||||||
|
IBuildEnvironmentVariable variables[] = ManagedBuildManager.getEnvironmentVariableProvider().getVariables(cfg,true,true);
|
||||||
|
String[] env = null;
|
||||||
|
ArrayList<String> envList = new ArrayList<String>();
|
||||||
|
if (variables != null) {
|
||||||
|
for(int i = 0; i < variables.length; i++){
|
||||||
|
envList.add(variables[i].getName() + "=" + variables[i].getValue()); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
env = envList.toArray(new String[envList.size()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hook up an error parser manager
|
||||||
|
String[] errorParsers = info.getDefaultConfiguration().getErrorParserList();
|
||||||
|
ErrorParserManager epm = new ErrorParserManager(getProject(), workingDirectoryURI, this, errorParsers);
|
||||||
|
epm.setOutputStream(consoleOutStream);
|
||||||
|
// This variable is necessary to ensure that the EPM stream stay open
|
||||||
|
// until we explicitly close it. See bug#123302.
|
||||||
|
OutputStream epmOutputStream = epm.getOutputStream();
|
||||||
|
|
||||||
|
// Get the arguments to be passed to make from build model
|
||||||
|
ArrayList<String> makeArgs = new ArrayList<String>();
|
||||||
|
String arg = info.getBuildArguments();
|
||||||
|
if (arg.length() > 0) {
|
||||||
|
String[] args = arg.split("\\s"); //$NON-NLS-1$
|
||||||
|
for (int i = 0; i < args.length; ++i) {
|
||||||
|
makeArgs.add(args[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] makeTargets;
|
||||||
|
String prebuildStep = info.getPrebuildStep();
|
||||||
|
//try to resolve the build macros in the prebuildStep
|
||||||
|
try{
|
||||||
|
prebuildStep = ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
|
||||||
|
prebuildStep,
|
||||||
|
"", //$NON-NLS-1$
|
||||||
|
" ", //$NON-NLS-1$
|
||||||
|
IBuildMacroProvider.CONTEXT_CONFIGURATION,
|
||||||
|
cfg);
|
||||||
|
} catch (BuildMacroException e){
|
||||||
|
}
|
||||||
|
boolean prebuildStepPresent = (prebuildStep.length() > 0);
|
||||||
|
Process proc = null;
|
||||||
|
boolean isuptodate = false;
|
||||||
|
|
||||||
|
if (prebuildStepPresent) {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
ArrayList<String> premakeArgs = (ArrayList<String>) makeArgs.clone();
|
||||||
|
String[] premakeTargets;
|
||||||
switch (buildType) {
|
switch (buildType) {
|
||||||
case FULL_BUILD:
|
case INCREMENTAL_BUILD: {
|
||||||
case INCREMENTAL_BUILD:
|
// For an incremental build with a prebuild step:
|
||||||
consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_INC);
|
// Check the status of the main build with "make -q main-build"
|
||||||
break;
|
// If up to date:
|
||||||
case CLEAN_BUILD:
|
// then: don't invoke the prebuild step, which should be run only if
|
||||||
consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_CLEAN);
|
// something needs to be built in the main build
|
||||||
break;
|
// else: invoke the prebuild step and the main build step
|
||||||
}
|
premakeArgs.add("-q"); //$NON-NLS-1$
|
||||||
|
premakeArgs.add("main-build"); //$NON-NLS-1$
|
||||||
consoleHeader[1] = info.getConfigurationName();
|
premakeTargets = premakeArgs.toArray(new String[premakeArgs.size()]);
|
||||||
consoleHeader[2] = currentProject.getName();
|
proc = launcher.execute(makeCommand, premakeTargets, env, workingDirectory, monitor);
|
||||||
buf.append(NEWLINE);
|
|
||||||
buf.append(ManagedMakeMessages.getFormattedString(CONSOLE_HEADER, consoleHeader)).append(NEWLINE);
|
|
||||||
buf.append(NEWLINE);
|
|
||||||
|
|
||||||
IConfiguration cfg = info.getDefaultConfiguration();
|
|
||||||
if(!cfg.isSupported()){
|
|
||||||
String msg = ManagedMakeMessages.getFormattedString(WARNING_UNSUPPORTED_CONFIGURATION,new String[] {cfg.getName(),cfg.getToolChain().getName()});
|
|
||||||
buf.append(msg).append(NEWLINE);
|
|
||||||
buf.append(NEWLINE);
|
|
||||||
}
|
|
||||||
consoleOutStream.write(buf.toString().getBytes());
|
|
||||||
consoleOutStream.flush();
|
|
||||||
|
|
||||||
// Remove all markers for this project
|
|
||||||
removeAllMarkers(currentProject);
|
|
||||||
|
|
||||||
// Get a launcher for the make command
|
|
||||||
String errMsg = null;
|
|
||||||
IBuilder builder = info.getDefaultConfiguration().getBuilder();
|
|
||||||
ICommandLauncher launcher = builder.getCommandLauncher();
|
|
||||||
launcher.setProject(currentProject);
|
|
||||||
launcher.showCommand(true);
|
|
||||||
|
|
||||||
// Set the environmennt
|
|
||||||
IBuildEnvironmentVariable variables[] = ManagedBuildManager.getEnvironmentVariableProvider().getVariables(cfg,true,true);
|
|
||||||
String[] env = null;
|
|
||||||
ArrayList<String> envList = new ArrayList<String>();
|
|
||||||
if (variables != null) {
|
|
||||||
for(int i = 0; i < variables.length; i++){
|
|
||||||
envList.add(variables[i].getName() + "=" + variables[i].getValue()); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
env = envList.toArray(new String[envList.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hook up an error parser manager
|
|
||||||
String[] errorParsers = info.getDefaultConfiguration().getErrorParserList();
|
|
||||||
ErrorParserManager epm = new ErrorParserManager(getProject(), workingDirectoryURI, this, errorParsers);
|
|
||||||
epm.setOutputStream(consoleOutStream);
|
|
||||||
// This variable is necessary to ensure that the EPM stream stay open
|
|
||||||
// until we explicitly close it. See bug#123302.
|
|
||||||
OutputStream epmOutputStream = epm.getOutputStream();
|
|
||||||
|
|
||||||
// Get the arguments to be passed to make from build model
|
|
||||||
ArrayList<String> makeArgs = new ArrayList<String>();
|
|
||||||
String arg = info.getBuildArguments();
|
|
||||||
if (arg.length() > 0) {
|
|
||||||
String[] args = arg.split("\\s"); //$NON-NLS-1$
|
|
||||||
for (int i = 0; i < args.length; ++i) {
|
|
||||||
makeArgs.add(args[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String[] makeTargets;
|
|
||||||
String prebuildStep = info.getPrebuildStep();
|
|
||||||
//try to resolve the build macros in the prebuildStep
|
|
||||||
try{
|
|
||||||
prebuildStep = ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
|
|
||||||
prebuildStep,
|
|
||||||
"", //$NON-NLS-1$
|
|
||||||
" ", //$NON-NLS-1$
|
|
||||||
IBuildMacroProvider.CONTEXT_CONFIGURATION,
|
|
||||||
cfg);
|
|
||||||
} catch (BuildMacroException e){
|
|
||||||
}
|
|
||||||
boolean prebuildStepPresent = (prebuildStep.length() > 0);
|
|
||||||
Process proc = null;
|
|
||||||
boolean isuptodate = false;
|
|
||||||
|
|
||||||
if (prebuildStepPresent) {
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
ArrayList<String> premakeArgs = (ArrayList<String>) makeArgs.clone();
|
|
||||||
String[] premakeTargets;
|
|
||||||
switch (buildType) {
|
|
||||||
case INCREMENTAL_BUILD: {
|
|
||||||
// For an incremental build with a prebuild step:
|
|
||||||
// Check the status of the main build with "make -q main-build"
|
|
||||||
// If up to date:
|
|
||||||
// then: don't invoke the prebuild step, which should be run only if
|
|
||||||
// something needs to be built in the main build
|
|
||||||
// else: invoke the prebuild step and the main build step
|
|
||||||
premakeArgs.add("-q"); //$NON-NLS-1$
|
|
||||||
premakeArgs.add("main-build"); //$NON-NLS-1$
|
|
||||||
premakeTargets = premakeArgs.toArray(new String[premakeArgs.size()]);
|
|
||||||
proc = launcher.execute(makeCommand, premakeTargets, env, workingDirectory, monitor);
|
|
||||||
if (proc != null) {
|
|
||||||
try {
|
|
||||||
// Close the input of the process since we will never write to it
|
|
||||||
proc.getOutputStream().close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
}
|
|
||||||
if (launcher.waitAndRead(epm.getOutputStream(), epm.getOutputStream(),
|
|
||||||
new SubProgressMonitor(monitor,
|
|
||||||
IProgressMonitor.UNKNOWN)) != ICommandLauncher.OK) {
|
|
||||||
errMsg = launcher.getErrorMessage();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
errMsg = launcher.getErrorMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((errMsg != null && errMsg.length() > 0) || proc == null) {
|
|
||||||
// Can't tell if the build is needed, so assume it is, and let any errors be triggered
|
|
||||||
// when the "real" build is invoked below
|
|
||||||
makeArgs.add("pre-build"); //$NON-NLS-1$
|
|
||||||
makeArgs.add("main-build"); //$NON-NLS-1$
|
|
||||||
} else {
|
|
||||||
// The "make -q" command launch was successful
|
|
||||||
if (proc.exitValue() == 0) {
|
|
||||||
// If the status value returned from "make -q" is 0, then the build state is up-to-date
|
|
||||||
isuptodate = true;
|
|
||||||
// Report that the build was up to date, and thus nothing needs to be built
|
|
||||||
String uptodateMsg = ManagedMakeMessages.getFormattedString(NOTHING_BUILT, currentProject.getName());
|
|
||||||
buf = new StringBuffer();
|
|
||||||
buf.append(NEWLINE);
|
|
||||||
buf.append(uptodateMsg).append(NEWLINE);
|
|
||||||
// Write message on the console
|
|
||||||
consoleOutStream.write(buf.toString().getBytes());
|
|
||||||
consoleOutStream.flush();
|
|
||||||
epmOutputStream.close();
|
|
||||||
consoleOutStream.close();
|
|
||||||
} else {
|
|
||||||
// The status value was other than 0, so press on with the build process
|
|
||||||
makeArgs.add("pre-build"); //$NON-NLS-1$
|
|
||||||
makeArgs.add("main-build"); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FULL_BUILD: {
|
|
||||||
// makeArgs.add("clean"); //$NON-NLS-1$
|
|
||||||
makeArgs.add("pre-build"); //$NON-NLS-1$
|
|
||||||
makeArgs.add("main-build"); //$NON-NLS-1$
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CLEAN_BUILD: {
|
|
||||||
makeArgs.add("clean"); //$NON-NLS-1$
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// No prebuild step
|
|
||||||
//
|
|
||||||
makeArgs.addAll(Arrays.asList(getMakeTargets(buildType)));
|
|
||||||
}
|
|
||||||
|
|
||||||
makeTargets = makeArgs.toArray(new String[makeArgs.size()]);
|
|
||||||
|
|
||||||
// Launch make - main invocation
|
|
||||||
if (!isuptodate) {
|
|
||||||
proc = launcher.execute(makeCommand, makeTargets, env, workingDirectory, monitor);
|
|
||||||
if (proc != null) {
|
if (proc != null) {
|
||||||
try {
|
try {
|
||||||
// Close the input of the process since we will never write to it
|
// Close the input of the process since we will never write to it
|
||||||
proc.getOutputStream().close();
|
proc.getOutputStream().close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
|
if (launcher.waitAndRead(epm.getOutputStream(), epm.getOutputStream(),
|
||||||
int state = launcher.waitAndRead(epm.getOutputStream(), epm.getOutputStream(),
|
|
||||||
new SubProgressMonitor(monitor,
|
new SubProgressMonitor(monitor,
|
||||||
IProgressMonitor.UNKNOWN));
|
IProgressMonitor.UNKNOWN)) != ICommandLauncher.OK) {
|
||||||
if(state != ICommandLauncher.OK){
|
|
||||||
errMsg = launcher.getErrorMessage();
|
errMsg = launcher.getErrorMessage();
|
||||||
|
|
||||||
if(state == ICommandLauncher.COMMAND_CANCELED){
|
|
||||||
//TODO: the better way of handling cancel is needed
|
|
||||||
//currently the rebuild state is set to true forcing the full rebuild
|
|
||||||
//on the next builder invocation
|
|
||||||
info.getDefaultConfiguration().setRebuildState(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force a resync of the projects without allowing the user to cancel.
|
|
||||||
// This is probably unkind, but short of this there is no way to insure
|
|
||||||
// the UI is up-to-date with the build results
|
|
||||||
monitor.subTask(ManagedMakeMessages
|
|
||||||
.getResourceString(REFRESH));
|
|
||||||
try {
|
|
||||||
//currentProject.refreshLocal(IResource.DEPTH_INFINITE, null);
|
|
||||||
|
|
||||||
// use the refresh scope manager to refresh
|
|
||||||
RefreshScopeManager refreshManager = RefreshScopeManager.getInstance();
|
|
||||||
IWorkspaceRunnable runnable = refreshManager.getRefreshRunnable(currentProject);
|
|
||||||
ResourcesPlugin.getWorkspace().run(runnable, null, IWorkspace.AVOID_UPDATE, null);
|
|
||||||
} catch (CoreException e) {
|
|
||||||
monitor.subTask(ManagedMakeMessages
|
|
||||||
.getResourceString(REFRESH_ERROR));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
errMsg = launcher.getErrorMessage();
|
errMsg = launcher.getErrorMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report either the success or failure of our mission
|
if ((errMsg != null && errMsg.length() > 0) || proc == null) {
|
||||||
buf = new StringBuffer();
|
// Can't tell if the build is needed, so assume it is, and let any errors be triggered
|
||||||
if (errMsg != null && errMsg.length() > 0) {
|
// when the "real" build is invoked below
|
||||||
String errorDesc = ManagedMakeMessages.getResourceString(BUILD_ERROR);
|
makeArgs.add("pre-build"); //$NON-NLS-1$
|
||||||
buf.append(errorDesc).append(NEWLINE);
|
makeArgs.add("main-build"); //$NON-NLS-1$
|
||||||
buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
} else {
|
} else {
|
||||||
// Report a successful build
|
// The "make -q" command launch was successful
|
||||||
String successMsg = ManagedMakeMessages.getFormattedString(BUILD_FINISHED,
|
if (proc.exitValue() == 0) {
|
||||||
currentProject.getName());
|
// If the status value returned from "make -q" is 0, then the build state is up-to-date
|
||||||
buf.append(successMsg).append(NEWLINE);
|
isuptodate = true;
|
||||||
|
// Report that the build was up to date, and thus nothing needs to be built
|
||||||
|
String uptodateMsg = ManagedMakeMessages.getFormattedString(NOTHING_BUILT, currentProject.getName());
|
||||||
|
buf = new StringBuffer();
|
||||||
|
buf.append(NEWLINE);
|
||||||
|
buf.append(uptodateMsg).append(NEWLINE);
|
||||||
|
// Write message on the console
|
||||||
|
consoleOutStream.write(buf.toString().getBytes());
|
||||||
|
consoleOutStream.flush();
|
||||||
|
epmOutputStream.close();
|
||||||
|
consoleOutStream.close();
|
||||||
|
} else {
|
||||||
|
// The status value was other than 0, so press on with the build process
|
||||||
|
makeArgs.add("pre-build"); //$NON-NLS-1$
|
||||||
|
makeArgs.add("main-build"); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FULL_BUILD: {
|
||||||
|
// makeArgs.add("clean"); //$NON-NLS-1$
|
||||||
|
makeArgs.add("pre-build"); //$NON-NLS-1$
|
||||||
|
makeArgs.add("main-build"); //$NON-NLS-1$
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CLEAN_BUILD: {
|
||||||
|
makeArgs.add("clean"); //$NON-NLS-1$
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// No prebuild step
|
||||||
|
//
|
||||||
|
makeArgs.addAll(Arrays.asList(getMakeTargets(buildType)));
|
||||||
|
}
|
||||||
|
|
||||||
|
makeTargets = makeArgs.toArray(new String[makeArgs.size()]);
|
||||||
|
|
||||||
|
// Launch make - main invocation
|
||||||
|
if (!isuptodate) {
|
||||||
|
proc = launcher.execute(makeCommand, makeTargets, env, workingDirectory, monitor);
|
||||||
|
if (proc != null) {
|
||||||
|
try {
|
||||||
|
// Close the input of the process since we will never write to it
|
||||||
|
proc.getOutputStream().close();
|
||||||
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write message on the console
|
int state = launcher.waitAndRead(epm.getOutputStream(), epm.getOutputStream(),
|
||||||
consoleOutStream.write(buf.toString().getBytes());
|
new SubProgressMonitor(monitor,
|
||||||
consoleOutStream.flush();
|
IProgressMonitor.UNKNOWN));
|
||||||
epmOutputStream.close();
|
if(state != ICommandLauncher.OK){
|
||||||
|
errMsg = launcher.getErrorMessage();
|
||||||
|
|
||||||
|
if(state == ICommandLauncher.COMMAND_CANCELED){
|
||||||
|
//TODO: the better way of handling cancel is needed
|
||||||
|
//currently the rebuild state is set to true forcing the full rebuild
|
||||||
|
//on the next builder invocation
|
||||||
|
info.getDefaultConfiguration().setRebuildState(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Generate any error markers that the build has discovered
|
// Force a resync of the projects without allowing the user to cancel.
|
||||||
monitor.subTask(ManagedMakeMessages.getResourceString(MARKERS));
|
// This is probably unkind, but short of this there is no way to insure
|
||||||
addBuilderMarkers(epm);
|
// the UI is up-to-date with the build results
|
||||||
consoleOutStream.close();
|
monitor.subTask(ManagedMakeMessages
|
||||||
|
.getResourceString(REFRESH));
|
||||||
|
try {
|
||||||
|
//currentProject.refreshLocal(IResource.DEPTH_INFINITE, null);
|
||||||
|
|
||||||
|
// use the refresh scope manager to refresh
|
||||||
|
RefreshScopeManager refreshManager = RefreshScopeManager.getInstance();
|
||||||
|
IWorkspaceRunnable runnable = refreshManager.getRefreshRunnable(currentProject);
|
||||||
|
ResourcesPlugin.getWorkspace().run(runnable, null, IWorkspace.AVOID_UPDATE, null);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
monitor.subTask(ManagedMakeMessages
|
||||||
|
.getResourceString(REFRESH_ERROR));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
errMsg = launcher.getErrorMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Report either the success or failure of our mission
|
||||||
|
buf = new StringBuffer();
|
||||||
|
if (errMsg != null && errMsg.length() > 0) {
|
||||||
|
String errorDesc = ManagedMakeMessages.getResourceString(BUILD_ERROR);
|
||||||
|
buf.append(errorDesc).append(NEWLINE);
|
||||||
|
buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
} else {
|
||||||
|
// Report a successful build
|
||||||
|
String successMsg = ManagedMakeMessages.getFormattedString(BUILD_FINISHED,
|
||||||
|
currentProject.getName());
|
||||||
|
buf.append(successMsg).append(NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write message on the console
|
||||||
|
consoleOutStream.write(buf.toString().getBytes());
|
||||||
|
consoleOutStream.flush();
|
||||||
|
epmOutputStream.close();
|
||||||
|
|
||||||
|
// Generate any error markers that the build has discovered
|
||||||
|
monitor.subTask(ManagedMakeMessages.getResourceString(MARKERS));
|
||||||
|
addBuilderMarkers(epm);
|
||||||
|
consoleOutStream.close();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
forgetLastBuiltState();
|
forgetLastBuiltState();
|
||||||
|
@ -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()) {
|
||||||
updateButtons();
|
setParallelDef(true);
|
||||||
|
setParallelNumber(-1);
|
||||||
|
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()) {
|
||||||
updateButtons();
|
setParallelDef(true);
|
||||||
|
setParallelNumber(s_parallelNumber.getSelection());
|
||||||
|
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,56 +231,55 @@ 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(
|
||||||
|
@ -273,42 +302,62 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
b_stopOnError.setEnabled(
|
b_stopOnError.setEnabled(
|
||||||
bldr.supportsStopOnError(true) &&
|
bldr.supportsStopOnError(true) &&
|
||||||
bldr.supportsStopOnError(false));
|
bldr.supportsStopOnError(false));
|
||||||
}
|
}
|
||||||
// parallel
|
|
||||||
if (extStates == null) // no extended states
|
|
||||||
setTriSelection(b_parallel, getInternalBuilderParallel());
|
|
||||||
else
|
|
||||||
setTriSelection(b_parallel, extStates[3]);
|
|
||||||
|
|
||||||
int n = getParallelNumber();
|
// Parallel build
|
||||||
if (n < 0) n = -n;
|
boolean isParallelSupported = bldr.supportsParallelBuild();
|
||||||
parallelProcesses.setSelection(n);
|
boolean isExternalBuilder = ! isInternalBuilderEnabled();
|
||||||
|
|
||||||
b_parallel.setVisible(bldr.supportsParallelBuild());
|
b_parallel.setVisible(isParallelSupported);
|
||||||
b_parallelOpt.setVisible(bldr.supportsParallelBuild());
|
b_parallelOptimal.setVisible(isParallelSupported);
|
||||||
b_parallelNum.setVisible(bldr.supportsParallelBuild());
|
b_parallelSpecific.setVisible(isParallelSupported);
|
||||||
parallelProcesses.setVisible(bldr.supportsParallelBuild());
|
b_parallelUnlimited.setVisible(isParallelSupported && isExternalBuilder);
|
||||||
|
s_parallelNumber.setVisible(isParallelSupported);
|
||||||
|
|
||||||
extStates = calc3states(page, icfg, 2);
|
if (isParallelSupported) {
|
||||||
if (extStates == null) {
|
if (extStates == null) {
|
||||||
setTriSelection(b_autoBuild, bldr.isAutoBuildEnable());
|
setTriSelection(b_parallel, getParallelDef());
|
||||||
setTriSelection(b_cmdBuild, bldr.isIncrementalBuildEnabled());
|
|
||||||
setTriSelection(b_cmdClean, bldr.isCleanBuildEnabled());
|
|
||||||
b_parallelOpt.setSelection(getParallelDef(icfg));
|
|
||||||
b_parallelNum.setSelection(!getParallelDef(icfg));
|
|
||||||
} else {
|
|
||||||
setTriSelection(b_autoBuild, extStates[0]);
|
|
||||||
setTriSelection(b_cmdBuild, extStates[1]);
|
|
||||||
setTriSelection(b_cmdClean, extStates[2]);
|
|
||||||
if (extStates[3] == TRI_UNKNOWN) {
|
|
||||||
b_parallelOpt.setSelection(false);
|
|
||||||
b_parallelNum.setSelection(false);
|
|
||||||
} else {
|
} else {
|
||||||
b_parallelOpt.setSelection(getParallelDef(icfg));
|
setTriSelection(b_parallel, extStates[3]);
|
||||||
b_parallelNum.setSelection(!getParallelDef(icfg));
|
}
|
||||||
|
boolean isParallelSelected = b_parallel.getSelection();
|
||||||
|
int optimalParallelNumber = bldr.getOptimalParallelJobNum();
|
||||||
|
|
||||||
|
b_parallelOptimal.setText(MessageFormat.format(Messages.BuilderSettingsTab_UseOptimalJobs, optimalParallelNumber));
|
||||||
|
b_parallelOptimal.setEnabled(isParallelSelected);
|
||||||
|
b_parallelSpecific.setEnabled(isParallelSelected);
|
||||||
|
b_parallelUnlimited.setEnabled(isParallelSelected && isExternalBuilder);
|
||||||
|
|
||||||
|
extStates = calc3states(page, icfg, 2);
|
||||||
|
if (extStates == null) {
|
||||||
|
setTriSelection(b_autoBuild, bldr.isAutoBuildEnable());
|
||||||
|
setTriSelection(b_cmdBuild, bldr.isIncrementalBuildEnabled());
|
||||||
|
setTriSelection(b_cmdClean, bldr.isCleanBuildEnabled());
|
||||||
|
} else { // multiple configurations selected
|
||||||
|
setTriSelection(b_autoBuild, extStates[0]);
|
||||||
|
setTriSelection(b_cmdBuild, extStates[1]);
|
||||||
|
setTriSelection(b_cmdClean, extStates[2]);
|
||||||
|
}
|
||||||
|
if ((extStates == null || extStates[3] != TRI_UNKNOWN) && isParallelSelected) {
|
||||||
|
// 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 {
|
||||||
|
b_parallelOptimal.setSelection(true);
|
||||||
|
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));
|
||||||
|
@ -320,13 +369,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
t_cmdClean.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_CLEAN, EMPTY_STR));
|
t_cmdClean.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_CLEAN, EMPTY_STR));
|
||||||
}
|
}
|
||||||
|
|
||||||
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