geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shiv...@apache.org
Subject svn commit: r677890 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/META-INF/ org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core...
Date Fri, 18 Jul 2008 12:51:41 GMT
Author: shivahr
Date: Fri Jul 18 05:51:41 2008
New Revision: 677890

URL: http://svn.apache.org/viewvc?rev=677890&view=rev
Log:
GERONIMODEVTOOLS-441 Retrieving Metadata complete Deployment Descriptor for Web Projects.
Thanks to Sainath for the patch.

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF?rev=677890&r1=677889&r2=677890&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
Fri Jul 18 05:51:41 2008
@@ -24,7 +24,9 @@
  org.eclipse.wst.web,
  org.eclipse.jem.util,
  org.apache.geronimo.runtime.common,
- org.apache.geronimo.jee.v21.jaxbmodel
+ org.apache.geronimo.jee.v21.jaxbmodel,
+ org.eclipse.jst.j2ee.core,
+ org.eclipse.emf.ecore
 Eclipse-LazyStart: true
 Export-Package: org,
  org.apache,
@@ -32,6 +34,7 @@
  org.apache.geronimo.st,
  org.apache.geronimo.st.core,
  org.apache.geronimo.st.core.commands,
+ org.apache.geronimo.st.core.descriptor,
  org.apache.geronimo.st.core.internal,
  org.apache.geronimo.st.core.jaxb,
  org.apache.geronimo.st.core.operations

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java?rev=677890&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java
Fri Jul 18 05:51:41 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.core;
+
+import org.apache.geronimo.st.core.descriptor.AbstractDeploymentDescriptor;
+import org.apache.geronimo.st.core.descriptor.WebJ2EEDeploymentDescriptor;
+import org.apache.geronimo.st.core.descriptor.WebJavaEEDeploymentDescriptor;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.jst.j2ee.model.ModelProviderManager;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DeploymentDescriptorUtils {
+    static final long serialVersionUID = 1L;
+
+    public static AbstractDeploymentDescriptor getDeploymentDescriptor(IProject project)
{
+        IModelProvider mp = ModelProviderManager.getModelProvider(project);
+        Object obj = mp.getModelObject();
+        if (obj instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
+            return (new WebJ2EEDeploymentDescriptor((org.eclipse.jst.j2ee.webapplication.WebApp)
obj));
+        }
+        if (obj instanceof org.eclipse.jst.javaee.web.WebApp) {
+            return (new WebJavaEEDeploymentDescriptor((org.eclipse.jst.javaee.web.WebApp)
obj));
+        }
+        return null;
+    }
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/DeploymentDescriptorUtils.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java?rev=677890&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java
Fri Jul 18 05:51:41 2008
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.core.descriptor;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class AbstractDeploymentDescriptor {
+
+    Object obj;
+
+    public AbstractDeploymentDescriptor(Object obj) {
+        this.obj = obj;
+    }
+
+    protected List<String> getDeploymentDescriptorInfo(Map<String, String> input)
{
+        ArrayList<String> result = new ArrayList<String>();
+        List info = null;
+        try {
+            Class clazz = null, infoClazz = null;
+            Method infoGetter = null, nameGetter = null;
+            clazz = Class.forName(input.get("class"));
+            infoGetter = clazz.getMethod(input.get("infoGetter"), null);
+            info = (List) infoGetter.invoke(obj, null);
+            infoClazz = Class.forName(input.get("implClass"));
+            nameGetter = infoClazz.getMethod(input.get("nameGetter"), null);
+            for (int i = 0; i < info.size(); i++) {
+                result.add((String) nameGetter.invoke(info.get(i), null));
+            }
+        } catch (IllegalArgumentException e) {
+            e.printStackTrace();
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+        } catch (SecurityException e) {
+            e.printStackTrace();
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/AbstractDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java?rev=677890&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java
Fri Jul 18 05:51:41 2008
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.core.descriptor;
+
+import java.util.List;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WebDeploymentDescriptor {
+
+    public List<String> getEjbRefs();
+
+    public List<String> getEjbLocalRefs();
+
+    public List<String> getSecurityRoles();
+
+    public List<String> getResourceRefs();
+
+    public List<String> getResourceEnvRefs();
+
+    public List<String> getMessageDestinations();
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java?rev=677890&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java
Fri Jul 18 05:51:41 2008
@@ -0,0 +1,64 @@
+package org.apache.geronimo.st.core.descriptor;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.jst.j2ee.webapplication.WebApp;
+
+public class WebJ2EEDeploymentDescriptor extends AbstractDeploymentDescriptor implements
+        WebDeploymentDescriptor {
+
+    HashMap<String, String> requiredInfo;
+
+    public WebJ2EEDeploymentDescriptor(WebApp webApp) {
+        super(webApp);
+        requiredInfo = new HashMap<String, String>();
+        requiredInfo.put("class", "org.eclipse.jst.j2ee.webapplication.WebApp");
+        requiredInfo.put("nameGetter", "getName");
+    }
+
+    public List<String> getEjbLocalRefs() {
+        requiredInfo.put("infoGetter", "getEjbLocalRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.j2ee.common.internal.impl.EJBLocalRefImpl");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getEjbRefs() {
+        requiredInfo.put("infoGetter", "getEjbRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.j2ee.common.internal.impl.EjbRefImpl");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getMessageDestinations() {
+        requiredInfo.put("infoGetter", "getMessageDestinations");
+        requiredInfo
+                .put("implClass", "org.eclipse.jst.j2ee.common.internal.impl.MessageDestinationImpl");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getResourceEnvRefs() {
+        requiredInfo.put("infoGetter", "getResourceEnvRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.j2ee.common.internal.impl.ResourceEnvRefImpl");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getResourceRefs() {
+        requiredInfo.put("infoGetter", "getResourceRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.j2ee.common.internal.impl.ResourceRefImpl");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getSecurityRoles() {
+        requiredInfo.put("infoGetter", "getSecurityRoles");
+        requiredInfo.put("implClass", "org.eclipse.jst.j2ee.common.internal.impl.SecurityRoleImpl");
+        requiredInfo.put("nameGetter", "getRoleName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    /*public List<String> getServiceRefs() {
+        requiredInfo.put("infoGetter", "getServiceRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.j2ee.common.internal.impl.EjbRefImpl");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }*/
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJ2EEDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java?rev=677890&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java
Fri Jul 18 05:51:41 2008
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.core.descriptor;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.jst.javaee.web.WebApp;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WebJavaEEDeploymentDescriptor extends AbstractDeploymentDescriptor implements
+        WebDeploymentDescriptor {
+
+    HashMap<String, String> requiredInfo;
+
+    public WebJavaEEDeploymentDescriptor(WebApp webApp) {
+        super(webApp);
+        requiredInfo = new HashMap<String, String>();
+        requiredInfo.put("class", "org.eclipse.jst.javaee.web.WebApp");
+    }
+
+    public List<String> getEjbLocalRefs() {
+        requiredInfo.put("infoGetter", "getEjbLocalRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.javaee.core.internal.impl.EjbLocalRefImpl");
+        requiredInfo.put("nameGetter", "getEjbRefName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getEjbRefs() {
+        requiredInfo.put("infoGetter", "getEjbRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.javaee.core.internal.impl.EjbRefImpl");
+        requiredInfo.put("nameGetter", "getEjbRefName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getMessageDestinations() {
+        requiredInfo.put("infoGetter", "getMessageDestinations");
+        requiredInfo
+                .put("implClass", "org.eclipse.jst.javaee.core.internal.impl.MessageDestinationImpl");
+        requiredInfo.put("nameGetter", "getMessageDestinationName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getResourceEnvRefs() {
+        requiredInfo.put("infoGetter", "getResourceEnvRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.javaee.core.internal.impl.ResourceEnvRefImpl");
+        requiredInfo.put("nameGetter", "getResourceEnvRefName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getResourceRefs() {
+        requiredInfo.put("infoGetter", "getResourceRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.javaee.core.internal.impl.ResourceRefImpl");
+        requiredInfo.put("nameGetter", "getResRefName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    public List<String> getSecurityRoles() {
+        requiredInfo.put("infoGetter", "getSecurityRoles");
+        requiredInfo.put("implClass", "org.eclipse.jst.javaee.core.internal.impl.SecurityRoleImpl");
+        requiredInfo.put("nameGetter", "getRoleName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }
+
+    /*public List<String> getServiceRefs() {
+        requiredInfo.put("infoGetter", "getServiceRefs");
+        requiredInfo.put("implClass", "org.eclipse.jst.javaee.core.internal.impl.ServiceRefImpl");
+        requiredInfo.put("nameGetter", "getServiceRefName");
+        return getDeploymentDescriptorInfo(requiredInfo);
+    }*/
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/descriptor/WebJavaEEDeploymentDescriptor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java?rev=677890&r1=677889&r2=677890&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java
Fri Jul 18 05:51:41 2008
@@ -18,9 +18,14 @@
 
 import javax.xml.bind.JAXBElement;
 
+import org.apache.geronimo.st.core.DeploymentDescriptorUtils;
+import org.apache.geronimo.st.core.descriptor.AbstractDeploymentDescriptor;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
 import org.eclipse.ui.forms.editor.FormPage;
@@ -35,6 +40,8 @@
 public abstract class AbstractGeronimoFormPage extends FormPage {
 
 	JAXBElement deploymentPlan;
+	
+	AbstractDeploymentDescriptor deploymentDescriptor;
 
 	protected FormToolkit toolkit;
 
@@ -64,6 +71,8 @@
 	 */
 	protected void createFormContent(IManagedForm managedForm) {
 		deploymentPlan = ((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan();
+		deploymentDescriptor = (AbstractDeploymentDescriptor) DeploymentDescriptorUtils
+				.getDeploymentDescriptor(getProject());
 		body = managedForm.getForm().getBody();
 		toolkit = managedForm.getToolkit();
 		ScrolledForm form = managedForm.getForm();
@@ -95,6 +104,18 @@
 		return deploymentPlan;
 	}
 
+	protected IProject getProject() {
+		IEditorInput editorInput = getEditorInput();
+		if (editorInput instanceof IFileEditorInput) {
+			return ((IFileEditorInput) editorInput).getFile().getProject();
+		}
+		return null;
+	}
+
+	public AbstractDeploymentDescriptor getDeploymentDescriptor() {
+		return deploymentDescriptor;
+	}
+
 	public String getFormTitle() {
 		return getTitle();
 	}



Mime
View raw message