You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sh...@apache.org on 2008/03/06 05:58:35 UTC

svn commit: r634164 [10/12] - in /geronimo/devtools/eclipse-plugin/trunk: features/org.apache.geronimo.v21.feature/ plugins/ plugins/org.apache.geronimo.deployment.v11.jaxbmodel/ plugins/org.apache.geronimo.deployment.v11.jaxbmodel/META-INF/ plugins/or...

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.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/sections/SecuritySection.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java Wed Mar  5 20:58:28 2008
@@ -16,19 +16,16 @@
  */
 package org.apache.geronimo.st.v11.ui.sections;
 
+import javax.xml.bind.JAXBElement;
+
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.v11.ui.Activator;
 import org.apache.geronimo.st.v11.ui.internal.EMFEditorContext;
 import org.apache.geronimo.st.v11.ui.wizards.SecurityRoleWizard;
-import org.apache.geronimo.xml.ns.security.DescriptionType;
-import org.apache.geronimo.xml.ns.security.RoleType;
-import org.apache.geronimo.xml.ns.security.SecurityPackage;
-import org.apache.geronimo.xml.ns.security.SecurityType;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
+import org.apache.geronimo.xml.ns.security_1.DescriptionType;
+import org.apache.geronimo.xml.ns.security_1.RoleType;
+import org.apache.geronimo.xml.ns.security_1.SecurityType;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.SWT;
@@ -45,7 +42,7 @@
 
 public class SecuritySection extends AbstractTableSection {
 
-	public EReference securityERef;
+	public JAXBElement securityERef;
 
 	Text roleNameText;
 
@@ -59,7 +56,7 @@
 	 * @param toolkit
 	 * @param style
 	 */
-	public SecuritySection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference securityERef) {
+	public SecuritySection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, JAXBElement securityERef) {
 		super(plan, parent, toolkit, style);
 		this.securityERef = securityERef;
 		createClient();
@@ -97,8 +94,8 @@
 	 * 
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
 	 */
-	public EReference getEReference() {
-		return SecurityPackage.eINSTANCE.getRoleMappingsType_Role();
+	public JAXBElement getEReference() {
+		return null;//SecurityPackage.eINSTANCE.getRoleMappingsType_Role();
 	}
 
 	/*
@@ -115,8 +112,8 @@
 	 * 
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
-	public EClass getTableEntryObjectType() {
-		return SecurityPackage.eINSTANCE.getRoleType();
+	public Class getTableEntryObjectType() {
+		return securityERef.getDeclaredType();
 	}
 
 	/*
@@ -183,10 +180,10 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getInput()
 	 */
 	public Object getInput() {
-		SecurityType secType = (SecurityType) getPlan().eGet(securityERef);
-		if (secType != null) {
-			return secType.getRoleMappings();
-		}
+//		SecurityType secType = (SecurityType) getPlan().eGet(securityERef);
+//		if (secType != null) {
+//			return secType.getRoleMappings();
+//		}
 		return super.getInput();
 	}
 
@@ -214,12 +211,12 @@
 
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
-	 */
-	public AdapterFactory getAdapterFactory() {
-		return EMFEditorContext.getFactory();
-	}
+//	/*
+//	 * (non-Javadoc)
+//	 * 
+//	 * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+//	 */
+//	public AdapterFactory getAdapterFactory() {
+//		return EMFEditorContext.getFactory();
+//	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.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/sections/ServiceRefSection.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java Wed Mar  5 20:58:28 2008
@@ -16,26 +16,22 @@
  */
 package org.apache.geronimo.st.v11.ui.sections;
 
+import javax.xml.bind.JAXBElement;
+
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.v11.ui.internal.EMFEditorContext;
 import org.apache.geronimo.st.v11.ui.wizards.ServiceRefWizard;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class ServiceRefSection extends AbstractTableSection {
 
-	EReference serviceRefERef;
+	JAXBElement serviceRefERef;
 
 	private static final String[] COLUMN_NAMES = new String[] { CommonMessages.editorServiceRefName };
 
-	public ServiceRefSection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference serviceRefERef) {
+	public ServiceRefSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, JAXBElement serviceRefERef) {
 		super(plan, parent, toolkit, style);
 		this.serviceRefERef = serviceRefERef;
 		createClient();
@@ -73,7 +69,7 @@
 	 * 
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
 	 */
-	public EReference getEReference() {
+	public JAXBElement getEReference() {
 		return serviceRefERef;
 	}
 
@@ -91,16 +87,16 @@
 	 * 
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
-	public EClass getTableEntryObjectType() {
-		return NamingPackage.eINSTANCE.getServiceRefType();
+	public Class getTableEntryObjectType() {
+		return serviceRefERef.getDeclaredType();
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
-	 */
-	public AdapterFactory getAdapterFactory() {
-		return EMFEditorContext.getFactory();
-	}
+//	/*
+//	 * (non-Javadoc)
+//	 * 
+//	 * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+//	 */
+//	public AdapterFactory getAdapterFactory() {
+//		return EMFEditorContext.getFactory();
+//	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebContainerSection.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/sections/WebContainerSection.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebContainerSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebContainerSection.java Wed Mar  5 20:58:28 2008
@@ -16,15 +16,13 @@
  */
 package org.apache.geronimo.st.v11.ui.sections;
 
+import javax.xml.bind.JAXBElement;
+
 import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
 import org.apache.geronimo.st.v11.ui.internal.Messages;
-import org.apache.geronimo.xml.ns.j2ee.web.WebAppType;
-import org.apache.geronimo.xml.ns.naming.GbeanLocatorType;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.apache.geronimo.xml.ns.naming.PatternType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
+import org.apache.geronimo.xml.ns.deployment_1.PatternType;
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.apache.geronimo.xml.ns.naming_1.GbeanLocatorType;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -66,9 +64,9 @@
 	 * @param style
 	 * @param plan
 	 */
-	public WebContainerSection(Composite parent, FormToolkit toolkit, int style, EObject plan) {
+	public WebContainerSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
 		super(parent, toolkit, style, plan);
-		this.plan = (WebAppType) plan;
+		this.plan = (WebAppType) plan.getValue();
 		createClient();
 	}
 
@@ -118,7 +116,7 @@
 		group.setLayoutData(createTextFieldGridData());
 		group.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
-				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_GroupId(), group.getText());
+//				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_GroupId(), group.getText());
 				markDirty();
 			}
 		});
@@ -130,7 +128,7 @@
 		artifact.setLayoutData(createTextFieldGridData());
 		artifact.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
-				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_ArtifactId(), artifact.getText());
+//				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_ArtifactId(), artifact.getText());
 				markDirty();
 			}
 		});
@@ -142,7 +140,7 @@
 		module.setLayoutData(createTextFieldGridData());
 		module.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
-				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_Module(), module.getText());
+//				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_Module(), module.getText());
 				markDirty();
 			}
 		});
@@ -154,7 +152,7 @@
 		name.setLayoutData(createTextFieldGridData());
 		name.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
-				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_Name(), name.getText());
+//				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_Name(), name.getText());
 				markDirty();
 			}
 		});
@@ -166,7 +164,7 @@
 		version.setLayoutData(createTextFieldGridData());
 		version.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
-				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_Version(), version.getText());
+//				setPatternTypeAttribute(NamingPackage.eINSTANCE.getPatternType_Version(), version.getText());
 				markDirty();
 			}
 		});
