mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
1. Fix for [Bug 186078] Targets from "Make Targets"view do not use "Builder Settings" for making
2. Fix to conversion mechanism 3.Fix to error parser settings NPE
This commit is contained in:
parent
dd19c6c7d6
commit
ea86a3db2a
9 changed files with 105 additions and 56 deletions
|
@ -45,7 +45,6 @@ public interface IBuilder extends IBuildObject, IMakeBuilderInfo {
|
||||||
|
|
||||||
// static final String BUILD_COMMAND = "buildCommand"; //$NON-NLS-1$
|
// static final String BUILD_COMMAND = "buildCommand"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_BUILD_PATH = "buildPath"; //$NON-NLS-1$
|
static final String ATTRIBUTE_BUILD_PATH = "buildPath"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_STOP_ON_ERROR = "stopOnError"; //$NON-NLS-1$
|
|
||||||
// static final String USE_DEFAULT_BUILD_CMD = "useDefaultBuildCmd"; //$NON-NLS-1$
|
// static final String USE_DEFAULT_BUILD_CMD = "useDefaultBuildCmd"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_TARGET_AUTO = "autoBuildTarget"; //$NON-NLS-1$
|
static final String ATTRIBUTE_TARGET_AUTO = "autoBuildTarget"; //$NON-NLS-1$
|
||||||
static final String ATTRIBUTE_TARGET_INCREMENTAL = "incrementalBuildTarget"; //$NON-NLS-1$
|
static final String ATTRIBUTE_TARGET_INCREMENTAL = "incrementalBuildTarget"; //$NON-NLS-1$
|
||||||
|
|
|
@ -666,6 +666,12 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
|
|
||||||
return (IBuilder) getExtensionBuilderMap().get(id);
|
return (IBuilder) getExtensionBuilderMap().get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IBuilder getExtensionBuilder(IBuilder builder) {
|
||||||
|
for(;builder != null && !builder.isExtensionElement(); builder = builder.getSuperClass());
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the option from the manifest with the ID specified in the argument
|
* Returns the option from the manifest with the ID specified in the argument
|
||||||
|
|
|
@ -585,7 +585,8 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
protected void loadFromProject(ICStorageElement element) {
|
protected void loadFromProject(ICStorageElement element) {
|
||||||
|
|
||||||
// id
|
// id
|
||||||
setId(element.getAttribute(IBuildObject.ID));
|
if(element.getAttribute(IBuildObject.ID) != null)
|
||||||
|
setId(element.getAttribute(IBuildObject.ID));
|
||||||
|
|
||||||
// name
|
// name
|
||||||
if (element.getAttribute(IBuildObject.NAME) != null) {
|
if (element.getAttribute(IBuildObject.NAME) != null) {
|
||||||
|
@ -596,11 +597,13 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
setVersion(getVersionFromId());
|
setVersion(getVersionFromId());
|
||||||
|
|
||||||
// superClass
|
// superClass
|
||||||
superClassId = element.getAttribute(IProjectType.SUPERCLASS);
|
if(element.getAttribute(IProjectType.SUPERCLASS) != null){
|
||||||
if (superClassId != null && superClassId.length() > 0) {
|
superClassId = element.getAttribute(IProjectType.SUPERCLASS);
|
||||||
superClass = ManagedBuildManager.getExtensionBuilder(superClassId);
|
if (superClassId != null && superClassId.length() > 0) {
|
||||||
// Check for migration support
|
superClass = ManagedBuildManager.getExtensionBuilder(superClassId);
|
||||||
checkForMigrationSupport();
|
// Check for migration support
|
||||||
|
checkForMigrationSupport();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the 'versionSupported' attribute
|
// Get the 'versionSupported' attribute
|
||||||
|
@ -636,37 +639,54 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
args = element.getAttribute(IBuilder.ARGUMENTS);
|
args = element.getAttribute(IBuilder.ARGUMENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
autoBuildTarget = element.getAttribute(ATTRIBUTE_TARGET_AUTO);
|
if(element.getAttribute(ATTRIBUTE_TARGET_AUTO) != null)
|
||||||
|
autoBuildTarget = element.getAttribute(ATTRIBUTE_TARGET_AUTO);
|
||||||
|
|
||||||
String tmp = element.getAttribute(ATTRIBUTE_AUTO_ENABLED);
|
String tmp = element.getAttribute(ATTRIBUTE_AUTO_ENABLED);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
autoBuildEnabled = Boolean.valueOf(tmp);
|
autoBuildEnabled = Boolean.valueOf(tmp);
|
||||||
incrementalBuildTarget = element.getAttribute(ATTRIBUTE_TARGET_INCREMENTAL);
|
|
||||||
|
if(element.getAttribute(ATTRIBUTE_TARGET_INCREMENTAL) != null)
|
||||||
|
incrementalBuildTarget = element.getAttribute(ATTRIBUTE_TARGET_INCREMENTAL);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_INCREMENTAL_ENABLED);
|
tmp = element.getAttribute(ATTRIBUTE_INCREMENTAL_ENABLED);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
incrementalBuildEnabled = Boolean.valueOf(tmp);
|
incrementalBuildEnabled = Boolean.valueOf(tmp);
|
||||||
cleanBuildTarget = element.getAttribute(ATTRIBUTE_TARGET_CLEAN);
|
|
||||||
|
if(element.getAttribute(ATTRIBUTE_TARGET_CLEAN) != null)
|
||||||
|
cleanBuildTarget = element.getAttribute(ATTRIBUTE_TARGET_CLEAN);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_CLEAN_ENABLED);
|
tmp = element.getAttribute(ATTRIBUTE_CLEAN_ENABLED);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
cleanBuildEnabled = Boolean.valueOf(tmp);
|
cleanBuildEnabled = Boolean.valueOf(tmp);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_MANAGED_BUILD_ON);
|
tmp = element.getAttribute(ATTRIBUTE_MANAGED_BUILD_ON);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
managedBuildOn = Boolean.valueOf(tmp);
|
managedBuildOn = Boolean.valueOf(tmp);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_KEEP_ENV);
|
tmp = element.getAttribute(ATTRIBUTE_KEEP_ENV);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
keepEnvVarInBuildfile = Boolean.valueOf(tmp);
|
keepEnvVarInBuildfile = Boolean.valueOf(tmp);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_SUPORTS_MANAGED_BUILD);
|
tmp = element.getAttribute(ATTRIBUTE_SUPORTS_MANAGED_BUILD);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
supportsManagedBuild = Boolean.valueOf(tmp);
|
supportsManagedBuild = Boolean.valueOf(tmp);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS);
|
tmp = element.getAttribute(ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
customizedErrorParserIds = CDataUtil.stringToArray(tmp, ";"); //$NON-NLS-1$
|
customizedErrorParserIds = CDataUtil.stringToArray(tmp, ";"); //$NON-NLS-1$
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_ENVIRONMENT);
|
tmp = element.getAttribute(ATTRIBUTE_ENVIRONMENT);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
customizedEnvironment = (HashMap)MapStorageElement.decodeMap(tmp);
|
customizedEnvironment = (HashMap)MapStorageElement.decodeMap(tmp);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_APPEND_ENVIRONMENT);
|
tmp = element.getAttribute(ATTRIBUTE_APPEND_ENVIRONMENT);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
appendEnvironment = Boolean.valueOf(tmp);;
|
appendEnvironment = Boolean.valueOf(tmp);
|
||||||
buildPath = element.getAttribute(ATTRIBUTE_BUILD_PATH);
|
|
||||||
|
if(element.getAttribute(ATTRIBUTE_BUILD_PATH) != null)
|
||||||
|
buildPath = element.getAttribute(ATTRIBUTE_BUILD_PATH);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_CUSTOM_PROPS);
|
tmp = element.getAttribute(ATTRIBUTE_CUSTOM_PROPS);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
customBuildProperties = (HashMap)MapStorageElement.decodeMap(tmp);
|
customBuildProperties = (HashMap)MapStorageElement.decodeMap(tmp);
|
||||||
|
@ -682,11 +702,16 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
// TODO: Issue warning?
|
// TODO: Issue warning?
|
||||||
}
|
}
|
||||||
|
|
||||||
ignoreErrCmd = element.getAttribute(ATTRIBUTE_IGNORE_ERR_CMD);
|
if(element.getAttribute(ATTRIBUTE_IGNORE_ERR_CMD) != null)
|
||||||
|
ignoreErrCmd = element.getAttribute(ATTRIBUTE_IGNORE_ERR_CMD);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_STOP_ON_ERR);
|
tmp = element.getAttribute(ATTRIBUTE_STOP_ON_ERR);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
stopOnErr = Boolean.valueOf(tmp);
|
stopOnErr = Boolean.valueOf(tmp);
|
||||||
parallelBuildCmd = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD);
|
|
||||||
|
if(element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD) != null)
|
||||||
|
parallelBuildCmd = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_CMD);
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER);
|
tmp = element.getAttribute(ATTRIBUTE_PARALLELIZATION_NUMBER);
|
||||||
if(tmp != null){
|
if(tmp != null){
|
||||||
try {
|
try {
|
||||||
|
@ -694,6 +719,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
} catch (NumberFormatException e){
|
} catch (NumberFormatException e){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_ON);
|
tmp = element.getAttribute(ATTRIBUTE_PARALLEL_BUILD_ON);
|
||||||
if(tmp != null)
|
if(tmp != null)
|
||||||
parallelBuildOn = Boolean.valueOf(tmp);
|
parallelBuildOn = Boolean.valueOf(tmp);
|
||||||
|
@ -884,7 +910,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
if (superClass != null) {
|
if (superClass != null) {
|
||||||
return superClass.getCommand();
|
return superClass.getCommand();
|
||||||
} else {
|
} else {
|
||||||
return new String("make"); //$NON-NLS-1$
|
return "make"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return command;
|
return command;
|
||||||
|
@ -1652,7 +1678,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDefaultBuildCmd() {
|
public boolean isDefaultBuildCmd() {
|
||||||
return isExtensionBuilder || (command == null && args == null && superClass != null);
|
return isExtensionBuilder || (command == null && args == null /*&& stopOnErr == null && parallelBuildOn == null && parallelNum == null */ && superClass != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isStopOnError() {
|
public boolean isStopOnError() {
|
||||||
|
@ -1699,6 +1725,9 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
if(on){
|
if(on){
|
||||||
command = null;
|
command = null;
|
||||||
args = null;
|
args = null;
|
||||||
|
// stopOnErr = null;
|
||||||
|
// parallelBuildOn = null;
|
||||||
|
// parallelNum = null;
|
||||||
} else {
|
} else {
|
||||||
command = getCommand();
|
command = getCommand();
|
||||||
}
|
}
|
||||||
|
@ -1918,7 +1947,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
return new String[]{BUILD_COMMAND, BuilderFactory.BUILD_COMMAND};
|
return new String[]{BUILD_COMMAND, BuilderFactory.BUILD_COMMAND};
|
||||||
} else if(ARGUMENTS.equals(name)){
|
} else if(ARGUMENTS.equals(name)){
|
||||||
return new String[]{BUILD_ARGUMENTS, BuilderFactory.BUILD_ARGUMENTS};
|
return new String[]{BUILD_ARGUMENTS, BuilderFactory.BUILD_ARGUMENTS};
|
||||||
} else if(ATTRIBUTE_STOP_ON_ERROR.equals(name)){
|
} else if(ATTRIBUTE_STOP_ON_ERR.equals(name)){
|
||||||
return new String[]{BuilderFactory.STOP_ON_ERROR};
|
return new String[]{BuilderFactory.STOP_ON_ERROR};
|
||||||
} //TODO else if(BuilderFactory.USE_DEFAULT_BUILD_CMD.equals(name)){
|
} //TODO else if(BuilderFactory.USE_DEFAULT_BUILD_CMD.equals(name)){
|
||||||
// return getCommand();
|
// return getCommand();
|
||||||
|
|
|
@ -16,6 +16,9 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.ErrorParserManager;
|
||||||
|
import org.eclipse.cdt.make.core.IMakeCommonBuildInfo;
|
||||||
|
import org.eclipse.cdt.make.internal.core.BuildInfoFactory;
|
||||||
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.IManagedBuildInfo;
|
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||||
|
@ -23,7 +26,6 @@ import org.eclipse.cdt.managedbuilder.core.IManagedProject;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||||
import org.eclipse.cdt.newmake.internal.core.MakeMessages;
|
|
||||||
import org.eclipse.core.resources.ICommand;
|
import org.eclipse.core.resources.ICommand;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IProjectDescription;
|
import org.eclipse.core.resources.IProjectDescription;
|
||||||
|
@ -54,7 +56,7 @@ public class BuilderFactory {
|
||||||
|
|
||||||
static final String CONTENTS = PREFIX + ".contents"; //$NON-NLS-1$
|
static final String CONTENTS = PREFIX + ".contents"; //$NON-NLS-1$
|
||||||
static final String CONTENTS_BUILDER = PREFIX + ".builder"; //$NON-NLS-1$
|
static final String CONTENTS_BUILDER = PREFIX + ".builder"; //$NON-NLS-1$
|
||||||
// static final String CONTENTS_BUILDER_CUSTOMIZATION = PREFIX + ".builderCustomization"; //$NON-NLS-1$
|
static final String CONTENTS_BUILDER_CUSTOMIZATION = PREFIX + ".builderCustomization"; //$NON-NLS-1$
|
||||||
static final String CONTENTS_CONFIGURATION_IDS = PREFIX + ".configurationIds"; //$NON-NLS-1$
|
static final String CONTENTS_CONFIGURATION_IDS = PREFIX + ".configurationIds"; //$NON-NLS-1$
|
||||||
|
|
||||||
// static final String IDS = PREFIX + ".ids"; //$NON-NLS-1$
|
// static final String IDS = PREFIX + ".ids"; //$NON-NLS-1$
|
||||||
|
@ -240,7 +242,8 @@ public class BuilderFactory {
|
||||||
args.put(IBuilder.ID, ManagedBuildManager.calculateChildId(command.getBuilderName(), null));
|
args.put(IBuilder.ID, ManagedBuildManager.calculateChildId(command.getBuilderName(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
return createBuilder(cfg, args);
|
//TODO: do we need a to check for the non-customization case ?
|
||||||
|
return createBuilder(cfg, args, cfg.getBuilder() != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBuilder createBuilderForEclipseBuilder(IConfiguration cfg, String eclipseBuilderID) throws CoreException {
|
public static IBuilder createBuilderForEclipseBuilder(IConfiguration cfg, String eclipseBuilderID) throws CoreException {
|
||||||
|
@ -272,37 +275,36 @@ public class BuilderFactory {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static IBuilder createBuilder(IConfiguration cfg, Map args){
|
private static IBuilder createBuilder(IConfiguration cfg, Map args, boolean customization){
|
||||||
IToolChain tCh = cfg.getToolChain();
|
IToolChain tCh = cfg.getToolChain();
|
||||||
boolean isMakeTargetBuild = false;
|
|
||||||
if(args.get(IBuilder.ID) == null){
|
|
||||||
args.put(IBuilder.ID, ManagedBuildManager.calculateChildId(cfg.getId(), null));
|
|
||||||
isMakeTargetBuild = true;
|
|
||||||
}
|
|
||||||
MapStorageElement el = new BuildArgsStorageElement(args, null);
|
|
||||||
Builder builder = new Builder(tCh, el, ManagedBuildManager.getVersion().toString());
|
|
||||||
IBuilder cfgBuilder = cfg.getEditableBuilder();
|
IBuilder cfgBuilder = cfg.getEditableBuilder();
|
||||||
if(builder.getBuildPathAttribute() == null){
|
|
||||||
//set the build path from the cfg settings
|
Builder builder;
|
||||||
builder.setBuildPath(cfgBuilder.getBuildPath());
|
if(customization){
|
||||||
}
|
builder = (Builder)createCustomBuilder(cfg, cfgBuilder);
|
||||||
if(builder.getManagedBuildOnAttribute() == null){
|
|
||||||
try {
|
//adjusting settings
|
||||||
builder.setManagedBuildOn(cfgBuilder.isManagedBuildOn());
|
String tmp = (String)args.get(ErrorParserManager.PREF_ERROR_PARSER);
|
||||||
} catch (CoreException e) {
|
if(tmp != null && tmp.length() == 0)
|
||||||
ManagedBuilderCorePlugin.log(e);
|
args.remove(ErrorParserManager.PREF_ERROR_PARSER);
|
||||||
}
|
|
||||||
}
|
|
||||||
if(isMakeTargetBuild){
|
|
||||||
String [] ids = builder.getCustomizedErrorParserIds();
|
|
||||||
if(ids != null && ids.length == 0){
|
|
||||||
builder.setCustomizedErrorParserIds(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
String id = builder.getErrorParserIds();
|
tmp = (String)args.get(USE_DEFAULT_BUILD_CMD);
|
||||||
if(id == null)
|
if(tmp != null && Boolean.valueOf(tmp).equals(Boolean.TRUE)){
|
||||||
builder.setErrorParserIds(cfgBuilder.getErrorParserIds());
|
args.remove(IMakeCommonBuildInfo.BUILD_COMMAND);
|
||||||
|
args.remove(IMakeCommonBuildInfo.BUILD_ARGUMENTS);
|
||||||
|
}
|
||||||
|
//end adjusting settings
|
||||||
|
|
||||||
|
MapStorageElement el = new BuildArgsStorageElement(args, null);
|
||||||
|
builder.loadFromProject(el);
|
||||||
|
} else {
|
||||||
|
if(args.get(IBuilder.ID) == null){
|
||||||
|
args.put(IBuilder.ID, ManagedBuildManager.calculateChildId(cfg.getId(), null));
|
||||||
|
}
|
||||||
|
MapStorageElement el = new BuildArgsStorageElement(args, null);
|
||||||
|
builder = new Builder(tCh, el, ManagedBuildManager.getVersion().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,13 +318,13 @@ public class BuilderFactory {
|
||||||
builders = new IBuilder[]{builder};
|
builders = new IBuilder[]{builder};
|
||||||
} else {
|
} else {
|
||||||
String type = (String)args.get(CONTENTS);
|
String type = (String)args.get(CONTENTS);
|
||||||
if(type == null){
|
if(type == null || CONTENTS_BUILDER_CUSTOMIZATION.equals(type)){
|
||||||
IConfiguration cfg = info.getDefaultConfiguration();
|
IConfiguration cfg = info.getDefaultConfiguration();
|
||||||
IBuilder builder;
|
IBuilder builder;
|
||||||
if(args.size() == 0){
|
if(args.size() == 0){
|
||||||
builder = cfg.getEditableBuilder();
|
builder = cfg.getEditableBuilder();
|
||||||
} else {
|
} else {
|
||||||
builder = createBuilder(cfg, args);
|
builder = createBuilder(cfg, args, true);
|
||||||
}
|
}
|
||||||
builders = new IBuilder[]{builder};
|
builders = new IBuilder[]{builder};
|
||||||
//TODO:
|
//TODO:
|
||||||
|
@ -331,7 +333,7 @@ public class BuilderFactory {
|
||||||
if(cfgs.length != 0){
|
if(cfgs.length != 0){
|
||||||
List list = new ArrayList(cfgs.length);
|
List list = new ArrayList(cfgs.length);
|
||||||
for(int i = 0; i < cfgs.length; i++){
|
for(int i = 0; i < cfgs.length; i++){
|
||||||
IBuilder builder = createBuilder(cfgs[i], args);
|
IBuilder builder = createBuilder(cfgs[i], args, false);
|
||||||
if(builder != null)
|
if(builder != null)
|
||||||
list.add(builder);
|
list.add(builder);
|
||||||
}
|
}
|
||||||
|
|
|
@ -478,7 +478,7 @@ public class CommonBuilder extends ACBuilder {
|
||||||
if(VERBOSE)
|
if(VERBOSE)
|
||||||
outputTrace(project.getName(), ">>build requested, type = " + kind); //$NON-NLS-1$
|
outputTrace(project.getName(), ">>build requested, type = " + kind); //$NON-NLS-1$
|
||||||
|
|
||||||
IBuilder builders[] = BuilderFactory.createBuilders(project, args);
|
IBuilder builders[] = ManagedBuilderCorePlugin.createBuilders(project, args);
|
||||||
IProject[] projects = build(kind, project, builders, true, monitor);
|
IProject[] projects = build(kind, project, builders, true, monitor);
|
||||||
|
|
||||||
if(VERBOSE)
|
if(VERBOSE)
|
||||||
|
@ -1443,7 +1443,7 @@ public class CommonBuilder extends ACBuilder {
|
||||||
|
|
||||||
protected void clean(IProgressMonitor monitor) throws CoreException {
|
protected void clean(IProgressMonitor monitor) throws CoreException {
|
||||||
IProject curProject = getProject();
|
IProject curProject = getProject();
|
||||||
IBuilder[] builders = BuilderFactory.createBuilders(curProject, null);
|
IBuilder[] builders = ManagedBuilderCorePlugin.createBuilders(curProject, null);
|
||||||
for(int i = 0; i < builders.length; i++){
|
for(int i = 0; i < builders.length; i++){
|
||||||
IBuilder builder = builders[i];
|
IBuilder builder = builders[i];
|
||||||
CfgBuildInfo bInfo = new CfgBuildInfo(builder, true);
|
CfgBuildInfo bInfo = new CfgBuildInfo(builder, true);
|
||||||
|
@ -1668,13 +1668,13 @@ public class CommonBuilder extends ACBuilder {
|
||||||
// Set the environment
|
// Set the environment
|
||||||
String[] env = calcEnvironment(builder);
|
String[] env = calcEnvironment(builder);
|
||||||
String[] buildArguments = targets;
|
String[] buildArguments = targets;
|
||||||
if (builder.isDefaultBuildCmd()) {
|
// if (builder.isDefaultBuildCmd()) {
|
||||||
// if (!builder.isStopOnError()) {
|
// if (!builder.isStopOnError()) {
|
||||||
// buildArguments = new String[targets.length + 1];
|
// buildArguments = new String[targets.length + 1];
|
||||||
// buildArguments[0] = "-k"; //$NON-NLS-1$
|
// buildArguments[0] = "-k"; //$NON-NLS-1$
|
||||||
// System.arraycopy(targets, 0, buildArguments, 1, targets.length);
|
// System.arraycopy(targets, 0, buildArguments, 1, targets.length);
|
||||||
// }
|
// }
|
||||||
} else {
|
// } else {
|
||||||
String args = builder.getBuildArguments();
|
String args = builder.getBuildArguments();
|
||||||
if (args != null && !(args = args.trim()).equals("")) { //$NON-NLS-1$
|
if (args != null && !(args = args.trim()).equals("")) { //$NON-NLS-1$
|
||||||
String[] newArgs = makeArray(args);
|
String[] newArgs = makeArray(args);
|
||||||
|
@ -1682,7 +1682,7 @@ public class CommonBuilder extends ACBuilder {
|
||||||
System.arraycopy(newArgs, 0, buildArguments, 0, newArgs.length);
|
System.arraycopy(newArgs, 0, buildArguments, 0, newArgs.length);
|
||||||
System.arraycopy(targets, 0, buildArguments, newArgs.length, targets.length);
|
System.arraycopy(targets, 0, buildArguments, newArgs.length, targets.length);
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
// MakeRecon recon = new MakeRecon(buildCommand, buildArguments, env, workingDirectory, makeMonitor, cos);
|
// MakeRecon recon = new MakeRecon(buildCommand, buildArguments, env, workingDirectory, makeMonitor, cos);
|
||||||
// recon.invokeMakeRecon();
|
// recon.invokeMakeRecon();
|
||||||
// cos = recon;
|
// cos = recon;
|
||||||
|
|
|
@ -2360,6 +2360,8 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
} else {
|
} else {
|
||||||
resetErrorParsers();
|
resetErrorParsers();
|
||||||
Set oldSet = contributeErrorParsers(null, true);
|
Set oldSet = contributeErrorParsers(null, true);
|
||||||
|
if(oldSet == null)
|
||||||
|
oldSet = new HashSet();
|
||||||
HashSet newSet = new HashSet();
|
HashSet newSet = new HashSet();
|
||||||
newSet.addAll(Arrays.asList(ids));
|
newSet.addAll(Arrays.asList(ids));
|
||||||
newSet.remove(null);
|
newSet.remove(null);
|
||||||
|
@ -2385,6 +2387,9 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
|
|
||||||
void removeErrorParsers(Set set){
|
void removeErrorParsers(Set set){
|
||||||
Set oldSet = contributeErrorParsers(null, false);
|
Set oldSet = contributeErrorParsers(null, false);
|
||||||
|
if(oldSet == null)
|
||||||
|
oldSet = new HashSet();
|
||||||
|
|
||||||
oldSet.removeAll(set);
|
oldSet.removeAll(set);
|
||||||
setErrorParserAttribute((String[])oldSet.toArray(new String[oldSet.size()]));
|
setErrorParserAttribute((String[])oldSet.toArray(new String[oldSet.size()]));
|
||||||
|
|
||||||
|
|
|
@ -3849,6 +3849,9 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
||||||
|
|
||||||
void removeErrorParsers(Set set){
|
void removeErrorParsers(Set set){
|
||||||
Set oldSet = contributeErrorParsers(null);
|
Set oldSet = contributeErrorParsers(null);
|
||||||
|
if(oldSet == null)
|
||||||
|
oldSet = new HashSet();
|
||||||
|
|
||||||
oldSet.removeAll(set);
|
oldSet.removeAll(set);
|
||||||
setErrorParserList((String[])oldSet.toArray(new String[oldSet.size()]));
|
setErrorParserList((String[])oldSet.toArray(new String[oldSet.size()]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2577,6 +2577,9 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
|
||||||
|
|
||||||
void removeErrorParsers(FolderInfo info, Set set){
|
void removeErrorParsers(FolderInfo info, Set set){
|
||||||
Set oldSet = contributeErrorParsers(info, null, false);
|
Set oldSet = contributeErrorParsers(info, null, false);
|
||||||
|
if(oldSet == null)
|
||||||
|
oldSet = new HashSet();
|
||||||
|
|
||||||
oldSet.removeAll(set);
|
oldSet.removeAll(set);
|
||||||
setErrorParserList((String[])oldSet.toArray(new String[oldSet.size()]));
|
setErrorParserList((String[])oldSet.toArray(new String[oldSet.size()]));
|
||||||
|
|
||||||
|
|
|
@ -548,7 +548,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
|
||||||
|
|
||||||
private ICProjectDescription getConvertedDescription(IProject project, IProjectDescription eDes) throws CoreException{
|
private ICProjectDescription getConvertedDescription(IProject project, IProjectDescription eDes) throws CoreException{
|
||||||
Object info[] = loadProjectDescriptionFromOldstyleStorage(project);
|
Object info[] = loadProjectDescriptionFromOldstyleStorage(project);
|
||||||
CProjectDescription des;
|
CProjectDescription des = null;
|
||||||
String ownerId;
|
String ownerId;
|
||||||
try {
|
try {
|
||||||
if(info != null){
|
if(info != null){
|
||||||
|
@ -604,6 +604,8 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
|
||||||
CProjectDescription d = clearDescriptionLoadding(project);
|
CProjectDescription d = clearDescriptionLoadding(project);
|
||||||
if(d != null)
|
if(d != null)
|
||||||
d.setLoadding(false);
|
d.setLoadding(false);
|
||||||
|
if(des != null)
|
||||||
|
des.setLoadding(false);
|
||||||
}
|
}
|
||||||
return des;
|
return des;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue