Author: dgeraskov
Date: 2010-04-20 09:39:34 -0400 (Tue, 20 Apr 2010)
New Revision: 21551
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6141
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-04-16
22:21:00 UTC (rev 21550)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-04-20
13:39:34 UTC (rev 21551)
@@ -49,6 +49,7 @@
import org.hibernate.console.ImageConstants;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.console.actions.AddConfigurationAction;
import org.hibernate.eclipse.console.utils.EclipseImages;
import org.hibernate.tool.hbm2x.HibernateConfigurationExporter;
@@ -142,14 +143,17 @@
HibernateConsolePlugin.getDefault().showError(getShell(),
HibernateConsoleMessages.NewConfigurationWizard_error, realException);
return false;
}
-
- if (connectionInfoPage.isCreateConsoleConfigurationEnabled()) {
- try {
+
+ try {
+ if (connectionInfoPage.isCreateConsoleConfigurationEnabled()) {
confPage.performFinish();
- } catch (CoreException ce) {
- HibernateConsolePlugin.getDefault().showError(getShell(),
HibernateConsoleMessages.AddConfigurationAction_problem_add_console_config, ce);
- }
- }
+ } else {
+ AddConfigurationAction.deleteTemporaryLaunchConfigurations();
+ }
+ } catch (CoreException ce) {
+ HibernateConsolePlugin.getDefault().showError(getShell(),
HibernateConsoleMessages.AddConfigurationAction_problem_add_console_config, ce);
+ }
+
return true;
}