geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1138277 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core: GeronimoServerBehaviourDelegate.java GeronimoUtils.java
Date Wed, 22 Jun 2011 01:59:19 GMT
Author: gawor
Date: Wed Jun 22 01:59:18 2011
New Revision: 1138277

URL: http://svn.apache.org/viewvc?rev=1138277&view=rev
Log:
GERONIMODEVTOOLS-756: Ensure we call doRemoved() with root module only

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

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.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/GeronimoServerBehaviourDelegate.java?rev=1138277&r1=1138276&r2=1138277&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Wed Jun 22 01:59:18 2011
@@ -300,16 +300,16 @@ abstract public class GeronimoServerBeha
          * we avoid redeploys and it guarantees that publishModule() is called once per
          * deployed application. 
          */
-        Map<IModule, ModuleDeltaList> publishMap = new LinkedHashMap<IModule, ModuleDeltaList>();
+        Map<String, ModuleDeltaList> publishMap = new LinkedHashMap<String, ModuleDeltaList>();
         for (int i = 0; i < modules.size(); i++) {
             IModule[] module = (IModule[]) modules.get(i);
             Integer moduleDeltaKind = (Integer) deltaKind.get(i);
             IModule rootModule = module[0];
             
-            ModuleDeltaList list = publishMap.get(rootModule);
+            ModuleDeltaList list = publishMap.get(rootModule.getId());
             if (list == null) {
                 list = new ModuleDeltaList(rootModule);
-                publishMap.put(rootModule, list);
+                publishMap.put(rootModule.getId(), list);
             }
             
             if (module.length == 1) {

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.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/GeronimoUtils.java?rev=1138277&r1=1138276&r2=1138277&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
Wed Jun 22 01:59:18 2011
@@ -332,38 +332,29 @@ public class GeronimoUtils {
         // use the module ID
         String moduleId = module.getId();
 
-        J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class,
null);
-        if (j2eeModule != null) {
-            // j2eeFlex
-            ArtifactEdit edit = null;
-            try {
-                edit = ArtifactEdit.getArtifactEditForRead(j2eeModule.getProject());
-                //TODO JAXB Refactoring - Can below two lines be removed without harm?
-                //XMIResource res = (XMIResource) edit.getContentModelRoot().eResource();
-                //moduleId = res.getID(edit.getContentModelRoot());
-            } finally {
-                if (edit != null)
-                    edit.dispose();
-            }
-        }
-
-        if (moduleId != null && moduleId.length() > 0)
+        if (moduleId != null && moduleId.length() > 0) {
             return moduleId;
-
+        }
+        
         // ...but if there is no defined module ID, pick the best alternative
 
-        IPath moduleLocation = new Path(j2eeModule.getURI(module));
-        if (moduleLocation != null) {
-            moduleId = moduleLocation.removeFileExtension().lastSegment();
-        }
+        J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class,
null);
+        if (j2eeModule != null) {
 
-        if (j2eeModule instanceof IWebModule) {
-            // A better choice is to use the context root
-            // For wars most appservers use the module name
-            // as the context root
-            String contextRoot = ((IWebModule) j2eeModule).getContextRoot();
-            if (contextRoot.charAt(0) == '/')
-                moduleId = contextRoot.substring(1);
+            IPath moduleLocation = new Path(j2eeModule.getURI(module));
+            if (moduleLocation != null) {
+                moduleId = moduleLocation.removeFileExtension().lastSegment();
+            }
+
+            if (j2eeModule instanceof IWebModule) {
+                // A better choice is to use the context root
+                // For wars most appservers use the module name
+                // as the context root
+                String contextRoot = ((IWebModule) j2eeModule).getContextRoot();
+                if (contextRoot.charAt(0) == '/') {
+                    moduleId = contextRoot.substring(1);
+                }
+            }
         }
 
         return moduleId;



Mime
View raw message