Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java')
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java30
1 files changed, 19 insertions, 11 deletions
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java
index ba3a220eb..812c14be9 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -83,7 +83,7 @@ public final class ExternalToolBuilder extends IncrementalProjectBuilder {
}
boolean kindCompatible= commandConfiguredForKind(config, kind);
if (kindCompatible && configEnabled(config)) {
- doBuildBasedOnScope(resources, kind, config, monitor);
+ doBuildBasedOnScope(resources, kind, config, args, monitor);
}
return projectsWithinScope;
@@ -155,7 +155,7 @@ public final class ExternalToolBuilder extends IncrementalProjectBuilder {
return true;
}
- private void doBuildBasedOnScope(IResource[] resources, int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
+ private void doBuildBasedOnScope(IResource[] resources, int kind, ILaunchConfiguration config, Map args, IProgressMonitor monitor) throws CoreException {
boolean buildForChange = true;
if (kind != FULL_BUILD) { //scope not applied for full builds
if (resources != null && resources.length > 0) {
@@ -164,19 +164,19 @@ public final class ExternalToolBuilder extends IncrementalProjectBuilder {
}
if (buildForChange) {
- launchBuild(kind, config, monitor);
+ launchBuild(kind, config, args, monitor);
}
}
- private void launchBuild(int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
+ private void launchBuild(int kind, ILaunchConfiguration config, Map args, IProgressMonitor monitor) throws CoreException {
monitor.subTask(NLS.bind(ExternalToolsModelMessages.ExternalToolBuilder_Running__0_____1, new String[] { config.getName()}));
- buildStarted(kind);
+ buildStarted(kind, args);
// The default value for "launch in background" is true in debug core. If
// the user doesn't go through the UI, the new attribute won't be set. This means
// that existing Ant builders will try to run in the background (and likely conflict with
// each other) without migration.
- config= ExternalToolMigration.migrateRunInBackground(config);
- config.launch(ILaunchManager.RUN_MODE, monitor);
+ ILaunchConfiguration newconfig= ExternalToolMigration.migrateRunInBackground(config);
+ newconfig.launch(ILaunchManager.RUN_MODE, monitor);
buildEnded();
}
@@ -213,15 +213,23 @@ public final class ExternalToolBuilder extends IncrementalProjectBuilder {
/**
* Stores the currently active build kind and build project when a build begins
* @param buildKind
+ * @param args
*/
- private void buildStarted(int buildKind) {
+ private void buildStarted(int buildKind, Map args) {
switch (buildKind) {
case IncrementalProjectBuilder.INCREMENTAL_BUILD :
+
buildType = IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
buildDelta = getDelta(getProject());
break;
case IncrementalProjectBuilder.FULL_BUILD :
- buildType = IExternalToolConstants.BUILD_TYPE_FULL;
+ if(args != null && args.containsKey(BuilderUtils.INC_CLEAN)) {
+ buildType = IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
+ buildDelta = getDelta(getProject());
+ }
+ else {
+ buildType = IExternalToolConstants.BUILD_TYPE_FULL;
+ }
break;
case IncrementalProjectBuilder.AUTO_BUILD :
buildType = IExternalToolConstants.BUILD_TYPE_AUTO;
@@ -283,6 +291,6 @@ public final class ExternalToolBuilder extends IncrementalProjectBuilder {
return;
}
- launchBuild(IncrementalProjectBuilder.CLEAN_BUILD, config, monitor);
+ launchBuild(IncrementalProjectBuilder.CLEAN_BUILD, config, null, monitor);
}
} \ No newline at end of file

Back to the top