| /** |
| * Copyright (c) 2016 CEA LIST and others. |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * CEA LIST - Initial API and implementation |
| * |
| */ |
| package org.eclipse.papyrus.interoperability.rpy.rpymetamodel.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.ecore.EStructuralFeature; |
| |
| import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
| import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
| import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
| import org.eclipse.emf.edit.provider.ViewerNotification; |
| |
| import org.eclipse.papyrus.interoperability.rpy.rpymetamodel.CGIObjectLink; |
| import org.eclipse.papyrus.interoperability.rpy.rpymetamodel.UMLRpyFactory; |
| import org.eclipse.papyrus.interoperability.rpy.rpymetamodel.UMLRpyPackage; |
| |
| /** |
| * This is the item provider adapter for a {@link org.eclipse.papyrus.interoperability.rpy.rpymetamodel.CGIObjectLink} object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class CGIObjectLinkItemProvider extends GraphElementsTypeItemProvider { |
| /** |
| * This constructs an instance from a factory and a notifier. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CGIObjectLinkItemProvider(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); |
| |
| addM_pModelObjectPropertyDescriptor(object); |
| addM_pParentPropertyDescriptor(object); |
| addM_pSourcePropertyDescriptor(object); |
| addM_sourceTypePropertyDescriptor(object); |
| addM_pTargetPropertyDescriptor(object); |
| addM_targetTypePropertyDescriptor(object); |
| addM_directionPropertyDescriptor(object); |
| addM_arrowPropertyDescriptor(object); |
| addM_anglePoint1PropertyDescriptor(object); |
| addM_anglePoint2PropertyDescriptor(object); |
| addM_line_stylePropertyDescriptor(object); |
| addM_SourcePortPropertyDescriptor(object); |
| addM_TargetPortPropertyDescriptor(object); |
| addM_bShowSourceMultiplicityPropertyDescriptor(object); |
| addM_bShowSourceRolePropertyDescriptor(object); |
| addM_bShowTargetMultiplicityPropertyDescriptor(object); |
| addM_bShowTargetRolePropertyDescriptor(object); |
| addM_bShowLinkNamePropertyDescriptor(object); |
| } |
| return itemPropertyDescriptors; |
| } |
| |
| /** |
| * This adds a property descriptor for the MpModel Object feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_pModelObjectPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_pModelObject_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_pModelObject_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_pModelObject(), |
| true, |
| false, |
| true, |
| null, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MpParent feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_pParentPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_pParent_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_pParent_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_pParent(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MpSource feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_pSourcePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_pSource_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_pSource_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_pSource(), |
| true, |
| false, |
| true, |
| null, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Msource Type feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_sourceTypePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_sourceType_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_sourceType_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_sourceType(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MpTarget feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_pTargetPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_pTarget_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_pTarget_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_pTarget(), |
| true, |
| false, |
| true, |
| null, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Mtarget Type feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_targetTypePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_targetType_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_targetType_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_targetType(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Mdirection feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_directionPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_direction_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_direction_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_direction(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Marrow feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_arrowPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_arrow_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_arrow_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_arrow(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Mangle Point1 feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_anglePoint1PropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_anglePoint1_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_anglePoint1_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_anglePoint1(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Mangle Point2 feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_anglePoint2PropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_anglePoint2_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_anglePoint2_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_anglePoint2(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Mline style feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_line_stylePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_line_style_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_line_style_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_line_style(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MSource Port feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_SourcePortPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_SourcePort_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_SourcePort_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_SourcePort(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MTarget Port feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_TargetPortPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_TargetPort_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_TargetPort_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_TargetPort(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MbShow Source Multiplicity feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_bShowSourceMultiplicityPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_bShowSourceMultiplicity_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_bShowSourceMultiplicity_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_bShowSourceMultiplicity(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MbShow Source Role feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_bShowSourceRolePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_bShowSourceRole_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_bShowSourceRole_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_bShowSourceRole(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MbShow Target Multiplicity feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_bShowTargetMultiplicityPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_bShowTargetMultiplicity_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_bShowTargetMultiplicity_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_bShowTargetMultiplicity(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MbShow Target Role feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_bShowTargetRolePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_bShowTargetRole_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_bShowTargetRole_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_bShowTargetRole(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the MbShow Link Name feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addM_bShowLinkNamePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add |
| (createItemPropertyDescriptor |
| (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_CGIObjectLink_m_bShowLinkName_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", "_UI_CGIObjectLink_m_bShowLinkName_feature", "_UI_CGIObjectLink_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_bShowLinkName(), |
| true, |
| false, |
| false, |
| ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| null, |
| null)); |
| } |
| |
| /** |
| * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
| * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
| * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
| if (childrenFeatures == null) { |
| super.getChildrenFeatures(object); |
| childrenFeatures.add(UMLRpyPackage.eINSTANCE.getCGIObjectLink_Properties()); |
| childrenFeatures.add(UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_rpn()); |
| childrenFeatures.add(UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_sourceRole()); |
| childrenFeatures.add(UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_targetRole()); |
| childrenFeatures.add(UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_sourceMultiplicity()); |
| childrenFeatures.add(UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_targetMultiplicity()); |
| } |
| return childrenFeatures; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EStructuralFeature getChildFeature(Object object, Object child) { |
| // Check the type of the specified child object and return the proper feature to use for |
| // adding (see {@link AddCommand}) it as a child. |
| |
| return super.getChildFeature(object, child); |
| } |
| |
| /** |
| * This returns CGIObjectLink.gif. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object getImage(Object object) { |
| return overlayImage(object, getResourceLocator().getImage("full/obj16/CGIObjectLink")); //$NON-NLS-1$ |
| } |
| |
| /** |
| * This returns the label text for the adapted class. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getText(Object object) { |
| String label = ((CGIObjectLink)object).getId(); |
| return label == null || label.length() == 0 ? |
| getString("_UI_CGIObjectLink_type") : //$NON-NLS-1$ |
| getString("_UI_CGIObjectLink_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ |
| } |
| |
| |
| /** |
| * 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(CGIObjectLink.class)) { |
| case UMLRpyPackage.CGI_OBJECT_LINK__MPPARENT: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MSOURCE_TYPE: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MTARGET_TYPE: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MDIRECTION: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MARROW: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MANGLE_POINT1: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MANGLE_POINT2: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MLINE_STYLE: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MSOURCE_PORT: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MTARGET_PORT: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MBSHOW_SOURCE_MULTIPLICITY: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MBSHOW_SOURCE_ROLE: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MBSHOW_TARGET_MULTIPLICITY: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MBSHOW_TARGET_ROLE: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MBSHOW_LINK_NAME: |
| fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
| return; |
| case UMLRpyPackage.CGI_OBJECT_LINK__PROPERTIES: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MRPN: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MSOURCE_ROLE: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MTARGET_ROLE: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MSOURCE_MULTIPLICITY: |
| case UMLRpyPackage.CGI_OBJECT_LINK__MTARGET_MULTIPLICITY: |
| fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
| 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); |
| |
| newChildDescriptors.add |
| (createChildParameter |
| (UMLRpyPackage.eINSTANCE.getCGIObjectLink_Properties(), |
| UMLRpyFactory.eINSTANCE.createIPropertyContainer())); |
| |
| newChildDescriptors.add |
| (createChildParameter |
| (UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_rpn(), |
| UMLRpyFactory.eINSTANCE.createCGIText())); |
| |
| newChildDescriptors.add |
| (createChildParameter |
| (UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_sourceRole(), |
| UMLRpyFactory.eINSTANCE.createCGIText())); |
| |
| newChildDescriptors.add |
| (createChildParameter |
| (UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_targetRole(), |
| UMLRpyFactory.eINSTANCE.createCGIText())); |
| |
| newChildDescriptors.add |
| (createChildParameter |
| (UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_sourceMultiplicity(), |
| UMLRpyFactory.eINSTANCE.createCGIText())); |
| |
| newChildDescriptors.add |
| (createChildParameter |
| (UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_targetMultiplicity(), |
| UMLRpyFactory.eINSTANCE.createCGIText())); |
| } |
| |
| /** |
| * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { |
| Object childFeature = feature; |
| Object childObject = child; |
| |
| boolean qualify = |
| childFeature == UMLRpyPackage.eINSTANCE.getGraphElementsType_M_name() || |
| childFeature == UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_rpn() || |
| childFeature == UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_sourceRole() || |
| childFeature == UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_targetRole() || |
| childFeature == UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_sourceMultiplicity() || |
| childFeature == UMLRpyPackage.eINSTANCE.getCGIObjectLink_M_targetMultiplicity(); |
| |
| if (qualify) { |
| return getString |
| ("_UI_CreateChild_text2", //$NON-NLS-1$ |
| new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); |
| } |
| return super.getCreateChildText(owner, feature, child, selection); |
| } |
| |
| } |