geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r321021 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui: editors/ pages/ sections/
Date Fri, 14 Oct 2005 05:48:41 GMT
Author: sppatel
Date: Thu Oct 13 22:48:34 2005
New Revision: 321021

URL: http://svn.apache.org/viewcvs?rev=321021&view=rev
Log:
abstract out namingformpage/section

Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/OpenEjbPlanEditor.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/WebEditor.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/ConnectorPlanEditor.java
Thu Oct 13 22:48:34 2005
@@ -18,7 +18,6 @@
 import org.apache.geronimo.core.internal.GeronimoUtils;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.pages.ConnectorOverviewPage;
-import org.apache.geronimo.ui.pages.NamingFormPage;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.ui.PartInitException;
@@ -32,13 +31,12 @@
     public void doAddPages() throws PartInitException {
         addPage(new ConnectorOverviewPage(this, "connectoroverview",
                 Messages.editorTabGeneral));
-        
-        addPage(new NamingFormPage(this, "namingpage", Messages.editorTabNaming));
-        
         addSourcePage();
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see org.apache.geronimo.ui.editors.AbstractGeronimoDeploymentPlanEditor#loadDeploymentPlan(org.eclipse.core.resources.IFile)
      */
     public EObject loadDeploymentPlan(IFile file) {

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/OpenEjbPlanEditor.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/OpenEjbPlanEditor.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/OpenEjbPlanEditor.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/OpenEjbPlanEditor.java
Thu Oct 13 22:48:34 2005
@@ -18,7 +18,6 @@
 import org.apache.geronimo.core.internal.GeronimoUtils;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.pages.EjbOverviewPage;
-import org.apache.geronimo.ui.pages.NamingFormPage;
 import org.apache.geronimo.ui.pages.SecurityPage;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.emf.ecore.EObject;
@@ -40,7 +39,7 @@
     public void doAddPages() throws PartInitException {
         addPage(new EjbOverviewPage(this, "ejboverview",
                 Messages.editorTabGeneral));        
-        addPage(new NamingFormPage(this, "namingpage", Messages.editorTabNaming));
+        //TODO Add naming page but broken down for each bean type
         addPage(new SecurityPage(this, "securitypage",
                 Messages.editorTabSecurity,  JarPackage.eINSTANCE
                 .getOpenejbJarType_Security()));        
@@ -54,6 +53,6 @@
      */
     public EObject loadDeploymentPlan(IFile file) {
         return GeronimoUtils.getOpenEjbDeploymentPlan(file);
-    }
+    }    
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/WebEditor.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/WebEditor.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/WebEditor.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/WebEditor.java
Thu Oct 13 22:48:34 2005
@@ -20,10 +20,12 @@
 import org.apache.geronimo.ui.pages.NamingFormPage;
 import org.apache.geronimo.ui.pages.SecurityPage;
 import org.apache.geronimo.ui.pages.WebGeneralPage;
+import org.apache.geronimo.xml.ns.web.WebFactory;
 import org.apache.geronimo.xml.ns.web.impl.WebPackageImpl;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormPage;
 
 public class WebEditor extends AbstractGeronimoDeploymentPlanEditor {
 
@@ -35,16 +37,29 @@
     public void doAddPages() throws PartInitException {
         addPage(new WebGeneralPage(this, "generalpage",
                 Messages.editorTabGeneral));
-        addPage(new NamingFormPage(this, "namingpage", Messages.editorTabNaming));
+        addPage(getNamingFormPage());
         addPage(new SecurityPage(this, "securitypage",
-                Messages.editorTabSecurity,  WebPackageImpl.eINSTANCE
-                .getWebAppType_Security()));
-
+                Messages.editorTabSecurity, WebPackageImpl.eINSTANCE
+                        .getWebAppType_Security()));
         addSourcePage();
     }
 
     public EObject loadDeploymentPlan(IFile file) {
         return GeronimoUtils.getWebDeploymentPlan(file);
+    }
+
+    private FormPage getNamingFormPage() {
+        NamingFormPage formPage = new NamingFormPage(this, "namingpage",
+                Messages.editorTabNaming);
+        formPage.ejbLocalRef = WebFactory.eINSTANCE.getWebPackage()
+                .getWebAppType_EjbLocalRef();
+        formPage.ejbRef = WebFactory.eINSTANCE.getWebPackage()
+                .getWebAppType_EjbRef();
+        formPage.resEnvRef = WebFactory.eINSTANCE.getWebPackage()
+                .getWebAppType_ResourceEnvRef();
+        formPage.resRef = WebFactory.eINSTANCE.getWebPackage()
+                .getWebAppType_ResourceRef();
+        return formPage;
     }
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java
Thu Oct 13 22:48:34 2005
@@ -15,12 +15,13 @@
  */
 package org.apache.geronimo.ui.pages;
 
-import org.apache.geronimo.ui.editors.WebEditor;
+import org.apache.geronimo.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.ui.sections.EjbLocalRefSection;
 import org.apache.geronimo.ui.sections.EjbRefSection;
 import org.apache.geronimo.ui.sections.ResourceEnvRefSection;
 import org.apache.geronimo.ui.sections.ResourceRefSection;
-import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.IManagedForm;
@@ -32,6 +33,14 @@
 
 public class NamingFormPage extends FormPage {
 
+    public EReference resRef;
+
+    public EReference resEnvRef;
+
+    public EReference ejbRef;
+
+    public EReference ejbLocalRef;
+
     public NamingFormPage(FormEditor editor, String id, String title) {
         super(editor, id, title);
     }
@@ -63,7 +72,8 @@
 
     private void fillBody(IManagedForm managedForm) {
 
-        WebAppType plan = (WebAppType) ((WebEditor) getEditor()).getDeploymentPlan();
+        EObject plan = ((AbstractGeronimoDeploymentPlanEditor) getEditor())
+                .getDeploymentPlan();
 
         Composite body = managedForm.getForm().getBody();
 
@@ -72,16 +82,16 @@
                 | ExpandableComposite.FOCUS_TITLE;
 
         managedForm.addPart(new ResourceRefSection(plan, body, managedForm
-                .getToolkit(), style));
+                .getToolkit(), style, resRef));
 
         managedForm.addPart(new ResourceEnvRefSection(plan, body, managedForm
-                .getToolkit(), style));
+                .getToolkit(), style, resEnvRef));
 
         managedForm.addPart(new EjbRefSection(plan, body, managedForm
-                .getToolkit(), style));
+                .getToolkit(), style, ejbRef));
 
         managedForm.addPart(new EjbLocalRefSection(plan, body, managedForm
-                .getToolkit(), style));
+                .getToolkit(), style, ejbLocalRef));
     }
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
Thu Oct 13 22:48:34 2005
@@ -20,10 +20,9 @@
 import org.apache.geronimo.ui.wizards.EjbLocalRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.apache.geronimo.xml.ns.web.WebAppType;
