Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorOleg Krasilnikov2008-03-19 09:35:59 +0000
committerOleg Krasilnikov2008-03-19 09:35:59 +0000
commit7d4b0fd58200e04bc47593828f395df75cc99b9f (patch)
treec56351315d0c66cf9c2019019114b828275eea43 /build
parentfd23b527a9c84b99732a671406fc79ae08c3509c (diff)
downloadorg.eclipse.cdt-7d4b0fd58200e04bc47593828f395df75cc99b9f.tar.gz
org.eclipse.cdt-7d4b0fd58200e04bc47593828f395df75cc99b9f.tar.xz
org.eclipse.cdt-7d4b0fd58200e04bc47593828f395df75cc99b9f.zip
Bug #223059 : Problems setting per resource tool settings
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java68
1 files changed, 31 insertions, 37 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
index 099a366aa3f..d60ec8f6f2e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
@@ -3942,61 +3942,55 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
return true;
}
}
- //envVarBuildPathList;
- // Managed Build model attributes
-// unusedChildren;
-// isAbstract;
Tool superTool = (Tool)superClass;
if(command != null && !command.equals(superTool.getToolCommand()))
return true;
- //inputExtensions;
- //interfaceExtensions; //(header extensions)
- //natureFilter;
- //outputExtensions;
- //outputFlag;
- //outputPrefix;
if(errorParserIds != null && !errorParserIds.equals(superTool.getErrorParserIds()))
return true;
-
if(commandLinePattern != null && !commandLinePattern.equals(superTool.getCommandLinePattern()))
return true;
- //versionsSupported;
- //convertToId;
- //advancedInputCategory;
if(customBuildStep != null && customBuildStep.booleanValue() != superTool.getCustomBuildStep())
return true;
if(announcement != null && !announcement.equals(superTool.getAnnouncement()))
return true;
- //commandLineGeneratorElement
- //commandLineGenerator
- //dependencyGeneratorElement
- //dependencyGenerator
- //iconPathURL;
- //pathconverterElement
- //optionPathConverter
- //supportedProperties
- //supportsManagedBuild
- //isTest;
- // Miscellaneous
- //isExtensionTool
- //isDirty
- //resolved
- //previousMbsVersionConversionElement
- //currentMbsVersionConversionElement
- //rebuildState
- //booleanExpressionCalculator
-
- //typeToDataMap
- //fDataMapInited;
- //identicalList;
+
if(discoveredInfoMap != null && discoveredInfoMap.size() != 0)
return true;
- //scannerConfigDiscoveryProfileId
+
+ if (isAnyOptionModified(this, tool))
+ return true;
+
+ return false;
+ }
+
+ private boolean isAnyOptionModified(ITool t1, ITool t2) {
+ for (IOption op1 : t1.getOptions()) {
+ for (IOption op2 : t2.getOptions()) {
+ // find matching option
+ try {
+ if (op1.getValueType() == op2.getValueType() &&
+ op1.getName().equals(op2.getName())) {
+ Object ob1 = op1.getValue();
+ Object ob2 = op2.getValue();
+ if (ob1 == null && ob2 == null)
+ break;
+ // values are different ?
+ if ((ob1 == null || ob2 == null) ||
+ !(ob1.equals(ob2) ))
+ return true;
+ else
+ break;
+ }
+ } catch (BuildException e) {
+ return true; // unprobable
+ }
+ }
+ }
return false;
}

Back to the top