Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Swanson2005-02-09 17:34:31 +0000
committerDarin Swanson2005-02-09 17:34:31 +0000
commit0756a8b91df0dee4dee14cf77eea495709bc11e8 (patch)
treea5668f5a955c885996b9f4c013b0f8feed2c1b4e /org.eclipse.ui.externaltools
parent83e4b6dd9c22b45d48ceb0e6e5cb6bc89ef3a622 (diff)
downloadeclipse.platform.debug-0756a8b91df0dee4dee14cf77eea495709bc11e8.tar.gz
eclipse.platform.debug-0756a8b91df0dee4dee14cf77eea495709bc11e8.tar.xz
eclipse.platform.debug-0756a8b91df0dee4dee14cf77eea495709bc11e8.zip
Bug 63685 - Customize what happens on each build kind when using external builders and Ant
Diffstat (limited to 'org.eclipse.ui.externaltools')
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java36
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java8
2 files changed, 30 insertions, 14 deletions
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java
index 1b49bef21..bcfe9afed 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java
@@ -43,15 +43,17 @@ import org.eclipse.ui.ide.IDE;
public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
- private Button afterClean;
- private Button autoBuildButton;
- private Button manualBuild;
- private Button workingSetButton;
- private Button specifyResources;
+ protected Button afterClean;
+ protected Button fDuringClean;
+ protected Button autoBuildButton;
+ protected Button manualBuild;
+ protected Button workingSetButton;
+ protected Button specifyResources;
protected Button fLaunchInBackgroundButton;
- private IWorkingSet workingSet;
+ protected IWorkingSet workingSet;
+ protected ILaunchConfiguration fConfiguration;
- private SelectionListener selectionListener= new SelectionAdapter() {
+ protected SelectionListener selectionListener= new SelectionAdapter() {
/* (non-Javadoc)
* @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
*/
@@ -99,14 +101,15 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
});
}
- private void createBuildScheduleComponent(Composite parent) {
+ protected void createBuildScheduleComponent(Composite parent) {
Label label= new Label(parent, SWT.NONE);
label.setText(ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.Run_this_builder_for__1")); //$NON-NLS-1$
label.setFont(parent.getFont());
afterClean= createButton(parent, selectionListener, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.&Full_builds_2"), ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.Full"), 2); //$NON-NLS-1$ //$NON-NLS-2$
manualBuild= createButton(parent, selectionListener, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.&Incremental_builds_4"), ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.Inc"), 2); //$NON-NLS-1$ //$NON-NLS-2$
autoBuildButton= createButton(parent, selectionListener, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.&Auto_builds_(Not_recommended)_6"), ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.Auto"), 2); //$NON-NLS-1$ //$NON-NLS-2$
-
+ fDuringClean= createButton(parent, selectionListener, "During a Clean", "Runs when a clean has been initiated", 2);
+
createVerticalSpacer(parent, 2);
workingSetButton= createButton(parent, selectionListener, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.workingSet_label"), ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsBuilderTab.workingSet_tooltip"), 1); //$NON-NLS-1$ //$NON-NLS-2$
@@ -123,7 +126,7 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
/*
* Creates a check button in the given composite with the given text
*/
- private Button createButton(Composite parent, SelectionListener listener, String text, String tooltipText, int columns) {
+ protected Button createButton(Composite parent, SelectionListener listener, String text, String tooltipText, int columns) {
Button button= createCheckButton(parent, text);
button.setToolTipText(tooltipText);
button.addSelectionListener(listener);
@@ -150,10 +153,11 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
*/
public void initializeFrom(ILaunchConfiguration configuration) {
-
+ fConfiguration= configuration;
afterClean.setSelection(false);
manualBuild.setSelection(false);
autoBuildButton.setSelection(false);
+ fDuringClean.setSelection(false);
String buildKindString= null;
String buildScope= null;
@@ -182,6 +186,9 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
case IncrementalProjectBuilder.AUTO_BUILD:
autoBuildButton.setSelection(true);
break;
+ case IncrementalProjectBuilder.CLEAN_BUILD:
+ fDuringClean.setSelection(true);
+ break;
}
}
boolean enabled= autoBuildButton.getSelection() || manualBuild.getSelection();
@@ -224,6 +231,10 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
if (autoBuildButton.getSelection()) {
buffer.append(IExternalToolConstants.BUILD_TYPE_AUTO).append(',');
}
+
+ if (fDuringClean.getSelection()) {
+ buffer.append(IExternalToolConstants.BUILD_TYPE_CLEAN);
+ }
configuration.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, buffer.toString());
if (workingSetButton.getSelection()) {
@@ -306,5 +317,4 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
// do nothing on deactivation
}
-
-}
+} \ No newline at end of file
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java
index e99c3178a..92b5843ec 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java
@@ -71,9 +71,15 @@ public interface IExternalToolConstants {
/**
* Build type indicating an automatic project build request for
- * the external tool running as a builder (value <code>incremental</code>).
+ * the external tool running as a builder (value <code>auto</code>).
*/
public static final String BUILD_TYPE_AUTO = "auto"; //$NON-NLS-1$
+
+ /**
+ * Build type indicating a clean project build request for
+ * the external tool running as a builder (value <code>clean</code>).
+ */
+ public static final String BUILD_TYPE_CLEAN = "clean"; //$NON-NLS-1$
/**
* Build type indicating no project build request for

Back to the top