geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1134033 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java
Date Thu, 09 Jun 2011 18:39:54 GMT
Author: gawor
Date: Thu Jun  9 18:39:54 2011
New Revision: 1134033

URL: http://svn.apache.org/viewvc?rev=1134033&view=rev
Log:
GERONIMODEVTOOLS-707: Module can be in some state between started & stopped so also check
available modules before removing

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java?rev=1134033&r1=1134032&r2=1134033&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java
Thu Jun  9 18:39:54 2011
@@ -79,6 +79,9 @@ public class SynchronizeProjectOnServerT
 
                         TargetModuleID[] nonRunningIds = dm.getNonRunningModules(null, targets);
                         Set<String> nonRunningConfigIds = createSet(nonRunningIds);
+                        
+                        TargetModuleID[] availableIds = dm.getAvailableModules(null, targets);
+                        Set<String> availableConfigIds = createSet(availableIds);
 
                         for (Map.Entry<String, String> entry : projectsOnServer.entrySet())
{
                             String projectName = entry.getKey();
@@ -91,8 +94,8 @@ public class SynchronizeProjectOnServerT
                                 delegate.setModulesState(modules, IServer.STATE_STARTED);
                             } else if (nonRunningConfigIds.contains(configID)) {
                                 delegate.setModulesState(modules, IServer.STATE_STOPPED);
-                            } else {
-                                // assume it's not installed
+                            } else if (!availableConfigIds.contains(configID)) {
+                                // it's not running, stopped or available - so remove it
                                 for (IModule module : modules) {
                                     removedModules.add(module);
                                 }



Mime
View raw message