Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2011-11-07 11:13:35 -0500
committerUwe Stieber2011-11-07 11:20:41 -0500
commit9f118ef1ed5c96796bf444ebebc6fa436eb17d72 (patch)
tree0f263ac133521765b6add4563c7b820792b15571
parent0d99bc88e87c39fbb11aa274923741ec359c197d (diff)
downloadorg.eclipse.tcf-9f118ef1ed5c96796bf444ebebc6fa436eb17d72.tar.gz
org.eclipse.tcf-9f118ef1ed5c96796bf444ebebc6fa436eb17d72.tar.xz
org.eclipse.tcf-9f118ef1ed5c96796bf444ebebc6fa436eb17d72.zip
Target Explorer: Propagate selection to the terminal launcher configuration panels
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF2
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConfigurationPanel.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java50
6 files changed, 95 insertions, 7 deletions
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java
index 9cf6e1a25..1b5ec1200 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java
@@ -22,7 +22,7 @@ import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
import org.eclipse.tm.te.tcf.terminals.core.launcher.TerminalsLauncher;
import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate;
/**
@@ -34,7 +34,7 @@ public class LauncherDelegate extends AbstractLauncherDelegate {
* @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#getPanel(org.eclipse.tm.te.ui.controls.BaseDialogPageControl)
*/
@Override
- public IWizardConfigurationPanel getPanel(BaseDialogPageControl parentControl) {
+ public IConfigurationPanel getPanel(BaseDialogPageControl parentControl) {
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF
index 7300e44e4..9a545e543 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF
@@ -30,9 +30,11 @@ Export-Package: org.eclipse.tm.te.ui.terminals.actions,
org.eclipse.tm.te.ui.terminals.internal;x-internal:=true,
org.eclipse.tm.te.ui.terminals.internal.dialogs;x-internal:=true,
org.eclipse.tm.te.ui.terminals.internal.handler;x-internal:=true,
+ org.eclipse.tm.te.ui.terminals.internal.tracing;x-internal:=true,
org.eclipse.tm.te.ui.terminals.launcher,
org.eclipse.tm.te.ui.terminals.manager,
org.eclipse.tm.te.ui.terminals.nls;x-internal:=true,
+ org.eclipse.tm.te.ui.terminals.panels,
org.eclipse.tm.te.ui.terminals.services,
org.eclipse.tm.te.ui.terminals.streams,
org.eclipse.tm.te.ui.terminals.tabs,
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConfigurationPanel.java
new file mode 100644
index 000000000..e9de5c79e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConfigurationPanel.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tm.te.ui.terminals.interfaces;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
+
+/**
+ * Terminal launcher configuration panel.
+ */
+public interface IConfigurationPanel extends IWizardConfigurationPanel {
+
+ /**
+ * Set the selection to the configuration panel.
+ *
+ * @param selection The selection or <code>null</code>.
+ */
+ public void setSelection(ISelection selection);
+
+ /**
+ * Returns the selection associated with the configuration panel.
+ *
+ * @return The selection or <code>null</code>.
+ */
+ public ISelection getSelection();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java
index 3f13c44e1..f28f8bb4b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java
@@ -14,7 +14,6 @@ import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
/**
* Terminal launcher delegate.
@@ -48,7 +47,7 @@ public interface ILauncherDelegate extends IExecutableExtension {
* @param parentControl The parent control. Must not be <code>null</code>.
* @return The configuration panel instance or <code>null</code>
*/
- public IWizardConfigurationPanel getPanel(BaseDialogPageControl parentControl);
+ public IConfigurationPanel getPanel(BaseDialogPageControl parentControl);
/**
* Execute the terminal launch.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
index b842944e3..584d66e2b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
+++ b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
@@ -36,13 +36,14 @@ import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
import org.eclipse.tm.te.ui.controls.BaseWizardConfigurationPanelControl;
import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel;
import org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog;
import org.eclipse.tm.te.ui.swt.SWTControlUtil;
import org.eclipse.tm.te.ui.terminals.help.IContextHelpIds;
+import org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate;
import org.eclipse.tm.te.ui.terminals.launcher.LauncherDelegateManager;
import org.eclipse.tm.te.ui.terminals.nls.Messages;
+import org.eclipse.tm.te.ui.terminals.panels.AbstractConfigurationPanel;
import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -91,7 +92,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
/**
* An empty terminal settings panel.
*/
- protected class EmptySettingsPanel extends AbstractWizardConfigurationPanel {
+ protected class EmptySettingsPanel extends AbstractConfigurationPanel {
/**
* Constructor.
@@ -198,8 +199,11 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
ILauncherDelegate delegate = label2delegate.get(terminalLabel);
Assert.isNotNull(delegate);
// Get the wizard configuration panel instance
- IWizardConfigurationPanel configPanel = delegate.getPanel(settings);
+ IConfigurationPanel configPanel = delegate.getPanel(settings);
if (configPanel == null) configPanel = new EmptySettingsPanel(settings);
+ // Push the selection to the configuration panel
+ Assert.isNotNull(configPanel);
+ configPanel.setSelection(getSelection());
// Add it
settings.addConfigurationPanel(terminalLabel, configPanel);
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java
new file mode 100644
index 000000000..caa239469
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tm.te.ui.terminals.panels;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel;
+import org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel;
+
+/**
+ * Abstract terminal configuration panel implementation.
+ */
+public abstract class AbstractConfigurationPanel extends AbstractWizardConfigurationPanel implements IConfigurationPanel {
+ // The selection
+ private ISelection selection;
+
+ /**
+ * Constructor.
+ *
+ * @param parentControl The parent control. Must not be <code>null</code>!
+ */
+ public AbstractConfigurationPanel(BaseDialogPageControl parentControl) {
+ super(parentControl);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel#setSelection(org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setSelection(ISelection selection) {
+ this.selection = selection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel#getSelection()
+ */
+ @Override
+ public ISelection getSelection() {
+ return selection;
+ }
+
+}

Back to the top