geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r366860 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins: org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/ org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ org.apache.geron...
Date Sat, 07 Jan 2006 17:36:45 GMT
Author: sppatel
Date: Sat Jan  7 09:36:34 2006
New Revision: 366860

URL: http://svn.apache.org/viewcvs?rev=366860&view=rev
Log:
emf edit migration

Added:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DependencyTypeItemProvider.java   (with props)
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/GbeanTypeItemProvider.java   (with props)
Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DependencyTypeItemProvider.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DependencyTypeItemProvider.java?rev=366860&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DependencyTypeItemProvider.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DependencyTypeItemProvider.java Sat Jan  7 09:36:34 2006
@@ -0,0 +1,277 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.xml.ns.deployment.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.geronimo.deployment.model.edit.GeronimoEMFEditPlugin;
+import org.apache.geronimo.xml.ns.deployment.DependencyType;
+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.DependencyType} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ * 
+ * @generated NOT
+ */
+public class DependencyTypeItemProvider extends ItemProviderAdapter implements
+		IEditingDomainItemProvider, IStructuredItemContentProvider,
+		ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+		ITableItemLabelProvider {
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public static final String copyright = "";
+
+	/**
+	 * This constructs an instance from a factory and a notifier. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public DependencyTypeItemProvider(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);
+			addTypePropertyDescriptor(object);
+			addArtifactIdPropertyDescriptor(object);
+			addVersionPropertyDescriptor(object);
+			addUriPropertyDescriptor(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_DependencyType_groupId_feature"), getString(
+						"_UI_PropertyDescriptor_description",
+						"_UI_DependencyType_groupId_feature",
+						"_UI_DependencyType_type"), DeploymentPackage.eINSTANCE
+						.getDependencyType_GroupId(), true,
+				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_DependencyType_type_feature"), getString(
+						"_UI_PropertyDescriptor_description",
+						"_UI_DependencyType_type_feature",
+						"_UI_DependencyType_type"), DeploymentPackage.eINSTANCE
+						.getDependencyType_Type(), true,
+				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_DependencyType_artifactId_feature"), getString(
+						"_UI_PropertyDescriptor_description",
+						"_UI_DependencyType_artifactId_feature",
+						"_UI_DependencyType_type"), DeploymentPackage.eINSTANCE
+						.getDependencyType_ArtifactId(), true,
+				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_DependencyType_version_feature"), getString(
+						"_UI_PropertyDescriptor_description",
+						"_UI_DependencyType_version_feature",
+						"_UI_DependencyType_type"), DeploymentPackage.eINSTANCE
+						.getDependencyType_Version(), true,
+				ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Uri feature. <!-- begin-user-doc
+	 * --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addUriPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(
+				((ComposeableAdapterFactory) adapterFactory)
+						.getRootAdapterFactory(), getResourceLocator(),
+				getString("_UI_DependencyType_uri_feature"), getString(
+						"_UI_PropertyDescriptor_description",
+						"_UI_DependencyType_uri_feature",
+						"_UI_DependencyType_type"), DeploymentPackage.eINSTANCE
+						.getDependencyType_Uri(), true,
+				ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This returns DependencyType.gif. <!-- begin-user-doc --> <!--
+	 * end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public Object getImage(Object object) {
+		return getResourceLocator().getImage("full/obj16/DependencyType");
+	}
+
+	/**
+	 * This returns the label text for the adapted class. <!-- begin-user-doc
+	 * --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public String getText(Object object) {
+		String label = ((DependencyType) object).getGroupId();
+		return label == null || label.length() == 0 ? getString("_UI_DependencyType_type")
+				: getString("_UI_DependencyType_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(DependencyType.class)) {
+		case DeploymentPackage.DEPENDENCY_TYPE__GROUP_ID:
+		case DeploymentPackage.DEPENDENCY_TYPE__TYPE:
+		case DeploymentPackage.DEPENDENCY_TYPE__ARTIFACT_ID:
+		case DeploymentPackage.DEPENDENCY_TYPE__VERSION:
+		case DeploymentPackage.DEPENDENCY_TYPE__URI:
+			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;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.emf.edit.provider.ITableItemLabelProvider#getColumnText(java.lang.Object,
+	 *      int)
+	 */
+	public String getColumnText(Object object, int columnIndex) {
+		DependencyType o = (DependencyType) object;
+		switch (columnIndex) {
+		case 0:
+			if (o.eIsSet(DeploymentPackage.eINSTANCE.getDependencyType_Uri())) {
+				return o.getUri();
+			} else {
+				return o.getGroupId() + "/" + o.getArtifactId() + "-"
+						+ o.getVersion() + ".jar";
+			}
+		}
+		return "";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.emf.edit.provider.ITableItemLabelProvider#getColumnImage(java.lang.Object,
+	 *      int)
+	 */
+	public Object getColumnImage(Object object, int columnIndex) {
+		if (columnIndex == 0) {
+			return getImage(object);
+		}
+		return null;
+	}
+
+}

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

