Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2003-01-07 15:26:33 +0000
committerDarin Wright2003-01-07 15:26:33 +0000
commit81fbc0917ebe1f29f8ec9901d74f8f42a09b9023 (patch)
tree918f2f5fcc97951ac1076b0243a240c0747b32db
parentf934cb10f2d9f85cbf4724f0df48e3ba82d47dfa (diff)
downloadeclipse.platform.debug-81fbc0917ebe1f29f8ec9901d74f8f42a09b9023.tar.gz
eclipse.platform.debug-81fbc0917ebe1f29f8ec9901d74f8f42a09b9023.tar.xz
eclipse.platform.debug-81fbc0917ebe1f29f8ec9901d74f8f42a09b9023.zip
bug 27989
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java32
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java25
3 files changed, 69 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index 163eec82c..d3b25b3d6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -1026,4 +1026,36 @@ public class LaunchConfigurationTabGroupViewer extends Viewer {
protected Composite getVisibleArea() {
return fVisibleArea;
}
+
+ /**
+ * Sets the displayed tab to the given tab. Has no effect if the specified
+ * tab is not one of the tabs being displayed in the dialog currently.
+ *
+ * @param tab the tab to display/activate
+ */
+ public void setActiveTab(ILaunchConfigurationTab tab) {
+ ILaunchConfigurationTab[] tabs = getTabs();
+ for (int i = 0; i < tabs.length; i++) {
+ ILaunchConfigurationTab configurationTab = tabs[i];
+ if (configurationTab.equals(tab)) {
+ setActiveTab(i);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Sets the displayed tab to the tab with the given index. Has no effect if
+ * the specified index is not within the limits of the tabs returned by
+ * <code>getTabs()</code>.
+ *
+ * @param index the index of the tab to dispay
+ */
+ public void setActiveTab(int index) {
+ ILaunchConfigurationTab[] tabs = getTabs();
+ if (index >= 0 && index < tabs.length) {
+ getTabFolder().setSelection(index);
+ handleTabSelected();
+ }
+ }
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index b5a61ee52..1bdeb0492 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -1848,4 +1848,18 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
}
+ /**
+ * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(org.eclipse.debug.ui.ILaunchConfigurationTab)
+ */
+ public void setActiveTab(ILaunchConfigurationTab tab) {
+ getTabViewer().setActiveTab(tab);
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(int)
+ */
+ public void setActiveTab(int index) {
+ getTabViewer().setActiveTab(index);
+ }
+
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java
index 071f9d513..21a0b0e2f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java
@@ -11,7 +11,9 @@ import org.eclipse.jface.operation.IRunnableContext;
* A launch configuration dialog is used to edit and launch
* launch configurations. It contains a launch configuration
* tab group.
- *
+ * <p>
+ * Clients are not intended to implement this interface.
+ * </p>
* @see ILaunchConfigurationTabGroup
* @see ILaunchConfigurationTab
* @since 2.0
@@ -86,6 +88,25 @@ public interface ILaunchConfigurationDialog extends IRunnableContext {
* @return one of <code>RUN_MODE</code> or <code>DEBUG_MODE</code> defined in <code>ILaunchManager</code>
* @see ILaunchManager
*/
- public String getMode();
+ public String getMode();
+
+ /**
+ * Sets the displayed tab to the given tab. Has no effect if the specified
+ * tab is not one of the tabs being displayed in the dialog currently.
+ *
+ * @param tab the tab to display/activate
+ * @since 2.1
+ */
+ public void setActiveTab(ILaunchConfigurationTab tab);
+
+ /**
+ * Sets the displayed tab to the tab with the given index. Has no effect if
+ * the specified index is not within the limits of the tabs returned by
+ * <code>getTabs()</code>.
+ *
+ * @param index the index of the tab to dispay
+ * @since 2.1
+ */
+ public void setActiveTab(int index);
}

Back to the top