Author: dgeraskov
Date: 2008-07-02 08:04:44 -0400 (Wed, 02 Jul 2008)
New Revision: 9044
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2435
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2008-07-02
12:04:15 UTC (rev 9043)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2008-07-02
12:04:44 UTC (rev 9044)
@@ -140,15 +140,18 @@
}
+ /**
+ * @param root
+ * @param forUpdate - shows whether physical removal necessary
+ */
public void configurationRemoved(ConsoleConfiguration root, boolean forUpdate) {
- try {
- removeConfiguration(root.getName());
- } catch (CoreException e) {
- if(!forUpdate) {
+ if(!forUpdate) {
+ try {
+ removeConfiguration(root.getName());
+ } catch (CoreException e) {
logErrorMessage(HibernateConsoleMessages.HibernateConsolePlugin_could_not_delete_launch_config_for
+ root.getName(), e);
}
}
-
}
public void configurationAdded(ConsoleConfiguration root) {
@@ -176,7 +179,8 @@
public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
ConsoleConfiguration cfg = KnownConfigurations.getInstance().find(
configuration.getName() );
if(cfg!=null) {
- KnownConfigurations.getInstance().removeConfiguration( cfg, false );
+ // file system removal have been made already.
+ KnownConfigurations.getInstance().removeConfiguration( cfg, true );
}
}
@@ -258,7 +262,11 @@
}
}
-
+ /**
+ * Remove configuration from the file system.
+ * @param name
+ * @throws CoreException
+ */
private void removeConfiguration(String name) throws CoreException {
ILaunchConfiguration findLaunchConfig = findLaunchConfig(name);
if (findLaunchConfig != null) {