@@ -174,11 +172,11 @@
 		specifyAsLink.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				if (specifyAsLink.getSelection()) {
-					if (plan.getWebContainer() != null
-							&& plan.getWebContainer().eIsSet(NamingPackage.eINSTANCE.getGbeanLocatorType_Pattern())) {
-						plan.getWebContainer().eUnset(NamingPackage.eINSTANCE.getGbeanLocatorType_Pattern());
-						markDirty();
-					}
+//					if (plan.getWebContainer() != null
+//							&& plan.getWebContainer().eIsSet(NamingPackage.eINSTANCE.getGbeanLocatorType_Pattern())) {
+//						plan.getWebContainer().eUnset(NamingPackage.eINSTANCE.getGbeanLocatorType_Pattern());
+//						markDirty();
+//					}
 					if (gBeanLink.getText().length() > 0) {
 						plan.getWebContainer().setGbeanLink(gBeanLink.getText());
 						markDirty();
@@ -191,11 +189,11 @@
 		specifyAsPattern.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				if (specifyAsPattern.getSelection()) {
-					if (plan.getWebContainer() != null
-							&& plan.getWebContainer().eIsSet(NamingPackage.eINSTANCE.getGbeanLocatorType_GbeanLink())) {
-						plan.getWebContainer().eUnset(NamingPackage.eINSTANCE.getGbeanLocatorType_GbeanLink());
-						markDirty();
-					}
+//					if (plan.getWebContainer() != null
+//							&& plan.getWebContainer().eIsSet(NamingPackage.eINSTANCE.getGbeanLocatorType_GbeanLink())) {
+//						plan.getWebContainer().eUnset(NamingPackage.eINSTANCE.getGbeanLocatorType_GbeanLink());
+//						markDirty();
+//					}
 					if (group.getText().length() > 0) {
 						getPatternType().setGroupId(group.getText());
 						markDirty();
@@ -209,7 +207,7 @@
 						markDirty();
 					}
 					if (name.getText().length() > 0) {
-						getPatternType().setName(name.getText());
+//						getPatternType().setName(name.getText());
 						markDirty();
 					}
 					if (version.getText().length() > 0) {
@@ -245,7 +243,7 @@
 	private GbeanLocatorType getGBeanLocator() {
 		GbeanLocatorType wc = plan.getWebContainer();
 		if (wc == null) {
-			wc = NamingFactory.eINSTANCE.createGbeanLocatorType();
+//			wc = NamingFactory.eINSTANCE.createGbeanLocatorType();
 			plan.setWebContainer(wc);
 		}
 		return wc;
@@ -256,21 +254,21 @@
 	 */
 	private PatternType getPatternType() {
 		GbeanLocatorType locator = getGBeanLocator();
-		PatternType pattern = locator.getPattern();
-		if (pattern == null) {
-			pattern = NamingFactory.eINSTANCE.createPatternType();
-			locator.setPattern(pattern);
-		}
-		return pattern;
+//		PatternType pattern = locator.getPattern();
+//		if (pattern == null) {
+//			pattern = NamingFactory.eINSTANCE.createPatternType();
+//			locator.setPattern(pattern);
+//		}
+		return null;//pattern;
 	}
 
-	/**
-	 * @param feature
-	 * @param value
-	 */
-	private void setPatternTypeAttribute(EStructuralFeature feature, String value) {
-		getPatternType().eSet(feature, value);
-	}
+//	/**
+//	 * @param feature
+//	 * @param value
+//	 */
+//	private void setPatternTypeAttribute(EStructuralFeature feature, String value) {
+//		getPatternType().eSet(feature, value);
+//	}
 
 	protected Label createLabel(Composite parent, String text) {
 		Label label = toolkit.createLabel(parent, text);

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.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/sections/WebGeneralSection.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java Wed Mar  5 20:58:28 2008
@@ -16,15 +16,10 @@
  */
 package org.apache.geronimo.st.v11.ui.sections;
 
+import javax.xml.bind.JAXBElement;
+
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.xml.ns.j2ee.web.WebAppType;
-import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -35,9 +30,9 @@
 
 	WebAppType plan;
 
-	public WebGeneralSection(Composite parent, FormToolkit toolkit, int style, EObject plan) {
+	public WebGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
 		super(parent, toolkit, style, plan);
-		this.plan = (WebAppType) plan;
+		this.plan = (WebAppType) plan.getValue();
 		createClient();
 	}
 
@@ -47,14 +42,14 @@
 
 		createLabel(composite, CommonMessages.editorContextRoot);
 
-		contextRoot = toolkit.createText(composite, plan.getContextRoot(), SWT.BORDER);
-		contextRoot.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
-		contextRoot.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				plan.setContextRoot(contextRoot.getText());
-				markDirty();
-			}
-		});
+//		contextRoot = toolkit.createText(composite, plan.getContextRoot(), SWT.BORDER);
+//		contextRoot.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+//		contextRoot.addModifyListener(new ModifyListener() {
+//			public void modifyText(ModifyEvent e) {
+//				plan.setContextRoot(contextRoot.getText());
+//				markDirty();
+//			}
+//		});
 	}
 
 	/*
@@ -62,7 +57,7 @@
 	 * 
 	 * @see org.apache.geronimo.st.v11.ui.sections.CommonGeneralSection#getEnvironmentEReference()
 	 */
-	protected EReference getEnvironmentEReference() {
-		return WebPackage.eINSTANCE.getWebAppType_Environment();
+	protected JAXBElement getEnvironmentEReference() {
+		return null;//WebPackage.eINSTANCE.getWebAppType_Environment();
 	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.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/wizards/DependencyWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.java Wed Mar  5 20:58:28 2008
@@ -16,17 +16,14 @@
  */
 package org.apache.geronimo.st.v11.ui.wizards;
 
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.deployment.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment.DependenciesType;
-import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
-import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
-import org.apache.geronimo.xml.ns.deployment.EnvironmentType;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EObject;
+import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.WizardPage;
@@ -70,22 +67,22 @@
 		super(section);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getEFactory()
-	 */
-	public EFactory getEFactory() {
-		return DeploymentFactory.eINSTANCE;
-	}
-
+//	/*
+//	 * (non-Javadoc)
+//	 * 
+//	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getEFactory()
+//	 */
+//	public EFactory getEFactory() {
+//		return DeploymentFactory.eINSTANCE;
+//	}
+//
 	/*
 	 * (non-Javadoc)
 	 * 
 	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getTableColumnEAttributes()
 	 */
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] {};
+	public String[] getTableColumnEAttributes() {
+		return new String[] {};
 	}
 
 	/*
@@ -200,20 +197,20 @@
 			typeText = new Text(composite, SWT.SINGLE | SWT.BORDER);
 			typeText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
-			if (eObject != null) {
-				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_ArtifactId())) {
-					artifactIdText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_ArtifactId()).toString());
-				}
-				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_GroupId())) {
-					groupIdText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_GroupId()).toString());
-				}
-				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_Version())) {
-					versionText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_Version()).toString());
-				}
-				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_Type())) {
-					typeText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_Type()).toString());
-				}
-			}
+//			if (eObject != null) {
+//				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_ArtifactId())) {
+//					artifactIdText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_ArtifactId()).toString());
+//				}
+//				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_GroupId())) {
+//					groupIdText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_GroupId()).toString());
+//				}
+//				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_Version())) {
+//					versionText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_Version()).toString());
+//				}
+//				if (eObject.eIsSet(DeploymentPackage.eINSTANCE.getArtifactType_Type())) {
+//					typeText.setText(eObject.eGet(DeploymentPackage.eINSTANCE.getArtifactType_Type()).toString());
+//				}
+//			}
 
 			setControl(composite);
 
@@ -230,16 +227,16 @@
 	 */
 	public boolean performFinish() {
 
-		if (eObject == null) {
-			eObject = getEFactory().create(section.getTableEntryObjectType());
-			EObject plan = section.getPlan();
-			DependenciesType dependenciesType = ((EnvironmentType) plan.eGet(section.getEReference())).getDependencies();
-			if(dependenciesType == null) {
-				dependenciesType = DeploymentFactory.eINSTANCE.createDependenciesType();
-				((EnvironmentType) plan.eGet(section.getEReference())).setDependencies(dependenciesType);
-			}
-			dependenciesType.getDependency().add(eObject);
-		}
+//		if (eObject == null) {
+//			eObject = getEFactory().create(section.getTableEntryObjectType());
+//			EObject plan = section.getPlan();
+//			DependenciesType dependenciesType = ((EnvironmentType) plan.eGet(section.getEReference())).getDependencies();
+//			if(dependenciesType == null) {
+//				dependenciesType = DeploymentFactory.eINSTANCE.createDependenciesType();
+//				((EnvironmentType) plan.eGet(section.getEReference())).setDependencies(dependenciesType);
+//			}
+//			dependenciesType.getDependency().add(eObject);
+//		}
 
 		processEAttributes(getPages()[0]);
 		

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/EjbLocalRefWizard.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/wizards/EjbLocalRefWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/EjbLocalRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/EjbLocalRefWizard.java Wed Mar  5 20:58:28 2008
@@ -19,10 +19,6 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
 
 public class EjbLocalRefWizard extends AbstractTableWizard {
 
@@ -39,15 +35,15 @@
 		return CommonMessages.wizardNewTitle_EjbLocalRef;
 	}
 
-	public EFactory getEFactory() {
-		return NamingFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] {
-				NamingPackage.eINSTANCE.getEjbLocalRefType_RefName(),
-				NamingPackage.eINSTANCE.getEjbLocalRefType_EjbLink() };
-	}
+//	public EFactory getEFactory() {
+//		return NamingFactory.eINSTANCE;
+//	}
+//
+//	public String[] getTableColumnEAttributes() {
+//		return new EAttribute[] {
+//				NamingPackage.eINSTANCE.getEjbLocalRefType_RefName(),
+//				NamingPackage.eINSTANCE.getEjbLocalRefType_EjbLink() };
+//	}
 
 	/*
 	 * (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/EjbRefWizard.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/wizards/EjbRefWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/EjbRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/EjbRefWizard.java Wed Mar  5 20:58:28 2008
@@ -19,10 +19,6 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
 
 public class EjbRefWizard extends AbstractTableWizard {
 
@@ -30,15 +26,15 @@
 		super(section);
 	}
 
-	public EFactory getEFactory() {
-		return NamingFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] {
-				NamingPackage.eINSTANCE.getEjbRefType_RefName(),
-				NamingPackage.eINSTANCE.getEjbRefType_EjbLink() };
-	}
+//	public EFactory getEFactory() {
+//		return NamingFactory.eINSTANCE;
+//	}
+//
+//	public EAttribute[] getTableColumnEAttributes() {
+//		return new EAttribute[] {
+//				NamingPackage.eINSTANCE.getEjbRefType_RefName(),
+//				NamingPackage.eINSTANCE.getEjbRefType_EjbLink() };
+//	}
 
 	/*
 	 * (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanRefWizard.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/wizards/GBeanRefWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanRefWizard.java Wed Mar  5 20:58:28 2008
@@ -19,10 +19,6 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
 
 public class GBeanRefWizard extends AbstractTableWizard {
 
@@ -30,15 +26,15 @@
 		super(section);
 	}
 
-	public EFactory getEFactory() {
-		return NamingFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] {
-				NamingPackage.eINSTANCE.getGbeanRefType_RefName(),
-				NamingPackage.eINSTANCE.getGbeanRefType_RefType()};
-	}
+//	public EFactory getEFactory() {
+//		return NamingFactory.eINSTANCE;
+//	}
+//
+//	public EAttribute[] getTableColumnEAttributes() {
+//		return new EAttribute[] {
+//				NamingPackage.eINSTANCE.getGbeanRefType_RefName(),
+//				NamingPackage.eINSTANCE.getGbeanRefType_RefType()};
+//	}
 
 	/*
 	 * (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanWizard.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/wizards/GBeanWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanWizard.java Wed Mar  5 20:58:28 2008
@@ -19,10 +19,6 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
-import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
 
 public class GBeanWizard extends AbstractTableWizard {
 
@@ -33,15 +29,15 @@
 		super(section);
 	}
 
-	public EFactory getEFactory() {
-		return DeploymentFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] {
-				DeploymentPackage.eINSTANCE.getGbeanType_Name(),
-				DeploymentPackage.eINSTANCE.getGbeanType_Class() };
-	}
+//	public EFactory getEFactory() {
+//		return DeploymentFactory.eINSTANCE;
+//	}
+//
+//	public EAttribute[] getTableColumnEAttributes() {
+//		return new EAttribute[] {
+//				DeploymentPackage.eINSTANCE.getGbeanType_Name(),
+//				DeploymentPackage.eINSTANCE.getGbeanType_Class() };
+//	}
 
 	/*
 	 * (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceEnvRefWizard.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/wizards/ResourceEnvRefWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceEnvRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceEnvRefWizard.java Wed Mar  5 20:58:28 2008
@@ -19,10 +19,6 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
 
 public class ResourceEnvRefWizard extends AbstractTableWizard {
 
@@ -33,15 +29,15 @@
 		super(section);
 	}
 
-	public EFactory getEFactory() {
-		return NamingFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] {
-				NamingPackage.eINSTANCE.getResourceEnvRefType_RefName(),
-				NamingPackage.eINSTANCE.getResourceEnvRefType_MessageDestinationLink() };
-	}
+//	public EFactory getEFactory() {
+//		return NamingFactory.eINSTANCE;
+//	}
+//
+//	public EAttribute[] getTableColumnEAttributes() {
+//		return new EAttribute[] {
+//				NamingPackage.eINSTANCE.getResourceEnvRefType_RefName(),
+//				NamingPackage.eINSTANCE.getResourceEnvRefType_MessageDestinationLink() };
+//	}
 
 	/*
 	 * (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceRefWizard.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/wizards/ResourceRefWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceRefWizard.java Wed Mar  5 20:58:28 2008
@@ -19,10 +19,6 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
 
 public class ResourceRefWizard extends AbstractTableWizard {
 
@@ -33,15 +29,15 @@
 		super(section);
 	}
 
-	public EFactory getEFactory() {
-		return NamingFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] {
-				NamingPackage.eINSTANCE.getResourceRefType_RefName(),
-				NamingPackage.eINSTANCE.getResourceRefType_ResourceLink() };
-	}
+//	public EFactory getEFactory() {
+//		return NamingFactory.eINSTANCE;
+//	}
+//
+//	public EAttribute[] getTableColumnEAttributes() {
+//		return new EAttribute[] {
+//				NamingPackage.eINSTANCE.getResourceRefType_RefName(),
+//				NamingPackage.eINSTANCE.getResourceRefType_ResourceLink() };
+//	}
 
 	/*
 	 * (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRoleWizard.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/wizards/SecurityRoleWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRoleWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRoleWizard.java Wed Mar  5 20:58:28 2008
@@ -19,16 +19,8 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.st.v11.ui.sections.SecuritySection;
-import org.apache.geronimo.xml.ns.security.DescriptionType;
-import org.apache.geronimo.xml.ns.security.RoleMappingsType;
-import org.apache.geronimo.xml.ns.security.RoleType;
-import org.apache.geronimo.xml.ns.security.SecurityFactory;
-import org.apache.geronimo.xml.ns.security.SecurityPackage;
-import org.apache.geronimo.xml.ns.security.SecurityType;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EObject;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.DescriptionType;
+import org.apache.geronimo.xml.ns.security_1.RoleType;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
@@ -41,13 +33,13 @@
 		super(section);
 	}
 
-	public EFactory getEFactory() {
-		return SecurityFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] { SecurityPackage.eINSTANCE.getRoleType_RoleName() };
-	}
+//	public EFactory getEFactory() {
+//		return SecurityFactory.eINSTANCE;
+//	}
+//
+//	public EAttribute[] getTableColumnEAttributes() {
+//		return new EAttribute[] { SecurityPackage.eINSTANCE.getRoleType_RoleName() };
+//	}
 
 	public String getAddWizardWindowTitle() {
 		return CommonMessages.wizardNewTitle_SecurityRole;
@@ -106,15 +98,15 @@
 			data.widthHint = 100;
 			descriptionText.setLayoutData(data);
 
-			if (eObject != null && eObject instanceof RoleType) {
-				RoleType roleType = (RoleType) eObject;
-				if (!roleType.getDescription().isEmpty()) {
-					DescriptionType desc = (DescriptionType) roleType.getDescription().get(0);
-					if (desc.eIsSet(SecurityPackage.eINSTANCE.getDescriptionType_Value())) {
-						descriptionText.setText(desc.getValue());
-					}
-				}
-			}
+//			if (eObject != null && eObject instanceof RoleType) {
+//				RoleType roleType = (RoleType) eObject;
+//				if (!roleType.getDescription().isEmpty()) {
+//					DescriptionType desc = (DescriptionType) roleType.getDescription().get(0);
+//					if (desc.eIsSet(SecurityPackage.eINSTANCE.getDescriptionType_Value())) {
+//						descriptionText.setText(desc.getValue());
+//					}
+//				}
+//			}
 		}
 	}
 
@@ -122,22 +114,22 @@
 		SecurityRoleWizardPage page = (SecurityRoleWizardPage) getPages()[0];
 
 		if (eObject == null) {
-			eObject = getEFactory().create(getTableColumnEAttributes()[0].getEContainingClass());
-			EObject plan = section.getPlan();
-
-			SecurityType securityType = (SecurityType) plan.eGet(((SecuritySection) section).securityERef);
-			if (securityType == null) {
-				securityType = SecurityFactory.eINSTANCE.createSecurityType();
-				plan.eSet(((SecuritySection) section).securityERef, securityType);
-			}
-
-			RoleMappingsType roleMappingsType = securityType.getRoleMappings();
-			if (roleMappingsType == null) {
-				roleMappingsType = SecurityFactory.eINSTANCE.createRoleMappingsType();
-				securityType.setRoleMappings(roleMappingsType);
-			}
-
-			roleMappingsType.getRole().add(eObject);
+//			eObject = getEFactory().create(getTableColumnEAttributes()[0].getEContainingClass());
+//			EObject plan = section.getPlan();
+//
+//			SecurityType securityType = (SecurityType) plan.eGet(((SecuritySection) section).securityERef);
+//			if (securityType == null) {
+//				securityType = SecurityFactory.eINSTANCE.createSecurityType();
+//				plan.eSet(((SecuritySection) section).securityERef, securityType);
+//			}
+//
+//			RoleMappingsType roleMappingsType = securityType.getRoleMappings();
+//			if (roleMappingsType == null) {
+//				roleMappingsType = SecurityFactory.eINSTANCE.createRoleMappingsType();
+//				securityType.setRoleMappings(roleMappingsType);
+//			}
+//
+//			roleMappingsType.getRole().add(eObject);
 		}
 
 		processEAttributes(page);
@@ -145,10 +137,10 @@
 		DescriptionType type = null;
 		RoleType roleType = ((RoleType) eObject);
 		if (roleType.getDescription().isEmpty()) {
-			type = SecurityFactory.eINSTANCE.createDescriptionType();
-			roleType.getDescription().add(type);
+//			type = SecurityFactory.eINSTANCE.createDescriptionType();
+//			roleType.getDescription().add(type);
 		} else {
-			type = (DescriptionType) roleType.getDescription().get(0);
+//			type = (DescriptionType) roleType.getDescription().get(0);
 		}
 		type.setValue(page.descriptionText.getText());
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServiceRefWizard.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/wizards/ServiceRefWizard.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServiceRefWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServiceRefWizard.java Wed Mar  5 20:58:28 2008
@@ -19,10 +19,6 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
-import org.apache.geronimo.xml.ns.naming.NamingPackage;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EFactory;
 
 public class ServiceRefWizard extends AbstractTableWizard {
 
@@ -33,13 +29,13 @@
 		super(section);
 	}
 
-	public EFactory getEFactory() {
-		return NamingFactory.eINSTANCE;
-	}
-
-	public EAttribute[] getTableColumnEAttributes() {
-		return new EAttribute[] { NamingPackage.eINSTANCE.getServiceRefType_ServiceRefName() };
-	}
+//	public EFactory getEFactory() {
+//		return NamingFactory.eINSTANCE;
+//	}
+//
+//	public EAttribute[] getTableColumnEAttributes() {
+//		return new EAttribute[] { NamingPackage.eINSTANCE.getServiceRefType_ServiceRefName() };
+//	}
 
 	/*
 	 * (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF Wed Mar  5 20:58:28 2008
@@ -14,9 +14,10 @@
  org.apache.geronimo.st.core,
  org.eclipse.jst.common.frameworks,
  org.eclipse.wst.common.modulecore,
- org.apache.geronimo.v11.deployment.model
+ org.apache.geronimo.deployment.v21.jaxbmodel
 Eclipse-LazyStart: true
 Export-Package: 
  org.apache.geronimo.st.v21.core,
  org.apache.geronimo.st.v21.core.internal,
+ org.apache.geronimo.st.v21.core.jaxb,
  org.apache.geronimo.st.v21.core.operations

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml Wed Mar  5 20:58:28 2008
@@ -87,7 +87,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.devtools</groupId>
-            <artifactId>org.apache.geronimo.v11.deployment.model</artifactId>
+            <artifactId>org.apache.geronimo.deployment.v21.jaxbmodel</artifactId>
             <version>${version}</version>
         </dependency>
     </dependencies>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java Wed Mar  5 20:58:28 2008
@@ -18,45 +18,37 @@
 
 import java.io.IOException;
 
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+
 import org.apache.geronimo.deployment.xbeans.EnvironmentDocument;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.st.core.GeronimoUtils;
 import org.apache.geronimo.st.core.internal.Trace;
-import org.apache.geronimo.xml.ns.deployment.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
-import org.apache.geronimo.xml.ns.deployment.EnvironmentType;
-import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
-import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
-import org.apache.geronimo.xml.ns.j2ee.application.util.ApplicationResourceFactoryImpl;
-import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorPackage;
-import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorType;
-import org.apache.geronimo.xml.ns.j2ee.connector.util.ConnectorResourceFactoryImpl;
-import org.apache.geronimo.xml.ns.j2ee.web.DocumentRoot;
-import org.apache.geronimo.xml.ns.j2ee.web.WebAppType;
-import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
-import org.apache.geronimo.xml.ns.j2ee.web.util.WebResourceFactoryImpl;
+import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.j2ee.application_2.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
+import org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.OpenejbJarType;
+import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 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;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.wst.common.componentcore.ComponentCore;
 import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
 import org.eclipse.wst.server.core.IModule;
-import org.openejb.xml.ns.openejb.jar.JarPackage;
-import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
-import org.openejb.xml.ns.openejb.jar.util.JarResourceFactoryImpl;
 
 /**
  * @version $Rev: 533836 $ $Date: 2007-04-30 15:39:14 -0400 (Mon, 30 Apr 2007) $
  */
 public class GeronimoV21Utils extends GeronimoUtils {
 
-    public static EObject getDeploymentPlan(IFile file) {
+    public static JAXBElement getDeploymentPlan(IFile file) {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getDeploymentPlan", file);
 
         if (!file.exists()) {
@@ -133,28 +125,28 @@
 
         EnvironmentType environment = null;
         if (isWebModule(module)) {
-            WebAppType plan = getWebDeploymentPlan(module);
+            WebAppType plan = getWebDeploymentPlan(module).getValue();
             if (plan != null)
                 environment = plan.getEnvironment();
         }
         else if (isEjbJarModule(module)) {
-            OpenejbJarType plan = getOpenEjbDeploymentPlan(module);
-            if (plan != null)
-                environment = plan.getEnvironment();
+            OpenejbJarType plan = getOpenEjbDeploymentPlan(module).getValue();
+//            if (plan != null)
+//                environment = plan.getEnvironment();
         }
         else if (isEarModule(module)) {
-            ApplicationType plan = getApplicationDeploymentPlan(module);
+            ApplicationType plan = getApplicationDeploymentPlan(module).getValue();
             if (plan != null)
                 environment = plan.getEnvironment();
         }
         else if (isRARModule(module)) {
-            ConnectorType plan = getConnectorDeploymentPlan(module);
+            ConnectorType plan = getConnectorDeploymentPlan(module).getValue();
             if (plan != null)
                 environment = plan.getEnvironment();
         }
 
         if (environment != null
-            && environment.eIsSet(DeploymentPackage.eINSTANCE.getEnvironmentType_ModuleId())) {
+            && environment.getModuleId() != null) {
             Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId", getQualifiedConfigID(environment.getModuleId()));
             return getQualifiedConfigID(environment.getModuleId());
         }
@@ -174,7 +166,7 @@
     public static String getContextRoot(IModule module) {
         String contextRoot = null;
 
-        WebAppType deploymentPlan = getWebDeploymentPlan(module);
+        WebAppType deploymentPlan = getWebDeploymentPlan(module).getValue();
         if (deploymentPlan != null)
             contextRoot = deploymentPlan.getContextRoot();
 
@@ -184,99 +176,117 @@
         return contextRoot;
     }
 
-    public static WebAppType getWebDeploymentPlan(IModule module) {
+    public static JAXBElement<WebAppType> getWebDeploymentPlan(IModule module) {
         return getWebDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static ApplicationType getApplicationDeploymentPlan(IModule module) {
+    public static JAXBElement<ApplicationType> getApplicationDeploymentPlan(IModule module) {
         return getApplicationDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static OpenejbJarType getOpenEjbDeploymentPlan(IModule module) {
+    public static JAXBElement<OpenejbJarType> getOpenEjbDeploymentPlan(IModule module) {
         return getOpenEjbDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static ConnectorType getConnectorDeploymentPlan(IModule module) {
+    public static JAXBElement<ConnectorType> getConnectorDeploymentPlan(IModule module) {
         return getConnectorDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static ApplicationType getApplicationDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getApplicationDeploymentPlan(IVirtualComponent comp) {
         return getApplicationDeploymentPlan(getApplicationDeploymentPlanFile(comp));
     }
 
-    public static WebAppType getWebDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getWebDeploymentPlan(IVirtualComponent comp) {
         return getWebDeploymentPlan(getWebDeploymentPlanFile(comp));
     }
 
-    public static OpenejbJarType getOpenEjbDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getOpenEjbDeploymentPlan(IVirtualComponent comp) {
         return getOpenEjbDeploymentPlan(getOpenEjbDeploymentPlanFile(comp));
     }
 
-    public static ConnectorType getConnectorDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getConnectorDeploymentPlan(IVirtualComponent comp) {
         return getConnectorDeploymentPlan(getConnectorDeploymentPlanFile(comp));
     }
 
-    public static ApplicationType getApplicationDeploymentPlan(IFile file) {
+    public static JAXBElement getApplicationDeploymentPlan(IFile file) {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getApplicationDeploymentPlan", file);
 
         if (file.getName().equals(APP_PLAN_NAME) && file.exists()) {
-            ResourceSet resourceSet = new ResourceSetImpl();
-            register(resourceSet, new ApplicationResourceFactoryImpl(), ApplicationPackage.eINSTANCE, ApplicationPackage.eNS_URI);
-            Resource resource = load(file, resourceSet);
-            if (resource != null) {
-                return((org.apache.geronimo.xml.ns.j2ee.application.DocumentRoot) resource.getContents().get(0)).getApplication();
-            }
+//            ResourceSet resourceSet = new ResourceSetImpl();
+//            register(resourceSet, new ApplicationResourceFactoryImpl(), ApplicationPackage.eINSTANCE, ApplicationPackage.eNS_URI);
+//            Resource resource = load(file, resourceSet);
+//            if (resource != null) {
+//                return((org.apache.geronimo.xml.ns.j2ee.application.DocumentRoot) resource.getContents().get(0)).getApplication();
+//            }
+        	return unmarshalDeploymentPlan( file );
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getApplicationDeploymentPlan", null);
         return null;
     }
 
-    public static WebAppType getWebDeploymentPlan(IFile file) {
+    public static JAXBElement getWebDeploymentPlan(IFile file) {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getWebDeploymentPlan", file);
 
         if (file.getName().equals(WEB_PLAN_NAME) && file.exists()) {
-            ResourceSet resourceSet = new ResourceSetImpl();
-            register(resourceSet, new WebResourceFactoryImpl(), WebPackage.eINSTANCE, WebPackage.eNS_URI);
-            Resource resource = load(file, resourceSet);
-            if (resource != null) {
-                return((DocumentRoot) resource.getContents().get(0)).getWebApp();
-            }
+//            ResourceSet resourceSet = new ResourceSetImpl();
+//            register(resourceSet, new WebResourceFactoryImpl(), WebPackage.eINSTANCE, WebPackage.eNS_URI);
+//            Resource resource = load(file, resourceSet);
+//            if (resource != null) {
+//                return((DocumentRoot) resource.getContents().get(0)).getWebApp();
+//            }
+            return unmarshalDeploymentPlan( file );
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getWebDeploymentPlan", null);
         return null;
     }
 
-    public static OpenejbJarType getOpenEjbDeploymentPlan(IFile file) {
+    public static JAXBElement getOpenEjbDeploymentPlan(IFile file) {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getOpenEjbDeploymentPlan", file);
 
         if (file.getName().equals(OPENEJB_PLAN_NAME) && file.exists()) {
-            ResourceSet resourceSet = new ResourceSetImpl();
-            register(resourceSet, new JarResourceFactoryImpl(), JarPackage.eINSTANCE, JarPackage.eNS_URI);
-            Resource resource = load(file, resourceSet);
-            if (resource != null) {
-                return((org.openejb.xml.ns.openejb.jar.DocumentRoot) resource.getContents().get(0)).getOpenejbJar();
-            }
+//            ResourceSet resourceSet = new ResourceSetImpl();
+//            register(resourceSet, new JarResourceFactoryImpl(), JarPackage.eINSTANCE, JarPackage.eNS_URI);
+//            Resource resource = load(file, resourceSet);
+//            if (resource != null) {
+//                return((org.openejb.xml.ns.openejb.jar.DocumentRoot) resource.getContents().get(0)).getOpenejbJar();
+//            }
+        	return unmarshalDeploymentPlan( file );
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getOpenEjbDeploymentPlan", null);
         return null;
     }
 
-    public static ConnectorType getConnectorDeploymentPlan(IFile file) {
+    public static JAXBElement getConnectorDeploymentPlan(IFile file) {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConnectorDeploymentPlan", file);
 
         if (file.getName().equals(CONNECTOR_PLAN_NAME) && file.exists()) {
-            ResourceSet resourceSet = new ResourceSetImpl();
-            register(resourceSet, new ConnectorResourceFactoryImpl(), ConnectorPackage.eINSTANCE, ConnectorPackage.eNS_URI);
-            Resource resource = load(file, resourceSet);
-            if (resource != null) {
-                return((org.apache.geronimo.xml.ns.j2ee.connector.DocumentRoot) resource.getContents().get(0)).getConnector();
-            }
+//            ResourceSet resourceSet = new ResourceSetImpl();
+//            register(resourceSet, new ConnectorResourceFactoryImpl(), ConnectorPackage.eINSTANCE, ConnectorPackage.eNS_URI);
+//            Resource resource = load(file, resourceSet);
+//            if (resource != null) {
+//                return((org.apache.geronimo.xml.ns.j2ee.connector.DocumentRoot) resource.getContents().get(0)).getConnector();
+//            }
+        	return unmarshalDeploymentPlan( file );
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getConnectorDeploymentPlan", null);
         return null;
     }
+    
+	private static JAXBElement unmarshalDeploymentPlan( IFile file ) {
+		try {
+	    	JAXBContext jb = JAXBContext.newInstance( "org.apache.geronimo.xml.ns.j2ee.web_2_0:org.apache.geronimo.xml.ns.j2ee.application_2:org.apache.geronimo.xml.ns.deployment_1:org.apache.geronimo.xml.ns.naming_1:org.apache.geronimo.xml.ns.security_2", Activator.class.getClassLoader() );
+	    	Unmarshaller ums = jb.createUnmarshaller();
+	    	JAXBElement plan = (JAXBElement)ums.unmarshal( file.getContents() );
+	    	return plan;
+		} catch ( JAXBException e ) {
+			e.printStackTrace();
+		} catch ( CoreException e ) {
+			e.printStackTrace();
+		}
+		return null;
+	}
 }

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java?rev=634164&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java Wed Mar  5 20:58:28 2008
@@ -0,0 +1,62 @@
+/*
+ * 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.v21.core.jaxb;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
+import org.apache.geronimo.xml.ns.security_2.SecurityType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class JAXBModelUtils {
+	
+	public static SecurityType getSecurityType(JAXBElement element) {
+		Object plan = element.getValue();
+		if ( WebAppType.class.isInstance( plan ) ) {
+			return ((WebAppType)plan).getSecurity() == null ? null : (SecurityType)((WebAppType)plan).getSecurity().getValue();
+		}
+		return null;
+	}
+	
+	public static void setSecurityType(JAXBElement element, SecurityType security) {
+		Object plan = element.getValue();
+		if ( WebAppType.class.isInstance( plan ) ) {
+			((WebAppType)plan).setSecurity((new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createSecurity( security ) );
+		}
+	}
+	
+	public static EnvironmentType getEnvironmentType(JAXBElement element) {
+		Object plan = element.getValue();
+		if ( WebAppType.class.isInstance( plan ) ) {
+			return ((WebAppType)plan).getEnvironment() == null ? null : ((WebAppType)plan).getEnvironment();
+		}
+		return null;
+	}
+	
+	public static List getServiceOrPersistence(JAXBElement element) {
+		Object plan = element.getValue();
+		if ( WebAppType.class.isInstance( plan ) ) {
+			return ((WebAppType)plan).getServiceOrPersistence() == null ? null : ((WebAppType)plan).getServiceOrPersistence();
+		}
+		return null;
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java?rev=634164&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java Wed Mar  5 20:58:28 2008
@@ -0,0 +1,62 @@
+/*
+ * 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.v21.core.jaxb;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.xml.ns.deployment_1.GbeanType;
+import org.apache.geronimo.xml.ns.naming_1.ObjectFactory;
+import org.apache.geronimo.xml.ns.naming_1.ResourceRefType;
+import org.apache.geronimo.xml.ns.security_2.DescriptionType;
+import org.apache.geronimo.xml.ns.security_2.RoleMappingsType;
+import org.apache.geronimo.xml.ns.security_2.RoleType;
+import org.apache.geronimo.xml.ns.security_2.SecurityType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class JAXBObjectFactoryImpl implements JAXBObjectFactory {
+
+	private static JAXBObjectFactoryImpl instance = new JAXBObjectFactoryImpl();
+	
+	private JAXBObjectFactoryImpl() {
+		
+	}
+	
+	public static JAXBObjectFactoryImpl getInstance() {
+		return instance;
+	}
+	
+	public Object create(Class type) {
+		System.out.println( type );
+		if ( type.equals( ResourceRefType.class ) ) {
+			return (new ObjectFactory()).createResourceRefType();
+		} else if ( type.equals( SecurityType.class ) ) {
+			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createSecurityType();
+		} else if ( type.equals( RoleMappingsType.class ) ) {
+			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createRoleMappingsType();
+		} else if ( type.equals( DescriptionType.class ) ) {
+			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createDescriptionType();
+		} else if ( type.equals( RoleType.class ) ) {
+			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createRoleType();
+		} else if ( type.equals( GbeanType.class ) ) {
+			return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createGbeanType();
+		}
+		
+		return null;
+	}
+
+}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java Wed Mar  5 20:58:28 2008
@@ -16,44 +16,22 @@
  */
 package org.apache.geronimo.st.v21.core.operations;
 
-import org.apache.geronimo.st.core.GeronimoSchemaNS;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+import javax.xml.bind.JAXBElement;
+
 import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
 import org.apache.geronimo.st.v21.core.DeploymentPlanInstallConfig;
-import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
 import org.apache.geronimo.st.v21.core.internal.Trace;
-import org.apache.geronimo.xml.ns.deployment.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment.DependenciesType;
-import org.apache.geronimo.xml.ns.deployment.DependencyType;
-import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
-import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
-import org.apache.geronimo.xml.ns.deployment.DocumentRoot;
-import org.apache.geronimo.xml.ns.deployment.EnvironmentType;
-import org.apache.geronimo.xml.ns.deployment.ModuleType;
-import org.apache.geronimo.xml.ns.deployment.util.DeploymentResourceFactoryImpl;
-import org.apache.geronimo.xml.ns.j2ee.application.ApplicationFactory;
-import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
-import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
-import org.apache.geronimo.xml.ns.j2ee.application.util.ApplicationResourceFactoryImpl;
-import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorFactory;
-import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorPackage;
-import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorType;
-import org.apache.geronimo.xml.ns.j2ee.connector.util.ConnectorResourceFactoryImpl;
-import org.apache.geronimo.xml.ns.j2ee.web.WebAppType;
-import org.apache.geronimo.xml.ns.j2ee.web.WebFactory;
-import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
-import org.apache.geronimo.xml.ns.j2ee.web.util.WebResourceFactoryImpl;
+import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
+import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.j2ee.application_2.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
+import org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.GeronimoEjbJarType;
+import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
 import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.EMap;
-import org.eclipse.emf.common.util.URI;
-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;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.openejb.xml.ns.openejb.jar.JarFactory;
-import org.openejb.xml.ns.openejb.jar.JarPackage;
-import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
-import org.openejb.xml.ns.openejb.jar.util.JarResourceFactoryImpl;
 
 /**
  * @version $Rev: 509704 $ $Date: 2007-02-20 13:42:24 -0500 (Tue, 20 Feb 2007) $
@@ -72,9 +50,14 @@
 	 * 
 	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoApplicationDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
-	public EObject createGeronimoApplicationDeploymentPlan(IFile dpFile) {
+	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile dpFile) {
 //		Trace.trace("Entry", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile);
 		
+		org.apache.geronimo.xml.ns.j2ee.application_2.ObjectFactory applicationFactory = new org.apache.geronimo.xml.ns.j2ee.application_2.ObjectFactory();
+		ApplicationType application = applicationFactory.createApplicationType();
+		application.setApplicationName(getProject().getName());
+		application.setEnvironment(getConfigEnvironment());
+/*		
 		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString(), false);
 
 		ResourceSet resourceSet = new ResourceSetImpl();
@@ -90,15 +73,15 @@
 		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
 
 		root.setApplicationName(getProject().getName());
-		root.setEnvironment(getConfigEnvironment());
+		root.setEnvironment();
 
 		documentRoot.setApplication(root);
 		resource.getContents().add(documentRoot);
 
 		save(resource);
-
+*/
 //		Trace.trace("Exit", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", root);
-		return root;
+		return applicationFactory.createApplication(application);
 	}
 
 	/*
@@ -106,9 +89,12 @@
 	 * 
 	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoWebDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
-	public EObject createGeronimoWebDeploymentPlan(IFile dpFile) {
+	public JAXBElement createGeronimoWebDeploymentPlan(IFile dpFile) {
 //		Trace.trace("Entry", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", dpFile);
 
+		org.apache.geronimo.xml.ns.j2ee.web_2_0.ObjectFactory webFactory = new org.apache.geronimo.xml.ns.j2ee.web_2_0.ObjectFactory();
+		WebAppType web = webFactory.createWebAppType();
+/*
 		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString(), false);
 
 		ResourceSet resourceSet = new ResourceSetImpl();
@@ -136,7 +122,9 @@
 		save(resource);
 
 //		Trace.trace("Exit", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", root);
-		return root;
+		return new JAXBElement<JAXBElement>();
+*/
+		return webFactory.createWebApp(web);
 	}
 
 	/*
@@ -144,9 +132,13 @@
 	 * 
 	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createOpenEjbDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
-	public EObject createOpenEjbDeploymentPlan(IFile dpFile) {
+	public JAXBElement createOpenEjbDeploymentPlan(IFile dpFile) {
 //		Trace.trace("Entry", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile);
+		org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.ObjectFactory ejbFactory = new org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.ObjectFactory();
+		GeronimoEjbJarType ejbjar = ejbFactory.createGeronimoEjbJarType();
+
 		
+/*
 		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString(), false);
 
 		ResourceSet resourceSet = new ResourceSetImpl();
@@ -173,6 +165,9 @@
 
 //		Trace.trace("Exit", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", root);
 		return root;
+*/
+		return ejbFactory.createEjbJar(ejbjar);
+		
 	}
 
 	/*
@@ -180,9 +175,15 @@
 	 * 
 	 * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createConnectorDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
-	public EObject createConnectorDeploymentPlan(IFile dpFile) {
+	public JAXBElement createConnectorDeploymentPlan(IFile dpFile) {
 //		Trace.trace("Entry", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile);
 		
+		org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory connectorFactory = new org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory();
+		ConnectorType connector = connectorFactory.createConnectorType();
+		return connectorFactory.createConnector(connector);
+
+		
+/*
 		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString(), false);
 
 		ResourceSet resourceSet = new ResourceSetImpl();
@@ -205,11 +206,18 @@
 
 //		Trace.trace("Exit", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", root);
 		return root;
+*/
 	}
 
-	public EObject createServiceDeploymentPlan(IFile dpFile) {
+	public JAXBElement createServiceDeploymentPlan(IFile dpFile) {
 //		Trace.trace("Entry", "V21DeploymentPlanCreationOperation.createServiceDeploymentPlan", dpFile);
+
+		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		org.apache.geronimo.xml.ns.deployment_1.ModuleType module = serviceFactory.createModuleType();
+		return serviceFactory.createModule(module);
+
 		
+/*
 		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString(), false);
 
 		ResourceSet resourceSet = new ResourceSetImpl();
@@ -230,6 +238,7 @@
 
 //		Trace.trace("Exit", "V21DeploymentPlanCreationOperation.createServiceDeploymentPlan", root);
 		return root;
+*/
 	}
 
 	public EnvironmentType getConfigEnvironment() {
@@ -249,12 +258,14 @@
 				: "car";
 
 		ArtifactType artifact = createArtifactType(groupId, artifactId, version, type);
-		EnvironmentType env = DeploymentFactory.eINSTANCE.createEnvironmentType();
+		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+   
+		EnvironmentType env = serviceFactory.createEnvironmentType();
 		env.setModuleId(artifact);
 
 		if (cfg != null && cfg.isSharedLib()) {
-			DependenciesType dt = DeploymentFactory.eINSTANCE.createDependenciesType();
-			ArtifactType sharedLib = createDependencyType("org.apache.geronimo.configs", "sharedlib", null, "car");
+			DependenciesType dt = serviceFactory.createDependenciesType();
+			DependencyType sharedLib = createDependencyType("org.apache.geronimo.configs", "sharedlib", null, "car");
 			dt.getDependency().add(sharedLib);
 			env.setDependencies(dt);
 		}
@@ -265,8 +276,9 @@
 
 	public static ArtifactType createArtifactType(String groupId, String artifactId, String version, String type) {
 //		Trace.trace("Entry", "V21DeploymentPlanCreationOperation.createArtifactType", groupId, artifactId, version, type);
-						
-		ArtifactType artifact = DeploymentFactory.eINSTANCE.createArtifactType();
+		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		ArtifactType artifact = serviceFactory.createArtifactType();
+
 		if (groupId != null)
 			artifact.setGroupId(groupId);
 		if (artifactId != null)
@@ -279,20 +291,20 @@
 		return artifact;
 	}
 
-	public static ArtifactType createDependencyType(String groupId, String artifactId, String version, String type) {
+	public static DependencyType createDependencyType(String groupId, String artifactId, String version, String type) {
 //		Trace.trace("Entry", "V21DeploymentPlanCreationOperation.createDependencyType", groupId, artifactId, version, type);
-		
-		DependencyType artifact = DeploymentFactory.eINSTANCE.createDependencyType();
+		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		DependencyType dependency = serviceFactory.createDependencyType();
 		if (groupId != null)
-			artifact.setGroupId(groupId);
+			dependency.setGroupId(groupId);
 		if (artifactId != null)
-			artifact.setArtifactId(artifactId);
+			dependency.setArtifactId(artifactId);
 		if (version != null)
-			artifact.setVersion(version);
-		artifact.setType(type);
+			dependency.setVersion(version);
+		dependency.setType(type);
 		
 //		Trace.trace("Exit", "V21DeploymentPlanCreationOperation.createDependencyType", artifact);
-		return artifact;
+		return dependency;
 	}
 
 	private static boolean hasValue(String attribute) {
@@ -302,4 +314,4 @@
 		return attribute != null && attribute.trim().length() != 0;
 	}
 
-}
\ No newline at end of file
+}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF Wed Mar  5 20:58:28 2008
@@ -6,14 +6,15 @@
 Bundle-Activator: org.apache.geronimo.st.v21.ui.Activator
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
+ org.eclipse.core.commands,
  org.apache.geronimo.st.v21.core,
  org.apache.geronimo.st.ui,
  org.eclipse.ui.forms,
  org.eclipse.core.resources,
- org.apache.geronimo.v11.deployment.model.edit,
- org.apache.geronimo.v11.deployment.model,
  org.eclipse.wst.common.project.facet.ui,
- org.apache.geronimo.st.v11.ui
+ org.apache.geronimo.st.v11.ui,
+ org.apache.geronimo.deployment.v21.jaxbmodel,
+ org.apache.geronimo.runtime.common
 Eclipse-LazyStart: true
 Bundle-Vendor: Apache.org
 Export-Package: org.apache.geronimo.st.v21.ui,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml Wed Mar  5 20:58:28 2008
@@ -77,12 +77,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.devtools</groupId>
-            <artifactId>org.apache.geronimo.v11.deployment.model</artifactId>
+            <artifactId>org.apache.geronimo.deployment.v21.jaxbmodel</artifactId>
             <version>${version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.devtools</groupId>
-            <artifactId>org.apache.geronimo.v11.deployment.model.edit</artifactId>
+            <artifactId>org.apache.geronimo.runtime.common</artifactId>
             <version>${version}</version>
         </dependency>
         <dependency>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java?rev=634164&r1=634163&r2=634164&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java Wed Mar  5 20:58:28 2008
@@ -16,9 +16,19 @@
  */
 package org.apache.geronimo.st.v21.ui.editors;
 
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+
 import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader;
 import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v21.ui.Activator;
 import org.apache.geronimo.st.v21.ui.pages.AppGeneralPage;
 import org.apache.geronimo.st.v21.ui.pages.ConnectorOverviewPage;
 import org.apache.geronimo.st.v21.ui.pages.DeploymentPage;
@@ -26,19 +36,11 @@
 import org.apache.geronimo.st.v21.ui.pages.NamingFormPage;
 import org.apache.geronimo.st.v21.ui.pages.SecurityPage;
 import org.apache.geronimo.st.v21.ui.pages.WebGeneralPage;
-import org.apache.geronimo.xml.ns.j2ee.application.ApplicationFactory;
-import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
-import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorFactory;
-import org.apache.geronimo.xml.ns.j2ee.web.WebFactory;
-import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
-import org.apache.geronimo.xml.ns.j2ee.web.impl.WebPackageImpl;
+import org.apache.geronimo.xml.ns.security_2.SecurityType;
 import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.forms.editor.FormEditor;
 import org.eclipse.ui.forms.editor.FormPage;
-import org.openejb.xml.ns.openejb.jar.JarFactory;
-import org.openejb.xml.ns.openejb.jar.JarPackage;
 
 public class GeronimoFormContentLoader extends AbstractGeronimoFormContentLoader {
 
@@ -49,7 +51,7 @@
 	 */
 	public void addApplicationPlanPages(FormEditor editor) throws PartInitException {
 		editor.addPage(new AppGeneralPage(editor, "appgeneralpage", CommonMessages.editorTabGeneral));
-		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, ApplicationPackage.eINSTANCE.getApplicationType_Security()));
+		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, null));
 		editor.addPage(getApplicationDeploymentPage(editor));
 	}
 
@@ -71,7 +73,7 @@
 	public void addOpenEjbPlanPages(FormEditor editor) throws PartInitException {
 		editor.addPage(new EjbOverviewPage(editor, "ejboverview", CommonMessages.editorTabGeneral));
 		// TODO Add naming page but broken down for each bean type
-		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, JarPackage.eINSTANCE.getOpenejbJarType_Security()));
+		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, null));
 		editor.addPage(getEjbJarDeploymentPage(editor));
 	}
 
@@ -81,9 +83,11 @@
 	 * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addWebPlanPages()
 	 */
 	public void addWebPlanPages(FormEditor editor) throws PartInitException {
+		AbstractGeronimoDeploymentPlanEditor geronimoEditor = (AbstractGeronimoDeploymentPlanEditor)editor;
+		JAXBElement plan = geronimoEditor.getDeploymentPlan();
 		editor.addPage(new WebGeneralPage(editor, "generalpage", CommonMessages.editorTabGeneral));
 		editor.addPage(getWebNamingPage(editor));
-		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, WebPackageImpl.eINSTANCE.getWebAppType_Security()));
+		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, (SecurityType)JAXBModelUtils.getSecurityType( plan )));
 		editor.addPage(getWebDeploymentPage(editor));
 	}
 
@@ -92,47 +96,52 @@
 	 * 
 	 * @see org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader#loadDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
-	public EObject loadDeploymentPlan(IFile file) {
+	public JAXBElement loadDeploymentPlan(IFile file) {
 		return GeronimoV21Utils.getDeploymentPlan(file);
 	}
+	
+	public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws IOException, JAXBException {
+		JAXBContext jb = JAXBContext.newInstance( "org.apache.geronimo.xml.ns.j2ee.web_2_0:org.apache.geronimo.xml.ns.j2ee.application_2:org.apache.geronimo.xml.ns.deployment_1:org.apache.geronimo.xml.ns.naming_1:org.apache.geronimo.xml.ns.security_2", Activator.class.getClassLoader() );
+		jb.createMarshaller().marshal( deploymentPlan, new File( file.getLocationURI().toURL().getFile()) );
+	}
 
 	protected FormPage getWebNamingPage(FormEditor editor) {
 		NamingFormPage formPage = createNamingFormPage(editor);
-		WebPackage pkg = WebFactory.eINSTANCE.getWebPackage();
-		formPage.ejbLocalRef = pkg.getWebAppType_EjbLocalRef();
-		formPage.ejbRef = pkg.getWebAppType_EjbRef();
-		formPage.resEnvRef = pkg.getWebAppType_ResourceEnvRef();
-		formPage.resRef = pkg.getWebAppType_ResourceRef();
-		formPage.gbeanRef = pkg.getWebAppType_GbeanRef();
-		formPage.serviceRef = pkg.getWebAppType_ServiceRef();
+//		WebPackage pkg = null; //WebFactory.eINSTANCE.getWebPackage();
+//		formPage.ejbLocalRef = pkg.getWebAppType_EjbLocalRef();
+//		formPage.ejbRef = pkg.getWebAppType_EjbRef();
+//		formPage.resEnvRef = pkg.getWebAppType_ResourceEnvRef();
+//		formPage.resRef = pkg.getWebAppType_ResourceRef();
+//		formPage.gbeanRef = pkg.getWebAppType_GbeanRef();
+//		formPage.serviceRef = pkg.getWebAppType_ServiceRef();
 		return formPage;
 	}
 
 	protected FormPage getWebDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.environment = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Environment();
-		formPage.gbeanERef = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Gbean();
+//		formPage.environment = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Environment();
+//		formPage.gbeanERef = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Gbean();
 		return formPage;
 	}
 
 	private FormPage getEjbJarDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.environment = JarFactory.eINSTANCE.getJarPackage().getOpenejbJarType_Environment();
-		formPage.gbeanERef = JarFactory.eINSTANCE.getJarPackage().getOpenejbJarType_Gbean();
+//		formPage.environment = JarFactory.eINSTANCE.getJarPackage().getOpenejbJarType_Environment();
+//		formPage.gbeanERef = JarFactory.eINSTANCE.getJarPackage().getOpenejbJarType_Gbean();
 		return formPage;
 	}
 
 	protected FormPage getApplicationDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.environment = ApplicationFactory.eINSTANCE.getApplicationPackage().getApplicationType_Environment();
-		formPage.gbeanERef = ApplicationFactory.eINSTANCE.getApplicationPackage().getApplicationType_Gbean();
+//		formPage.environment = ApplicationFactory.eINSTANCE.getApplicationPackage().getApplicationType_Environment();
+//		formPage.gbeanERef = ApplicationFactory.eINSTANCE.getApplicationPackage().getApplicationType_Gbean();
 		return formPage;
 	}
 
 	private FormPage getConnectorDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.environment = ConnectorFactory.eINSTANCE.getConnectorPackage().getConnectorType_Environment();
-		formPage.gbeanERef = ConnectorFactory.eINSTANCE.getConnectorPackage().getConnectorType_Gbean();
+//		formPage.environment = ConnectorFactory.eINSTANCE.getConnectorPackage().getConnectorType_Environment();
+//		formPage.gbeanERef = ConnectorFactory.eINSTANCE.getConnectorPackage().getConnectorType_Gbean();
 		return formPage;
 	}