Propchange: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/DependencyTypeItemProvider.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

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

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/GbeanTypeItemProvider.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/GbeanTypeItemProvider.java?rev=366860&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/GbeanTypeItemProvider.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/GbeanTypeItemProvider.java Sat Jan  7 09:36:34 2006
@@ -0,0 +1,350 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.xml.ns.deployment.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.geronimo.deployment.model.edit.GeronimoEMFEditPlugin;
+import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
+import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+import org.apache.geronimo.xml.ns.deployment.GbeanType;
+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.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
+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.GbeanType} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ * 
+ * @generated NOT
+ */
+public class GbeanTypeItemProvider extends ItemProviderAdapter implements
+		IEditingDomainItemProvider, IStructuredItemContentProvider,
+		ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+		ITableItemLabelProvider {
+	/**
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public static final String copyright = "";
+
+	/**
+	 * This constructs an instance from a factory and a notifier. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public GbeanTypeItemProvider(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);
+
+			addClassPropertyDescriptor(object);
+			addGbeanNamePropertyDescriptor(object);
+			addNamePropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Class feature. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addClassPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(
+				((ComposeableAdapterFactory) adapterFactory)
+						.getRootAdapterFactory(), getResourceLocator(),
+				getString("_UI_GbeanType_class_feature"), getString(
+						"_UI_PropertyDescriptor_description",
+						"_UI_GbeanType_class_feature", "_UI_GbeanType_type"),
+				DeploymentPackage.eINSTANCE.getGbeanType_Class(), true,
+				ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Gbean Name feature. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addGbeanNamePropertyDescriptor(Object object) {
+		itemPropertyDescriptors
+				.add(createItemPropertyDescriptor(
+						((ComposeableAdapterFactory) adapterFactory)
+								.getRootAdapterFactory(), getResourceLocator(),
+						getString("_UI_GbeanType_gbeanName_feature"),
+						getString("_UI_PropertyDescriptor_description",
+								"_UI_GbeanType_gbeanName_feature",
+								"_UI_GbeanType_type"),
+						DeploymentPackage.eINSTANCE.getGbeanType_GbeanName(),
+						true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
+						null));
+	}
+
+	/**
+	 * This adds a property descriptor for the Name feature. <!-- begin-user-doc
+	 * --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	protected void addNamePropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add(createItemPropertyDescriptor(
+				((ComposeableAdapterFactory) adapterFactory)
+						.getRootAdapterFactory(), getResourceLocator(),
+				getString("_UI_GbeanType_name_feature"), getString(
+						"_UI_PropertyDescriptor_description",
+						"_UI_GbeanType_name_feature", "_UI_GbeanType_type"),
+				DeploymentPackage.eINSTANCE.getGbeanType_Name(), true,
+				ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+	}
+
+	/**
+	 * This specifies how to implement {@link #getChildren} and is used to
+	 * deduce an appropriate feature for an
+	 * {@link org.eclipse.emf.edit.command.AddCommand},
+	 * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+	 * {@link org.eclipse.emf.edit.command.MoveCommand} in
+	 * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public Collection getChildrenFeatures(Object object) {
+		if (childrenFeatures == null) {
+			super.getChildrenFeatures(object);
+			childrenFeatures.add(DeploymentPackage.eINSTANCE
+					.getGbeanType_Group());
+		}
+		return childrenFeatures;
+	}
+
+	/**
+	 * This returns GbeanType.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public Object getImage(Object object) {
+		return getResourceLocator().getImage("full/obj16/GbeanType");
+	}
+
+	/**
+	 * This returns the label text for the adapted class. <!-- begin-user-doc
+	 * --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public String getText(Object object) {
+		String label = ((GbeanType) object).getName();
+		return label == null || label.length() == 0 ? getString("_UI_GbeanType_type")
+				: getString("_UI_GbeanType_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(GbeanType.class)) {
+		case DeploymentPackage.GBEAN_TYPE__CLASS:
+		case DeploymentPackage.GBEAN_TYPE__GBEAN_NAME:
+		case DeploymentPackage.GBEAN_TYPE__NAME:
+			fireNotifyChanged(new ViewerNotification(notification, notification
+					.getNotifier(), false, true));
+			return;
+		case DeploymentPackage.GBEAN_TYPE__GROUP:
+			fireNotifyChanged(new ViewerNotification(notification, notification
+					.getNotifier(), true, false));
+			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);
+
+		newChildDescriptors.add(createChildParameter(
+				DeploymentPackage.eINSTANCE.getGbeanType_Group(),
+				FeatureMapUtil.createEntry(DeploymentPackage.eINSTANCE
+						.getGbeanType_Attribute(), DeploymentFactory.eINSTANCE
+						.createAttributeType())));
+
+		newChildDescriptors.add(createChildParameter(
+				DeploymentPackage.eINSTANCE.getGbeanType_Group(),
+				FeatureMapUtil.createEntry(DeploymentPackage.eINSTANCE
+						.getGbeanType_XmlAttribute(),
+						DeploymentFactory.eINSTANCE.createXmlAttributeType())));
+
+		newChildDescriptors.add(createChildParameter(
+				DeploymentPackage.eINSTANCE.getGbeanType_Group(),
+				FeatureMapUtil.createEntry(DeploymentPackage.eINSTANCE
+						.getGbeanType_Reference(), DeploymentFactory.eINSTANCE
+						.createReferenceType())));
+
+		newChildDescriptors.add(createChildParameter(
+				DeploymentPackage.eINSTANCE.getGbeanType_Group(),
+				FeatureMapUtil.createEntry(DeploymentPackage.eINSTANCE
+						.getGbeanType_References(), DeploymentFactory.eINSTANCE
+						.createReferencesType())));
+
+		newChildDescriptors.add(createChildParameter(
+				DeploymentPackage.eINSTANCE.getGbeanType_Group(),
+				FeatureMapUtil.createEntry(DeploymentPackage.eINSTANCE
+						.getGbeanType_XmlReference(),
+						DeploymentFactory.eINSTANCE.createXmlAttributeType())));
+
+		newChildDescriptors.add(createChildParameter(
+				DeploymentPackage.eINSTANCE.getGbeanType_Group(),
+				FeatureMapUtil.createEntry(DeploymentPackage.eINSTANCE
+						.getGbeanType_Dependency(), DeploymentFactory.eINSTANCE
+						.createPatternType())));
+
+		newChildDescriptors.add(createChildParameter(
+				DeploymentPackage.eINSTANCE.getGbeanType_Group(),
+				FeatureMapUtil.createEntry(DeploymentPackage.eINSTANCE
+						.getGbeanType_Dependency(), DeploymentFactory.eINSTANCE
+						.createReferenceType())));
+	}
+
+	/**
+	 * This returns the label text for
+	 * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public String getCreateChildText(Object owner, Object feature,
+			Object child, Collection selection) {
+		Object childFeature = feature;
+		Object childObject = child;
+
+		if (childFeature instanceof EStructuralFeature
+				&& FeatureMapUtil
+						.isFeatureMap((EStructuralFeature) childFeature)) {
+			FeatureMap.Entry entry = (FeatureMap.Entry) childObject;
+			childFeature = entry.getEStructuralFeature();
+			childObject = entry.getValue();
+		}
+
+		boolean qualify = childFeature == DeploymentPackage.eINSTANCE
+				.getGbeanType_XmlAttribute()
+				|| childFeature == DeploymentPackage.eINSTANCE
+						.getGbeanType_XmlReference()
+				|| childFeature == DeploymentPackage.eINSTANCE
+						.getGbeanType_Reference()
+				|| childFeature == DeploymentPackage.eINSTANCE
+						.getGbeanType_Dependency();
+
+		if (qualify) {
+			return getString("_UI_CreateChild_text2", new Object[] {
+					getTypeText(childObject), getFeatureText(childFeature),
+					getTypeText(owner) });
+		}
+		return super.getCreateChildText(owner, feature, child, selection);
+	}
+
+	/**
+	 * Return the resource locator for this item provider's resources. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
+	 * @generated
+	 */
+	public ResourceLocator getResourceLocator() {
+		return GeronimoEMFEditPlugin.INSTANCE;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.emf.edit.provider.ITableItemLabelProvider#getColumnText(java.lang.Object,
+	 *      int)
+	 */
+	public String getColumnText(Object object, int columnIndex) {
+		GbeanType o = (GbeanType) object;
+		switch (columnIndex) {
+		case 0:
+			if (o.eIsSet(DeploymentPackage.eINSTANCE.getGbeanType_Name())) {
+				return o.getName();
+			} 
+			break;
+		case 1:
+			if (o.eIsSet(DeploymentPackage.eINSTANCE.getGbeanType_GbeanName())) {
+				return o.getGbeanName();
+			} 
+			break;
+		case 2:
+			if (o.eIsSet(DeploymentPackage.eINSTANCE.getGbeanType_Class())) {
+				return o.getClass_();
+			} 
+			break;
+		}
+		return "";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.emf.edit.provider.ITableItemLabelProvider#getColumnImage(java.lang.Object,
+	 *      int)
+	 */
+	public Object getColumnImage(Object object, int columnIndex) {
+		if (columnIndex == 0) {
+			return getImage(object);
+		}
+		return null;
+	}
+
+}

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

