| author | skovalsky | 2012-02-06 14:40:35 (EST) |
|---|---|---|
| committer | mgolubev | 2012-04-29 12:39:10 (EDT) |
| commit | 9856761ef72e98cd6ca677b88d178d4dfcbf1539 (patch) (side-by-side diff) | |
| tree | 7f7b6d15febf5a617e83a62cb5340cc713a86145 | |
| parent | e7a2eb139de47b5465b4d5b3ed9d421c4965ad1c (diff) | |
| download | org.eclipse.gmf-tooling-9856761ef72e98cd6ca677b88d178d4dfcbf1539.zip org.eclipse.gmf-tooling-9856761ef72e98cd6ca677b88d178d4dfcbf1539.tar.gz org.eclipse.gmf-tooling-9856761ef72e98cd6ca677b88d178d4dfcbf1539.tar.bz2 | |
GMFMap - introduce VisualEffectMapping - bounds some OCL expression to
GMFGraph Pin
42 files changed, 3566 insertions, 19 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.edit/plugin.properties b/plugins/org.eclipse.gmf.graphdef.edit/plugin.properties index 17543f7..2c81ade 100644 --- a/plugins/org.eclipse.gmf.graphdef.edit/plugin.properties +++ b/plugins/org.eclipse.gmf.graphdef.edit/plugin.properties @@ -600,3 +600,18 @@ _UI_Rectangle2D_height_feature = Height _UI_SVGPropertyType_FLOAT_literal = FLOAT _UI_SVGFigure_noCanvasWidth_feature = No Canvas Width _UI_SVGFigure_noCanvasHeight_feature = No Canvas Height +_UI_Pin_type = Pin +_UI_CustomPin_type = Custom Pin +_UI_ColorPin_type = Color Pin +_UI_PinOwner_type = Pin Owner +_UI_CustomPin_type_feature = Type +_UI_CustomPin_name_feature = Name +_UI_ColorPin_backgroundNotForeground_feature = Background Not Foreground +_UI_PinOwner_pins_feature = Pins +_UI_Pin_name_feature = Name +_UI_CustomPin_customSetterType_feature = Custom Setter Type +_UI_CustomPin_customSetterName_feature = Custom Setter Name +_UI_CustomPin_customOperationName_feature = Custom Operation Name +_UI_CustomPin_customOperationType_feature = Custom Operation Type +_UI_VisibilityPin_type = Visibility Pin +_UI_VisiblePin_type = Visible Pin diff --git a/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/ColorPinItemProvider.java b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/ColorPinItemProvider.java new file mode 100644 index 0000000..22acec4 --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/ColorPinItemProvider.java @@ -0,0 +1,186 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph.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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.gmfgraph.ColorPin;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.ColorPin} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ColorPinItemProvider
+ 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 ColorPinItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ addBackgroundNotForegroundPropertyDescriptor(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_Identity_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
+ GMFGraphPackage.eINSTANCE.getIdentity_Name(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Background Not Foreground feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBackgroundNotForegroundPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ColorPin_backgroundNotForeground_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ColorPin_backgroundNotForeground_feature", "_UI_ColorPin_type"),
+ GMFGraphPackage.eINSTANCE.getColorPin_BackgroundNotForeground(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ColorPin.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ColorPin"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ColorPin)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ColorPin_type") :
+ getString("_UI_ColorPin_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
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ColorPin.class)) {
+ case GMFGraphPackage.COLOR_PIN__NAME:
+ case GMFGraphPackage.COLOR_PIN__BACKGROUND_NOT_FOREGROUND:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/CustomPinItemProvider.java b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/CustomPinItemProvider.java new file mode 100644 index 0000000..c4d9ecb --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/CustomPinItemProvider.java @@ -0,0 +1,211 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph.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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.gmfgraph.CustomPin;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.CustomPin} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CustomPinItemProvider
+ 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 CustomPinItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ addCustomOperationNamePropertyDescriptor(object);
+ addCustomOperationTypePropertyDescriptor(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_Identity_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
+ GMFGraphPackage.eINSTANCE.getIdentity_Name(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Custom Operation Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCustomOperationNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CustomPin_customOperationName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_CustomPin_customOperationName_feature", "_UI_CustomPin_type"),
+ GMFGraphPackage.eINSTANCE.getCustomPin_CustomOperationName(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Custom Operation Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCustomOperationTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CustomPin_customOperationType_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_CustomPin_customOperationType_feature", "_UI_CustomPin_type"),
+ GMFGraphPackage.eINSTANCE.getCustomPin_CustomOperationType(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns CustomPin.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CustomPin"));
+ }
+
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((CustomPin)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_CustomPin_type") :
+ getString("_UI_CustomPin_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
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(CustomPin.class)) {
+ case GMFGraphPackage.CUSTOM_PIN__NAME:
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_NAME:
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_TYPE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/GMFGraphItemProviderAdapterFactory.java b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/GMFGraphItemProviderAdapterFactory.java index 008de9d..0f12ab9 100644 --- a/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/GMFGraphItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/GMFGraphItemProviderAdapterFactory.java @@ -1353,6 +1353,75 @@ public class GMFGraphItemProviderAdapterFactory extends GMFGraphAdapterFactory i } /** + * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.CustomPin} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CustomPinItemProvider customPinItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.CustomPin}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createCustomPinAdapter() { + if (customPinItemProvider == null) { + customPinItemProvider = new CustomPinItemProvider(this); + } + + return customPinItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.ColorPin} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ColorPinItemProvider colorPinItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.ColorPin}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createColorPinAdapter() { + if (colorPinItemProvider == null) { + colorPinItemProvider = new ColorPinItemProvider(this); + } + + return colorPinItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.VisiblePin} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VisiblePinItemProvider visiblePinItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.VisiblePin}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createVisiblePinAdapter() { + if (visiblePinItemProvider == null) { + visiblePinItemProvider = new VisiblePinItemProvider(this); + } + + return visiblePinItemProvider; + } + + /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1533,6 +1602,9 @@ public class GMFGraphItemProviderAdapterFactory extends GMFGraphAdapterFactory i if (svgFigureItemProvider != null) svgFigureItemProvider.dispose(); if (svgPropertyItemProvider != null) svgPropertyItemProvider.dispose(); if (rectangle2DItemProvider != null) rectangle2DItemProvider.dispose(); + if (customPinItemProvider != null) customPinItemProvider.dispose(); + if (colorPinItemProvider != null) colorPinItemProvider.dispose(); + if (visiblePinItemProvider != null) visiblePinItemProvider.dispose(); } } diff --git a/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/RealFigureItemProvider.java b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/RealFigureItemProvider.java index 3c39c44..d91b6ff 100644 --- a/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/RealFigureItemProvider.java +++ b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/RealFigureItemProvider.java @@ -100,6 +100,7 @@ public class RealFigureItemProvider public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); + childrenFeatures.add(GMFGraphPackage.eINSTANCE.getPinOwner_Pins()); childrenFeatures.add(GMFGraphPackage.eINSTANCE.getRealFigure_Children()); } return childrenFeatures; @@ -147,6 +148,7 @@ public class RealFigureItemProvider case GMFGraphPackage.REAL_FIGURE__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; + case GMFGraphPackage.REAL_FIGURE__PINS: case GMFGraphPackage.REAL_FIGURE__CHILDREN: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; @@ -167,6 +169,21 @@ public class RealFigureItemProvider newChildDescriptors.add (createChildParameter + (GMFGraphPackage.eINSTANCE.getPinOwner_Pins(), + GMFGraphFactory.eINSTANCE.createCustomPin())); + + newChildDescriptors.add + (createChildParameter + (GMFGraphPackage.eINSTANCE.getPinOwner_Pins(), + GMFGraphFactory.eINSTANCE.createColorPin())); + + newChildDescriptors.add + (createChildParameter + (GMFGraphPackage.eINSTANCE.getPinOwner_Pins(), + GMFGraphFactory.eINSTANCE.createVisiblePin())); + + newChildDescriptors.add + (createChildParameter (GMFGraphPackage.eINSTANCE.getRealFigure_Children(), GMFGraphFactory.eINSTANCE.createFigureRef())); diff --git a/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/VisiblePinItemProvider.java b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/VisiblePinItemProvider.java new file mode 100644 index 0000000..4b67fc9 --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef.edit/src/org/eclipse/gmf/gmfgraph/provider/VisiblePinItemProvider.java @@ -0,0 +1,162 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph.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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.VisiblePin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.VisiblePin} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VisiblePinItemProvider
+ 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 VisiblePinItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(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_Identity_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
+ GMFGraphPackage.eINSTANCE.getIdentity_Name(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns VisiblePin.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/VisiblePin"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((VisiblePin)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_VisiblePin_type") :
+ getString("_UI_VisiblePin_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
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(VisiblePin.class)) {
+ case GMFGraphPackage.VISIBLE_PIN__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore index 8e7ee61..83b5ba4 100644 --- a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore +++ b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.ecore @@ -158,7 +158,7 @@ </eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="RealFigure" abstract="true" eSuperTypes="#//AbstractFigure">
+ <eClassifiers xsi:type="ecore:EClass" name="RealFigure" abstract="true" eSuperTypes="#//AbstractFigure #//PinOwner">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="This is exact/specific/concrete figure, unlike proxy/reference-nature FigureRef"/>
</eAnnotations>
@@ -538,4 +538,22 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="width" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="height" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Pin" abstract="true" interface="true"
+ eSuperTypes="#//Identity">
+ <eOperations name="getOperationName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getOperationType" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CustomPin" eSuperTypes="#//Pin">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="customOperationName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="customOperationType" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ColorPin" eSuperTypes="#//Pin">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="backgroundNotForeground"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VisiblePin" eSuperTypes="#//Pin"/>
+ <eClassifiers xsi:type="ecore:EClass" name="PinOwner" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="pins" upperBound="-1" eType="#//Pin"
+ containment="true"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.emf b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.emf index bc278dc..af069f1 100644 --- a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.emf +++ b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.emf @@ -127,7 +127,7 @@ class ChildAccess { } @genmodel(documentation="This is exact/specific/concrete figure, unlike proxy/reference-nature FigureRef") -abstract class RealFigure extends AbstractFigure { +abstract class RealFigure extends AbstractFigure, PinOwner { attr String[?] name; // unlike identity, do not require this attribute (and not necessarily unique) ordered val Figure[*] children; } @@ -490,3 +490,29 @@ class Rectangle2D { attr float width; attr float height; } + +abstract interface Pin extends Identity { + + op String getOperationName(); + op String getOperationType(); +} + +class CustomPin extends Pin { + + attr String customOperationName; + attr String customOperationType; +} + +class ColorPin extends Pin { + + attr boolean backgroundNotForeground; +} + +class VisiblePin extends Pin { + +} + +abstract interface PinOwner { + + val Pin[*] pins; +} diff --git a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel index 8b7cd37..02bb987 100644 --- a/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel +++ b/plugins/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel @@ -318,5 +318,20 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//Rectangle2D/width"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//Rectangle2D/height"/>
</genClasses>
+ <genClasses image="false" ecoreClass="gmfgraph.ecore#//Pin">
+ <genOperations ecoreOperation="gmfgraph.ecore#//Pin/getOperationName"/>
+ <genOperations ecoreOperation="gmfgraph.ecore#//Pin/getOperationType"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgraph.ecore#//CustomPin">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//CustomPin/customOperationName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//CustomPin/customOperationType"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgraph.ecore#//ColorPin">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//ColorPin/backgroundNotForeground"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgraph.ecore#//VisiblePin"/>
+ <genClasses image="false" ecoreClass="gmfgraph.ecore#//PinOwner">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//PinOwner/pins"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/ColorPin.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/ColorPin.java new file mode 100644 index 0000000..6df0f36 --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/ColorPin.java @@ -0,0 +1,53 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Color Pin</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.ColorPin#isBackgroundNotForeground <em>Background Not Foreground</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getColorPin()
+ * @model
+ * @generated
+ */
+public interface ColorPin extends Pin {
+ /**
+ * Returns the value of the '<em><b>Background Not Foreground</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Background Not Foreground</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Background Not Foreground</em>' attribute.
+ * @see #setBackgroundNotForeground(boolean)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getColorPin_BackgroundNotForeground()
+ * @model
+ * @generated
+ */
+ boolean isBackgroundNotForeground();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.ColorPin#isBackgroundNotForeground <em>Background Not Foreground</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Background Not Foreground</em>' attribute.
+ * @see #isBackgroundNotForeground()
+ * @generated
+ */
+ void setBackgroundNotForeground(boolean value);
+
+} // ColorPin
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/CustomPin.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/CustomPin.java new file mode 100644 index 0000000..22dfd2a --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/CustomPin.java @@ -0,0 +1,80 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Custom Pin</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationName <em>Custom Operation Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationType <em>Custom Operation Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomPin()
+ * @model
+ * @generated
+ */
+public interface CustomPin extends Pin {
+ /**
+ * Returns the value of the '<em><b>Custom Operation Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Custom Operation Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Custom Operation Name</em>' attribute.
+ * @see #setCustomOperationName(String)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomPin_CustomOperationName()
+ * @model
+ * @generated
+ */
+ String getCustomOperationName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationName <em>Custom Operation Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Custom Operation Name</em>' attribute.
+ * @see #getCustomOperationName()
+ * @generated
+ */
+ void setCustomOperationName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Custom Operation Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Custom Operation Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Custom Operation Type</em>' attribute.
+ * @see #setCustomOperationType(String)
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomPin_CustomOperationType()
+ * @model
+ * @generated
+ */
+ String getCustomOperationType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationType <em>Custom Operation Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Custom Operation Type</em>' attribute.
+ * @see #getCustomOperationType()
+ * @generated
+ */
+ void setCustomOperationType(String value);
+
+} // CustomPin
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java index 2c261f8..ed00964 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java @@ -521,6 +521,33 @@ public interface GMFGraphFactory extends EFactory { Rectangle2D createRectangle2D(); /** + * Returns a new object of class '<em>Custom Pin</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Custom Pin</em>'. + * @generated + */ + CustomPin createCustomPin(); + + /** + * Returns a new object of class '<em>Color Pin</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Color Pin</em>'. + * @generated + */ + ColorPin createColorPin(); + + /** + * Returns a new object of class '<em>Visible Pin</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Visible Pin</em>'. + * @generated + */ + VisiblePin createVisiblePin(); + + /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java index 130e9da..8dc2fe0 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java @@ -1333,13 +1333,22 @@ public interface GMFGraphPackage extends EPackage { int REAL_FIGURE__SIZE = ABSTRACT_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int REAL_FIGURE__PINS = ABSTRACT_FIGURE_FEATURE_COUNT + 0; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int REAL_FIGURE__NAME = ABSTRACT_FIGURE_FEATURE_COUNT + 0; + int REAL_FIGURE__NAME = ABSTRACT_FIGURE_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Children</b></em>' containment reference list. @@ -1348,7 +1357,7 @@ public interface GMFGraphPackage extends EPackage { * @generated * @ordered */ - int REAL_FIGURE__CHILDREN = ABSTRACT_FIGURE_FEATURE_COUNT + 1; + int REAL_FIGURE__CHILDREN = ABSTRACT_FIGURE_FEATURE_COUNT + 2; /** * The number of structural features of the '<em>Real Figure</em>' class. @@ -1357,7 +1366,7 @@ public interface GMFGraphPackage extends EPackage { * @generated * @ordered */ - int REAL_FIGURE_FEATURE_COUNT = ABSTRACT_FIGURE_FEATURE_COUNT + 2; + int REAL_FIGURE_FEATURE_COUNT = ABSTRACT_FIGURE_FEATURE_COUNT + 3; /** * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.FigureRefImpl <em>Figure Ref</em>}' class. @@ -1632,6 +1641,15 @@ public interface GMFGraphPackage extends EPackage { int CONNECTION_FIGURE__SIZE = REAL_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONNECTION_FIGURE__PINS = REAL_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1786,6 +1804,15 @@ public interface GMFGraphPackage extends EPackage { int DECORATION_FIGURE__SIZE = REAL_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DECORATION_FIGURE__PINS = REAL_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1940,6 +1967,15 @@ public interface GMFGraphPackage extends EPackage { int SHAPE__SIZE = REAL_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHAPE__PINS = REAL_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2157,6 +2193,15 @@ public interface GMFGraphPackage extends EPackage { int LABEL__SIZE = REAL_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LABEL__PINS = REAL_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2320,6 +2365,15 @@ public interface GMFGraphPackage extends EPackage { int LABELED_CONTAINER__SIZE = REAL_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LABELED_CONTAINER__PINS = REAL_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2474,6 +2528,15 @@ public interface GMFGraphPackage extends EPackage { int RECTANGLE__SIZE = SHAPE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RECTANGLE__PINS = SHAPE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2691,6 +2754,15 @@ public interface GMFGraphPackage extends EPackage { int ROUNDED_RECTANGLE__SIZE = SHAPE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ROUNDED_RECTANGLE__PINS = SHAPE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2926,6 +2998,15 @@ public interface GMFGraphPackage extends EPackage { int ELLIPSE__SIZE = SHAPE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ELLIPSE__PINS = SHAPE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3143,6 +3224,15 @@ public interface GMFGraphPackage extends EPackage { int POLYLINE__SIZE = SHAPE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POLYLINE__PINS = SHAPE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3369,6 +3459,15 @@ public interface GMFGraphPackage extends EPackage { int POLYGON__SIZE = POLYLINE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POLYGON__PINS = POLYLINE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3595,6 +3694,15 @@ public interface GMFGraphPackage extends EPackage { int SCALABLE_POLYGON__SIZE = POLYGON__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SCALABLE_POLYGON__PINS = POLYGON__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3821,6 +3929,15 @@ public interface GMFGraphPackage extends EPackage { int POLYLINE_CONNECTION__SIZE = POLYLINE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POLYLINE_CONNECTION__PINS = POLYLINE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -4065,6 +4182,15 @@ public interface GMFGraphPackage extends EPackage { int POLYLINE_DECORATION__SIZE = POLYLINE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POLYLINE_DECORATION__PINS = POLYLINE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -4291,6 +4417,15 @@ public interface GMFGraphPackage extends EPackage { int POLYGON_DECORATION__SIZE = POLYGON__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POLYGON_DECORATION__PINS = POLYGON__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -4514,7 +4649,7 @@ public interface GMFGraphPackage extends EPackage { * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getFontStyle() * @generated */ - int FONT_STYLE = 73; + int FONT_STYLE = 78; /** * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.PointImpl <em>Point</em>}' class. @@ -4886,6 +5021,15 @@ public interface GMFGraphPackage extends EPackage { int CUSTOM_FIGURE__SIZE = REAL_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CUSTOM_FIGURE__PINS = REAL_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -5057,6 +5201,15 @@ public interface GMFGraphPackage extends EPackage { int CUSTOM_DECORATION__SIZE = CUSTOM_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CUSTOM_DECORATION__PINS = CUSTOM_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -5228,6 +5381,15 @@ public interface GMFGraphPackage extends EPackage { int CUSTOM_CONNECTION__SIZE = CUSTOM_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CUSTOM_CONNECTION__PINS = CUSTOM_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -6225,6 +6387,15 @@ public interface GMFGraphPackage extends EPackage { int SVG_FIGURE__SIZE = REAL_FIGURE__SIZE; /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SVG_FIGURE__PINS = REAL_FIGURE__PINS; + + /** * The feature id for the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -6425,6 +6596,173 @@ public interface GMFGraphPackage extends EPackage { int RECTANGLE2_D_FEATURE_COUNT = 4; /** + * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Pin <em>Pin</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.gmf.gmfgraph.Pin + * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getPin() + * @generated + */ + int PIN = 72; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PIN__NAME = IDENTITY__NAME; + + /** + * The number of structural features of the '<em>Pin</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PIN_FEATURE_COUNT = IDENTITY_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.CustomPinImpl <em>Custom Pin</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.gmf.gmfgraph.impl.CustomPinImpl + * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getCustomPin() + * @generated + */ + int CUSTOM_PIN = 73; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CUSTOM_PIN__NAME = PIN__NAME; + + /** + * The feature id for the '<em><b>Custom Operation Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CUSTOM_PIN__CUSTOM_OPERATION_NAME = PIN_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Custom Operation Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CUSTOM_PIN__CUSTOM_OPERATION_TYPE = PIN_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Custom Pin</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CUSTOM_PIN_FEATURE_COUNT = PIN_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.ColorPinImpl <em>Color Pin</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.gmf.gmfgraph.impl.ColorPinImpl + * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getColorPin() + * @generated + */ + int COLOR_PIN = 74; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COLOR_PIN__NAME = PIN__NAME; + + /** + * The feature id for the '<em><b>Background Not Foreground</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COLOR_PIN__BACKGROUND_NOT_FOREGROUND = PIN_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Color Pin</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COLOR_PIN_FEATURE_COUNT = PIN_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.VisiblePinImpl <em>Visible Pin</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.gmf.gmfgraph.impl.VisiblePinImpl + * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getVisiblePin() + * @generated + */ + int VISIBLE_PIN = 75; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISIBLE_PIN__NAME = PIN__NAME; + + /** + * The number of structural features of the '<em>Visible Pin</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISIBLE_PIN_FEATURE_COUNT = PIN_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.PinOwner <em>Pin Owner</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.gmf.gmfgraph.PinOwner + * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getPinOwner() + * @generated + */ + int PIN_OWNER = 76; + + /** + * The feature id for the '<em><b>Pins</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PIN_OWNER__PINS = 0; + + /** + * The number of structural features of the '<em>Pin Owner</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PIN_OWNER_FEATURE_COUNT = 1; + + /** * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}' enum. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -6432,7 +6770,7 @@ public interface GMFGraphPackage extends EPackage { * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getColorConstants() * @generated */ - int COLOR_CONSTANTS = 72; + int COLOR_CONSTANTS = 77; /** * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Direction <em>Direction</em>}' enum. @@ -6442,7 +6780,7 @@ public interface GMFGraphPackage extends EPackage { * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getDirection() * @generated */ - int DIRECTION = 74; + int DIRECTION = 79; /** * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.LineKind <em>Line Kind</em>}' enum. @@ -6452,7 +6790,7 @@ public interface GMFGraphPackage extends EPackage { * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getLineKind() * @generated */ - int LINE_KIND = 75; + int LINE_KIND = 80; /** @@ -6463,7 +6801,7 @@ public interface GMFGraphPackage extends EPackage { * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getAlignment() * @generated */ - int ALIGNMENT = 76; + int ALIGNMENT = 81; /** @@ -6474,7 +6812,7 @@ public interface GMFGraphPackage extends EPackage { * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getSVGPropertyType() * @generated */ - int SVG_PROPERTY_TYPE = 77; + int SVG_PROPERTY_TYPE = 82; /** @@ -8693,6 +9031,100 @@ public interface GMFGraphPackage extends EPackage { EAttribute getRectangle2D_Height(); /** + * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Pin <em>Pin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Pin</em>'. + * @see org.eclipse.gmf.gmfgraph.Pin + * @generated + */ + EClass getPin(); + + /** + * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.CustomPin <em>Custom Pin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Custom Pin</em>'. + * @see org.eclipse.gmf.gmfgraph.CustomPin + * @generated + */ + EClass getCustomPin(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationName <em>Custom Operation Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Custom Operation Name</em>'. + * @see org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationName() + * @see #getCustomPin() + * @generated + */ + EAttribute getCustomPin_CustomOperationName(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationType <em>Custom Operation Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Custom Operation Type</em>'. + * @see org.eclipse.gmf.gmfgraph.CustomPin#getCustomOperationType() + * @see #getCustomPin() + * @generated + */ + EAttribute getCustomPin_CustomOperationType(); + + /** + * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.ColorPin <em>Color Pin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Color Pin</em>'. + * @see org.eclipse.gmf.gmfgraph.ColorPin + * @generated + */ + EClass getColorPin(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.ColorPin#isBackgroundNotForeground <em>Background Not Foreground</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Background Not Foreground</em>'. + * @see org.eclipse.gmf.gmfgraph.ColorPin#isBackgroundNotForeground() + * @see #getColorPin() + * @generated + */ + EAttribute getColorPin_BackgroundNotForeground(); + + /** + * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.VisiblePin <em>Visible Pin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Visible Pin</em>'. + * @see org.eclipse.gmf.gmfgraph.VisiblePin + * @generated + */ + EClass getVisiblePin(); + + /** + * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.PinOwner <em>Pin Owner</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Pin Owner</em>'. + * @see org.eclipse.gmf.gmfgraph.PinOwner + * @generated + */ + EClass getPinOwner(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.PinOwner#getPins <em>Pins</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Pins</em>'. + * @see org.eclipse.gmf.gmfgraph.PinOwner#getPins() + * @see #getPinOwner() + * @generated + */ + EReference getPinOwner_Pins(); + + /** * Returns the meta object for enum '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/Pin.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/Pin.java new file mode 100644 index 0000000..8d983f7 --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/Pin.java @@ -0,0 +1,38 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pin</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getPin()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface Pin extends Identity {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getOperationName();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getOperationType();
+
+} // Pin
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/PinOwner.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/PinOwner.java new file mode 100644 index 0000000..1b3c5f0 --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/PinOwner.java @@ -0,0 +1,46 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pin Owner</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.PinOwner#getPins <em>Pins</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getPinOwner()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface PinOwner extends EObject {
+ /**
+ * Returns the value of the '<em><b>Pins</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.gmf.gmfgraph.Pin}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Pins</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Pins</em>' containment reference list.
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getPinOwner_Pins()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Pin> getPins();
+
+} // PinOwner
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/RealFigure.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/RealFigure.java index fd2c312..ed63916 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/RealFigure.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/RealFigure.java @@ -29,7 +29,7 @@ import org.eclipse.emf.common.util.EList; * @model abstract="true" * @generated */ -public interface RealFigure extends AbstractFigure { +public interface RealFigure extends AbstractFigure, PinOwner { /** * Returns the value of the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/VisiblePin.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/VisiblePin.java new file mode 100644 index 0000000..1cd7fd6 --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/VisiblePin.java @@ -0,0 +1,21 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Visible Pin</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getVisiblePin()
+ * @model
+ * @generated
+ */
+public interface VisiblePin extends Pin {
+} // VisiblePin
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/ColorPinImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/ColorPinImpl.java new file mode 100644 index 0000000..1cb9798 --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/ColorPinImpl.java @@ -0,0 +1,239 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.gmf.gmfgraph.ColorPin;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Color Pin</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.ColorPinImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.ColorPinImpl#isBackgroundNotForeground <em>Background Not Foreground</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ColorPinImpl extends EObjectImpl implements ColorPin {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isBackgroundNotForeground() <em>Background Not Foreground</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isBackgroundNotForeground()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean BACKGROUND_NOT_FOREGROUND_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isBackgroundNotForeground() <em>Background Not Foreground</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isBackgroundNotForeground()
+ * @generated
+ * @ordered
+ */
+ protected boolean backgroundNotForeground = BACKGROUND_NOT_FOREGROUND_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ColorPinImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GMFGraphPackage.eINSTANCE.getColorPin();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.COLOR_PIN__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isBackgroundNotForeground() {
+ return backgroundNotForeground;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setBackgroundNotForeground(boolean newBackgroundNotForeground) {
+ boolean oldBackgroundNotForeground = backgroundNotForeground;
+ backgroundNotForeground = newBackgroundNotForeground;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.COLOR_PIN__BACKGROUND_NOT_FOREGROUND, oldBackgroundNotForeground, backgroundNotForeground));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getOperationName() {
+ return isBackgroundNotForeground() ? "setBackgroundColor" : "setForegroundColor";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getOperationType() {
+ return "Tuple(red:Integer, green:Integer, blue:Integer)";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFGraphPackage.COLOR_PIN__NAME:
+ return getName();
+ case GMFGraphPackage.COLOR_PIN__BACKGROUND_NOT_FOREGROUND:
+ return isBackgroundNotForeground();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFGraphPackage.COLOR_PIN__NAME:
+ setName((String)newValue);
+ return;
+ case GMFGraphPackage.COLOR_PIN__BACKGROUND_NOT_FOREGROUND:
+ setBackgroundNotForeground((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.COLOR_PIN__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case GMFGraphPackage.COLOR_PIN__BACKGROUND_NOT_FOREGROUND:
+ setBackgroundNotForeground(BACKGROUND_NOT_FOREGROUND_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.COLOR_PIN__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case GMFGraphPackage.COLOR_PIN__BACKGROUND_NOT_FOREGROUND:
+ return backgroundNotForeground != BACKGROUND_NOT_FOREGROUND_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", backgroundNotForeground: ");
+ result.append(backgroundNotForeground);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ColorPinImpl
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/CustomPinImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/CustomPinImpl.java new file mode 100644 index 0000000..94e2d0d --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/CustomPinImpl.java @@ -0,0 +1,293 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.gmf.gmfgraph.CustomPin;
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Custom Pin</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomPinImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomPinImpl#getCustomOperationName <em>Custom Operation Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomPinImpl#getCustomOperationType <em>Custom Operation Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CustomPinImpl extends EObjectImpl implements CustomPin {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCustomOperationName() <em>Custom Operation Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomOperationName()
+ * @generated
+ * @ordered
+ */
+ protected static final String CUSTOM_OPERATION_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCustomOperationName() <em>Custom Operation Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomOperationName()
+ * @generated
+ * @ordered
+ */
+ protected String customOperationName = CUSTOM_OPERATION_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCustomOperationType() <em>Custom Operation Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomOperationType()
+ * @generated
+ * @ordered
+ */
+ protected static final String CUSTOM_OPERATION_TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCustomOperationType() <em>Custom Operation Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomOperationType()
+ * @generated
+ * @ordered
+ */
+ protected String customOperationType = CUSTOM_OPERATION_TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CustomPinImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GMFGraphPackage.eINSTANCE.getCustomPin();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_PIN__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCustomOperationName() {
+ return customOperationName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCustomOperationName(String newCustomOperationName) {
+ String oldCustomOperationName = customOperationName;
+ customOperationName = newCustomOperationName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_NAME, oldCustomOperationName, customOperationName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCustomOperationType() {
+ return customOperationType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCustomOperationType(String newCustomOperationType) {
+ String oldCustomOperationType = customOperationType;
+ customOperationType = newCustomOperationType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_TYPE, oldCustomOperationType, customOperationType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getOperationName() {
+ return getCustomOperationName();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getOperationType() {
+ return getCustomOperationType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFGraphPackage.CUSTOM_PIN__NAME:
+ return getName();
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_NAME:
+ return getCustomOperationName();
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_TYPE:
+ return getCustomOperationType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFGraphPackage.CUSTOM_PIN__NAME:
+ setName((String)newValue);
+ return;
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_NAME:
+ setCustomOperationName((String)newValue);
+ return;
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_TYPE:
+ setCustomOperationType((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.CUSTOM_PIN__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_NAME:
+ setCustomOperationName(CUSTOM_OPERATION_NAME_EDEFAULT);
+ return;
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_TYPE:
+ setCustomOperationType(CUSTOM_OPERATION_TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.CUSTOM_PIN__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_NAME:
+ return CUSTOM_OPERATION_NAME_EDEFAULT == null ? customOperationName != null : !CUSTOM_OPERATION_NAME_EDEFAULT.equals(customOperationName);
+ case GMFGraphPackage.CUSTOM_PIN__CUSTOM_OPERATION_TYPE:
+ return CUSTOM_OPERATION_TYPE_EDEFAULT == null ? customOperationType != null : !CUSTOM_OPERATION_TYPE_EDEFAULT.equals(customOperationType);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", customOperationName: ");
+ result.append(customOperationName);
+ result.append(", customOperationType: ");
+ result.append(customOperationType);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CustomPinImpl
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java index 9152bfa..56ef97c 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java @@ -113,6 +113,9 @@ public class GMFGraphFactoryImpl extends EFactoryImpl implements GMFGraphFactory case GMFGraphPackage.SVG_FIGURE: return createSVGFigure(); case GMFGraphPackage.SVG_PROPERTY: return createSVGProperty(); case GMFGraphPackage.RECTANGLE2_D: return createRectangle2D(); + case GMFGraphPackage.CUSTOM_PIN: return createCustomPin(); + case GMFGraphPackage.COLOR_PIN: return createColorPin(); + case GMFGraphPackage.VISIBLE_PIN: return createVisiblePin(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -723,6 +726,36 @@ public class GMFGraphFactoryImpl extends EFactoryImpl implements GMFGraphFactory * <!-- end-user-doc --> * @generated */ + public CustomPin createCustomPin() { + CustomPinImpl customPin = new CustomPinImpl(); + return customPin; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ColorPin createColorPin() { + ColorPinImpl colorPin = new ColorPinImpl(); + return colorPin; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VisiblePin createVisiblePin() { + VisiblePinImpl visiblePin = new VisiblePinImpl(); + return visiblePin; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public ColorConstants createColorConstantsFromString(EDataType eDataType, String initialValue) { ColorConstants result = ColorConstants.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java index f290192..163e288 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java @@ -25,6 +25,7 @@ import org.eclipse.gmf.gmfgraph.Canvas; import org.eclipse.gmf.gmfgraph.ChildAccess; import org.eclipse.gmf.gmfgraph.Color; import org.eclipse.gmf.gmfgraph.ColorConstants; +import org.eclipse.gmf.gmfgraph.ColorPin; import org.eclipse.gmf.gmfgraph.Compartment; import org.eclipse.gmf.gmfgraph.CompoundBorder; import org.eclipse.gmf.gmfgraph.Connection; @@ -38,6 +39,7 @@ import org.eclipse.gmf.gmfgraph.CustomDecoration; import org.eclipse.gmf.gmfgraph.CustomFigure; import org.eclipse.gmf.gmfgraph.CustomLayout; import org.eclipse.gmf.gmfgraph.CustomLayoutData; +import org.eclipse.gmf.gmfgraph.CustomPin; import org.eclipse.gmf.gmfgraph.DecorationFigure; import org.eclipse.gmf.gmfgraph.DefaultSizeFacet; import org.eclipse.gmf.gmfgraph.DiagramElement; @@ -72,6 +74,8 @@ import org.eclipse.gmf.gmfgraph.LineBorder; import org.eclipse.gmf.gmfgraph.LineKind; import org.eclipse.gmf.gmfgraph.MarginBorder; import org.eclipse.gmf.gmfgraph.Node; +import org.eclipse.gmf.gmfgraph.Pin; +import org.eclipse.gmf.gmfgraph.PinOwner; import org.eclipse.gmf.gmfgraph.Point; import org.eclipse.gmf.gmfgraph.Polygon; import org.eclipse.gmf.gmfgraph.PolygonDecoration; @@ -89,10 +93,10 @@ import org.eclipse.gmf.gmfgraph.SVGPropertyType; import org.eclipse.gmf.gmfgraph.ScalablePolygon; import org.eclipse.gmf.gmfgraph.Shape; import org.eclipse.gmf.gmfgraph.StackLayout; +import org.eclipse.gmf.gmfgraph.VisiblePin; import org.eclipse.gmf.gmfgraph.VisualFacet; import org.eclipse.gmf.gmfgraph.XYLayout; import org.eclipse.gmf.gmfgraph.XYLayoutData; -import org.eclipse.gmf.gmfgraph.*; /** * <!-- begin-user-doc --> @@ -610,6 +614,41 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage * <!-- end-user-doc --> * @generated */ + private EClass pinEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass customPinEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass colorPinEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass visiblePinEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass pinOwnerEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EEnum colorConstantsEEnum = null; /** @@ -2585,6 +2624,87 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage * <!-- end-user-doc --> * @generated */ + public EClass getPin() { + return pinEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCustomPin() { + return customPinEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCustomPin_CustomOperationName() { + return (EAttribute)customPinEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCustomPin_CustomOperationType() { + return (EAttribute)customPinEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getColorPin() { + return colorPinEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getColorPin_BackgroundNotForeground() { + return (EAttribute)colorPinEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVisiblePin() { + return visiblePinEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPinOwner() { + return pinOwnerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPinOwner_Pins() { + return (EReference)pinOwnerEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EEnum getColorConstants() { return colorConstantsEEnum; } @@ -2932,6 +3052,20 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage createEAttribute(rectangle2DEClass, RECTANGLE2_D__WIDTH); createEAttribute(rectangle2DEClass, RECTANGLE2_D__HEIGHT); + pinEClass = createEClass(PIN); + + customPinEClass = createEClass(CUSTOM_PIN); + createEAttribute(customPinEClass, CUSTOM_PIN__CUSTOM_OPERATION_NAME); + createEAttribute(customPinEClass, CUSTOM_PIN__CUSTOM_OPERATION_TYPE); + + colorPinEClass = createEClass(COLOR_PIN); + createEAttribute(colorPinEClass, COLOR_PIN__BACKGROUND_NOT_FOREGROUND); + + visiblePinEClass = createEClass(VISIBLE_PIN); + + pinOwnerEClass = createEClass(PIN_OWNER); + createEReference(pinOwnerEClass, PIN_OWNER__PINS); + // Create enums colorConstantsEEnum = createEEnum(COLOR_CONSTANTS); fontStyleEEnum = createEEnum(FONT_STYLE); @@ -2986,6 +3120,7 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage abstractFigureEClass.getESuperTypes().add(this.getFigure()); figureDescriptorEClass.getESuperTypes().add(this.getIdentity()); realFigureEClass.getESuperTypes().add(this.getAbstractFigure()); + realFigureEClass.getESuperTypes().add(this.getPinOwner()); figureRefEClass.getESuperTypes().add(this.getAbstractFigure()); connectionFigureEClass.getESuperTypes().add(this.getRealFigure()); decorationFigureEClass.getESuperTypes().add(this.getRealFigure()); @@ -3033,6 +3168,10 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage xyLayoutDataEClass.getESuperTypes().add(this.getLayoutData()); stackLayoutEClass.getESuperTypes().add(this.getLayout()); svgFigureEClass.getESuperTypes().add(this.getRealFigure()); + pinEClass.getESuperTypes().add(this.getIdentity()); + customPinEClass.getESuperTypes().add(this.getPin()); + colorPinEClass.getESuperTypes().add(this.getPin()); + visiblePinEClass.getESuperTypes().add(this.getPin()); // Initialize classes and features; add operations and parameters initEClass(canvasEClass, Canvas.class, "Canvas", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -3314,6 +3453,24 @@ public class GMFGraphPackageImpl extends EPackageImpl implements GMFGraphPackage initEAttribute(getRectangle2D_Width(), ecorePackage.getEFloat(), "width", null, 0, 1, Rectangle2D.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getRectangle2D_Height(), ecorePackage.getEFloat(), "height", null, 0, 1, Rectangle2D.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(pinEClass, Pin.class, "Pin", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + addEOperation(pinEClass, ecorePackage.getEString(), "getOperationName", 0, 1, IS_UNIQUE, IS_ORDERED); + + addEOperation(pinEClass, ecorePackage.getEString(), "getOperationType", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(customPinEClass, CustomPin.class, "CustomPin", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCustomPin_CustomOperationName(), ecorePackage.getEString(), "customOperationName", null, 0, 1, CustomPin.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCustomPin_CustomOperationType(), ecorePackage.getEString(), "customOperationType", null, 0, 1, CustomPin.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(colorPinEClass, ColorPin.class, "ColorPin", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getColorPin_BackgroundNotForeground(), ecorePackage.getEBoolean(), "backgroundNotForeground", null, 0, 1, ColorPin.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(visiblePinEClass, VisiblePin.class, "VisiblePin", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(pinOwnerEClass, PinOwner.class, "PinOwner", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getPinOwner_Pins(), this.getPin(), null, "pins", null, 0, -1, PinOwner.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize enums and add enum literals initEEnum(colorConstantsEEnum, ColorConstants.class, "ColorConstants"); addEEnumLiteral(colorConstantsEEnum, ColorConstants.WHITE_LITERAL); diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/RealFigureImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/RealFigureImpl.java index 23476c8..859487c 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/RealFigureImpl.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/RealFigureImpl.java @@ -23,6 +23,8 @@ import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.gmf.gmfgraph.Figure; import org.eclipse.gmf.gmfgraph.GMFGraphPackage; +import org.eclipse.gmf.gmfgraph.Pin; +import org.eclipse.gmf.gmfgraph.PinOwner; import org.eclipse.gmf.gmfgraph.RealFigure; /** @@ -32,6 +34,7 @@ import org.eclipse.gmf.gmfgraph.RealFigure; * <p> * The following features are implemented: * <ul> + * <li>{@link org.eclipse.gmf.gmfgraph.impl.RealFigureImpl#getPins <em>Pins</em>}</li> * <li>{@link org.eclipse.gmf.gmfgraph.impl.RealFigureImpl#getName <em>Name</em>}</li> * <li>{@link org.eclipse.gmf.gmfgraph.impl.RealFigureImpl#getChildren <em>Children</em>}</li> * </ul> @@ -41,6 +44,16 @@ import org.eclipse.gmf.gmfgraph.RealFigure; */ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealFigure { /** + * The cached value of the '{@link #getPins() <em>Pins</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPins() + * @generated + * @ordered + */ + protected EList<Pin> pins; + + /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -94,6 +107,18 @@ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealF * <!-- end-user-doc --> * @generated */ + public EList<Pin> getPins() { + if (pins == null) { + pins = new EObjectContainmentEList<Pin>(Pin.class, this, GMFGraphPackage.REAL_FIGURE__PINS); + } + return pins; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public String getName() { return name; } @@ -130,6 +155,8 @@ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealF @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { + case GMFGraphPackage.REAL_FIGURE__PINS: + return ((InternalEList<?>)getPins()).basicRemove(otherEnd, msgs); case GMFGraphPackage.REAL_FIGURE__CHILDREN: return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs); } @@ -144,6 +171,8 @@ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealF @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { + case GMFGraphPackage.REAL_FIGURE__PINS: + return getPins(); case GMFGraphPackage.REAL_FIGURE__NAME: return getName(); case GMFGraphPackage.REAL_FIGURE__CHILDREN: @@ -161,6 +190,10 @@ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealF @Override public void eSet(int featureID, Object newValue) { switch (featureID) { + case GMFGraphPackage.REAL_FIGURE__PINS: + getPins().clear(); + getPins().addAll((Collection<? extends Pin>)newValue); + return; case GMFGraphPackage.REAL_FIGURE__NAME: setName((String)newValue); return; @@ -180,6 +213,9 @@ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealF @Override public void eUnset(int featureID) { switch (featureID) { + case GMFGraphPackage.REAL_FIGURE__PINS: + getPins().clear(); + return; case GMFGraphPackage.REAL_FIGURE__NAME: setName(NAME_EDEFAULT); return; @@ -198,6 +234,8 @@ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealF @Override public boolean eIsSet(int featureID) { switch (featureID) { + case GMFGraphPackage.REAL_FIGURE__PINS: + return pins != null && !pins.isEmpty(); case GMFGraphPackage.REAL_FIGURE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case GMFGraphPackage.REAL_FIGURE__CHILDREN: @@ -212,6 +250,38 @@ public abstract class RealFigureImpl extends AbstractFigureImpl implements RealF * @generated */ @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == PinOwner.class) { + switch (derivedFeatureID) { + case GMFGraphPackage.REAL_FIGURE__PINS: return GMFGraphPackage.PIN_OWNER__PINS; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { + if (baseClass == PinOwner.class) { + switch (baseFeatureID) { + case GMFGraphPackage.PIN_OWNER__PINS: return GMFGraphPackage.REAL_FIGURE__PINS; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override public String toString() { if (eIsProxy()) return super.toString(); diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/VisiblePinImpl.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/VisiblePinImpl.java new file mode 100644 index 0000000..560c73a --- a/dev/null +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/impl/VisiblePinImpl.java @@ -0,0 +1,185 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.gmfgraph.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.gmfgraph.VisiblePin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Visible Pin</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.gmfgraph.impl.VisiblePinImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class VisiblePinImpl extends EObjectImpl implements VisiblePin {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VisiblePinImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GMFGraphPackage.eINSTANCE.getVisiblePin();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.VISIBLE_PIN__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getOperationName() {
+ return "setVisible";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getOperationType() {
+ return "Boolean";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFGraphPackage.VISIBLE_PIN__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFGraphPackage.VISIBLE_PIN__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.VISIBLE_PIN__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFGraphPackage.VISIBLE_PIN__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //VisiblePinImpl
diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java index 74312e2..a559c92 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java @@ -357,6 +357,26 @@ public class GMFGraphAdapterFactory extends AdapterFactoryImpl { return createRectangle2DAdapter(); } @Override + public Adapter casePin(Pin object) { + return createPinAdapter(); + } + @Override + public Adapter caseCustomPin(CustomPin object) { + return createCustomPinAdapter(); + } + @Override + public Adapter caseColorPin(ColorPin object) { + return createColorPinAdapter(); + } + @Override + public Adapter caseVisiblePin(VisiblePin object) { + return createVisiblePinAdapter(); + } + @Override + public Adapter casePinOwner(PinOwner object) { + return createPinOwnerAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -1385,6 +1405,76 @@ public class GMFGraphAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.Pin <em>Pin</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.gmf.gmfgraph.Pin + * @generated + */ + public Adapter createPinAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.CustomPin <em>Custom Pin</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.gmf.gmfgraph.CustomPin + * @generated + */ + public Adapter createCustomPinAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.ColorPin <em>Color Pin</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.gmf.gmfgraph.ColorPin + * @generated + */ + public Adapter createColorPinAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.VisiblePin <em>Visible Pin</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.gmf.gmfgraph.VisiblePin + * @generated + */ + public Adapter createVisiblePinAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.PinOwner <em>Pin Owner</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.gmf.gmfgraph.PinOwner + * @generated + */ + public Adapter createPinOwnerAdapter() { + return null; + } + + /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> * This default implementation returns null. diff --git a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java index 02b7a0b..dafea74 100644 --- a/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java +++ b/plugins/org.eclipse.gmf.graphdef/src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java @@ -214,6 +214,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { RealFigure realFigure = (RealFigure)theEObject; T result = caseRealFigure(realFigure); if (result == null) result = caseAbstractFigure(realFigure); + if (result == null) result = casePinOwner(realFigure); if (result == null) result = caseFigure(realFigure); if (result == null) result = caseLayoutable(realFigure); if (result == null) result = defaultCase(theEObject); @@ -233,6 +234,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { T result = caseConnectionFigure(connectionFigure); if (result == null) result = caseRealFigure(connectionFigure); if (result == null) result = caseAbstractFigure(connectionFigure); + if (result == null) result = casePinOwner(connectionFigure); if (result == null) result = caseFigure(connectionFigure); if (result == null) result = caseLayoutable(connectionFigure); if (result == null) result = defaultCase(theEObject); @@ -243,6 +245,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { T result = caseDecorationFigure(decorationFigure); if (result == null) result = caseRealFigure(decorationFigure); if (result == null) result = caseAbstractFigure(decorationFigure); + if (result == null) result = casePinOwner(decorationFigure); if (result == null) result = caseFigure(decorationFigure); if (result == null) result = caseLayoutable(decorationFigure); if (result == null) result = defaultCase(theEObject); @@ -253,6 +256,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { T result = caseShape(shape); if (result == null) result = caseRealFigure(shape); if (result == null) result = caseAbstractFigure(shape); + if (result == null) result = casePinOwner(shape); if (result == null) result = caseFigure(shape); if (result == null) result = caseLayoutable(shape); if (result == null) result = defaultCase(theEObject); @@ -263,6 +267,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { T result = caseLabel(label); if (result == null) result = caseRealFigure(label); if (result == null) result = caseAbstractFigure(label); + if (result == null) result = casePinOwner(label); if (result == null) result = caseFigure(label); if (result == null) result = caseLayoutable(label); if (result == null) result = defaultCase(theEObject); @@ -273,6 +278,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { T result = caseLabeledContainer(labeledContainer); if (result == null) result = caseRealFigure(labeledContainer); if (result == null) result = caseAbstractFigure(labeledContainer); + if (result == null) result = casePinOwner(labeledContainer); if (result == null) result = caseFigure(labeledContainer); if (result == null) result = caseLayoutable(labeledContainer); if (result == null) result = defaultCase(theEObject); @@ -284,6 +290,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(rectangle); if (result == null) result = caseRealFigure(rectangle); if (result == null) result = caseAbstractFigure(rectangle); + if (result == null) result = casePinOwner(rectangle); if (result == null) result = caseFigure(rectangle); if (result == null) result = caseLayoutable(rectangle); if (result == null) result = defaultCase(theEObject); @@ -295,6 +302,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(roundedRectangle); if (result == null) result = caseRealFigure(roundedRectangle); if (result == null) result = caseAbstractFigure(roundedRectangle); + if (result == null) result = casePinOwner(roundedRectangle); if (result == null) result = caseFigure(roundedRectangle); if (result == null) result = caseLayoutable(roundedRectangle); if (result == null) result = defaultCase(theEObject); @@ -306,6 +314,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(ellipse); if (result == null) result = caseRealFigure(ellipse); if (result == null) result = caseAbstractFigure(ellipse); + if (result == null) result = casePinOwner(ellipse); if (result == null) result = caseFigure(ellipse); if (result == null) result = caseLayoutable(ellipse); if (result == null) result = defaultCase(theEObject); @@ -317,6 +326,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(polyline); if (result == null) result = caseRealFigure(polyline); if (result == null) result = caseAbstractFigure(polyline); + if (result == null) result = casePinOwner(polyline); if (result == null) result = caseFigure(polyline); if (result == null) result = caseLayoutable(polyline); if (result == null) result = defaultCase(theEObject); @@ -329,6 +339,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(polygon); if (result == null) result = caseRealFigure(polygon); if (result == null) result = caseAbstractFigure(polygon); + if (result == null) result = casePinOwner(polygon); if (result == null) result = caseFigure(polygon); if (result == null) result = caseLayoutable(polygon); if (result == null) result = defaultCase(theEObject); @@ -342,6 +353,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(scalablePolygon); if (result == null) result = caseRealFigure(scalablePolygon); if (result == null) result = caseAbstractFigure(scalablePolygon); + if (result == null) result = casePinOwner(scalablePolygon); if (result == null) result = caseFigure(scalablePolygon); if (result == null) result = caseLayoutable(scalablePolygon); if (result == null) result = defaultCase(theEObject); @@ -355,6 +367,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(polylineConnection); if (result == null) result = caseRealFigure(polylineConnection); if (result == null) result = caseAbstractFigure(polylineConnection); + if (result == null) result = casePinOwner(polylineConnection); if (result == null) result = caseFigure(polylineConnection); if (result == null) result = caseLayoutable(polylineConnection); if (result == null) result = defaultCase(theEObject); @@ -368,6 +381,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(polylineDecoration); if (result == null) result = caseRealFigure(polylineDecoration); if (result == null) result = caseAbstractFigure(polylineDecoration); + if (result == null) result = casePinOwner(polylineDecoration); if (result == null) result = caseFigure(polylineDecoration); if (result == null) result = caseLayoutable(polylineDecoration); if (result == null) result = defaultCase(theEObject); @@ -382,6 +396,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseShape(polygonDecoration); if (result == null) result = caseRealFigure(polygonDecoration); if (result == null) result = caseAbstractFigure(polygonDecoration); + if (result == null) result = casePinOwner(polygonDecoration); if (result == null) result = caseFigure(polygonDecoration); if (result == null) result = caseLayoutable(polygonDecoration); if (result == null) result = defaultCase(theEObject); @@ -411,6 +426,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseRealFigure(customFigure); if (result == null) result = caseCustomClass(customFigure); if (result == null) result = caseAbstractFigure(customFigure); + if (result == null) result = casePinOwner(customFigure); if (result == null) result = caseFigure(customFigure); if (result == null) result = caseLayoutable(customFigure); if (result == null) result = defaultCase(theEObject); @@ -424,6 +440,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseRealFigure(customDecoration); if (result == null) result = caseCustomClass(customDecoration); if (result == null) result = caseAbstractFigure(customDecoration); + if (result == null) result = casePinOwner(customDecoration); if (result == null) result = caseFigure(customDecoration); if (result == null) result = caseLayoutable(customDecoration); if (result == null) result = defaultCase(theEObject); @@ -437,6 +454,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = caseRealFigure(customConnection); if (result == null) result = caseCustomClass(customConnection); if (result == null) result = caseAbstractFigure(customConnection); + if (result == null) result = casePinOwner(customConnection); if (result == null) result = caseFigure(customConnection); if (result == null) result = caseLayoutable(customConnection); if (result == null) result = defaultCase(theEObject); @@ -637,6 +655,7 @@ public class GMFGraphSwitch<T> extends Switch<T> { T result = caseSVGFigure(svgFigure); if (result == null) result = caseRealFigure(svgFigure); if (result == null) result = caseAbstractFigure(svgFigure); + if (result == null) result = casePinOwner(svgFigure); if (result == null) result = caseFigure(svgFigure); if (result == null) result = caseLayoutable(svgFigure); if (result == null) result = defaultCase(theEObject); @@ -654,6 +673,43 @@ public class GMFGraphSwitch<T> extends Switch<T> { if (result == null) result = defaultCase(theEObject); return result; } + case GMFGraphPackage.PIN: { + Pin pin = (Pin)theEObject; + T result = casePin(pin); + if (result == null) result = caseIdentity(pin); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GMFGraphPackage.CUSTOM_PIN: { + CustomPin customPin = (CustomPin)theEObject; + T result = caseCustomPin(customPin); + if (result == null) result = casePin(customPin); + if (result == null) result = caseIdentity(customPin); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GMFGraphPackage.COLOR_PIN: { + ColorPin colorPin = (ColorPin)theEObject; + T result = caseColorPin(colorPin); + if (result == null) result = casePin(colorPin); + if (result == null) result = caseIdentity(colorPin); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GMFGraphPackage.VISIBLE_PIN: { + VisiblePin visiblePin = (VisiblePin)theEObject; + T result = caseVisiblePin(visiblePin); + if (result == null) result = casePin(visiblePin); + if (result == null) result = caseIdentity(visiblePin); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GMFGraphPackage.PIN_OWNER: { + PinOwner pinOwner = (PinOwner)theEObject; + T result = casePinOwner(pinOwner); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -1739,6 +1795,81 @@ public class GMFGraphSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>Pin</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Pin</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePin(Pin object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Custom Pin</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Custom Pin</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCustomPin(CustomPin object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Color Pin</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Color Pin</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseColorPin(ColorPin object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Visible Pin</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Visible Pin</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVisiblePin(VisiblePin object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Pin Owner</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Pin Owner</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePinOwner(PinOwner object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. * <!-- begin-user-doc --> * This implementation returns null; diff --git a/plugins/org.eclipse.gmf.map.edit/plugin.properties b/plugins/org.eclipse.gmf.map.edit/plugin.properties index ecfcb57..eb4c8ba 100644 --- a/plugins/org.eclipse.gmf.map.edit/plugin.properties +++ b/plugins/org.eclipse.gmf.map.edit/plugin.properties @@ -255,3 +255,13 @@ _UI_OclChoiceLabelMapping_refFeature_feature = Ref Feature _UI_OclChoiceLabelMapping_itemsExpression_feature = Items Expression _UI_OclChoiceLabelMapping_showExpression_feature = Show Expression _UI_OclChoiceLabelMapping_feature_feature = Feature +_UI_PinMapping_type = Pin Mapping +_UI_NodeMapping_pins_feature = Pins +_UI_PinMapping_diagramPin_feature = Diagram Pin +_UI_PinMapping_oclExpression_feature = Ocl Expression +_UI_PinMapping_parentNode_feature = Parent Node +_UI_VisualEffectMapping_type = Visual Effect Mapping +_UI_VisualEffectMapping_diagramPin_feature = Diagram Pin +_UI_VisualEffectMapping_oclExpression_feature = Ocl Expression +_UI_VisualEffectMapping_parentNode_feature = Parent Node +_UI_NodeMapping_visualEffects_feature = Visual Effects diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java index f148630..f9c6aa9 100644 --- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapItemProviderAdapterFactory.java @@ -695,6 +695,29 @@ public class GMFMapItemProviderAdapterFactory extends GMFMapAdapterFactory imple } /** + * This keeps track of the one adapter used for all {@link org.eclipse.gmf.mappings.VisualEffectMapping} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VisualEffectMappingItemProvider visualEffectMappingItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.gmf.mappings.VisualEffectMapping}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createVisualEffectMappingAdapter() { + if (visualEffectMappingItemProvider == null) { + visualEffectMappingItemProvider = new VisualEffectMappingItemProvider(this); + } + + return visualEffectMappingItemProvider; + } + + /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -820,6 +843,7 @@ public class GMFMapItemProviderAdapterFactory extends GMFMapAdapterFactory imple if (metricContainerItemProvider != null) metricContainerItemProvider.dispose(); if (metricRuleItemProvider != null) metricRuleItemProvider.dispose(); if (auditedMetricTargetItemProvider != null) auditedMetricTargetItemProvider.dispose(); + if (visualEffectMappingItemProvider != null) visualEffectMappingItemProvider.dispose(); } } diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java index 836d47d..04482f6 100644 --- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java +++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/NodeMappingItemProvider.java @@ -178,6 +178,7 @@ public class NodeMappingItemProvider super.getChildrenFeatures(object); childrenFeatures.add(GMFMapPackage.eINSTANCE.getNodeMapping_Children()); childrenFeatures.add(GMFMapPackage.eINSTANCE.getNodeMapping_Compartments()); + childrenFeatures.add(GMFMapPackage.eINSTANCE.getNodeMapping_VisualEffects()); } return childrenFeatures; } @@ -242,6 +243,7 @@ public class NodeMappingItemProvider switch (notification.getFeatureID(NodeMapping.class)) { case GMFMapPackage.NODE_MAPPING__CHILDREN: case GMFMapPackage.NODE_MAPPING__COMPARTMENTS: + case GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -278,6 +280,11 @@ public class NodeMappingItemProvider (createChildParameter (GMFMapPackage.eINSTANCE.getNodeMapping_Compartments(), GMFMapFactory.eINSTANCE.createCompartmentMapping())); + + newChildDescriptors.add + (createChildParameter + (GMFMapPackage.eINSTANCE.getNodeMapping_VisualEffects(), + GMFMapFactory.eINSTANCE.createVisualEffectMapping())); } } diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/VisualEffectMappingItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/VisualEffectMappingItemProvider.java new file mode 100644 index 0000000..be81d5f --- a/dev/null +++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/VisualEffectMappingItemProvider.java @@ -0,0 +1,184 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.mappings.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.IItemPropertyDescriptor;
+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.mappings.GMFMapPackage;
+import org.eclipse.gmf.mappings.VisualEffectMapping;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.mappings.VisualEffectMapping} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VisualEffectMappingItemProvider
+ 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 VisualEffectMappingItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDiagramPinPropertyDescriptor(object);
+ addOclExpressionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Diagram Pin feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDiagramPinPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_VisualEffectMapping_diagramPin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_VisualEffectMapping_diagramPin_feature", "_UI_VisualEffectMapping_type"),
+ GMFMapPackage.eINSTANCE.getVisualEffectMapping_DiagramPin(),
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Ocl Expression feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addOclExpressionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_VisualEffectMapping_oclExpression_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_VisualEffectMapping_oclExpression_feature", "_UI_VisualEffectMapping_type"),
+ GMFMapPackage.eINSTANCE.getVisualEffectMapping_OclExpression(),
+ true,
+ true,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns VisualEffectMapping.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/VisualEffectMapping"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = crop(((VisualEffectMapping)object).getOclExpression());
+ return label == null || label.length() == 0 ?
+ getString("_UI_VisualEffectMapping_type") :
+ getString("_UI_VisualEffectMapping_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
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(VisualEffectMapping.class)) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__OCL_EXPRESSION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return GMFMapEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.map/models/gmfmap.ecore b/plugins/org.eclipse.gmf.map/models/gmfmap.ecore index 7d8a4cc..d005e6f 100644 --- a/plugins/org.eclipse.gmf.map/models/gmfmap.ecore +++ b/plugins/org.eclipse.gmf.map/models/gmfmap.ecore @@ -139,6 +139,8 @@ eType="#//ChildReference" containment="true" eOpposite="#//ChildReference/parentNode"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="compartments" upperBound="-1"
eType="#//CompartmentMapping" containment="true" eOpposite="#//CompartmentMapping/parentNode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="visualEffects" upperBound="-1"
+ eType="#//VisualEffectMapping" containment="true" eOpposite="#//VisualEffectMapping/parentNode"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CompartmentMapping">
<eStructuralFeatures xsi:type="ecore:EReference" name="compartment" lowerBound="1"
@@ -742,4 +744,11 @@ <eLiterals name="nregexp" value="3"/>
<eLiterals name="literal" value="4"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VisualEffectMapping">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="diagramPin" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.gmf.graphdef/models/gmfgraph.ecore#//Pin"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="oclExpression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parentNode" lowerBound="1"
+ eType="#//NodeMapping" changeable="false" eOpposite="#//NodeMapping/visualEffects"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.gmf.map/models/gmfmap.emf b/plugins/org.eclipse.gmf.map/models/gmfmap.emf index 2e33c1b..09d932f 100644 --- a/plugins/org.eclipse.gmf.map/models/gmfmap.emf +++ b/plugins/org.eclipse.gmf.map/models/gmfmap.emf @@ -107,6 +107,8 @@ class NodeMapping extends MappingEntry, MenuOwner, ToolOwner, AppearanceSteward val CompartmentMapping[*]#parentNode compartments; //FIXME no containment feature - persist in resource then. Was: @constraints(ocl="not containmentFeature.oclIsUndefined() ", description="The child node mapping containmentFeature must be set") + + val VisualEffectMapping[*]#parentNode visualEffects; } class CompartmentMapping { @@ -453,3 +455,10 @@ enum Language { nregexp = 3; literal = 4; } + +class VisualEffectMapping { + ref gmfgraph.Pin[1] diagramPin; + attr String oclExpression; + + readonly ref NodeMapping[1]#visualEffects parentNode; +} diff --git a/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel b/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel index 0401453..42870b8 100644 --- a/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel +++ b/plugins/org.eclipse.gmf.map/models/gmfmap.genmodel @@ -68,6 +68,7 @@ ecoreFeature="ecore:EReference gmfmap.ecore#//NodeMapping/diagramNode"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfmap.ecore#//NodeMapping/children"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfmap.ecore#//NodeMapping/compartments"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfmap.ecore#//NodeMapping/visualEffects"/>
</genClasses>
<genClasses ecoreClass="gmfmap.ecore#//CompartmentMapping">
<genFeatures notify="false" createChild="false" propertyCategory="Visual representation"
@@ -224,5 +225,10 @@ </genClasses>
<genClasses ecoreClass="gmfmap.ecore#//Auditable"/>
<genClasses ecoreClass="gmfmap.ecore#//Measurable"/>
+ <genClasses ecoreClass="gmfmap.ecore#//VisualEffectMapping">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfmap.ecore#//VisualEffectMapping/diagramPin"/>
+ <genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute gmfmap.ecore#//VisualEffectMapping/oclExpression"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfmap.ecore#//VisualEffectMapping/parentNode"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java index 81cfba0..184e3f02 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapFactory.java @@ -269,6 +269,15 @@ public interface GMFMapFactory extends EFactory { AuditedMetricTarget createAuditedMetricTarget(); /** + * Returns a new object of class '<em>Visual Effect Mapping</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Visual Effect Mapping</em>'. + * @generated + */ + VisualEffectMapping createVisualEffectMapping(); + + /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java index 9b3f9d4..85ffcc2 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/GMFMapPackage.java @@ -551,13 +551,22 @@ public interface GMFMapPackage extends EPackage { int NODE_MAPPING__COMPARTMENTS = MAPPING_ENTRY_FEATURE_COUNT + 5; /** + * The feature id for the '<em><b>Visual Effects</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NODE_MAPPING__VISUAL_EFFECTS = MAPPING_ENTRY_FEATURE_COUNT + 6; + + /** * The number of structural features of the '<em>Node Mapping</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int NODE_MAPPING_FEATURE_COUNT = MAPPING_ENTRY_FEATURE_COUNT + 6; + int NODE_MAPPING_FEATURE_COUNT = MAPPING_ENTRY_FEATURE_COUNT + 7; /** * The feature id for the '<em><b>Compartment</b></em>' reference. @@ -2084,6 +2093,52 @@ public interface GMFMapPackage extends EPackage { int MEASURABLE_FEATURE_COUNT = 0; /** + * The meta object id for the '{@link org.eclipse.gmf.mappings.impl.VisualEffectMappingImpl <em>Visual Effect Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.gmf.mappings.impl.VisualEffectMappingImpl + * @see org.eclipse.gmf.mappings.impl.GMFMapPackageImpl#getVisualEffectMapping() + * @generated + */ + int VISUAL_EFFECT_MAPPING = 37; + + /** + * The feature id for the '<em><b>Diagram Pin</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISUAL_EFFECT_MAPPING__DIAGRAM_PIN = 0; + + /** + * The feature id for the '<em><b>Ocl Expression</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISUAL_EFFECT_MAPPING__OCL_EXPRESSION = 1; + + /** + * The feature id for the '<em><b>Parent Node</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISUAL_EFFECT_MAPPING__PARENT_NODE = 2; + + /** + * The number of structural features of the '<em>Visual Effect Mapping</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VISUAL_EFFECT_MAPPING_FEATURE_COUNT = 3; + + /** * The meta object id for the '{@link org.eclipse.gmf.mappings.LabelTextAccessMethod <em>Label Text Access Method</em>}' enum. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2352,6 +2407,17 @@ public interface GMFMapPackage extends EPackage { EReference getNodeMapping_Compartments(); /** + * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.mappings.NodeMapping#getVisualEffects <em>Visual Effects</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Visual Effects</em>'. + * @see org.eclipse.gmf.mappings.NodeMapping#getVisualEffects() + * @see #getNodeMapping() + * @generated + */ + EReference getNodeMapping_VisualEffects(); + + /** * Returns the meta object for class '{@link org.eclipse.gmf.mappings.CompartmentMapping <em>Compartment Mapping</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3552,6 +3618,49 @@ public interface GMFMapPackage extends EPackage { EClass getMeasurable(); /** + * Returns the meta object for class '{@link org.eclipse.gmf.mappings.VisualEffectMapping <em>Visual Effect Mapping</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Visual Effect Mapping</em>'. + * @see org.eclipse.gmf.mappings.VisualEffectMapping + * @generated + */ + EClass getVisualEffectMapping(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.gmf.mappings.VisualEffectMapping#getDiagramPin <em>Diagram Pin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Diagram Pin</em>'. + * @see org.eclipse.gmf.mappings.VisualEffectMapping#getDiagramPin() + * @see #getVisualEffectMapping() + * @generated + */ + EReference getVisualEffectMapping_DiagramPin(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.gmf.mappings.VisualEffectMapping#getOclExpression <em>Ocl Expression</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Ocl Expression</em>'. + * @see org.eclipse.gmf.mappings.VisualEffectMapping#getOclExpression() + * @see #getVisualEffectMapping() + * @generated + */ + EAttribute getVisualEffectMapping_OclExpression(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.gmf.mappings.VisualEffectMapping#getParentNode <em>Parent Node</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the container reference '<em>Parent Node</em>'. + * @see org.eclipse.gmf.mappings.VisualEffectMapping#getParentNode() + * @see #getVisualEffectMapping() + * @generated + */ + EReference getVisualEffectMapping_ParentNode(); + + /** * Returns the meta object for enum '{@link org.eclipse.gmf.mappings.LabelTextAccessMethod <em>Label Text Access Method</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/NodeMapping.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/NodeMapping.java index 0f72bef..344962a 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/NodeMapping.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/NodeMapping.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.gmfgraph.Node; * <li>{@link org.eclipse.gmf.mappings.NodeMapping#getDiagramNode <em>Diagram Node</em>}</li> * <li>{@link org.eclipse.gmf.mappings.NodeMapping#getChildren <em>Children</em>}</li> * <li>{@link org.eclipse.gmf.mappings.NodeMapping#getCompartments <em>Compartments</em>}</li> + * <li>{@link org.eclipse.gmf.mappings.NodeMapping#getVisualEffects <em>Visual Effects</em>}</li> * </ul> * </p> * @@ -96,4 +97,22 @@ public interface NodeMapping extends MappingEntry, MenuOwner, ToolOwner, Appeara */ EList<CompartmentMapping> getCompartments(); + /** + * Returns the value of the '<em><b>Visual Effects</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.gmf.mappings.VisualEffectMapping}. + * It is bidirectional and its opposite is '{@link org.eclipse.gmf.mappings.VisualEffectMapping#getParentNode <em>Parent Node</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Visual Effects</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Visual Effects</em>' containment reference list. + * @see org.eclipse.gmf.mappings.GMFMapPackage#getNodeMapping_VisualEffects() + * @see org.eclipse.gmf.mappings.VisualEffectMapping#getParentNode + * @model opposite="parentNode" containment="true" + * @generated + */ + EList<VisualEffectMapping> getVisualEffects(); + } // NodeMapping diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/VisualEffectMapping.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/VisualEffectMapping.java new file mode 100644 index 0000000..e91621d --- a/dev/null +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/VisualEffectMapping.java @@ -0,0 +1,101 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.mappings;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.gmf.gmfgraph.Pin;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Visual Effect Mapping</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.mappings.VisualEffectMapping#getDiagramPin <em>Diagram Pin</em>}</li>
+ * <li>{@link org.eclipse.gmf.mappings.VisualEffectMapping#getOclExpression <em>Ocl Expression</em>}</li>
+ * <li>{@link org.eclipse.gmf.mappings.VisualEffectMapping#getParentNode <em>Parent Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.mappings.GMFMapPackage#getVisualEffectMapping()
+ * @model
+ * @generated
+ */
+public interface VisualEffectMapping extends EObject {
+ /**
+ * Returns the value of the '<em><b>Diagram Pin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Diagram Pin</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Diagram Pin</em>' reference.
+ * @see #setDiagramPin(Pin)
+ * @see org.eclipse.gmf.mappings.GMFMapPackage#getVisualEffectMapping_DiagramPin()
+ * @model required="true"
+ * @generated
+ */
+ Pin getDiagramPin();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.mappings.VisualEffectMapping#getDiagramPin <em>Diagram Pin</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Diagram Pin</em>' reference.
+ * @see #getDiagramPin()
+ * @generated
+ */
+ void setDiagramPin(Pin value);
+
+ /**
+ * Returns the value of the '<em><b>Ocl Expression</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Ocl Expression</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Ocl Expression</em>' attribute.
+ * @see #setOclExpression(String)
+ * @see org.eclipse.gmf.mappings.GMFMapPackage#getVisualEffectMapping_OclExpression()
+ * @model
+ * @generated
+ */
+ String getOclExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.mappings.VisualEffectMapping#getOclExpression <em>Ocl Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Ocl Expression</em>' attribute.
+ * @see #getOclExpression()
+ * @generated
+ */
+ void setOclExpression(String value);
+
+ /**
+ * Returns the value of the '<em><b>Parent Node</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.gmf.mappings.NodeMapping#getVisualEffects <em>Visual Effects</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent Node</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent Node</em>' container reference.
+ * @see org.eclipse.gmf.mappings.GMFMapPackage#getVisualEffectMapping_ParentNode()
+ * @see org.eclipse.gmf.mappings.NodeMapping#getVisualEffects
+ * @model opposite="visualEffects" required="true" transient="false" changeable="false"
+ * @generated
+ */
+ NodeMapping getParentNode();
+
+} // VisualEffectMapping
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java index 0cc77f0..f59702b 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapFactoryImpl.java @@ -104,6 +104,7 @@ public class GMFMapFactoryImpl extends EFactoryImpl implements GMFMapFactory { case GMFMapPackage.METRIC_CONTAINER: return createMetricContainer(); case GMFMapPackage.METRIC_RULE: return createMetricRule(); case GMFMapPackage.AUDITED_METRIC_TARGET: return createAuditedMetricTarget(); + case GMFMapPackage.VISUAL_EFFECT_MAPPING: return createVisualEffectMapping(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -422,6 +423,16 @@ public class GMFMapFactoryImpl extends EFactoryImpl implements GMFMapFactory { * <!-- end-user-doc --> * @generated */ + public VisualEffectMapping createVisualEffectMapping() { + VisualEffectMappingImpl visualEffectMapping = new VisualEffectMappingImpl(); + return visualEffectMapping; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public LabelTextAccessMethod createLabelTextAccessMethodFromString(EDataType eDataType, String initialValue) { LabelTextAccessMethod result = LabelTextAccessMethod.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java index 7df1197..d4bc76d 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/GMFMapPackageImpl.java @@ -58,6 +58,10 @@ import org.eclipse.gmf.mappings.Severity; import org.eclipse.gmf.mappings.ToolOwner; import org.eclipse.gmf.mappings.TopNodeReference; import org.eclipse.gmf.mappings.ValueExpression; +<<<<<<< OURS +======= +import org.eclipse.gmf.mappings.VisualEffectMapping; +>>>>>>> THEIRS import org.eclipse.gmf.tooldef.GMFToolPackage; import org.eclipse.gmf.validate.GMFValidator; @@ -339,6 +343,13 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage { * <!-- end-user-doc --> * @generated */ + private EClass visualEffectMappingEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EEnum labelTextAccessMethodEEnum = null; /** @@ -630,6 +641,15 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage { * <!-- end-user-doc --> * @generated */ + public EReference getNodeMapping_VisualEffects() { + return (EReference)nodeMappingEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EClass getCompartmentMapping() { return compartmentMappingEClass; } @@ -1638,6 +1658,42 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage { * <!-- end-user-doc --> * @generated */ + public EClass getVisualEffectMapping() { + return visualEffectMappingEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVisualEffectMapping_DiagramPin() { + return (EReference)visualEffectMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVisualEffectMapping_OclExpression() { + return (EAttribute)visualEffectMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVisualEffectMapping_ParentNode() { + return (EReference)visualEffectMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EEnum getLabelTextAccessMethod() { return labelTextAccessMethodEEnum; } @@ -1723,6 +1779,7 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage { createEReference(nodeMappingEClass, NODE_MAPPING__DIAGRAM_NODE); createEReference(nodeMappingEClass, NODE_MAPPING__CHILDREN); createEReference(nodeMappingEClass, NODE_MAPPING__COMPARTMENTS); + createEReference(nodeMappingEClass, NODE_MAPPING__VISUAL_EFFECTS); compartmentMappingEClass = createEClass(COMPARTMENT_MAPPING); createEReference(compartmentMappingEClass, COMPARTMENT_MAPPING__COMPARTMENT); @@ -1860,6 +1917,11 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage { measurableEClass = createEClass(MEASURABLE); + visualEffectMappingEClass = createEClass(VISUAL_EFFECT_MAPPING); + createEReference(visualEffectMappingEClass, VISUAL_EFFECT_MAPPING__DIAGRAM_PIN); + createEAttribute(visualEffectMappingEClass, VISUAL_EFFECT_MAPPING__OCL_EXPRESSION); + createEReference(visualEffectMappingEClass, VISUAL_EFFECT_MAPPING__PARENT_NODE); + // Create enums labelTextAccessMethodEEnum = createEEnum(LABEL_TEXT_ACCESS_METHOD); severityEEnum = createEEnum(SEVERITY); @@ -1967,6 +2029,7 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage { initEReference(getNodeMapping_DiagramNode(), theGMFGraphPackage.getNode(), null, "diagramNode", null, 1, 1, NodeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getNodeMapping_Children(), this.getChildReference(), this.getChildReference_ParentNode(), "children", null, 0, -1, NodeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getNodeMapping_Compartments(), this.getCompartmentMapping(), this.getCompartmentMapping_ParentNode(), "compartments", null, 0, -1, NodeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeMapping_VisualEffects(), this.getVisualEffectMapping(), this.getVisualEffectMapping_ParentNode(), "visualEffects", null, 0, -1, NodeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(compartmentMappingEClass, CompartmentMapping.class, "CompartmentMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getCompartmentMapping_Compartment(), theGMFGraphPackage.getCompartment(), null, "compartment", null, 1, 1, CompartmentMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -2104,6 +2167,11 @@ public class GMFMapPackageImpl extends EPackageImpl implements GMFMapPackage { initEClass(measurableEClass, Measurable.class, "Measurable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(visualEffectMappingEClass, VisualEffectMapping.class, "VisualEffectMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVisualEffectMapping_DiagramPin(), theGMFGraphPackage.getPin(), null, "diagramPin", null, 1, 1, VisualEffectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVisualEffectMapping_OclExpression(), ecorePackage.getEString(), "oclExpression", null, 0, 1, VisualEffectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVisualEffectMapping_ParentNode(), this.getNodeMapping(), this.getNodeMapping_VisualEffects(), "parentNode", null, 1, 1, VisualEffectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize enums and add enum literals initEEnum(labelTextAccessMethodEEnum, LabelTextAccessMethod.class, "LabelTextAccessMethod"); addEEnumLiteral(labelTextAccessMethodEEnum, LabelTextAccessMethod.MESSAGE_FORMAT); diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/NodeMappingImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/NodeMappingImpl.java index 4e3f70e..965b5f1 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/NodeMappingImpl.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/NodeMappingImpl.java @@ -10,15 +10,12 @@ import java.util.Collection; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; - import org.eclipse.emf.common.util.EList; - import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.InternalEList; - import org.eclipse.gmf.gmfgraph.Node; import org.eclipse.gmf.mappings.AppearanceSteward; import org.eclipse.gmf.mappings.ChildReference; @@ -26,9 +23,8 @@ import org.eclipse.gmf.mappings.CompartmentMapping; import org.eclipse.gmf.mappings.GMFMapPackage; import org.eclipse.gmf.mappings.MenuOwner; import org.eclipse.gmf.mappings.NodeMapping; - import org.eclipse.gmf.mappings.ToolOwner; - +import org.eclipse.gmf.mappings.VisualEffectMapping; import org.eclipse.gmf.tooldef.AbstractTool; import org.eclipse.gmf.tooldef.ContextMenu; import org.eclipse.gmf.tooldef.StyleSelector; @@ -46,6 +42,7 @@ import org.eclipse.gmf.tooldef.StyleSelector; * <li>{@link org.eclipse.gmf.mappings.impl.NodeMappingImpl#getDiagramNode <em>Diagram Node</em>}</li> * <li>{@link org.eclipse.gmf.mappings.impl.NodeMappingImpl#getChildren <em>Children</em>}</li> * <li>{@link org.eclipse.gmf.mappings.impl.NodeMappingImpl#getCompartments <em>Compartments</em>}</li> + * <li>{@link org.eclipse.gmf.mappings.impl.NodeMappingImpl#getVisualEffects <em>Visual Effects</em>}</li> * </ul> * </p> * @@ -113,6 +110,16 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { protected EList<CompartmentMapping> compartments; /** + * The cached value of the '{@link #getVisualEffects() <em>Visual Effects</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVisualEffects() + * @generated + * @ordered + */ + protected EList<VisualEffectMapping> visualEffects; + + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated @@ -312,6 +319,18 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { * <!-- end-user-doc --> * @generated */ + public EList<VisualEffectMapping> getVisualEffects() { + if (visualEffects == null) { + visualEffects = new EObjectContainmentWithInverseEList<VisualEffectMapping>(VisualEffectMapping.class, this, GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS, GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE); + } + return visualEffects; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { @@ -320,6 +339,8 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { return ((InternalEList<InternalEObject>)(InternalEList<?>)getChildren()).basicAdd(otherEnd, msgs); case GMFMapPackage.NODE_MAPPING__COMPARTMENTS: return ((InternalEList<InternalEObject>)(InternalEList<?>)getCompartments()).basicAdd(otherEnd, msgs); + case GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getVisualEffects()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } @@ -336,6 +357,8 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs); case GMFMapPackage.NODE_MAPPING__COMPARTMENTS: return ((InternalEList<?>)getCompartments()).basicRemove(otherEnd, msgs); + case GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS: + return ((InternalEList<?>)getVisualEffects()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -364,6 +387,8 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { return getChildren(); case GMFMapPackage.NODE_MAPPING__COMPARTMENTS: return getCompartments(); + case GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS: + return getVisualEffects(); } return super.eGet(featureID, resolve, coreType); } @@ -397,6 +422,10 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { getCompartments().clear(); getCompartments().addAll((Collection<? extends CompartmentMapping>)newValue); return; + case GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS: + getVisualEffects().clear(); + getVisualEffects().addAll((Collection<? extends VisualEffectMapping>)newValue); + return; } super.eSet(featureID, newValue); } @@ -427,6 +456,9 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { case GMFMapPackage.NODE_MAPPING__COMPARTMENTS: getCompartments().clear(); return; + case GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS: + getVisualEffects().clear(); + return; } super.eUnset(featureID); } @@ -451,6 +483,8 @@ public class NodeMappingImpl extends MappingEntryImpl implements NodeMapping { return children != null && !children.isEmpty(); case GMFMapPackage.NODE_MAPPING__COMPARTMENTS: return compartments != null && !compartments.isEmpty(); + case GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS: + return visualEffects != null && !visualEffects.isEmpty(); } return super.eIsSet(featureID); } diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/VisualEffectMappingImpl.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/VisualEffectMappingImpl.java new file mode 100644 index 0000000..2feeb83 --- a/dev/null +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/impl/VisualEffectMappingImpl.java @@ -0,0 +1,291 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.mappings.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.gmf.gmfgraph.Pin;
+
+import org.eclipse.gmf.mappings.GMFMapPackage;
+import org.eclipse.gmf.mappings.NodeMapping;
+import org.eclipse.gmf.mappings.VisualEffectMapping;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Visual Effect Mapping</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.mappings.impl.VisualEffectMappingImpl#getDiagramPin <em>Diagram Pin</em>}</li>
+ * <li>{@link org.eclipse.gmf.mappings.impl.VisualEffectMappingImpl#getOclExpression <em>Ocl Expression</em>}</li>
+ * <li>{@link org.eclipse.gmf.mappings.impl.VisualEffectMappingImpl#getParentNode <em>Parent Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class VisualEffectMappingImpl extends EObjectImpl implements VisualEffectMapping {
+ /**
+ * The cached value of the '{@link #getDiagramPin() <em>Diagram Pin</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDiagramPin()
+ * @generated
+ * @ordered
+ */
+ protected Pin diagramPin;
+
+ /**
+ * The default value of the '{@link #getOclExpression() <em>Ocl Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOclExpression()
+ * @generated
+ * @ordered
+ */
+ protected static final String OCL_EXPRESSION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getOclExpression() <em>Ocl Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOclExpression()
+ * @generated
+ * @ordered
+ */
+ protected String oclExpression = OCL_EXPRESSION_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VisualEffectMappingImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GMFMapPackage.eINSTANCE.getVisualEffectMapping();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pin getDiagramPin() {
+ if (diagramPin != null && diagramPin.eIsProxy()) {
+ InternalEObject oldDiagramPin = (InternalEObject)diagramPin;
+ diagramPin = (Pin)eResolveProxy(oldDiagramPin);
+ if (diagramPin != oldDiagramPin) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFMapPackage.VISUAL_EFFECT_MAPPING__DIAGRAM_PIN, oldDiagramPin, diagramPin));
+ }
+ }
+ return diagramPin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pin basicGetDiagramPin() {
+ return diagramPin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDiagramPin(Pin newDiagramPin) {
+ Pin oldDiagramPin = diagramPin;
+ diagramPin = newDiagramPin;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFMapPackage.VISUAL_EFFECT_MAPPING__DIAGRAM_PIN, oldDiagramPin, diagramPin));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getOclExpression() {
+ return oclExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOclExpression(String newOclExpression) {
+ String oldOclExpression = oclExpression;
+ oclExpression = newOclExpression;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFMapPackage.VISUAL_EFFECT_MAPPING__OCL_EXPRESSION, oldOclExpression, oclExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeMapping getParentNode() {
+ if (eContainerFeatureID() != GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE) return null;
+ return (NodeMapping)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return eBasicSetContainer(otherEnd, GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE:
+ return eBasicSetContainer(null, GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE:
+ return eInternalContainer().eInverseRemove(this, GMFMapPackage.NODE_MAPPING__VISUAL_EFFECTS, NodeMapping.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__DIAGRAM_PIN:
+ if (resolve) return getDiagramPin();
+ return basicGetDiagramPin();
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__OCL_EXPRESSION:
+ return getOclExpression();
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE:
+ return getParentNode();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__DIAGRAM_PIN:
+ setDiagramPin((Pin)newValue);
+ return;
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__OCL_EXPRESSION:
+ setOclExpression((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__DIAGRAM_PIN:
+ setDiagramPin((Pin)null);
+ return;
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__OCL_EXPRESSION:
+ setOclExpression(OCL_EXPRESSION_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__DIAGRAM_PIN:
+ return diagramPin != null;
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__OCL_EXPRESSION:
+ return OCL_EXPRESSION_EDEFAULT == null ? oclExpression != null : !OCL_EXPRESSION_EDEFAULT.equals(oclExpression);
+ case GMFMapPackage.VISUAL_EFFECT_MAPPING__PARENT_NODE:
+ return getParentNode() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (oclExpression: ");
+ result.append(oclExpression);
+ result.append(')');
+ return result.toString();
+ }
+
+} //VisualEffectMappingImpl
diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java index 7280d01..31ae947 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapAdapterFactory.java @@ -245,6 +245,10 @@ public class GMFMapAdapterFactory extends AdapterFactoryImpl { return createMeasurableAdapter(); } @Override + public Adapter caseVisualEffectMapping(VisualEffectMapping object) { + return createVisualEffectMappingAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -797,6 +801,20 @@ public class GMFMapAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.gmf.mappings.VisualEffectMapping <em>Visual Effect Mapping</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.gmf.mappings.VisualEffectMapping + * @generated + */ + public Adapter createVisualEffectMappingAdapter() { + return null; + } + + /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> * This default implementation returns null. diff --git a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java index 07521d2..fa84174 100644 --- a/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java +++ b/plugins/org.eclipse.gmf.map/src/org/eclipse/gmf/mappings/util/GMFMapSwitch.java @@ -355,6 +355,12 @@ public class GMFMapSwitch<T> extends Switch<T> { if (result == null) result = defaultCase(theEObject); return result; } + case GMFMapPackage.VISUAL_EFFECT_MAPPING: { + VisualEffectMapping visualEffectMapping = (VisualEffectMapping)theEObject; + T result = caseVisualEffectMapping(visualEffectMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -930,6 +936,21 @@ public class GMFMapSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>Visual Effect Mapping</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Visual Effect Mapping</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVisualEffectMapping(VisualEffectMapping object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. * <!-- begin-user-doc --> * This implementation returns null; |

