geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r416914 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/ org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/ org.apache.geronimo.st.v11.ui/src/org/a...
Date Sat, 24 Jun 2006 13:23:51 GMT
Author: sppatel
Date: Sat Jun 24 06:23:50 2006
New Revision: 416914

URL: http://svn.apache.org/viewvc?rev=416914&view=rev
Log:
fix broken editor tables

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java?rev=416914&r1=416913&r2=416914&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
Sat Jun 24 06:23:50 2006
@@ -155,6 +155,7 @@
 	public static String groupId;
 	public static String artifactId;
 	public static String version;
+	public static String type;
 	//
 	public static String wizardNewTitle_Import;
 	public static String wizardEditTitle_Import;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties?rev=416914&r1=416913&r2=416914&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties
Sat Jun 24 06:23:50 2006
@@ -141,6 +141,7 @@
 groupId=Group Id:
 artifactId=Artifact Id:
 version=Version:
+type=Artifact Type:
 
 editorTabGeneral=General
 editorTabNaming=Naming

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java?rev=416914&r1=416913&r2=416914&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
Sat Jun 24 06:23:50 2006
@@ -25,8 +25,6 @@
 import org.apache.geronimo.st.v11.ui.pages.NamingFormPage;
 import org.apache.geronimo.st.v11.ui.pages.SecurityPage;
 import org.apache.geronimo.st.v11.ui.pages.WebGeneralPage;
-import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
-import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
 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;
@@ -111,25 +109,25 @@
 
 	protected FormPage getWebDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.gbeans = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Gbean();
+		formPage.environment = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Environment();
 		return formPage;
 	}
 
 	private FormPage getEjbJarDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.gbeans = JarFactory.eINSTANCE.getJarPackage().getOpenejbJarType_Gbean();
+		formPage.environment = JarFactory.eINSTANCE.getJarPackage().getOpenejbJarType_Environment();
 		return formPage;
 	}
 
 	protected FormPage getApplicationDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.gbeans = ApplicationFactory.eINSTANCE.getApplicationPackage().getApplicationType_Gbean();
+		formPage.environment = ApplicationFactory.eINSTANCE.getApplicationPackage().getApplicationType_Environment();
 		return formPage;
 	}
 
 	private FormPage getConnectorDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-		formPage.gbeans = ConnectorFactory.eINSTANCE.getConnectorPackage().getConnectorType_Gbean();
+		formPage.environment = ConnectorFactory.eINSTANCE.getConnectorPackage().getConnectorType_Environment();
 		return formPage;
 	}
 