Propchange: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/deployment/provider/GbeanTypeItemProvider.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

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

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java?rev=366860&r1=366859&r2=366860&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java Sat Jan  7 09:36:34 2006
@@ -15,6 +15,7 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
@@ -22,6 +23,8 @@
 import org.apache.geronimo.ui.wizards.GBeanWizard;
 import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
 import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+import org.apache.geronimo.xml.ns.deployment.provider.DeploymentItemProviderAdapterFactory;
+import org.apache.geronimo.xml.ns.j2ee.web.provider.WebItemProviderAdapterFactory;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
@@ -116,7 +119,10 @@
     }
     
     public List getFactories() {
-    	return Collections.EMPTY_LIST;
+    	List factories = new ArrayList();
+		factories.add(new WebItemProviderAdapterFactory());
+		factories.add(new DeploymentItemProviderAdapterFactory());
+		return factories;
     }
 
 	public EClass getTableEntryObjectType() {

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java?rev=366860&r1=366859&r2=366860&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java Sat Jan  7 09:36:34 2006
@@ -18,9 +18,7 @@
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.sections.DynamicTableSection;
 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.eclipse.emf.common.util.EList;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
@@ -32,297 +30,267 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 
 public class DependencyWizard extends DynamicAddEditWizard {
 
-    public static String wizardNewTitle_Dependency;
+	public static String wizardNewTitle_Dependency;
 
-    public static String wizardEditTitle_Dependency;
+	public static String wizardEditTitle_Dependency;
 
-    public static String wizardPageTitle_Dependency;
+	public static String wizardPageTitle_Dependency;
 
-    public static String wizardPageDescription_Dependency;
+	public static String wizardPageDescription_Dependency;
 
-    protected Button uriButton;
-
-    protected Button mavenButton;
-
-    protected Label uriLabel;
-
-    protected Label groupIdLabel;
-
-    protected Label artifactIdLabel;
-
-    protected Label versionLabel;
-
-    protected Text uriText;
-
-    protected Text groupIdText;
-
-    protected Text artifactIdText;
-
-    protected Text versionText;
-
-    /**
-     * @param section
-     */
-    public DependencyWizard(DynamicTableSection section) {
-        super(section);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getAddWizardWindowTitle()
-     */
-    public String getAddWizardWindowTitle() {
-        return Messages.wizardNewTitle_Dependency;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getEditWizardWindowTitle()
-     */
-    public String getEditWizardWindowTitle() {
-        return Messages.wizardEditTitle_Dependency;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getWizardFirstPageTitle()
-     */
-    public String getWizardFirstPageTitle() {
-        return Messages.wizardPageTitle_Dependency;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getWizardFirstPageDescription()
-     */
-    public String getWizardFirstPageDescription() {
-        return Messages.wizardPageDescription_Dependency;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.jface.wizard.IWizard#performFinish()
-     */
-    public boolean performFinish() {
-
-        boolean isNew = false;
-
-        if (eObject == null) {
-            eObject = DeploymentFactory.eINSTANCE.createDependencyType();
-            ((EList) section.getPlan().eGet(section.getEReference()))
-                    .add(eObject);
-            isNew = true;
-        }
-
-        DependencyType dt = (DependencyType) eObject;
-
-        if (uriButton.getSelection()) {
-            dt.setUri(uriText.getText());
-            dt.eUnset(DeploymentPackage.eINSTANCE
-                    .getDependencyType_ArtifactId());
-            dt.eUnset(DeploymentPackage.eINSTANCE.getDependencyType_GroupId());
-            dt.eUnset(DeploymentPackage.eINSTANCE.getDependencyType_Version());
-        } else {
-            dt.setArtifactId(artifactIdText.getText());
-            dt.setGroupId(groupIdText.getText());
-            dt.setVersion(versionText.getText());
-            dt.eUnset(DeploymentPackage.eINSTANCE.getDependencyType_Uri());
-        }
-
-        /*String[] tableText = section.getTableText(eObject);
-
-        if (isNew) {
-            TableItem item = new TableItem(section.getTableViewer().getTable(),
-                    SWT.NONE);
-            item.setImage(section.getImage());
-            item.setData(eObject);
-            item.setText(tableText);
-        } else {
-            int index = section.getTableViewer().getTable().getSelectionIndex();
-            if (index != -1) {
-                TableItem item = section.getTableViewer().getTable().getItem(
-                        index);
-                item.setText(tableText);
-            }
-        }*/
-
-        return true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.jface.wizard.IWizard#addPages()
-     */
-    public void addPages() {
-        WizardPage page = new DependencyWizardPage("Page0");
-        addPage(page);
-    }
-
-    public class DependencyWizardPage extends WizardPage {
-
-        Text[] textEntries = new Text[section.getTableColumnEAttributes().length];
-
-        public DependencyWizardPage(String pageName) {
-            super(pageName);
-            setTitle(getWizardFirstPageTitle());
-            setDescription(getWizardFirstPageDescription());
-        }
-
-        public DependencyWizardPage(String pageName, String title,
-                ImageDescriptor titleImage) {
-            super(pageName, title, titleImage);
-        }
-
-        public void createControl(Composite parent) {
-            Composite composite = new Composite(parent, SWT.NULL);
-
-            GridLayout layout = new GridLayout();
-            layout.numColumns = 2;
-            layout.horizontalSpacing = 15;
-            composite.setLayout(layout);
-            composite
-                    .setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
-            GridData data = new GridData();
-            data = new GridData(GridData.FILL_HORIZONTAL);
-            data.horizontalSpan = 2;
-
-            Group group = new Group(composite, SWT.NONE);
-            group.setText(Messages.dependencyGroupLabel);
-            group.setLayoutData(data);
-            group.setLayout(layout);
-
-            uriButton = new Button(group, SWT.LEFT | SWT.RADIO);
-            uriButton.setText(Messages.serverRepos);
-            uriButton.setLayoutData(data);
-
-            uriLabel = new Label(group, SWT.LEFT);
-            uriLabel.setText(Messages.uri);
-            uriLabel.setLayoutData(createLabelGridData());
-
-            uriText = new Text(group, SWT.SINGLE | SWT.BORDER);
-            uriText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-            mavenButton = new Button(group, SWT.LEFT | SWT.RADIO);
-            mavenButton.setText(Messages.mavenArtifact);
-            mavenButton.setLayoutData(data);
-
-            groupIdLabel = new Label(group, SWT.LEFT);
-            groupIdLabel.setText(Messages.groupId);
-            groupIdLabel.setLayoutData(createLabelGridData());
-
-            groupIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
-            groupIdText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-            artifactIdLabel = new Label(group, SWT.LEFT);
-            artifactIdLabel.setText(Messages.artifactId);
-            artifactIdLabel.setLayoutData(createLabelGridData());
-
-            artifactIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
-            artifactIdText
-                    .setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-            versionLabel = new Label(group, SWT.LEFT);
-            versionLabel.setText(Messages.version);
-            versionLabel.setLayoutData(createLabelGridData());
-
-            versionText = new Text(group, SWT.SINGLE | SWT.BORDER);
-            versionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-            uriButton.addSelectionListener(new SelectionAdapter() {
-                public void widgetSelected(SelectionEvent e) {
-                    if (uriButton.getSelection()) {
-                        toggle();
-                    }
-                }
-            });
-
-            mavenButton.addSelectionListener(new SelectionAdapter() {
-                public void widgetSelected(SelectionEvent e) {
-                    if (mavenButton.getSelection()) {
-                        toggle();
-                    }
-                }
-            });
-
-            if (eObject != null) {
-                if (eObject.eIsSet(DeploymentPackage.eINSTANCE
-                        .getDependencyType_Uri())) {
-                    uriButton.setSelection(true);
-                    uriText.setText(eObject
-                            .eGet(
-                                    DeploymentPackage.eINSTANCE
-                                            .getDependencyType_Uri())
-                            .toString());
-                } else {
-                    mavenButton.setSelection(true);
-                    if (eObject.eIsSet(DeploymentPackage.eINSTANCE
-                            .getDependencyType_ArtifactId())) {
-                        artifactIdText.setText(eObject.eGet(
-                                DeploymentPackage.eINSTANCE
-                                        .getDependencyType_ArtifactId())
-                                .toString());
-                    }
-                    if (eObject.eIsSet(DeploymentPackage.eINSTANCE
-                            .getDependencyType_GroupId())) {
-                        groupIdText.setText(eObject.eGet(
-                                DeploymentPackage.eINSTANCE
-                                        .getDependencyType_GroupId())
-                                .toString());
-                    }
-                    if (eObject.eIsSet(DeploymentPackage.eINSTANCE
-                            .getDependencyType_Version())) {
-                        versionText.setText(eObject.eGet(
-                                DeploymentPackage.eINSTANCE
-                                        .getDependencyType_Version())
-                                .toString());
-                    }
-                }
-            } else {
-                uriButton.setSelection(true);
-                uriLabel.setEnabled(true);
-                uriText.setEnabled(true);
-
-                mavenButton.setSelection(false);
-                groupIdLabel.setEnabled(false);
-                groupIdText.setEnabled(false);
-                artifactIdLabel.setEnabled(false);
-                artifactIdText.setEnabled(false);
-                versionLabel.setEnabled(false);
-                versionText.setEnabled(false);
-            }
-
-            setControl(composite);
-
-        }
-    }
-
-    public GridData createLabelGridData() {
-        GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-        gd.horizontalIndent = 20;
-        return gd;
-    }
-
-    public void toggle() {
-        uriLabel.setEnabled(!uriLabel.isEnabled());
-        groupIdLabel.setEnabled(!groupIdLabel.isEnabled());
-        artifactIdLabel.setEnabled(!artifactIdLabel.isEnabled());
-        versionLabel.setEnabled(!versionLabel.isEnabled());
-        uriText.setEnabled(!uriText.isEnabled());
-        groupIdText.setEnabled(!groupIdText.isEnabled());
-        artifactIdText.setEnabled(!artifactIdText.isEnabled());
-        versionText.setEnabled(!versionText.isEnabled());
-    }
+	protected Button uriButton;
+
+	protected Button mavenButton;
+
+	protected Label uriLabel;
+
+	protected Label groupIdLabel;
+
+	protected Label artifactIdLabel;
+
+	protected Label versionLabel;
+
+	protected Text uriText;
+
+	protected Text groupIdText;
+
+	protected Text artifactIdText;
+
+	protected Text versionText;
+
+	/**
+	 * @param section
+	 */
+	public DependencyWizard(DynamicTableSection section) {
+		super(section);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getAddWizardWindowTitle()
+	 */
+	public String getAddWizardWindowTitle() {
+		return Messages.wizardNewTitle_Dependency;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getEditWizardWindowTitle()
+	 */
+	public String getEditWizardWindowTitle() {
+		return Messages.wizardEditTitle_Dependency;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getWizardFirstPageTitle()
+	 */
+	public String getWizardFirstPageTitle() {
+		return Messages.wizardPageTitle_Dependency;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getWizardFirstPageDescription()
+	 */
+	public String getWizardFirstPageDescription() {
+		return Messages.wizardPageDescription_Dependency;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#processEAttributes(org.apache.geronimo.ui.wizards.DynamicAddEditWizard.DynamicWizardPage)
+	 */
+	public void processEAttributes(DynamicWizardPage page) {
+		DependencyType dt = (DependencyType) eObject;
+
+		if (uriButton.getSelection()) {
+			dt.setUri(uriText.getText());
+			dt.eUnset(DeploymentPackage.eINSTANCE
+					.getDependencyType_ArtifactId());
+			dt.eUnset(DeploymentPackage.eINSTANCE.getDependencyType_GroupId());
+			dt.eUnset(DeploymentPackage.eINSTANCE.getDependencyType_Version());
+		} else {
+			dt.setArtifactId(artifactIdText.getText());
+			dt.setGroupId(groupIdText.getText());
+			dt.setVersion(versionText.getText());
+			dt.eUnset(DeploymentPackage.eINSTANCE.getDependencyType_Uri());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.wizard.IWizard#addPages()
+	 */
+	public void addPages() {
+		WizardPage page = new DependencyWizardPage("Page0");
+		addPage(page);
+	}
+
+	public class DependencyWizardPage extends WizardPage {
+
+		Text[] textEntries = new Text[section.getTableColumnEAttributes().length];
+
+		public DependencyWizardPage(String pageName) {
+			super(pageName);
+			setTitle(getWizardFirstPageTitle());
+			setDescription(getWizardFirstPageDescription());
+		}
+
+		public DependencyWizardPage(String pageName, String title,
+				ImageDescriptor titleImage) {
+			super(pageName, title, titleImage);
+		}
+
+		public void createControl(Composite parent) {
+			Composite composite = new Composite(parent, SWT.NULL);
+
+			GridLayout layout = new GridLayout();
+			layout.numColumns = 2;
+			layout.horizontalSpacing = 15;
+			composite.setLayout(layout);
+			composite
+					.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+
+			GridData data = new GridData();
+			data = new GridData(GridData.FILL_HORIZONTAL);
+			data.horizontalSpan = 2;
+
+			Group group = new Group(composite, SWT.NONE);
+			group.setText(Messages.dependencyGroupLabel);
+			group.setLayoutData(data);
+			group.setLayout(layout);
+
+			uriButton = new Button(group, SWT.LEFT | SWT.RADIO);
+			uriButton.setText(Messages.serverRepos);
+			uriButton.setLayoutData(data);
+
+			uriLabel = new Label(group, SWT.LEFT);
+			uriLabel.setText(Messages.uri);
+			uriLabel.setLayoutData(createLabelGridData());
+
+			uriText = new Text(group, SWT.SINGLE | SWT.BORDER);
+			uriText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+			mavenButton = new Button(group, SWT.LEFT | SWT.RADIO);
+			mavenButton.setText(Messages.mavenArtifact);
+			mavenButton.setLayoutData(data);
+
+			groupIdLabel = new Label(group, SWT.LEFT);
+			groupIdLabel.setText(Messages.groupId);
+			groupIdLabel.setLayoutData(createLabelGridData());
+
+			groupIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
+			groupIdText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+			artifactIdLabel = new Label(group, SWT.LEFT);
+			artifactIdLabel.setText(Messages.artifactId);
+			artifactIdLabel.setLayoutData(createLabelGridData());
+
+			artifactIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
+			artifactIdText
+					.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+			versionLabel = new Label(group, SWT.LEFT);
+			versionLabel.setText(Messages.version);
+			versionLabel.setLayoutData(createLabelGridData());
+
+			versionText = new Text(group, SWT.SINGLE | SWT.BORDER);
+			versionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+			uriButton.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					if (uriButton.getSelection()) {
+						toggle();
+					}
+				}
+			});
+
+			mavenButton.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					if (mavenButton.getSelection()) {
+						toggle();
+					}
+				}
+			});
+
+			if (eObject != null) {
+				if (eObject.eIsSet(DeploymentPackage.eINSTANCE
+						.getDependencyType_Uri())) {
+					uriButton.setSelection(true);
+					uriText.setText(eObject
+							.eGet(
+									DeploymentPackage.eINSTANCE
+											.getDependencyType_Uri())
+							.toString());
+				} else {
+					mavenButton.setSelection(true);
+					if (eObject.eIsSet(DeploymentPackage.eINSTANCE
+							.getDependencyType_ArtifactId())) {
+						artifactIdText.setText(eObject.eGet(
+								DeploymentPackage.eINSTANCE
+										.getDependencyType_ArtifactId())
+								.toString());
+					}
+					if (eObject.eIsSet(DeploymentPackage.eINSTANCE
+							.getDependencyType_GroupId())) {
+						groupIdText.setText(eObject.eGet(
+								DeploymentPackage.eINSTANCE
+										.getDependencyType_GroupId())
+								.toString());
+					}
+					if (eObject.eIsSet(DeploymentPackage.eINSTANCE
+							.getDependencyType_Version())) {
+						versionText.setText(eObject.eGet(
+								DeploymentPackage.eINSTANCE
+										.getDependencyType_Version())
+								.toString());
+					}
+				}
+			} else {
+				uriButton.setSelection(true);
+				uriLabel.setEnabled(true);
+				uriText.setEnabled(true);
+
+				mavenButton.setSelection(false);
+				groupIdLabel.setEnabled(false);
+				groupIdText.setEnabled(false);
+				artifactIdLabel.setEnabled(false);
+				artifactIdText.setEnabled(false);
+				versionLabel.setEnabled(false);
+				versionText.setEnabled(false);
+			}
+
+			setControl(composite);
+
+		}
+	}
+
+	public GridData createLabelGridData() {
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		gd.horizontalIndent = 20;
+		return gd;
+	}
+
+	public void toggle() {
+		uriLabel.setEnabled(!uriLabel.isEnabled());
+		groupIdLabel.setEnabled(!groupIdLabel.isEnabled());
+		artifactIdLabel.setEnabled(!artifactIdLabel.isEnabled());
+		versionLabel.setEnabled(!versionLabel.isEnabled());
+		uriText.setEnabled(!uriText.isEnabled());
+		groupIdText.setEnabled(!groupIdText.isEnabled());
+		artifactIdText.setEnabled(!artifactIdText.isEnabled());
+		versionText.setEnabled(!versionText.isEnabled());
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java?rev=366860&r1=366859&r2=366860&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java Sat Jan  7 09:36:34 2006
@@ -28,7 +28,6 @@
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 
 public abstract class DynamicAddEditWizard extends Wizard {
@@ -77,8 +76,6 @@
     public boolean performFinish() {
         DynamicWizardPage page = (DynamicWizardPage) getPages()[0];
 
-        boolean isNew = false;
-
         if (eObject == null) {
             eObject = section.getEFactory().create(
                     section.getTableColumnEAttributes()[0]
@@ -86,27 +83,9 @@
             EObject plan = section.getPlan();           
             
             ((EList) plan.eGet(section.getEReference())).add(eObject);
-            isNew = true;
         }
         
         processEAttributes(page);
-
-        /*String[] tableText = section.getTableText(eObject);
-
-        if (isNew) {
-            TableItem item = new TableItem(section.getTableViewer().getTable(),
-                    SWT.NONE);
-            item.setImage(section.getImage());
-            item.setData(eObject);
-            item.setText(tableText);
-        } else {
-            int index = section.getTableViewer().getTable().getSelectionIndex();
-            if (index != -1) {
-                TableItem item = section.getTableViewer().getTable().getItem(
-                        index);
-                item.setText(tableText);
-            }
-        }*/
 
         return true;
     }



Mime
View raw message