[jbosstools-commits] JBoss Tools SVN: r9043 - branches/jbosstools-2.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Jul 2 08:04:15 EDT 2008


Author: dgeraskov
Date: 2008-07-02 08:04:15 -0400 (Wed, 02 Jul 2008)
New Revision: 9043

Modified:
   branches/jbosstools-2.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2435

Modified: branches/jbosstools-2.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
===================================================================
--- branches/jbosstools-2.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java	2008-07-02 11:52:25 UTC (rev 9042)
+++ branches/jbosstools-2.1.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java	2008-07-02 12:04:15 UTC (rev 9043)
@@ -139,16 +139,19 @@
 				// TODO Auto-generated method stub
 		
 			}
-		
+
+			/**
+			 * @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) {
-						logErrorMessage("Could not delete launch configuration for: " + root.getName(), e);
+				if(!forUpdate) {
+					try {
+						removeConfiguration(root.getName());
+					} catch (CoreException e) {
+						logErrorMessage("Could not delete launch configuration 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) {




More information about the jbosstools-commits mailing list