Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-01-08 02:20:03 -0500
committerUwe Stieber2012-01-08 02:20:03 -0500
commit1e82cb3cac6d20179e9f7039dce57a2f87b1bfaa (patch)
treea9f01a757eedd873cfbffecf7b70a826d7ba3236 /target_explorer/plugins
parent9a5707ec6b3739fa596dc353f6e4e5cee6835ed1 (diff)
downloadorg.eclipse.tcf-1e82cb3cac6d20179e9f7039dce57a2f87b1bfaa.tar.gz
org.eclipse.tcf-1e82cb3cac6d20179e9f7039dce57a2f87b1bfaa.tar.xz
org.eclipse.tcf-1e82cb3cac6d20179e9f7039dce57a2f87b1bfaa.zip
Target Explorer: Fix peer node overview page issue not saving changes in multiple sections
Diffstat (limited to 'target_explorer/plugins')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java74
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java67
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/ISharedDataWizardPage.java63
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java19
15 files changed, 268 insertions, 183 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
index bd1deffbf..eb8c40bce 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
@@ -27,15 +27,15 @@ import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
import org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel;
import org.eclipse.tcf.te.ui.controls.validator.RegexValidator;
import org.eclipse.tcf.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* Custom transport type panel implementation.
*/
-public class CustomTransportPanel extends AbstractWizardConfigurationPanel implements ISharedDataWizardPage {
+public class CustomTransportPanel extends AbstractWizardConfigurationPanel implements IDataExchangeNode3 {
private CustomTransportNameControl customTransportNameControl;
@@ -181,7 +181,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -193,7 +193,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
@@ -205,14 +205,14 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
@@ -221,6 +221,16 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ Assert.isNotNull(src);
+ Assert.isNotNull(dst);
+ dst.setProperty(IPeer.ATTR_TRANSPORT_NAME, src.getProperty(IPeer.ATTR_TRANSPORT_NAME));
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
index 6cf566874..2d87cfc07 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
@@ -26,15 +26,15 @@ import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
import org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel;
import org.eclipse.tcf.te.ui.controls.validator.RegexValidator;
import org.eclipse.tcf.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* Pipe transport type panel implementation.
*/
-public class PipeTransportPanel extends AbstractWizardConfigurationPanel implements ISharedDataWizardPage {
+public class PipeTransportPanel extends AbstractWizardConfigurationPanel implements IDataExchangeNode3 {
private PipeNameControl pipeNameControl;
@@ -180,7 +180,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -192,7 +192,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
@@ -205,14 +205,14 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
@@ -221,6 +221,16 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ Assert.isNotNull(src);
+ Assert.isNotNull(dst);
+ dst.setProperty("PipeName", src.getProperty("PipeName")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java
index af3794f1e..e5dfe4456 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java
@@ -28,15 +28,15 @@ import org.eclipse.tcf.te.ui.controls.net.RemoteHostPortControl;
import org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel;
import org.eclipse.tcf.te.ui.controls.validator.NameOrIPValidator;
import org.eclipse.tcf.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* TCP transport type wizard configuration panel.
*/
-public class TcpTransportPanel extends AbstractWizardConfigurationPanel implements ISharedDataWizardPage {
+public class TcpTransportPanel extends AbstractWizardConfigurationPanel implements IDataExchangeNode3 {
private RemoteHostAddressControl addressControl = null;
private RemoteHostPortControl portControl = null;
@@ -241,7 +241,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -257,7 +257,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
@@ -275,14 +275,14 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
@@ -292,6 +292,17 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ Assert.isNotNull(src);
+ Assert.isNotNull(dst);
+ dst.setProperty(IPeer.ATTR_IP_HOST, src.getStringProperty(IPeer.ATTR_IP_HOST));
+ dst.setProperty(IPeer.ATTR_IP_PORT, src.getStringProperty(IPeer.ATTR_IP_PORT));
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java
index 8f06767c3..3b4e32ba1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java
@@ -71,7 +71,8 @@ public class AttributesSection extends AbstractSection {
*/
private static final String[] FILTERED_NAMES = new String [] {
IPeer.ATTR_ID, IPeer.ATTR_NAME,
- IPeer.ATTR_TRANSPORT_NAME, IPeer.ATTR_IP_HOST, IPeer.ATTR_IP_PORT
+ IPeer.ATTR_TRANSPORT_NAME, IPeer.ATTR_IP_HOST, IPeer.ATTR_IP_PORT,
+ "PipeName" //$NON-NLS-1$
};
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
index f381de687..733cfad5f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
@@ -206,14 +206,13 @@ public class GeneralInformationSection extends AbstractSection {
Protocol.invokeAndWait(new Runnable() {
@Override
public void run() {
- wc.setProperties(node.getProperties());
- odc.setProperties(node.getProperties());
-
- Map<String, String> properties = node.getPeer().getAttributes();
- for (String key : properties.keySet()) {
- wc.setProperty(key, properties.get(key));
- odc.setProperty(key, properties.get(key));
- }
+ // The section is handling the ID, the name and
+ // the link state. Ignore other properties.
+ odc.setProperty(IPeerModelProperties.PROP_STATE, node.getProperty(IPeerModelProperties.PROP_STATE));
+ odc.setProperty(IPeer.ATTR_ID, node.getPeer().getAttributes().get(IPeer.ATTR_ID));
+ odc.setProperty(IPeer.ATTR_NAME, node.getPeer().getAttributes().get(IPeer.ATTR_NAME));
+ // Initially, the working copy is a duplicate of the original data copy
+ wc.setProperties(odc.getProperties());
}
});
@@ -274,36 +273,39 @@ public class GeneralInformationSection extends AbstractSection {
wc.setProperty(IPeer.ATTR_NAME, nameControl.getEditFieldControlText());
}
- // Copy the working copy data back to the original properties container
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- // To update the peer attributes, the peer needs to be recreated
- IPeer oldPeer = node.getPeer();
- // Create a write able copy of the peer attributes
- Map<String, String> attributes = new HashMap<String, String>(oldPeer.getAttributes());
- // Update the (managed) attributes from the working copy
- attributes.put(IPeer.ATTR_NAME, wc.getStringProperty(IPeer.ATTR_NAME));
- // Update the persistence storage URI (if set)
- if (attributes.containsKey(IPersistableNodeProperties.PROPERTY_URI)) {
- IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
- if (persistenceService != null) {
- URI uri = null;
- try {
- uri = persistenceService.getURI(attributes);
- } catch (IOException e) { /* ignored on purpose */ }
- if (uri != null) attributes.put(IPersistableNodeProperties.PROPERTY_URI, uri.toString());
- else attributes.remove(IPersistableNodeProperties.PROPERTY_URI);
+ // If the peer name changed, copy the working copy data back to
+ // the original properties container
+ if (!odc.getStringProperty(IPeer.ATTR_NAME).equals(wc.getStringProperty(IPeer.ATTR_NAME))) {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // To update the peer attributes, the peer needs to be recreated
+ IPeer oldPeer = node.getPeer();
+ // Create a write able copy of the peer attributes
+ Map<String, String> attributes = new HashMap<String, String>(oldPeer.getAttributes());
+ // Update the (managed) attributes from the working copy
+ attributes.put(IPeer.ATTR_NAME, wc.getStringProperty(IPeer.ATTR_NAME));
+ // Update the persistence storage URI (if set)
+ if (attributes.containsKey(IPersistableNodeProperties.PROPERTY_URI)) {
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService != null) {
+ URI uri = null;
+ try {
+ uri = persistenceService.getURI(attributes);
+ } catch (IOException e) { /* ignored on purpose */ }
+ if (uri != null) attributes.put(IPersistableNodeProperties.PROPERTY_URI, uri.toString());
+ else attributes.remove(IPersistableNodeProperties.PROPERTY_URI);
+ }
}
+ // Create the new peer
+ IPeer newPeer = oldPeer instanceof PeerRedirector ? new PeerRedirector(((PeerRedirector)oldPeer).getParent(), attributes) : new TransientPeer(attributes);
+ // Update the peer node instance (silently)
+ boolean changed = node.setChangeEventsEnabled(false);
+ node.setProperty(IPeerModelProperties.PROP_INSTANCE, newPeer);
+ if (changed) node.setChangeEventsEnabled(true);
}
- // Create the new peer
- IPeer newPeer = oldPeer instanceof PeerRedirector ? new PeerRedirector(((PeerRedirector)oldPeer).getParent(), attributes) : new TransientPeer(attributes);
- // Update the peer node instance (silently)
- boolean changed = node.setChangeEventsEnabled(false);
- node.setProperty(IPeerModelProperties.PROP_INSTANCE, newPeer);
- if (changed) node.setChangeEventsEnabled(true);
- }
- });
+ });
+ }
}
/* (non-Javadoc)
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
index d8bcfc9b1..3f41d28e3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.core.runtime.Assert;
@@ -44,9 +45,10 @@ import org.eclipse.tcf.te.tcf.ui.editor.controls.TransportSectionTypePanelContro
import org.eclipse.tcf.te.tcf.ui.nls.Messages;
import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.tcf.te.ui.views.editor.AbstractEditorPage;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
@@ -57,7 +59,7 @@ import org.eclipse.ui.forms.widgets.Section;
public class TransportSection extends AbstractSection {
// The section sub controls
private TransportSectionTypeControl transportTypeControl = null;
- private TransportSectionTypePanelControl transportTypePanelControl = null;
+ /* default */ TransportSectionTypePanelControl transportTypePanelControl = null;
// Reference to the original data object
/* default */ IPeerModel od;
@@ -194,11 +196,24 @@ public class TransportSection extends AbstractSection {
Protocol.invokeAndWait(new Runnable() {
@Override
public void run() {
- Map<String, String> properties = node.getPeer().getAttributes();
- for (String key : properties.keySet()) {
- wc.setProperty(key, properties.get(key));
- odc.setProperty(key, properties.get(key));
+ // The section is handling the transport name and the
+ // transport type specific properties. Ignore other properties.
+ odc.setProperty(IPeer.ATTR_TRANSPORT_NAME, node.getPeer().getTransportName());
+ if (transportTypePanelControl != null) {
+ IPropertiesContainer src = new PropertiesContainer();
+ Map<String, String> properties = node.getPeer().getAttributes();
+ for (String key : properties.keySet()) {
+ src.setProperty(key, properties.get(key));
+ }
+
+ for (String id : transportTypePanelControl.getConfigurationPanelIds()) {
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(id);
+ if (panel instanceof IDataExchangeNode3) ((IDataExchangeNode3)panel).copyData(src, odc);
+ }
}
+
+ // Initially, the working copy is a duplicate of the original data copy
+ wc.setProperties(odc.getProperties());
}
});
@@ -212,7 +227,7 @@ public class TransportSection extends AbstractSection {
if (transportTypePanelControl != null) {
transportTypePanelControl.showConfigurationPanel(transportType);
IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(transportType);
- if (panel instanceof ISharedDataWizardPage) ((ISharedDataWizardPage)panel).setupData(wc);
+ if (panel instanceof IDataExchangeNode) ((IDataExchangeNode)panel).setupData(wc);
}
}
}
@@ -233,23 +248,40 @@ public class TransportSection extends AbstractSection {
// If no data is available, we are done
if (node == null) return;
- // Extract the transport type and transport attributes into the working copy
+ // The list of removed attributes
+ final List<String> removed = new ArrayList<String>();
+ // Get the current key set from the working copy
+ Set<String> currentKeySet = wc.getProperties().keySet();
+
+ // Get the current transport type from the working copy
+ String oldTransportType = wc.getStringProperty(IPeer.ATTR_TRANSPORT_NAME);
+ if (oldTransportType != null) {
+ // Get the current transport type configuration panel
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(oldTransportType);
+ // And clean out the current transport type specific attributes from the working copy
+ if (panel instanceof IDataExchangeNode3) ((IDataExchangeNode3)panel).removeData(wc);
+ }
- // Set the transport type
+ // Get the new transport type from the widget
String transportType = transportTypeControl.getSelectedTransportType();
+ // And write the new transport to the working copy
wc.setProperty(IPeer.ATTR_TRANSPORT_NAME, transportType);
-
- // Get the transport type configuration panel
+ // Get the new transport type configuration panel
IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(transportType);
- // Clean the old attributes from the working copy
- if (panel instanceof ISharedDataWizardPage) ((ISharedDataWizardPage)panel).removeData(wc);
- // Extract the new attributes into the working copy
- if (panel instanceof ISharedDataWizardPage) ((ISharedDataWizardPage)panel).extractData(wc);
+ // And extract the new attributes into the working copy
+ if (panel instanceof IDataExchangeNode) ((IDataExchangeNode)panel).extractData(wc);
// If the data has not changed compared to the original data copy,
// we are done here and return immediately
if (odc.equals(wc)) return;
+ // Get the new key set from the working copy
+ Set<String> newKeySet = wc.getProperties().keySet();
+ // Everything from the old key set not found in the new key set is a removed attribute
+ for (String key : currentKeySet) {
+ if (!newKeySet.contains(key)) removed.add(key);
+ }
+
// Copy the working copy data back to the original properties container
Protocol.invokeAndWait(new Runnable() {
@Override
@@ -258,11 +290,6 @@ public class TransportSection extends AbstractSection {
IPeer oldPeer = node.getPeer();
// Create a write able copy of the peer attributes
Map<String, String> attributes = new HashMap<String, String>(oldPeer.getAttributes());
- // Determine the removed attributes
- List<String> removed = new ArrayList<String>();
- for (String key : attributes.keySet()) {
- if (wc.getProperty(key) == null) removed.add(key);
- }
// Clean out the removed attributes
for (String key : removed) attributes.remove(key);
// Update with the current configured attributes
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java
index 28b6d1414..edc9c03f4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java
@@ -23,8 +23,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
import org.eclipse.tcf.te.ui.terminals.panels.AbstractConfigurationPanel;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.ssh.SshConnector;
import org.eclipse.tm.internal.terminal.ssh.SshSettings;
@@ -34,7 +34,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
* SSH wizard configuration panel implementation.
*/
@SuppressWarnings("restriction")
-public class SshWizardConfigurationPanel extends AbstractConfigurationPanel implements ISharedDataWizardPage {
+public class SshWizardConfigurationPanel extends AbstractConfigurationPanel implements IDataExchangeNode {
private SshSettings sshSettings;
private ISettingsPage sshSettingsPage;
@@ -77,7 +77,7 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -93,7 +93,7 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
@@ -113,20 +113,6 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- public void initializeData(IPropertiesContainer data) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- public void removeData(IPropertiesContainer data) {
- }
-
- /* (non-Javadoc)
* @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java
index 69efa90f6..858e522a4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java
@@ -19,8 +19,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
import org.eclipse.tcf.te.ui.terminals.panels.AbstractConfigurationPanel;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.telnet.NetworkPortMap;
import org.eclipse.tm.internal.terminal.telnet.TelnetConnector;
@@ -31,7 +31,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
* telnet wizard configuration panel implementation.
*/
@SuppressWarnings("restriction")
-public class TelnetWizardConfigurationPanel extends AbstractConfigurationPanel implements ISharedDataWizardPage {
+public class TelnetWizardConfigurationPanel extends AbstractConfigurationPanel implements IDataExchangeNode {
private TelnetSettings telnetSettings;
private ISettingsPage telnetSettingsPage;
@@ -75,14 +75,14 @@ public class TelnetWizardConfigurationPanel extends AbstractConfigurationPanel i
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
@@ -99,20 +99,6 @@ public class TelnetWizardConfigurationPanel extends AbstractConfigurationPanel i
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- public void initializeData(IPropertiesContainer data) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- public void removeData(IPropertiesContainer data) {
- }
-
- /* (non-Javadoc)
* @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
index c524314c4..01ae870f0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
@@ -45,9 +45,9 @@ import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
import org.eclipse.tcf.te.ui.controls.BaseWizardConfigurationPanelControl;
import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
import org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -313,8 +313,8 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
data.setProperty("selection", selection); //$NON-NLS-1$
// Store the delegate specific settings
- if (panel instanceof ISharedDataWizardPage) {
- ((ISharedDataWizardPage)panel).extractData(data);
+ if (panel instanceof IDataExchangeNode) {
+ ((IDataExchangeNode)panel).extractData(data);
}
super.okPressed();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF
index ac8f6ff8d..0fba53546 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF
@@ -25,6 +25,7 @@ Export-Package: org.eclipse.tcf.te.ui,
org.eclipse.tcf.te.ui.dialogs,
org.eclipse.tcf.te.ui.events,
org.eclipse.tcf.te.ui.interfaces,
+ org.eclipse.tcf.te.ui.interfaces.data,
org.eclipse.tcf.te.ui.internal.executors;x-internal:=true,
org.eclipse.tcf.te.ui.nls,
org.eclipse.tcf.te.ui.preferences,
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java
new file mode 100644
index 000000000..c02fdb58b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.tcf.te.ui.interfaces.data;
+
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Public interface for wizard or dialog pages, panel, controls or other UI elements
+ * exchanging data via a shared data object.
+ */
+public interface IDataExchangeNode {
+
+ /**
+ * Initialize the widgets based of the data from the given properties container.
+ * <p>
+ * This method may called multiple times during the lifetime of the node and the given
+ * properties container might be even <code>null</code>.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void setupData(IPropertiesContainer data);
+
+ /**
+ * Extract the data from the widgets and write it back to the given properties container.
+ * <p>
+ * This method may called multiple times during the lifetime of the node and the given
+ * properties container might be even <code>null</code>.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void extractData(IPropertiesContainer data);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java
new file mode 100644
index 000000000..74b59ec5a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.tcf.te.ui.interfaces.data;
+
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Public interface for wizard or dialog pages, panel, controls or other UI elements
+ * exchanging data via a shared data object.
+ */
+public interface IDataExchangeNode2 extends IDataExchangeNode {
+
+ /**
+ * Initialize the given properties container with default values for the data this node is
+ * managing.
+ * <p>
+ * This method is called once for each handler. The widgets are typically not yet created as
+ * this method can be called before the node is set visible.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void initializeData(IPropertiesContainer data);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java
new file mode 100644
index 000000000..ab776e023
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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.tcf.te.ui.interfaces.data;
+
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Public interface for wizard or dialog pages, panel, controls or other UI elements
+ * exchanging data via a shared data object.
+ */
+public interface IDataExchangeNode3 extends IDataExchangeNode2 {
+
+ /**
+ * Remove the data the node is managing from the given properties container.
+ * <p>
+ * This method may called multiple times during the lifetime of the node and the given
+ * properties container might be even <code>null</code>.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void removeData(IPropertiesContainer data);
+
+ /**
+ * Copy the data the node is managing from the given source properties container
+ * to the given destination properties container.
+ *
+ * @param src The source properties container. Must not be <code>null</code>.
+ * @param dst The destination properties. Must not be <code>null/code>.
+ */
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/ISharedDataWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/ISharedDataWizardPage.java
deleted file mode 100644
index 03951fc58..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/ISharedDataWizardPage.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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.tcf.te.ui.wizards.interfaces;
-
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * Public interface for wizard or dialog pages or wizard page
- * widgets sharing a common data object.
- */
-public interface ISharedDataWizardPage {
-
- /**
- * Initialize the page widgets based of the data from the given properties container.
- * <p>
- * This method may called multiple times during the lifetime of the page and
- * the given properties container might be even <code>null</code>.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void setupData(IPropertiesContainer data);
-
- /**
- * Extract the data from the page widgets and write it back to the given
- * properties container.
- * <p>
- * This method may called multiple times during the lifetime of the page and
- * the given properties container might be even <code>null</code>.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void extractData(IPropertiesContainer data);
-
- /**
- * Initialize the given properties container with default values for the data
- * this page is managing.
- * <p>
- * This method is called once for each wizard page and is typically called from a
- * new target wizard. The page widgets are typically not yet created as this method
- * can be called before the page is set visible.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void initializeData(IPropertiesContainer data);
-
- /**
- * Remove the data of the page widgets from the given properties
- * container.
- * <p>
- * This method may called multiple times during the lifetime of the page and the
- * given properties container might be even <code>null</code>.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void removeData(IPropertiesContainer data);
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java
index e9969ab76..b1e4cd87e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java
@@ -10,13 +10,13 @@
package org.eclipse.tcf.te.ui.wizards.pages;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
/**
* An abstract shared data wizard page implementation.
*/
-public abstract class AbstractSharedDataWizardPage extends AbstractValidatingWizardPage implements ISharedDataWizardPage {
+public abstract class AbstractSharedDataWizardPage extends AbstractValidatingWizardPage implements IDataExchangeNode3 {
/**
* Constructor.
@@ -39,30 +39,37 @@ public abstract class AbstractSharedDataWizardPage extends AbstractValidatingWiz
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ }
}

Back to the top