Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-11-24 08:20:13 +0000
committerTobias Schwarz2014-11-24 08:20:13 +0000
commit2ff1adbb7e1ca0479bcdafe645f887cd7e232f12 (patch)
tree018452604ffe7f28d0de2bb752eb9d4574b91393
parenta8a4a0390422950bdaa6ec94508c4c034657c5d8 (diff)
downloadorg.eclipse.tcf-2ff1adbb7e1ca0479bcdafe645f887cd7e232f12.tar.gz
org.eclipse.tcf-2ff1adbb7e1ca0479bcdafe645f887cd7e232f12.tar.xz
org.eclipse.tcf-2ff1adbb7e1ca0479bcdafe645f887cd7e232f12.zip
SM: fix new connection wizard overwrites existing connection
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewWizard.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewWizard.java
index 34bc127d9..6055397ca 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewWizard.java
@@ -29,6 +29,7 @@ import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNodeProperties;
import org.eclipse.tcf.te.runtime.persistence.interfaces.IURIPersistenceService;
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import org.eclipse.tcf.te.runtime.services.ServiceManager;
@@ -119,7 +120,9 @@ public class NewWizard extends AbstractNewConfigWizard {
public void run() {
for (Entry<String, String> attribute : peer.getAttributes().entrySet()) {
if (sameType || (!finIsPeerNode && isAllowedForeignAttribute(attribute.getKey()))) {
- data.setProperty(attribute.getKey(), attribute.getValue());
+ if (!attribute.getKey().endsWith("transient")) { //$NON-NLS-1$
+ data.setProperty(attribute.getKey(), attribute.getValue());
+ }
}
}
}
@@ -132,6 +135,9 @@ public class NewWizard extends AbstractNewConfigWizard {
data.setProperty(IPeerProperties.PROP_AUTO_CONNECT, autoConnect);
data.setProperty(IPeerProperties.PROP_TYPE, getPeerType());
+ data.setProperty(IPersistableNodeProperties.PROPERTY_URI, null);
+ data.setProperty(IPeer.ATTR_ID, UUID.randomUUID());
+
return data;
}

Back to the top