-import org.apache.geronimo.xml.ns.web.WebFactory;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
@@ -31,10 +30,13 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class EjbLocalRefSection extends DynamicTableSection {
+    
+    EReference ejbLocalRefERef;
 
-    public EjbLocalRefSection(WebAppType plan, Composite parent,
-            FormToolkit toolkit, int style) {
+    public EjbLocalRefSection(EObject plan, Composite parent,
+            FormToolkit toolkit, int style,  EReference ejbLocalRefERef) {
         super(plan, parent, toolkit, style);
+        this.ejbLocalRefERef = ejbLocalRefERef;
         create();
     }
 
@@ -71,7 +73,7 @@
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
      */
     public EReference getEReference() {
-        return WebFactory.eINSTANCE.getWebPackage().getWebAppType_EjbLocalRef();
+        return ejbLocalRefERef;
     }
 
     /*

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
Thu Oct 13 22:48:34 2005
@@ -20,7 +20,6 @@
 import org.apache.geronimo.ui.wizards.EjbRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.apache.geronimo.xml.ns.web.WebFactory;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
@@ -32,6 +31,8 @@
 import org.eclipse.ui.forms.widgets.Section;
 
 public class EjbRefSection extends DynamicTableSection {
+    
+    EReference ejbRefERef;
 
     /**
      * @param section
@@ -47,8 +48,9 @@
      * @param style
      */
     public EjbRefSection(EObject plan, Composite parent, FormToolkit toolkit,
-            int style) {
+            int style, EReference ejbRefERef) {
         super(plan, parent, toolkit, style);
+        this.ejbRefERef = ejbRefERef;
         create();
     }
 
@@ -85,7 +87,7 @@
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
      */
     public EReference getEReference() {
-        return WebFactory.eINSTANCE.getWebPackage().getWebAppType_EjbRef();
+        return ejbRefERef;
     }
 
     /*

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
Thu Oct 13 22:48:34 2005
@@ -20,10 +20,9 @@
 import org.apache.geronimo.ui.wizards.ResourceEnvRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.apache.geronimo.xml.ns.web.WebAppType;
-import org.apache.geronimo.xml.ns.web.WebFactory;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
@@ -31,10 +30,13 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class ResourceEnvRefSection extends DynamicTableSection {
+    
+    EReference resourceEnvRefERef;
 
-    public ResourceEnvRefSection(WebAppType plan, Composite parent,
-            FormToolkit toolkit, int style) {
+    public ResourceEnvRefSection(EObject plan, Composite parent,
+            FormToolkit toolkit, int style,  EReference resourceEnvRefERef) {
         super(plan, parent, toolkit, style);
+        this.resourceEnvRefERef = resourceEnvRefERef;
         create();
     }
 
@@ -71,8 +73,7 @@
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
      */
     public EReference getEReference() {
-        return WebFactory.eINSTANCE.getWebPackage()
-                .getWebAppType_ResourceEnvRef();
+        return resourceEnvRefERef;
     }
 
     /*

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java?rev=321021&r1=321020&r2=321021&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
Thu Oct 13 22:48:34 2005
@@ -20,10 +20,9 @@
 import org.apache.geronimo.ui.wizards.ResourceRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.apache.geronimo.xml.ns.web.WebAppType;
-import org.apache.geronimo.xml.ns.web.WebFactory;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
@@ -31,10 +30,13 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class ResourceRefSection extends DynamicTableSection {
+    
+    EReference resourceRefERef;
 
-    public ResourceRefSection(WebAppType plan, Composite parent,
-            FormToolkit toolkit, int style) {
+    public ResourceRefSection(EObject plan, Composite parent,
+            FormToolkit toolkit, int style, EReference resourceRefERef) {
         super(plan, parent, toolkit, style);
+        this.resourceRefERef = resourceRefERef;
         create();
     }
 
@@ -71,7 +73,7 @@
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
      */
     public EReference getEReference() {
-        return WebFactory.eINSTANCE.getWebPackage().getWebAppType_ResourceRef();
+        return resourceRefERef;
     }
 
     /*



Mime
View raw message