Author: dgeraskov
Date: 2008-08-25 08:41:26 -0400 (Mon, 25 Aug 2008)
New Revision: 9881
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2683
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-25
12:14:59 UTC (rev 9880)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-25
12:41:26 UTC (rev 9881)
@@ -697,9 +697,17 @@
updateStatus(HibernateConsoleMessages.ConsoleConfigurationWizardPage_name_must_specified);
return;
} else {
- if(oldConfiguaration==null &&
KnownConfigurations.getInstance().find(getConfigurationName() )!=null) {
- updateStatus(HibernateConsoleMessages.ConsoleConfigurationWizardPage_config_name_already_exist);
- return;
+ if(oldConfiguaration==null){
+ ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+ try {
+ if (lm.isExistingLaunchConfigurationName(getConfigurationName())){
+
+ updateStatus(HibernateConsoleMessages.ConsoleConfigurationWizardPage_config_name_already_exist);
+ return;
+ }
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(e.getMessage(), e);
+ }
}
}