Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Burns2002-12-09 19:14:19 +0000
committerJared Burns2002-12-09 19:14:19 +0000
commit3d750b48f01fb8b0d6a277bcbbc483297629a4da (patch)
tree19a3e2020c66ff14d663167157c1c6ec09129c0e /org.eclipse.ui.externaltools/Program Tools Support
parent8d3e6ae8109e27c3e083d23106ab58f629d2162c (diff)
downloadeclipse.platform.debug-3d750b48f01fb8b0d6a277bcbbc483297629a4da.tar.gz
eclipse.platform.debug-3d750b48f01fb8b0d6a277bcbbc483297629a4da.tar.xz
eclipse.platform.debug-3d750b48f01fb8b0d6a277bcbbc483297629a4da.zip
Bug 27956 - Create Ant Main tab to limit location selection
Diffstat (limited to 'org.eclipse.ui.externaltools/Program Tools Support')
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramBuilderTabGroup.java3
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java33
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramTabGroup.java3
3 files changed, 35 insertions, 4 deletions
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramBuilderTabGroup.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramBuilderTabGroup.java
index a0427e1e8..7eedd61c6 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramBuilderTabGroup.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramBuilderTabGroup.java
@@ -10,7 +10,6 @@ http://www.eclipse.org/legal/cpl-v10.html
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.ui.externaltools.launchConfigurations.ExternalToolsMainTab;
import org.eclipse.ui.externaltools.launchConfigurations.ExternalToolsRefreshTab;
public class ProgramBuilderTabGroup extends AbstractLaunchConfigurationTabGroup {
@@ -20,7 +19,7 @@ public class ProgramBuilderTabGroup extends AbstractLaunchConfigurationTabGroup
*/
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new ExternalToolsMainTab(),
+ new ProgramMainTab(),
new ExternalToolsRefreshTab(),
};
setTabs(tabs);
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
new file mode 100644
index 000000000..18bb548a8
--- /dev/null
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
@@ -0,0 +1,33 @@
+package org.eclipse.ui.externaltools.internal.program.launchConfigurations;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.ui.externaltools.internal.ui.FileSelectionDialog;
+import org.eclipse.ui.externaltools.launchConfigurations.ExternalToolsMainTab;
+import org.eclipse.ui.externaltools.model.IExternalToolConstants;
+import org.eclipse.ui.externaltools.model.ToolUtil;
+
+public class ProgramMainTab extends ExternalToolsMainTab {
+
+ /**
+ * Prompts the user for a program location within the workspace and sets the
+ * location as a String containing the workspace_loc variable or
+ * <code>null</code> if no location was obtained from the user.
+ */
+ protected void handleWorkspaceLocationButtonSelected() {
+ FileSelectionDialog dialog;
+ dialog = new FileSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), "&Select a program");
+ dialog.open();
+ IFile file = dialog.getResult();
+ if (file == null) {
+ return;
+ }
+ StringBuffer buf = new StringBuffer();
+ ToolUtil.buildVariableTag(IExternalToolConstants.VAR_WORKSPACE_LOC, file.getFullPath().toString(), buf);
+ String text= buf.toString();
+ if (text != null) {
+ locationField.setText(text);
+ }
+ }
+
+}
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramTabGroup.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramTabGroup.java
index af775b6b8..74b0a38e7 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramTabGroup.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramTabGroup.java
@@ -11,7 +11,6 @@ import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
import org.eclipse.debug.ui.CommonTab;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.ui.externaltools.launchConfigurations.ExternalToolsMainTab;
import org.eclipse.ui.externaltools.launchConfigurations.ExternalToolsRefreshTab;
public class ProgramTabGroup extends AbstractLaunchConfigurationTabGroup {
@@ -21,7 +20,7 @@ public class ProgramTabGroup extends AbstractLaunchConfigurationTabGroup {
*/
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new ExternalToolsMainTab(),
+ new ProgramMainTab(),
new ExternalToolsRefreshTab(),
new CommonTab()
};

Back to the top