@@ -140,9 +138,6 @@
 
 	// TODO Push to superclass
 	private DeploymentPage createDeploymentFormPage(FormEditor editor) {
-		DeploymentPage formPage = new DeploymentPage(editor, "deploymentpage", CommonMessages.editorTabDeployment);
-		DeploymentPackage pkg = DeploymentFactory.eINSTANCE.getDeploymentPackage();
-		formPage.dependencies = pkg.getEnvironmentType_Dependencies();
-		return formPage;
+		return new DeploymentPage(editor, "deploymentpage", CommonMessages.editorTabDeployment);
 	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.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/pages/DeploymentPage.java?rev=416914&r1=416913&r2=416914&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/pages/DeploymentPage.java
Sat Jun 24 06:23:50 2006
@@ -19,18 +19,13 @@
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v11.ui.sections.DependencySection;
 import org.apache.geronimo.st.v11.ui.sections.GBeanSection;
-import org.apache.geronimo.st.v11.ui.sections.ImportSection;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
 
 public class DeploymentPage extends AbstractGeronimoFormPage {
-
-	public EReference dependencies;
-
-	public EReference imports;
-
-	public EReference gbeans;
+	
+	public EReference environment;
 
 	public DeploymentPage(FormEditor editor, String id, String title) {
 		super(editor, id, title);
@@ -42,9 +37,8 @@
 	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
 	 */
 	protected void fillBody(IManagedForm managedForm) {
-		managedForm.addPart(new DependencySection(getDeploymentPlan(), dependencies, body, toolkit,
getStyle()));
-		managedForm.addPart(new ImportSection(getDeploymentPlan(), imports, body, toolkit, getStyle()));
-		managedForm.addPart(new GBeanSection(getDeploymentPlan(), gbeans, body, toolkit, getStyle()));
+		managedForm.addPart(new DependencySection(getDeploymentPlan(), environment, body, toolkit,
getStyle()));
+		managedForm.addPart(new GBeanSection(getDeploymentPlan(), environment, body, toolkit, getStyle()));
 	}
 
 	/*

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.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/DependencySection.java?rev=416914&r1=416913&r2=416914&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
Sat Jun 24 06:23:50 2006
@@ -21,23 +21,19 @@
 import org.apache.geronimo.st.v11.ui.internal.EMFEditorContext;
 import org.apache.geronimo.st.v11.ui.wizards.DependencyWizard;
 import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+import org.apache.geronimo.xml.ns.deployment.EnvironmentType;
 import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class DependencySection extends AbstractTableSection {
 
-	/**
-	 * Must be a set to a ERef type of XPackage.eINSTANCE.getXType_Dependency();
-	 */
-	private EReference dependenciesERef;
+	private EReference environmentERef;
 
 	/**
 	 * @param plan
@@ -45,9 +41,9 @@
 	 * @param toolkit
 	 * @param style
 	 */
-	public DependencySection(EObject plan, EReference dependenciesERef, Composite parent, FormToolkit
toolkit, int style) {
+	public DependencySection(EObject plan, EReference environment, Composite parent, FormToolkit
toolkit, int style) {
 		super(plan, parent, toolkit, style);
-		this.dependenciesERef = dependenciesERef;
+		this.environmentERef = environment;
 		createClient();
 	}
 
@@ -75,7 +71,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
 	 */
 	public EReference getEReference() {
-		return dependenciesERef;
+		return environmentERef;
 	}
 
 	/*
@@ -112,22 +108,17 @@
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#filter(org.eclipse.jface.viewers.Viewer,
-	 *      java.lang.Object, java.lang.Object)
-	 */
-	protected boolean filter(Viewer viewer, Object parentElement, Object element) {
-		if (super.filter(viewer, parentElement, element)) {
-			return ((EList) getPlan().eGet(getEReference())).contains(element);
-		}
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
 	 * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
 	 */
 	public AdapterFactory getAdapterFactory() {
 		return EMFEditorContext.getFactory();
+	}
+	
+	public Object getInput() {
+		EnvironmentType envType = (EnvironmentType) getPlan().eGet(getEReference());
+		if (envType != null) {
+			return envType.getDependencies();
+		}
+		return super.getInput();
 	}
 }

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=416914&r1=416913&r2=416914&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
Sat Jun 24 06:23:50 2006
@@ -19,10 +19,13 @@
 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.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.WizardPage;
@@ -30,7 +33,6 @@
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 
@@ -49,12 +51,16 @@
 	protected Label artifactIdLabel;
 
 	protected Label versionLabel;
+	
+	protected Label typeLabel;
 
 	protected Text groupIdText;
 
 	protected Text artifactIdText;
 
 	protected Text versionText;
+	
+	protected Text typeText;
 
 	/**
 	 * @param section
@@ -127,6 +133,7 @@
 		dt.setArtifactId(artifactIdText.getText());
 		dt.setGroupId(groupIdText.getText());
 		dt.setVersion(versionText.getText());
+		dt.setType(typeText.getText());
 	}
 
 	/*
@@ -164,40 +171,47 @@
 			data = new GridData(GridData.FILL_HORIZONTAL);
 			data.horizontalSpan = 2;
 
-			Group group = new Group(composite, SWT.NONE);
-			group.setText(CommonMessages.dependencyGroupLabel);
-			group.setLayoutData(data);
-			group.setLayout(layout);
-
-			groupIdLabel = new Label(group, SWT.LEFT);
+			groupIdLabel = new Label(composite, SWT.LEFT);
 			groupIdLabel.setText(CommonMessages.groupId);
 			groupIdLabel.setLayoutData(createLabelGridData());
 
-			groupIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
+			groupIdText = new Text(composite, SWT.SINGLE | SWT.BORDER);
 			groupIdText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
-			artifactIdLabel = new Label(group, SWT.LEFT);
+			artifactIdLabel = new Label(composite, SWT.LEFT);
 			artifactIdLabel.setText(CommonMessages.artifactId);
 			artifactIdLabel.setLayoutData(createLabelGridData());
 
-			artifactIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
+			artifactIdText = new Text(composite, SWT.SINGLE | SWT.BORDER);
 			artifactIdText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
-			versionLabel = new Label(group, SWT.LEFT);
+			versionLabel = new Label(composite, SWT.LEFT);
 			versionLabel.setText(CommonMessages.version);
 			versionLabel.setLayoutData(createLabelGridData());
 
-			versionText = new Text(group, SWT.SINGLE | SWT.BORDER);
+			versionText = new Text(composite, SWT.SINGLE | SWT.BORDER);
 			versionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-			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());
+			
+			typeLabel = new Label(composite, SWT.LEFT);
+			typeLabel.setText(CommonMessages.type);
+			typeLabel.setLayoutData(createLabelGridData());
+
+			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());
+				}
 			}
 
 			setControl(composite);
@@ -206,8 +220,28 @@
 	}
 
 	public GridData createLabelGridData() {
-		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-		gd.horizontalIndent = 20;
-		return gd;
+		return new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+	}
+	
+	
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.ui.wizards.AbstractTableWizard#performFinish()
+	 */
+	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);
+		}
+
+		processEAttributes(getPages()[0]);
+
+		return true;
 	}
 }

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java?rev=416914&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java
Sat Jun 24 06:23:50 2006
@@ -0,0 +1,201 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.geronimo.xml.ns.deployment.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.geronimo.v11.deployment.model.edit.GeronimoEMFEditPlugin;
+
+import org.apache.geronimo.xml.ns.deployment.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.apache.geronimo.xml.ns.deployment.ArtifactType} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ * 
+ * @generated NOT
+ */
+public class ArtifactTypeItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
ITableItemLabelProvider {
+	/**
+	 * This constructs an instance from a factory and a notifier. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public ArtifactTypeItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public List getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+			addGroupIdPropertyDescriptor(object);
+			addArtifactIdPropertyDescriptor(object);
+			addVersionPropertyDescriptor(object);
+			addTypePropertyDescriptor(object);
+			addImportPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Group Id feature. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addGroupIdPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_ArtifactType_groupId_feature"), getString("_UI_PropertyDescriptor_description",
"_UI_ArtifactType_groupId_feature", "_UI_ArtifactType_type"), DeploymentPackage.Literals.ARTIFACT_TYPE__GROUP_ID,
true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Artifact Id feature. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addArtifactIdPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_ArtifactType_artifactId_feature"), getString("_UI_PropertyDescriptor_description",
"_UI_ArtifactType_artifactId_feature", "_UI_ArtifactType_type"), DeploymentPackage.Literals.ARTIFACT_TYPE__ARTIFACT_ID,
true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Version feature. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addVersionPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_ArtifactType_version_feature"), getString("_UI_PropertyDescriptor_description",
"_UI_ArtifactType_version_feature", "_UI_ArtifactType_type"), DeploymentPackage.Literals.ARTIFACT_TYPE__VERSION,
true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Type feature. <!-- begin-user-doc
+	 * --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addTypePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_ArtifactType_type_feature"), getString("_UI_PropertyDescriptor_description",
"_UI_ArtifactType_type_feature", "_UI_ArtifactType_type"), DeploymentPackage.Literals.ARTIFACT_TYPE__TYPE,
true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Import feature. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addImportPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_ArtifactType_import_feature"), getString("_UI_PropertyDescriptor_description",
"_UI_ArtifactType_import_feature", "_UI_ArtifactType_type"), DeploymentPackage.Literals.ARTIFACT_TYPE__IMPORT,
true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This returns ArtifactType.gif. <!-- begin-user-doc --> <!-- end-user-doc
+	 * -->
+	 * 
+	 * @generated
+	 */
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/ArtifactType"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class. <!-- begin-user-doc
+	 * --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public String getText(Object object) {
+		String label = ((ArtifactType) object).getGroupId();
+		return label == null || label.length() == 0 ? getString("_UI_ArtifactType_type")
+				: getString("_UI_ArtifactType_type") + " " + label;
+	}
+
+	/**
+	 * This handles model notifications by calling {@link #updateChildren} to
+	 * update any cached children and by creating a viewer notification, which
+	 * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+	 * end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+
+		switch (notification.getFeatureID(ArtifactType.class)) {
+		case DeploymentPackage.ARTIFACT_TYPE__GROUP_ID:
+		case DeploymentPackage.ARTIFACT_TYPE__ARTIFACT_ID:
+		case DeploymentPackage.ARTIFACT_TYPE__VERSION:
+		case DeploymentPackage.ARTIFACT_TYPE__TYPE:
+		case DeploymentPackage.ARTIFACT_TYPE__IMPORT:
+			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false,
true));
+			return;
+		}
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds to the collection of
+	 * {@link org.eclipse.emf.edit.command.CommandParameter}s describing all of
+	 * the children that can be created under this object. <!-- begin-user-doc
+	 * --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object)
{
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+	}
+
+	/**
+	 * Return the resource locator for this item provider's resources. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public ResourceLocator getResourceLocator() {
+		return GeronimoEMFEditPlugin.INSTANCE;
+	}
+
+	public String getColumnText(Object object, int columnIndex) {
+		ArtifactType o = (ArtifactType) object;
+		if (columnIndex == 0) {
+			return o.getGroupId() + "/" + o.getArtifactId() + "-" + o.getVersion() + "." + o.getType();
+		}
+		return "";
+	}
+
+	public Object getColumnImage(Object object, int columnIndex) {
+		if (columnIndex == 0)
+			return getImage(object);
+		return null;
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ArtifactTypeItemProvider.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java?rev=416914&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java
Sat Jun 24 06:23:50 2006
@@ -0,0 +1,542 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.geronimo.xml.ns.deployment.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.apache.geronimo.xml.ns.deployment.util.DeploymentAdapterFactory;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to
{@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DeploymentItemProviderAdapterFactory extends DeploymentAdapterFactory implements
ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection supportedTypes = new ArrayList();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated NOT
+   */
+  public DeploymentItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);		
+    supportedTypes.add(ITableItemLabelProvider.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.ArtifactType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ArtifactTypeItemProvider artifactTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.ArtifactType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createArtifactTypeAdapter()
+  {
+    if (artifactTypeItemProvider == null)
+    {
+      artifactTypeItemProvider = new ArtifactTypeItemProvider(this);
+    }
+
+    return artifactTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.AttributeType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AttributeTypeItemProvider attributeTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.AttributeType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createAttributeTypeAdapter()
+  {
+    if (attributeTypeItemProvider == null)
+    {
+      attributeTypeItemProvider = new AttributeTypeItemProvider(this);
+    }
+
+    return attributeTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.ClassFilterType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ClassFilterTypeItemProvider classFilterTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.ClassFilterType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createClassFilterTypeAdapter()
+  {
+    if (classFilterTypeItemProvider == null)
+    {
+      classFilterTypeItemProvider = new ClassFilterTypeItemProvider(this);
+    }
+
+    return classFilterTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.DependenciesType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DependenciesTypeItemProvider dependenciesTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.DependenciesType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createDependenciesTypeAdapter()
+  {
+    if (dependenciesTypeItemProvider == null)
+    {
+      dependenciesTypeItemProvider = new DependenciesTypeItemProvider(this);
+    }
+
+    return dependenciesTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.DocumentRoot}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DocumentRootItemProvider documentRootItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.DocumentRoot}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createDocumentRootAdapter()
+  {
+    if (documentRootItemProvider == null)
+    {
+      documentRootItemProvider = new DocumentRootItemProvider(this);
+    }
+
+    return documentRootItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.EmptyType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EmptyTypeItemProvider emptyTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.EmptyType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createEmptyTypeAdapter()
+  {
+    if (emptyTypeItemProvider == null)
+    {
+      emptyTypeItemProvider = new EmptyTypeItemProvider(this);
+    }
+
+    return emptyTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.EnvironmentType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EnvironmentTypeItemProvider environmentTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.EnvironmentType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createEnvironmentTypeAdapter()
+  {
+    if (environmentTypeItemProvider == null)
+    {
+      environmentTypeItemProvider = new EnvironmentTypeItemProvider(this);
+    }
+
+    return environmentTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.GbeanType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GbeanTypeItemProvider gbeanTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.GbeanType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createGbeanTypeAdapter()
+  {
+    if (gbeanTypeItemProvider == null)
+    {
+      gbeanTypeItemProvider = new GbeanTypeItemProvider(this);
+    }
+
+    return gbeanTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.ModuleType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModuleTypeItemProvider moduleTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.ModuleType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createModuleTypeAdapter()
+  {
+    if (moduleTypeItemProvider == null)
+    {
+      moduleTypeItemProvider = new ModuleTypeItemProvider(this);
+    }
+
+    return moduleTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.PatternType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PatternTypeItemProvider patternTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.PatternType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createPatternTypeAdapter()
+  {
+    if (patternTypeItemProvider == null)
+    {
+      patternTypeItemProvider = new PatternTypeItemProvider(this);
+    }
+
+    return patternTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.ReferencesType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ReferencesTypeItemProvider referencesTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.ReferencesType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createReferencesTypeAdapter()
+  {
+    if (referencesTypeItemProvider == null)
+    {
+      referencesTypeItemProvider = new ReferencesTypeItemProvider(this);
+    }
+
+    return referencesTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.ReferenceType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ReferenceTypeItemProvider referenceTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.ReferenceType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createReferenceTypeAdapter()
+  {
+    if (referenceTypeItemProvider == null)
+    {
+      referenceTypeItemProvider = new ReferenceTypeItemProvider(this);
+    }
+
+    return referenceTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.ServiceType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ServiceTypeItemProvider serviceTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.ServiceType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createServiceTypeAdapter()
+  {
+    if (serviceTypeItemProvider == null)
+    {
+      serviceTypeItemProvider = new ServiceTypeItemProvider(this);
+    }
+
+    return serviceTypeItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.apache.geronimo.xml.ns.deployment.XmlAttributeType}
instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected XmlAttributeTypeItemProvider xmlAttributeTypeItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.apache.geronimo.xml.ns.deployment.XmlAttributeType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter createXmlAttributeTypeAdapter()
+  {
+    if (xmlAttributeTypeItemProvider == null)
+    {
+      xmlAttributeTypeItemProvider = new XmlAttributeTypeItemProvider(this);
+    }
+
+    return xmlAttributeTypeItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class) || (((Class)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (artifactTypeItemProvider != null) artifactTypeItemProvider.dispose();
+    if (attributeTypeItemProvider != null) attributeTypeItemProvider.dispose();
+    if (classFilterTypeItemProvider != null) classFilterTypeItemProvider.dispose();
+    if (dependenciesTypeItemProvider != null) dependenciesTypeItemProvider.dispose();
+    if (documentRootItemProvider != null) documentRootItemProvider.dispose();
+    if (emptyTypeItemProvider != null) emptyTypeItemProvider.dispose();
+    if (environmentTypeItemProvider != null) environmentTypeItemProvider.dispose();
+    if (gbeanTypeItemProvider != null) gbeanTypeItemProvider.dispose();
+    if (moduleTypeItemProvider != null) moduleTypeItemProvider.dispose();
+    if (patternTypeItemProvider != null) patternTypeItemProvider.dispose();
+    if (referencesTypeItemProvider != null) referencesTypeItemProvider.dispose();
+    if (referenceTypeItemProvider != null) referenceTypeItemProvider.dispose();
+    if (serviceTypeItemProvider != null) serviceTypeItemProvider.dispose();
+    if (xmlAttributeTypeItemProvider != null) xmlAttributeTypeItemProvider.dispose();
+  }
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.v11.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DeploymentItemProviderAdapterFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message