Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2005-12-20 09:10:13 +0000
committerdstadnik2005-12-20 09:10:13 +0000
commit5f813553b04fd44d1a4a94c903b373629c2c06c8 (patch)
treeb62ed3d03051e0978594346d224f59747398fdf4 /examples/org.eclipse.gmf.examples.taipan.edit
parentd2fb731be0deed045598e9b459a6d40e3f27b97d (diff)
downloadorg.eclipse.gmf-tooling-5f813553b04fd44d1a4a94c903b373629c2c06c8.tar.gz
org.eclipse.gmf-tooling-5f813553b04fd44d1a4a94c903b373629c2c06c8.tar.xz
org.eclipse.gmf-tooling-5f813553b04fd44d1a4a94c903b373629c2c06c8.zip
add type-based link (Route)
Diffstat (limited to 'examples/org.eclipse.gmf.examples.taipan.edit')
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_routes_Route.gifbin0 -> 223 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Route.gifbin0 -> 129 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/plugin.properties6
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/AquatoryItemProvider.java14
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java15
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java9
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/RouteItemProvider.java185
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ShipItemProvider.java18
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanItemProviderAdapterFactory.java27
9 files changed, 256 insertions, 18 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_routes_Route.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_routes_Route.gif
new file mode 100644
index 000000000..2efcaf5d9
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_routes_Route.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Route.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Route.gif
new file mode 100644
index 000000000..83afb9b3c
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Route.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/plugin.properties b/examples/org.eclipse.gmf.examples.taipan.edit/plugin.properties
index 7e0a938f1..a462f3dff 100644
--- a/examples/org.eclipse.gmf.examples.taipan.edit/plugin.properties
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/plugin.properties
@@ -45,3 +45,9 @@ _UI_Item_article_feature = Article
_UI_Item_quantity_feature = Quantity
_UI_Unknown_feature = Unspecified
+_UI_Route_type = Route
+_UI_Route_source_feature = Source
+_UI_Route_destination_feature = Destination
+_UI_Route_description_feature = Description
+_UI_Route_reliability_feature = Reliability
+_UI_Aquatory_routes_feature = Routes
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/AquatoryItemProvider.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/AquatoryItemProvider.java
index b1440a39d..96bb040d8 100644
--- a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/AquatoryItemProvider.java
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/AquatoryItemProvider.java
@@ -39,7 +39,8 @@ import org.eclipse.gmf.examples.taipan.TaiPanPackage;
* <!-- end-user-doc -->
* @generated
*/
-public class AquatoryItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+public class AquatoryItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
@@ -78,6 +79,7 @@ public class AquatoryItemProvider extends ItemProviderAdapter implements IEditin
super.getChildrenFeatures(object);
childrenFeatures.add(TaiPanPackage.eINSTANCE.getAquatory_Ports());
childrenFeatures.add(TaiPanPackage.eINSTANCE.getAquatory_Ships());
+ childrenFeatures.add(TaiPanPackage.eINSTANCE.getAquatory_Routes());
}
return childrenFeatures;
}
@@ -127,6 +129,7 @@ public class AquatoryItemProvider extends ItemProviderAdapter implements IEditin
switch (notification.getFeatureID(Aquatory.class)) {
case TaiPanPackage.AQUATORY__PORTS:
case TaiPanPackage.AQUATORY__SHIPS:
+ case TaiPanPackage.AQUATORY__ROUTES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -143,9 +146,14 @@ public class AquatoryItemProvider extends ItemProviderAdapter implements IEditin
protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getAquatory_Ports(), TaiPanFactory.eINSTANCE.createPort()));
+ newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getAquatory_Ports(), TaiPanFactory.eINSTANCE
+ .createPort()));
- newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getAquatory_Ships(), TaiPanFactory.eINSTANCE.createShip()));
+ newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getAquatory_Ships(), TaiPanFactory.eINSTANCE
+ .createShip()));
+
+ newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getAquatory_Routes(), TaiPanFactory.eINSTANCE
+ .createRoute()));
}
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java
index 65ac060c0..869857d89 100644
--- a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java
@@ -38,7 +38,8 @@ import org.eclipse.gmf.examples.taipan.TaiPanPackage;
* <!-- end-user-doc -->
* @generated
*/
-public class ItemItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+public class ItemItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
@@ -73,8 +74,10 @@ public class ItemItemProvider extends ItemProviderAdapter implements IEditingDom
* @generated
*/
protected void addArticlePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Item_article_feature"), getString("_UI_PropertyDescriptor_description",
- "_UI_Item_article_feature", "_UI_Item_type"), TaiPanPackage.eINSTANCE.getItem_Article(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Item_article_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Item_article_feature", "_UI_Item_type"), TaiPanPackage.eINSTANCE
+ .getItem_Article(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
@@ -84,8 +87,10 @@ public class ItemItemProvider extends ItemProviderAdapter implements IEditingDom
* @generated
*/
protected void addQuantityPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Item_quantity_feature"), getString("_UI_PropertyDescriptor_description",
- "_UI_Item_quantity_feature", "_UI_Item_type"), TaiPanPackage.eINSTANCE.getItem_Quantity(), true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Item_quantity_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Item_quantity_feature", "_UI_Item_type"), TaiPanPackage.eINSTANCE
+ .getItem_Quantity(), true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java
index 009c2be5f..df43bbb83 100644
--- a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java
@@ -38,7 +38,8 @@ import org.eclipse.gmf.examples.taipan.TaiPanPackage;
* <!-- end-user-doc -->
* @generated
*/
-public class PortItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+public class PortItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
@@ -72,8 +73,10 @@ public class PortItemProvider extends ItemProviderAdapter implements IEditingDom
* @generated
*/
protected void addLocationPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Port_location_feature"), getString("_UI_PropertyDescriptor_description",
- "_UI_Port_location_feature", "_UI_Port_type"), TaiPanPackage.eINSTANCE.getPort_Location(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Port_location_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Port_location_feature", "_UI_Port_type"), TaiPanPackage.eINSTANCE
+ .getPort_Location(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/RouteItemProvider.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/RouteItemProvider.java
new file mode 100644
index 000000000..b322be10f
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/RouteItemProvider.java
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitri Stadnik (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.examples.taipan.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+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.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.examples.taipan.Route;
+import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.examples.taipan.Route} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RouteItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RouteItemProvider(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);
+
+ addSourcePropertyDescriptor(object);
+ addDestinationPropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
+ addReliabilityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Source feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSourcePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Route_source_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Route_source_feature", "_UI_Route_type"), TaiPanPackage.eINSTANCE
+ .getRoute_Source(), true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Destination feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDestinationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Route_destination_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Route_destination_feature", "_UI_Route_type"),
+ TaiPanPackage.eINSTANCE.getRoute_Destination(), true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Description feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDescriptionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Route_description_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Route_description_feature", "_UI_Route_type"),
+ TaiPanPackage.eINSTANCE.getRoute_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Reliability feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addReliabilityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Route_reliability_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Route_reliability_feature", "_UI_Route_type"),
+ TaiPanPackage.eINSTANCE.getRoute_Reliability(), true, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns Route.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/Route");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((Route) object).getDescription();
+ return label == null || label.length() == 0 ? getString("_UI_Route_type") : getString("_UI_Route_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(Route.class)) {
+ case TaiPanPackage.ROUTE__DESCRIPTION:
+ case TaiPanPackage.ROUTE__RELIABILITY:
+ 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 TaiPanEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ShipItemProvider.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ShipItemProvider.java
index 7431f2f2a..672ee024d 100644
--- a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ShipItemProvider.java
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ShipItemProvider.java
@@ -39,7 +39,8 @@ import org.eclipse.gmf.examples.taipan.TaiPanPackage;
* <!-- end-user-doc -->
* @generated
*/
-public class ShipItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+public class ShipItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
@@ -74,8 +75,10 @@ public class ShipItemProvider extends ItemProviderAdapter implements IEditingDom
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ship_name_feature"), getString("_UI_PropertyDescriptor_description",
- "_UI_Ship_name_feature", "_UI_Ship_type"), TaiPanPackage.eINSTANCE.getShip_Name(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ship_name_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Ship_name_feature", "_UI_Ship_type"), TaiPanPackage.eINSTANCE
+ .getShip_Name(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
@@ -85,8 +88,10 @@ public class ShipItemProvider extends ItemProviderAdapter implements IEditingDom
* @generated
*/
protected void addDestinationPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ship_destination_feature"), getString("_UI_PropertyDescriptor_description",
- "_UI_Ship_destination_feature", "_UI_Ship_type"), TaiPanPackage.eINSTANCE.getShip_Destination(), true, null, null, null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ship_destination_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_Ship_destination_feature", "_UI_Ship_type"), TaiPanPackage.eINSTANCE
+ .getShip_Destination(), true, null, null, null));
}
/**
@@ -157,7 +162,8 @@ public class ShipItemProvider extends ItemProviderAdapter implements IEditingDom
protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getShip_Cargo(), TaiPanFactory.eINSTANCE.createItem()));
+ newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getShip_Cargo(), TaiPanFactory.eINSTANCE
+ .createItem()));
}
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanItemProviderAdapterFactory.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanItemProviderAdapterFactory.java
index a57d4b358..aa8d2ad23 100644
--- a/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanItemProviderAdapterFactory.java
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanItemProviderAdapterFactory.java
@@ -41,7 +41,8 @@ import org.eclipse.gmf.examples.taipan.util.TaiPanAdapterFactory;
* <!-- end-user-doc -->
* @generated
*/
-public class TaiPanItemProviderAdapterFactory extends TaiPanAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+public class TaiPanItemProviderAdapterFactory extends TaiPanAdapterFactory implements ComposeableAdapterFactory,
+ IChangeNotifier, IDisposable {
/**
* This keeps track of the root adapter factory that delegates to this adapter factory.
@@ -170,6 +171,28 @@ public class TaiPanItemProviderAdapterFactory extends TaiPanAdapterFactory imple
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.taipan.Route} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RouteItemProvider routeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.examples.taipan.Route}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createRouteAdapter() {
+ if (routeItemProvider == null) {
+ routeItemProvider = new RouteItemProvider(this);
+ }
+
+ return routeItemProvider;
+ }
+
+ /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -273,6 +296,8 @@ public class TaiPanItemProviderAdapterFactory extends TaiPanAdapterFactory imple
shipItemProvider.dispose();
if (itemItemProvider != null)
itemItemProvider.dispose();
+ if (routeItemProvider != null)
+ routeItemProvider.dispose();
}
}

Back to the top