Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2005-11-10 14:44:55 +0000
committerdstadnik2005-11-10 14:44:55 +0000
commite786483cf14049ac8fd5091cf475f3c4784730ae (patch)
tree98c6e9a96ee83e7375b0c7c6aac3f370f544ac7e /examples/org.eclipse.gmf.examples.taipan.edit
parentcf662bf94cbe5410d5c3b8d9a0c7da878cde0749 (diff)
downloadorg.eclipse.gmf-tooling-e786483cf14049ac8fd5091cf475f3c4784730ae.tar.gz
org.eclipse.gmf-tooling-e786483cf14049ac8fd5091cf475f3c4784730ae.tar.xz
org.eclipse.gmf-tooling-e786483cf14049ac8fd5091cf475f3c4784730ae.zip
#115612 provide simple set of models to demonstrate gmf usage
Diffstat (limited to 'examples/org.eclipse.gmf.examples.taipan.edit')
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/.classpath7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/.cvsignore1
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/.project28
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/META-INF/MANIFEST.MF14
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/build.properties13
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ports_Port.gifbin0 -> 223 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ships_Ship.gifbin0 -> 223 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateShip_cargo_Item.gifbin0 -> 223 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Aquatory.gifbin0 -> 129 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Item.gifbin0 -> 129 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Port.gifbin0 -> 129 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Ship.gifbin0 -> 129 bytes
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/plugin.properties47
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/plugin.xml26
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/AquatoryItemProvider.java161
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java152
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java139
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ShipItemProvider.java173
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanEditPlugin.java97
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanItemProviderAdapterFactory.java278
20 files changed, 1136 insertions, 0 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/.classpath b/examples/org.eclipse.gmf.examples.taipan.edit/.classpath
new file mode 100644
index 000000000..751c8f2e5
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/.cvsignore b/examples/org.eclipse.gmf.examples.taipan.edit/.cvsignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/.project b/examples/org.eclipse.gmf.examples.taipan.edit/.project
new file mode 100644
index 000000000..054bac333
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmf.examples.taipan.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/META-INF/MANIFEST.MF b/examples/org.eclipse.gmf.examples.taipan.edit/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..1a520a2bc
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.gmf.examples.taipan.edit; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.gmf.examples.taipan.provider.TaiPanEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.gmf.examples.taipan.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.gmf.examples.taipan;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport
+Eclipse-LazyStart: true
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/build.properties b/examples/org.eclipse.gmf.examples.taipan.edit/build.properties
new file mode 100644
index 000000000..85b80b2c9
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/build.properties
@@ -0,0 +1,13 @@
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/ \ No newline at end of file
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ports_Port.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ports_Port.gif
new file mode 100644
index 000000000..3070b3d0c
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ports_Port.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ships_Ship.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ships_Ship.gif
new file mode 100644
index 000000000..18da82fce
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateAquatory_ships_Ship.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateShip_cargo_Item.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateShip_cargo_Item.gif
new file mode 100644
index 000000000..a815b62ad
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/ctool16/CreateShip_cargo_Item.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Aquatory.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Aquatory.gif
new file mode 100644
index 000000000..e4b530eca
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Aquatory.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Item.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Item.gif
new file mode 100644
index 000000000..1e5345fb3
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Item.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Port.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Port.gif
new file mode 100644
index 000000000..e4b530eca
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Port.gif
Binary files differ
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Ship.gif b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Ship.gif
new file mode 100644
index 000000000..33a997a16
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/icons/full/obj16/Ship.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
new file mode 100644
index 000000000..ec4eef284
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/plugin.properties
@@ -0,0 +1,47 @@
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = TaiPan Edit Support
+providerName = www.example.org
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Aquatory_type = Aquatory
+_UI_Port_type = Port
+_UI_Ship_type = Ship
+_UI_Item_type = Item
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Aquatory_ports_feature = Ports
+_UI_Aquatory_ships_feature = Ships
+_UI_Port_location_feature = Location
+_UI_Ship_name_feature = Name
+_UI_Ship_destination_feature = Destination
+_UI_Ship_cargo_feature = Cargo
+_UI_Item_article_feature = Article
+_UI_Item_quantity_feature = Quantity
+_UI_Unknown_feature = Unspecified
+
diff --git a/examples/org.eclipse.gmf.examples.taipan.edit/plugin.xml b/examples/org.eclipse.gmf.examples.taipan.edit/plugin.xml
new file mode 100644
index 000000000..8bcd47f6b
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri = "http://www.eclipse.org/examples/gmf/taipan"
+ class = "org.eclipse.gmf.examples.taipan.provider.TaiPanItemProviderAdapterFactory"
+ supportedTypes =
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource" />
+ </extension>
+
+</plugin>
+
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
new file mode 100644
index 000000000..b1440a39d
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/AquatoryItemProvider.java
@@ -0,0 +1,161 @@
+/*
+ * 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.ecore.EStructuralFeature;
+
+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.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.examples.taipan.Aquatory;
+import org.eclipse.gmf.examples.taipan.TaiPanFactory;
+import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.examples.taipan.Aquatory} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AquatoryItemProvider 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 AquatoryItemProvider(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);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * 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(TaiPanPackage.eINSTANCE.getAquatory_Ports());
+ childrenFeatures.add(TaiPanPackage.eINSTANCE.getAquatory_Ships());
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Aquatory.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/Aquatory");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ return getString("_UI_Aquatory_type");
+ }
+
+ /**
+ * 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(Aquatory.class)) {
+ case TaiPanPackage.AQUATORY__PORTS:
+ case TaiPanPackage.AQUATORY__SHIPS:
+ 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(TaiPanPackage.eINSTANCE.getAquatory_Ports(), TaiPanFactory.eINSTANCE.createPort()));
+
+ newChildDescriptors.add(createChildParameter(TaiPanPackage.eINSTANCE.getAquatory_Ships(), TaiPanFactory.eINSTANCE.createShip()));
+ }
+
+ /**
+ * 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/ItemItemProvider.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java
new file mode 100644
index 000000000..65ac060c0
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ItemItemProvider.java
@@ -0,0 +1,152 @@
+/*
+ * 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.Item;
+import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.examples.taipan.Item} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ItemItemProvider 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 ItemItemProvider(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);
+
+ addArticlePropertyDescriptor(object);
+ addQuantityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Article feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * This adds a property descriptor for the Quantity feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * This returns Item.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/Item");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((Item) object).getArticle();
+ return label == null || label.length() == 0 ? getString("_UI_Item_type") : getString("_UI_Item_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(Item.class)) {
+ case TaiPanPackage.ITEM__ARTICLE:
+ case TaiPanPackage.ITEM__QUANTITY:
+ 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/PortItemProvider.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java
new file mode 100644
index 000000000..009c2be5f
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/PortItemProvider.java
@@ -0,0 +1,139 @@
+/*
+ * 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.Port;
+import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.examples.taipan.Port} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PortItemProvider 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 PortItemProvider(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);
+
+ addLocationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Location feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * This returns Port.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/Port");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((Port) object).getLocation();
+ return label == null || label.length() == 0 ? getString("_UI_Port_type") : getString("_UI_Port_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(Port.class)) {
+ case TaiPanPackage.PORT__LOCATION:
+ 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
new file mode 100644
index 000000000..7431f2f2a
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/ShipItemProvider.java
@@ -0,0 +1,173 @@
+/*
+ * 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.Ship;
+import org.eclipse.gmf.examples.taipan.TaiPanFactory;
+import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.examples.taipan.Ship} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ShipItemProvider 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 ShipItemProvider(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);
+
+ addNamePropertyDescriptor(object);
+ addDestinationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * 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_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));
+ }
+
+ /**
+ * 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_Ship_destination_feature"), getString("_UI_PropertyDescriptor_description",
+ "_UI_Ship_destination_feature", "_UI_Ship_type"), TaiPanPackage.eINSTANCE.getShip_Destination(), true, null, 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(TaiPanPackage.eINSTANCE.getShip_Cargo());
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * This returns Ship.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/Ship");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((Ship) object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Ship_type") : getString("_UI_Ship_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(Ship.class)) {
+ case TaiPanPackage.SHIP__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case TaiPanPackage.SHIP__CARGO:
+ 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(TaiPanPackage.eINSTANCE.getShip_Cargo(), TaiPanFactory.eINSTANCE.createItem()));
+ }
+
+ /**
+ * 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/TaiPanEditPlugin.java b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanEditPlugin.java
new file mode 100644
index 000000000..aa2b7a317
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanEditPlugin.java
@@ -0,0 +1,97 @@
+/*
+ * 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 org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the TaiPan edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class TaiPanEditPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final TaiPanEditPlugin INSTANCE = new TaiPanEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TaiPanEditPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
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
new file mode 100644
index 000000000..a57d4b358
--- /dev/null
+++ b/examples/org.eclipse.gmf.examples.taipan.edit/src/org/eclipse/gmf/examples/taipan/provider/TaiPanItemProviderAdapterFactory.java
@@ -0,0 +1,278 @@
+/*
+ * 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.ArrayList;
+import java.util.Collection;
+
+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.ITreeItemContentProvider;
+
+import org.eclipse.gmf.examples.taipan.util.TaiPanAdapterFactory;
+
+/**
+ * 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 TaiPanItemProviderAdapterFactory extends TaiPanAdapterFactory 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
+ */
+ public TaiPanItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.taipan.Aquatory} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AquatoryItemProvider aquatoryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.examples.taipan.Aquatory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createAquatoryAdapter() {
+ if (aquatoryItemProvider == null) {
+ aquatoryItemProvider = new AquatoryItemProvider(this);
+ }
+
+ return aquatoryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.taipan.Port} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PortItemProvider portItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.examples.taipan.Port}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createPortAdapter() {
+ if (portItemProvider == null) {
+ portItemProvider = new PortItemProvider(this);
+ }
+
+ return portItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.taipan.Ship} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ShipItemProvider shipItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.examples.taipan.Ship}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createShipAdapter() {
+ if (shipItemProvider == null) {
+ shipItemProvider = new ShipItemProvider(this);
+ }
+
+ return shipItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.examples.taipan.Item} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ItemItemProvider itemItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.examples.taipan.Item}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createItemAdapter() {
+ if (itemItemProvider == null) {
+ itemItemProvider = new ItemItemProvider(this);
+ }
+
+ return itemItemProvider;
+ }
+
+ /**
+ * 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 (aquatoryItemProvider != null)
+ aquatoryItemProvider.dispose();
+ if (portItemProvider != null)
+ portItemProvider.dispose();
+ if (shipItemProvider != null)
+ shipItemProvider.dispose();
+ if (itemItemProvider != null)
+ itemItemProvider.dispose();
+ }
+
+}

Back to the top