Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2016-05-05 22:57:16 -0400
committerSarika Sinha2016-05-06 08:51:31 -0400
commit59ebb61484af6371b211e05af63fa9eceddbc218 (patch)
tree3ca6d2296e379d1330e1df9b976e29d1f697430c
parent195733aaa797df98ff894f84628865246d799da1 (diff)
downloadeclipse.platform.debug-59ebb61484af6371b211e05af63fa9eceddbc218.tar.gz
eclipse.platform.debug-59ebb61484af6371b211e05af63fa9eceddbc218.tar.xz
eclipse.platform.debug-59ebb61484af6371b211e05af63fa9eceddbc218.zip
LaunchConfigurationTabGroupViewer.verifyName() Change-Id: I9a133e04a3bbc4a225e3bd2a26b86879f625b873
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java8
1 files changed, 5 insertions, 3 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 142ea3a00..f4f60cedd 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation 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
@@ -1310,11 +1310,13 @@ public class LaunchConfigurationTabGroupViewer {
Set<String> reservednames = ((LaunchConfigurationsDialog) getLaunchConfigurationDialog()).getReservedNameSet();
if (mgr.isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) {
ILaunchConfiguration config = ((LaunchManager)mgr).findLaunchConfiguration(currentName);
- //config cannot be null at this location since the manager knows the name conflicts
+ // config can be null if name matches to unsaved
+ // configuration created in Properties dialog
+ String configTypeName = config != null ? config.getType().getName() : fOriginal.getType().getName();
throw new CoreException(new Status(IStatus.ERROR,
DebugUIPlugin.getUniqueIdentifier(),
0,
- NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, config.getType().getName()),
+ NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, configTypeName),
null));
}
}

Back to the top