Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2017-04-13 23:22:06 +0000
committerJeff Johnston2017-06-22 22:10:10 +0000
commit150fda824db19c8c8c9c3027b6c858710b41ea08 (patch)
tree80b8fd4acb3d7354ad0c30b91c0c5865dcb937d0
parente70713966f6ac62197aa92c20a6fd1578d5817ad (diff)
downloadorg.eclipse.cdt-150fda824db19c8c8c9c3027b6c858710b41ea08.tar.gz
org.eclipse.cdt-150fda824db19c8c8c9c3027b6c858710b41ea08.tar.xz
org.eclipse.cdt-150fda824db19c8c8c9c3027b6c858710b41ea08.zip
Fix step builder make invocation that isn't using Container
- change CommandBuilder to accept a project as an argument to its constructor and to pass this as an argument to the CommandLauncherFactoryManager - have StepBuilder pass project when creating a CommandBuilder Change-Id: I54073b791fb48a7fd62ce98a93dcfbdcd6d76d2b
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/StepBuilder.java6
2 files changed, 11 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
index 7bcec107c7..bc924ce04d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
@@ -23,6 +23,7 @@ import org.eclipse.cdt.core.ICommandLauncher;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildCommand;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeMessages;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -47,6 +48,8 @@ public class CommandBuilder implements IBuildModelBuilder {
private Process fProcess;
private String fErrMsg;
+ private IProject fProject;
+
protected class OutputStreamWrapper extends OutputStream {
private OutputStream fOut;
@@ -80,8 +83,9 @@ public class CommandBuilder implements IBuildModelBuilder {
}
- public CommandBuilder(IBuildCommand cmd, IResourceRebuildStateContainer cr){
+ public CommandBuilder(IBuildCommand cmd, IResourceRebuildStateContainer cr, IProject project){
fCmd = cmd;
+ fProject = project;
}
protected OutputStream wrap(OutputStream out){
@@ -143,7 +147,7 @@ public class CommandBuilder implements IBuildModelBuilder {
}
protected ICommandLauncher createLauncher() {
- return CommandLauncherFactoryManager.getInstance().getCommandLauncher();
+ return CommandLauncherFactoryManager.getInstance().getCommandLauncher(fProject);
}
public String getErrMsg() {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/StepBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/StepBuilder.java
index 9773bec0aa..b40ae1ccc6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/StepBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/StepBuilder.java
@@ -17,7 +17,9 @@ import org.eclipse.cdt.managedbuilder.buildmodel.IBuildCommand;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildDescription;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildResource;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildStep;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -223,8 +225,10 @@ public class StepBuilder implements IBuildModelBuilder {
fCommandBuilders = new CommandBuilder[0];
else {
fCommandBuilders = new CommandBuilder[cmds.length];
+ IConfiguration cfg = fStep.getBuildDescription().getConfiguration();
+ IProject project = (IProject)cfg.getOwner();
for(int i = 0; i < cmds.length; i++){
- fCommandBuilders[i] = new CommandBuilder(cmds[i], fRebuildStateContainer);
+ fCommandBuilders[i] = new CommandBuilder(cmds[i], fRebuildStateContainer, project);
}
}
}

Back to the top