You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2006/09/11 16:07:54 UTC

svn commit: r442225 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/ org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/editors/ org.apache.geronimo.st.v11.core/src/org/...

Author: sppatel
Date: Mon Sep 11 07:07:53 2006
New Revision: 442225

URL: http://svn.apache.org/viewvc?view=rev&rev=442225
Log:
GERONIMODEVTOOLS-103 form editors for non-web dp don't load

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoV1Utils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/editors/GeronimoFormContentLoader.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoV11Utils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoV1Utils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoV1Utils.java?view=diff&rev=442225&r1=442224&r2=442225
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoV1Utils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoV1Utils.java Mon Sep 11 07:07:53 2006
@@ -27,6 +27,7 @@
 import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
 import org.apache.geronimo.xml.ns.j2ee.web.util.WebResourceFactoryImpl;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
@@ -37,6 +38,22 @@
 import org.openejb.xml.ns.openejb.jar.util.JarResourceFactoryImpl;
 
 public class GeronimoV1Utils extends GeronimoUtils {
+	
+	public static EObject getDeploymentPlan(IFile file) {
+		if (!file.exists())
+			return null;
+
+		if (file.getName().equals(GeronimoUtils.APP_PLAN_NAME))
+			return getApplicationDeploymentPlan(file);
+		else if (file.getName().equals(GeronimoUtils.OPENEJB_PLAN_NAME))
+			return getOpenEjbDeploymentPlan(file);
+		else if (file.getName().equals(GeronimoUtils.WEB_PLAN_NAME))
+			return getWebDeploymentPlan(file);
+		else if (file.getName().equals(GeronimoUtils.CONNECTOR_PLAN_NAME))
+			return getConnectorDeploymentPlan(file);
+
+		return null;
+	}
 
 	public static String getConfigId(IModule module) {
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/editors/GeronimoFormContentLoader.java?view=diff&rev=442225&r1=442224&r2=442225
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/editors/GeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/editors/GeronimoFormContentLoader.java Mon Sep 11 07:07:53 2006
@@ -91,7 +91,7 @@
 	 * @see org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader#loadDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
 	public EObject loadDeploymentPlan(IFile file) {
-		return GeronimoV1Utils.getWebDeploymentPlan(file);
+		return GeronimoV1Utils.getDeploymentPlan(file);
 	}
 
 	protected FormPage getWebNamingPage(FormEditor editor) {

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoV11Utils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoV11Utils.java?view=diff&rev=442225&r1=442224&r2=442225
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoV11Utils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoV11Utils.java Mon Sep 11 07:07:53 2006
@@ -30,6 +30,7 @@
 import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
 import org.apache.geronimo.xml.ns.j2ee.web.util.WebResourceFactoryImpl;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
@@ -40,6 +41,22 @@
 import org.openejb.xml.ns.openejb.jar.util.JarResourceFactoryImpl;
 
 public class GeronimoV11Utils extends GeronimoUtils {
+	
+	public static EObject getDeploymentPlan(IFile file) {
+		if (!file.exists())
+			return null;
+
+		if (file.getName().equals(GeronimoUtils.APP_PLAN_NAME))
+			return getApplicationDeploymentPlan(file);
+		else if (file.getName().equals(GeronimoUtils.OPENEJB_PLAN_NAME))
+			return getOpenEjbDeploymentPlan(file);
+		else if (file.getName().equals(GeronimoUtils.WEB_PLAN_NAME))
+			return getWebDeploymentPlan(file);
+		else if (file.getName().equals(GeronimoUtils.CONNECTOR_PLAN_NAME))
+			return getConnectorDeploymentPlan(file);
+
+		return null;
+	}
 
 	public static String getConfigId(IModule module) {
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java?view=diff&rev=442225&r1=442224&r2=442225
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java Mon Sep 11 07:07:53 2006
@@ -92,7 +92,7 @@
 	 * @see org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader#loadDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
 	public EObject loadDeploymentPlan(IFile file) {
-		return GeronimoV11Utils.getWebDeploymentPlan(file);
+		return GeronimoV11Utils.getDeploymentPlan(file);
 	}
 
 	protected FormPage getWebNamingPage(FormEditor editor) {