1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 09:16:02 +02:00

Bug 322794 Allow IBuilder to have IOptions.

This commit is contained in:
Doug Schaefer 2010-08-18 14:21:22 +00:00
parent 92009d5090
commit ef4aeacd8a
3 changed files with 85 additions and 138 deletions

View file

@ -1484,6 +1484,9 @@ Additional special types exist to flag options of special relevance to the build
</documentation> </documentation>
</annotation> </annotation>
<complexType> <complexType>
<sequence>
<element ref="option" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string" use="required"> <attribute name="id" type="string" use="required">
<annotation> <annotation>
<documentation> <documentation>

View file

@ -32,7 +32,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
* @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 IBuilder extends IBuildObject, IMakeBuilderInfo { public interface IBuilder extends IHoldsOptions, IMakeBuilderInfo {
public static final String ARGUMENTS = "arguments"; //$NON-NLS-1$ public static final String ARGUMENTS = "arguments"; //$NON-NLS-1$
public static final String BUILDER_ELEMENT_NAME = "builder"; //$NON-NLS-1$ public static final String BUILDER_ELEMENT_NAME = "builder"; //$NON-NLS-1$
public static final String BUILDFILEGEN_ID ="buildfileGenerator"; //$NON-NLS-1$ public static final String BUILDFILEGEN_ID ="buildfileGenerator"; //$NON-NLS-1$

View file

@ -37,6 +37,7 @@ import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.cdt.core.settings.model.extension.CBuildData; import org.eclipse.cdt.core.settings.model.extension.CBuildData;
import org.eclipse.cdt.core.settings.model.util.CDataUtil; import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.core.settings.model.util.LanguageSettingEntriesSerializer; import org.eclipse.cdt.core.settings.model.util.LanguageSettingEntriesSerializer;
import org.eclipse.cdt.managedbuilder.core.BuildException;
import org.eclipse.cdt.managedbuilder.core.ExternalBuildRunner; import org.eclipse.cdt.managedbuilder.core.ExternalBuildRunner;
import org.eclipse.cdt.managedbuilder.core.IBuildObject; import org.eclipse.cdt.managedbuilder.core.IBuildObject;
import org.eclipse.cdt.managedbuilder.core.IBuildRunner; import org.eclipse.cdt.managedbuilder.core.IBuildRunner;
@ -45,6 +46,7 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement; import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
import org.eclipse.cdt.managedbuilder.core.IManagedProject; import org.eclipse.cdt.managedbuilder.core.IManagedProject;
import org.eclipse.cdt.managedbuilder.core.IProjectType; import org.eclipse.cdt.managedbuilder.core.IProjectType;
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.cdt.managedbuilder.core.InternalBuildRunner; import org.eclipse.cdt.managedbuilder.core.InternalBuildRunner;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
@ -73,12 +75,11 @@ import org.eclipse.core.variables.IStringVariableManager;
import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.core.variables.VariablesPlugin;
import org.osgi.framework.Version; import org.osgi.framework.Version;
public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider, IRealBuildObjectAssociation { public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider, IRealBuildObjectAssociation {
private static final String EMPTY_STRING = ""; //$NON-NLS-1$ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
// Superclass // Superclass
private IBuilder superClass;
private String superClassId; private String superClassId;
// Parent and children // Parent and children
private IToolChain parent; private IToolChain parent;
@ -159,6 +160,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* @param managedBuildRevision The fileVersion of Managed Buid System * @param managedBuildRevision The fileVersion of Managed Buid System
*/ */
public Builder(IToolChain parent, IManagedConfigElement element, String managedBuildRevision) { public Builder(IToolChain parent, IManagedConfigElement element, String managedBuildRevision) {
super(true);
this.parent = parent; this.parent = parent;
isExtensionBuilder = true; isExtensionBuilder = true;
@ -185,6 +187,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* @param isExtensionElement Indicates whether this is an extension element or a managed project element * @param isExtensionElement Indicates whether this is an extension element or a managed project element
*/ */
public Builder(ToolChain parent, IBuilder superClass, String Id, String name, boolean isExtensionElement) { public Builder(ToolChain parent, IBuilder superClass, String Id, String name, boolean isExtensionElement) {
super(true);
this.parent = parent; this.parent = parent;
this.superClass = superClass; this.superClass = superClass;
setManagedBuildRevision(parent.getManagedBuildRevision()); setManagedBuildRevision(parent.getManagedBuildRevision());
@ -214,6 +217,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* @param managedBuildRevision The fileVersion of Managed Buid System * @param managedBuildRevision The fileVersion of Managed Buid System
*/ */
public Builder(IToolChain parent, ICStorageElement element, String managedBuildRevision) { public Builder(IToolChain parent, ICStorageElement element, String managedBuildRevision) {
super(true);
this.parent = parent; this.parent = parent;
isExtensionBuilder = false; isExtensionBuilder = false;
@ -233,6 +237,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* @param builder The existing builder to clone. * @param builder The existing builder to clone.
*/ */
public Builder(IToolChain parent, String Id, String name, Builder builder) { public Builder(IToolChain parent, String Id, String name, Builder builder) {
super(true);
this.parent = parent; this.parent = parent;
superClass = builder.superClass; superClass = builder.superClass;
@ -433,7 +438,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* 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) /**
* Loads the builder information from the ManagedConfigElement specified in the * Loads the builder information from the ManagedConfigElement specified in the
* argument. * argument.
* *
@ -565,19 +570,23 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
IManagedConfigElement[] children = element.getChildren(); IManagedConfigElement[] children = element.getChildren();
for(int i = 0; i < children.length; i++){ for(int i = 0; i < children.length; i++){
IManagedConfigElement child = children[i]; IManagedConfigElement child = children[i];
String name = child.getName(); if (loadChild(child)) {
if(OUTPUT_ENTRIES.equals(name)){ // nothing
ICSettingEntry entries[] = LanguageSettingEntriesSerializer.loadEntries(new ManagedConfigStorageElement(child)); } else {
if(entries.length == 0){ String name = child.getName();
outputEntries = new ICOutputEntry[0]; if(OUTPUT_ENTRIES.equals(name)){
} else { ICSettingEntry entries[] = LanguageSettingEntriesSerializer.loadEntries(new ManagedConfigStorageElement(child));
List list = new ArrayList(entries.length); if(entries.length == 0){
for(int k = 0; k < entries.length; k++){ outputEntries = new ICOutputEntry[0];
if(entries[k].getKind() == ICLanguageSettingEntry.OUTPUT_PATH) } else {
list.add(entries[k]); List list = new ArrayList(entries.length);
for(int k = 0; k < entries.length; k++){
if(entries[k].getKind() == ICLanguageSettingEntry.OUTPUT_PATH)
list.add(entries[k]);
}
outputEntries = (ICOutputEntry[])list.toArray(new ICOutputEntry[list.size()]);
} }
outputEntries = (ICOutputEntry[])list.toArray(new ICOutputEntry[list.size()]); }
}
} }
} }
@ -591,7 +600,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
fBuildRunnerElement = ((DefaultManagedConfigElement)element).getConfigurationElement(); fBuildRunnerElement = ((DefaultManagedConfigElement)element).getConfigurationElement();
} }
/* (non-Javadoc) /**
* Initialize the builder information from the XML element * Initialize the builder information from the XML element
* specified in the argument * specified in the argument
* *
@ -742,19 +751,23 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
ICStorageElement[] children = element.getChildren(); ICStorageElement[] children = element.getChildren();
for(int i = 0; i < children.length; i++){ for(int i = 0; i < children.length; i++){
ICStorageElement child = children[i]; ICStorageElement child = children[i];
String name = child.getName(); if (loadChild(child)) {
if(OUTPUT_ENTRIES.equals(name)){ // nothing
ICSettingEntry entries[] = LanguageSettingEntriesSerializer.loadEntries(child); } else {
if(entries.length == 0){ String name = child.getName();
outputEntries = new ICOutputEntry[0]; if(OUTPUT_ENTRIES.equals(name)){
} else { ICSettingEntry entries[] = LanguageSettingEntriesSerializer.loadEntries(child);
List list = new ArrayList(entries.length); if(entries.length == 0){
for(int k = 0; k < entries.length; k++){ outputEntries = new ICOutputEntry[0];
if(entries[k].getKind() == ICLanguageSettingEntry.OUTPUT_PATH) } else {
list.add(entries[k]); List list = new ArrayList(entries.length);
for(int k = 0; k < entries.length; k++){
if(entries[k].getKind() == ICLanguageSettingEntry.OUTPUT_PATH)
list.add(entries[k]);
}
outputEntries = (ICOutputEntry[])list.toArray(new ICOutputEntry[list.size()]);
} }
outputEntries = (ICOutputEntry[])list.toArray(new ICOutputEntry[list.size()]); }
}
} }
} }
@ -852,6 +865,13 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
// TODO: issue warning? // TODO: issue warning?
} }
// options
try {
super.serialize(element);
} catch (BuildException e) {
ManagedBuilderCorePlugin.log(e);
}
if(outputEntries != null){ if(outputEntries != null){
ICStorageElement outEl = element.createChild(OUTPUT_ENTRIES); ICStorageElement outEl = element.createChild(OUTPUT_ENTRIES);
LanguageSettingEntriesSerializer.serializeEntries(outputEntries, outEl); LanguageSettingEntriesSerializer.serializeEntries(outputEntries, outEl);
@ -938,6 +958,13 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
// TODO: issue warning? // TODO: issue warning?
} }
// options
try {
super.serialize(element);
} catch (BuildException e) {
ManagedBuilderCorePlugin.log(e);
}
if(outputEntries != null){ if(outputEntries != null){
ICStorageElement outEl = element.createChild(OUTPUT_ENTRIES); ICStorageElement outEl = element.createChild(OUTPUT_ENTRIES);
LanguageSettingEntriesSerializer.serializeEntries(outputEntries, outEl); LanguageSettingEntriesSerializer.serializeEntries(outputEntries, outEl);
@ -948,9 +975,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* P A R E N T A N D C H I L D H A N D L I N G * P A R E N T A N D C H I L D H A N D L I N G
*/ */
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder#getParent()
*/
public IToolChain getParent() { public IToolChain getParent() {
return parent; return parent;
} }
@ -959,24 +983,15 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* M O D E L A T T R I B U T E A C C E S S O R S * M O D E L A T T R I B U T E A C C E S S O R S
*/ */
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getSuperClass()
*/
public IBuilder getSuperClass() { public IBuilder getSuperClass() {
return superClass; return (IBuilder)superClass;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder#getName()
*/
@Override @Override
public String getName() { public String getName() {
return (name == null && superClass != null) ? superClass.getName() : name; return (name == null && superClass != null) ? superClass.getName() : name;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder#isAbstract()
*/
public boolean isAbstract() { public boolean isAbstract() {
if (isAbstract != null) { if (isAbstract != null) {
return isAbstract.booleanValue(); return isAbstract.booleanValue();
@ -985,9 +1000,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder#getUnusedChildren()
*/
public String getUnusedChildren() { public String getUnusedChildren() {
if (unusedChildren != null) { if (unusedChildren != null) {
return unusedChildren; return unusedChildren;
@ -995,14 +1007,11 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return EMPTY_STRING; // Note: no inheritance from superClass return EMPTY_STRING; // Note: no inheritance from superClass
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder#getCommand()
*/
public String getCommand() { public String getCommand() {
if (command == null) { if (command == null) {
// If I have a superClass, ask it // If I have a superClass, ask it
if (superClass != null) { if (superClass != null) {
return superClass.getCommand(); return getSuperClass().getCommand();
} else { } else {
return "make"; //$NON-NLS-1$ return "make"; //$NON-NLS-1$
} }
@ -1010,9 +1019,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return command; return command;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder#getArguments()
*/
public String getArguments() { public String getArguments() {
String args = getArgumentsAttribute(); String args = getArgumentsAttribute();
String stopOnErrCmd = getStopOnErrCmd(isStopOnError()); String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
@ -1159,23 +1165,17 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return args; return args;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getErrorParserIds()
*/
public String getErrorParserIds() { public String getErrorParserIds() {
String ids = errorParserIds; String ids = errorParserIds;
if (ids == null) { if (ids == null) {
// If I have a superClass, ask it // If I have a superClass, ask it
if (superClass != null) { if (superClass != null) {
ids = superClass.getErrorParserIds(); ids = getSuperClass().getErrorParserIds();
} }
} }
return ids; return ids;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getErrorParserList()
*/
public String[] getErrorParserList() { public String[] getErrorParserList() {
String parserIDs = getErrorParserIds(); String parserIDs = getErrorParserIds();
String[] errorParsers = null; String[] errorParsers = null;
@ -1198,9 +1198,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return errorParsers; return errorParsers;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder.setCommand(String)
*/
public void setCommand(String cmd) { public void setCommand(String cmd) {
if(getCommand().equals(cmd)) return; if(getCommand().equals(cmd)) return;
if (cmd == null && command == null) return; if (cmd == null && command == null) return;
@ -1210,9 +1207,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IBuilder#setArguments(String)
*/
public void setArguments(String newArgs) { public void setArguments(String newArgs) {
if(getArguments().equals(newArgs)) if(getArguments().equals(newArgs))
return; return;
@ -1235,9 +1229,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#setErrorParserIds()
*/
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;
@ -1247,17 +1238,11 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
} }
/* (non-Javadoc)
* Sets the isAbstract attribute
*/
public void setIsAbstract(boolean b) { public void setIsAbstract(boolean b) {
isAbstract = new Boolean(b); isAbstract = new Boolean(b);
setDirty(true); setDirty(true);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getBuildFileGeneratorElement()
*/
public IConfigurationElement getBuildFileGeneratorElement() { public IConfigurationElement getBuildFileGeneratorElement() {
if (buildFileGeneratorElement == null) { if (buildFileGeneratorElement == null) {
if (superClass != null) { if (superClass != null) {
@ -1267,9 +1252,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return buildFileGeneratorElement; return buildFileGeneratorElement;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getBuildFileGenerator()
*/
public IManagedBuilderMakefileGenerator getBuildFileGenerator(){ public IManagedBuilderMakefileGenerator getBuildFileGenerator(){
IConfigurationElement element = getBuildFileGeneratorElement(); IConfigurationElement element = getBuildFileGeneratorElement();
if (element != null) { if (element != null) {
@ -1292,9 +1274,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#setBuildFileGeneratorElement(String)
*/
public void setBuildFileGeneratorElement(IConfigurationElement element) { public void setBuildFileGeneratorElement(IConfigurationElement element) {
buildFileGeneratorElement = element; buildFileGeneratorElement = element;
setDirty(true); setDirty(true);
@ -1304,32 +1283,20 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
* O B J E C T S T A T E M A I N T E N A N C E * O B J E C T S T A T E M A I N T E N A N C E
*/ */
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#isExtensionElement()
*/
public boolean isExtensionElement() { public boolean isExtensionElement() {
return isExtensionBuilder; return isExtensionBuilder;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#isDirty()
*/
public boolean isDirty() { public boolean isDirty() {
// This shouldn't be called for an extension Builder // This shouldn't be called for an extension Builder
if (isExtensionBuilder) return false; if (isExtensionBuilder) return false;
return isDirty; return isDirty;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#setDirty(boolean)
*/
public void setDirty(boolean isDirty) { public void setDirty(boolean isDirty) {
this.isDirty = isDirty; this.isDirty = isDirty;
} }
/* (non-Javadoc)
* Resolve the element IDs to interface references
*/
public void resolveReferences() { public void resolveReferences() {
if (!resolved) { if (!resolved) {
resolved = true; resolved = true;
@ -1348,14 +1315,11 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getConvertToId()
*/
public String getConvertToId() { public String getConvertToId() {
if (convertToId == null) { if (convertToId == null) {
// If I have a superClass, ask it // If I have a superClass, ask it
if (superClass != null) { if (superClass != null) {
return superClass.getConvertToId(); return getSuperClass().getConvertToId();
} else { } else {
return EMPTY_STRING; return EMPTY_STRING;
} }
@ -1363,9 +1327,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return convertToId; return convertToId;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#setConvertToId(String)
*/
public void setConvertToId(String convertToId) { public void setConvertToId(String convertToId) {
if (convertToId == null && this.convertToId == null) return; if (convertToId == null && this.convertToId == null) return;
if (convertToId == null || this.convertToId == null || !convertToId.equals(this.convertToId)) { if (convertToId == null || this.convertToId == null || !convertToId.equals(this.convertToId)) {
@ -1375,14 +1336,11 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return; return;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getVersionsSupported()
*/
public String getVersionsSupported() { public String getVersionsSupported() {
if (versionsSupported == null) { if (versionsSupported == null) {
// If I have a superClass, ask it // If I have a superClass, ask it
if (superClass != null) { if (superClass != null) {
return superClass.getVersionsSupported(); return getSuperClass().getVersionsSupported();
} else { } else {
return EMPTY_STRING; return EMPTY_STRING;
} }
@ -1390,10 +1348,6 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return versionsSupported; return versionsSupported;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#setVersionsSupported(String)
*/
public void setVersionsSupported(String versionsSupported) { public void setVersionsSupported(String versionsSupported) {
if (versionsSupported == null && this.versionsSupported == null) return; if (versionsSupported == null && this.versionsSupported == null) return;
if (versionsSupported == null || this.versionsSupported == null || !versionsSupported.equals(this.versionsSupported)) { if (versionsSupported == null || this.versionsSupported == null || !versionsSupported.equals(this.versionsSupported)) {
@ -1403,48 +1357,33 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return; return;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getFileContextBuildMacroValues()
*/
public IFileContextBuildMacroValues getFileContextBuildMacroValues(){ public IFileContextBuildMacroValues getFileContextBuildMacroValues(){
if(fileContextBuildMacroValues == null && superClass != null) if(fileContextBuildMacroValues == null && superClass != null)
return superClass.getFileContextBuildMacroValues(); return getSuperClass().getFileContextBuildMacroValues();
return fileContextBuildMacroValues; return fileContextBuildMacroValues;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getBuilderVariablePattern()
*/
public String getBuilderVariablePattern(){ public String getBuilderVariablePattern(){
if(builderVariablePattern == null && superClass != null) if(builderVariablePattern == null && superClass != null)
return superClass.getBuilderVariablePattern(); return getSuperClass().getBuilderVariablePattern();
return builderVariablePattern; return builderVariablePattern;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#isVariableCaseSensitive()
*/
public boolean isVariableCaseSensitive(){ public boolean isVariableCaseSensitive(){
if(isVariableCaseSensitive == null){ if(isVariableCaseSensitive == null){
if(superClass != null) if(superClass != null)
return superClass.isVariableCaseSensitive(); return getSuperClass().isVariableCaseSensitive();
return true; return true;
} }
return isVariableCaseSensitive.booleanValue(); return isVariableCaseSensitive.booleanValue();
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getReservedMacroNames()
*/
public String[] getReservedMacroNames(){ public String[] getReservedMacroNames(){
if(reservedMacroNames == null && superClass != null) if(reservedMacroNames == null && superClass != null)
return superClass.getReservedMacroNames(); return getSuperClass().getReservedMacroNames();
return reservedMacroNames; return reservedMacroNames;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IBuilder#getReservedMacroNameSupplier()
*/
public IReservedMacroNameSupplier getReservedMacroNameSupplier(){ public IReservedMacroNameSupplier getReservedMacroNameSupplier(){
if(reservedMacroNameSupplier == null && reservedMacroNameSupplierElement != null){ if(reservedMacroNameSupplier == null && reservedMacroNameSupplierElement != null){
try{ try{
@ -1453,7 +1392,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
} }
if(reservedMacroNameSupplier == null && superClass != null) if(reservedMacroNameSupplier == null && superClass != null)
return superClass.getReservedMacroNameSupplier(); return getSuperClass().getReservedMacroNameSupplier();
return reservedMacroNameSupplier; return reservedMacroNameSupplier;
} }
@ -1844,7 +1783,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean isStopOnError() { public boolean isStopOnError() {
if(stopOnErr == null){ if(stopOnErr == null){
if(superClass != null){ if(superClass != null){
return superClass.isStopOnError(); return getSuperClass().isStopOnError();
} }
return true; return true;
} }
@ -1984,7 +1923,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean isAutoBuildEnable() { public boolean isAutoBuildEnable() {
if(autoBuildEnabled == null){ if(autoBuildEnabled == null){
if(superClass != null) if(superClass != null)
return superClass.isAutoBuildEnable(); return getSuperClass().isAutoBuildEnable();
return false; return false;
} }
return autoBuildEnabled.booleanValue(); return autoBuildEnabled.booleanValue();
@ -1993,7 +1932,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean isCleanBuildEnabled() { public boolean isCleanBuildEnabled() {
if(cleanBuildEnabled == null){ if(cleanBuildEnabled == null){
if(superClass != null) if(superClass != null)
return superClass.isCleanBuildEnabled(); return getSuperClass().isCleanBuildEnabled();
return true; return true;
} }
return cleanBuildEnabled.booleanValue(); return cleanBuildEnabled.booleanValue();
@ -2006,7 +1945,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean isIncrementalBuildEnabled() { public boolean isIncrementalBuildEnabled() {
if(incrementalBuildEnabled == null){ if(incrementalBuildEnabled == null){
if(superClass != null) if(superClass != null)
return superClass.isIncrementalBuildEnabled(); return getSuperClass().isIncrementalBuildEnabled();
return true; return true;
} }
return incrementalBuildEnabled.booleanValue(); return incrementalBuildEnabled.booleanValue();
@ -2047,7 +1986,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean appendEnvironment() { public boolean appendEnvironment() {
if(appendEnvironment == null){ if(appendEnvironment == null){
if(superClass != null){ if(superClass != null){
return superClass.appendEnvironment(); return getSuperClass().appendEnvironment();
} }
return true; return true;
} }
@ -2339,7 +2278,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean keepEnvironmentVariablesInBuildfile() { public boolean keepEnvironmentVariablesInBuildfile() {
if(keepEnvVarInBuildfile == null){ if(keepEnvVarInBuildfile == null){
if(superClass != null) if(superClass != null)
return superClass.keepEnvironmentVariablesInBuildfile(); return getSuperClass().keepEnvironmentVariablesInBuildfile();
return false; return false;
} }
return keepEnvVarInBuildfile.booleanValue(); return keepEnvVarInBuildfile.booleanValue();
@ -2363,7 +2302,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean supportsBuild(boolean managed) { public boolean supportsBuild(boolean managed) {
if(supportsManagedBuild == null){ if(supportsManagedBuild == null){
if(superClass != null) if(superClass != null)
return superClass.supportsBuild(managed); return getSuperClass().supportsBuild(managed);
return managed || !isInternalBuilder(); return managed || !isInternalBuilder();
} }
return supportsManagedBuild.booleanValue(); return supportsManagedBuild.booleanValue();
@ -2551,7 +2490,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
public boolean isParallelBuildOn() { public boolean isParallelBuildOn() {
if(parallelBuildOn == null){ if(parallelBuildOn == null){
if(superClass != null){ if(superClass != null){
return superClass.isParallelBuildOn(); return getSuperClass().isParallelBuildOn();
} }
return false; return false;
} }
@ -2749,7 +2688,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
} }
} }
if(fCommandLauncher == null && superClass != null) if(fCommandLauncher == null && superClass != null)
return superClass.getCommandLauncher(); return getSuperClass().getCommandLauncher();
else if(fCommandLauncher == null) // catch all for backwards compatibility else if(fCommandLauncher == null) // catch all for backwards compatibility
fCommandLauncher = new CommandLauncher(); fCommandLauncher = new CommandLauncher();
@ -2770,7 +2709,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
// Check with superClass // Check with superClass
if (superClass != null) if (superClass != null)
return superClass.getBuildRunner(); return getSuperClass().getBuildRunner();
// Default internal or external builder // Default internal or external builder
if (isInternalBuilder()) if (isInternalBuilder())
@ -2778,5 +2717,10 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
return new ExternalBuildRunner(); return new ExternalBuildRunner();
} }
@Override
protected IResourceInfo getParentResourceInfo() {
// There are no resources associated with builders
return null;
}
} }