Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Bonneau2015-03-07 14:23:42 +0000
committerElena Laskavaia2015-03-30 23:55:55 +0000
commitf3781679fa888c172514d789e89ef211ad043b8c (patch)
treef433b46638c2128f714ad8d9df89b8b0e48b0756
parent65bac9ae34b33d4c6de28960135315d5d54c06a4 (diff)
downloadorg.eclipse.cdt-f3781679fa888c172514d789e89ef211ad043b8c.tar.gz
org.eclipse.cdt-f3781679fa888c172514d789e89ef211ad043b8c.tar.xz
org.eclipse.cdt-f3781679fa888c172514d789e89ef211ad043b8c.zip
Bug 461628 Some tools within a toolchain can potentially generate an
output resource with the same name even if the input resource name to the tool is not the same. This fix is to provide this capability to CDT Change-Id: I9ad9d2ff0cc39797718f8b689c7a828e81f49648 Signed-off-by: Guy Bonneau <guy.bonneau@videotron.ca> Bug 461628 Some tools within a toolchain can potentially generate an output resource with the same name even if the input resource name to the tool is not the same. This fix is to provide this capability to CDT" Change-Id: I9ad9d2ff0cc39797718f8b689c7a828e81f49648 Signed-off-by: Guy Bonneau <guy.bonneau@videotron.ca>
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
index af997d7ab45..b997b0489cc 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
@@ -21,6 +21,7 @@ import org.eclipse.cdt.managedbuilder.buildmodel.IBuildDescription;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildIOType;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildResource;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildStep;
+import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
@@ -143,6 +144,15 @@ public class BuildResource implements IBuildResource {
inStep.removeResource(fProducerArg, this, true);
fProducerArg = arg;
} else {
+ // Bug 461628
+ // Check if this resource is an output produced by a Tool that support merging in which case
+ // a producer can already be defined by a previous step. This is supported.
+
+ IBuildStep step = fProducerArg.getStep();
+ ITool tool = step instanceof BuildStep ? ((BuildStep)(step)).getTool() : null;
+ if(tool != null && !arg.isInput()) {
+ return;
+ }
String err = "ProducerArgument not null!!!\n"; //$NON-NLS-1$
String rcName = DbgUtil.resourceName(this);
@@ -155,8 +165,6 @@ public class BuildResource implements IBuildResource {
if(DbgUtil.DEBUG){
err = err + externalizedErr + "curent producer: " + DbgUtil.dumpStep(fProducerArg.getStep()) + "\n producer attempt: " + DbgUtil.dumpStep(arg.getStep()); //$NON-NLS-1$ //$NON-NLS-2$
}
-
-
throw new IllegalArgumentException(externalizedErr);
}
}

Back to the top