Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.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/pages/NewTargetWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
index 36d0a16a0..c8887534a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
@@ -369,7 +369,13 @@ public class NewTargetWizardPage extends AbstractValidatingWizardPage implements
public void setupData(IPropertiesContainer data) {
if (data.containsKey(IPeer.ATTR_NAME) && peerNameControl != null) {
- peerNameControl.setEditFieldControlText(data.getStringProperty(IPeer.ATTR_NAME));
+ String name = data.getStringProperty(IPeer.ATTR_NAME);
+ int i = 1;
+ while (usedNames.contains(name.toUpperCase())) {
+ name = data.getStringProperty(IPeer.ATTR_NAME) + " (" + i + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ i++;
+ }
+ peerNameControl.setEditFieldControlText(name);
}
String transportType = data.getStringProperty(IPeer.ATTR_TRANSPORT_NAME);

Back to the top