| /* |
| * Copyright (c) 2005, 2018 IBM Corporation, Embarcadero Technologies, CEA, 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: |
| * IBM - initial API and implementation |
| * Kenn Hussey (Embarcadero Technologies) - 215418, 204200 |
| * Kenn Hussey - 323181, 438123 |
| * Kenn Hussey (CEA) - 327039, 351774, 418466, 414970, 370089, 511674 |
| * |
| */ |
| package org.eclipse.uml2.uml.edit.providers; |
| |
| 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.uml2.uml.StructuredActivityNode; |
| import org.eclipse.uml2.uml.UMLFactory; |
| import org.eclipse.uml2.uml.UMLPackage; |
| |
| /** |
| * This is the item provider adapter for a {@link org.eclipse.uml2.uml.StructuredActivityNode} object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class StructuredActivityNodeItemProvider |
| extends ActionItemProvider { |
| |
| /** |
| * This constructs an instance from a factory and a notifier. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public StructuredActivityNodeItemProvider(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); |
| |
| addOwnedRulePropertyDescriptor(object); |
| addElementImportPropertyDescriptor(object); |
| addPackageImportPropertyDescriptor(object); |
| addOwnedMemberPropertyDescriptor(object); |
| addImportedMemberPropertyDescriptor(object); |
| addMemberPropertyDescriptor(object); |
| addContainedEdgePropertyDescriptor(object); |
| addContainedNodePropertyDescriptor(object); |
| addInActivityPropertyDescriptor(object); |
| addSubgroupPropertyDescriptor(object); |
| addSuperGroupPropertyDescriptor(object); |
| addEdgePropertyDescriptor(object); |
| addMustIsolatePropertyDescriptor(object); |
| addStructuredNodeInputPropertyDescriptor(object); |
| addStructuredNodeOutputPropertyDescriptor(object); |
| addVariablePropertyDescriptor(object); |
| addNodePropertyDescriptor(object); |
| } |
| return itemPropertyDescriptors; |
| } |
| |
| /** |
| * This adds a property descriptor for the Element Import feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addElementImportPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_Namespace_elementImport_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_Namespace_elementImport_feature", "_UI_Namespace_type"), //$NON-NLS-1$ //$NON-NLS-2$ |
| UMLPackage.Literals.NAMESPACE__ELEMENT_IMPORT, true, false, true, |
| null, null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Package Import feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addPackageImportPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_Namespace_packageImport_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_Namespace_packageImport_feature", "_UI_Namespace_type"), //$NON-NLS-1$ //$NON-NLS-2$ |
| UMLPackage.Literals.NAMESPACE__PACKAGE_IMPORT, true, false, true, |
| null, null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Owned Rule feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addOwnedRulePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), getString("_UI_Namespace_ownedRule_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_Namespace_ownedRule_feature", "_UI_Namespace_type"), //$NON-NLS-1$ //$NON-NLS-2$ |
| UMLPackage.Literals.NAMESPACE__OWNED_RULE, true, false, true, null, |
| null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Member feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addMemberPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), getString("_UI_Namespace_member_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_Namespace_member_feature", "_UI_Namespace_type"), //$NON-NLS-1$ //$NON-NLS-2$ |
| UMLPackage.Literals.NAMESPACE__MEMBER, false, false, false, null, |
| null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Imported Member feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addImportedMemberPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_Namespace_importedMember_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_Namespace_importedMember_feature", "_UI_Namespace_type"), //$NON-NLS-1$ //$NON-NLS-2$ |
| UMLPackage.Literals.NAMESPACE__IMPORTED_MEMBER, false, false, false, |
| null, null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Owned Member feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addOwnedMemberPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_Namespace_ownedMember_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_Namespace_ownedMember_feature", "_UI_Namespace_type"), //$NON-NLS-1$ //$NON-NLS-2$ |
| UMLPackage.Literals.NAMESPACE__OWNED_MEMBER, false, false, false, |
| null, null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Subgroup feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addSubgroupPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_ActivityGroup_subgroup_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_ActivityGroup_subgroup_feature", "_UI_ActivityGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ |
| UMLPackage.Literals.ACTIVITY_GROUP__SUBGROUP, false, false, false, |
| null, null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Super Group feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addSuperGroupPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_ActivityGroup_superGroup_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_ActivityGroup_superGroup_feature", //$NON-NLS-1$ |
| "_UI_ActivityGroup_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.ACTIVITY_GROUP__SUPER_GROUP, false, false, |
| false, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Contained Node feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addContainedNodePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_ActivityGroup_containedNode_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_ActivityGroup_containedNode_feature", //$NON-NLS-1$ |
| "_UI_ActivityGroup_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.ACTIVITY_GROUP__CONTAINED_NODE, false, false, |
| false, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the In Activity feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addInActivityPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_ActivityGroup_inActivity_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_ActivityGroup_inActivity_feature", //$NON-NLS-1$ |
| "_UI_ActivityGroup_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.ACTIVITY_GROUP__IN_ACTIVITY, true, false, true, |
| null, null, new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Contained Edge feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addContainedEdgePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_ActivityGroup_containedEdge_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_ActivityGroup_containedEdge_feature", //$NON-NLS-1$ |
| "_UI_ActivityGroup_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.ACTIVITY_GROUP__CONTAINED_EDGE, false, false, |
| false, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Variable feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addVariablePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_StructuredActivityNode_variable_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_variable_feature", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__VARIABLE, true, false, |
| true, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Node feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addNodePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_StructuredActivityNode_node_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_node_feature", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, true, false, |
| true, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Structured Node Input feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addStructuredNodeInputPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_StructuredActivityNode_structuredNodeInput_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_structuredNodeInput_feature", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT, |
| true, false, true, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Structured Node Output feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addStructuredNodeOutputPropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString( |
| "_UI_StructuredActivityNode_structuredNodeOutput_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_structuredNodeOutput_feature", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT, |
| true, false, true, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * This adds a property descriptor for the Must Isolate feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addMustIsolatePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_StructuredActivityNode_mustIsolate_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_mustIsolate_feature", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__MUST_ISOLATE, true, |
| false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, |
| null)); |
| } |
| |
| /** |
| * This adds a property descriptor for the Edge feature. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void addEdgePropertyDescriptor(Object object) { |
| itemPropertyDescriptors.add(createItemPropertyDescriptor( |
| ((ComposeableAdapterFactory) adapterFactory) |
| .getRootAdapterFactory(), |
| getResourceLocator(), |
| getString("_UI_StructuredActivityNode_edge_feature"), //$NON-NLS-1$ |
| getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_edge_feature", //$NON-NLS-1$ |
| "_UI_StructuredActivityNode_type"), //$NON-NLS-1$ |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE, true, false, |
| true, null, null, |
| new String[]{"org.eclipse.ui.views.properties.expert" //$NON-NLS-1$ |
| })); |
| } |
| |
| /** |
| * 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(UMLPackage.Literals.NAMESPACE__OWNED_RULE); |
| childrenFeatures.add(UMLPackage.Literals.NAMESPACE__ELEMENT_IMPORT); |
| childrenFeatures.add(UMLPackage.Literals.NAMESPACE__PACKAGE_IMPORT); |
| childrenFeatures |
| .add(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE); |
| childrenFeatures.add( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT); |
| childrenFeatures.add( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT); |
| childrenFeatures |
| .add(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__VARIABLE); |
| childrenFeatures |
| .add(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE); |
| } |
| 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 StructuredActivityNode.gif. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object getImage(Object object) { |
| return overlayImage(object, |
| getResourceLocator().getImage("full/obj16/StructuredActivityNode")); //$NON-NLS-1$ |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected boolean shouldComposeCreationImage() { |
| return true; |
| } |
| |
| /** |
| * This returns the label text for the adapted class. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated NOT |
| */ |
| @Override |
| public String getText(Object object) { |
| return appendLabel( |
| appendType(appendKeywords(new StringBuffer(), object), |
| "_UI_StructuredActivityNode_type"), //$NON-NLS-1$ |
| object).toString(); |
| } |
| |
| /** |
| * 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(StructuredActivityNode.class)) { |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__MUST_ISOLATE : |
| fireNotifyChanged(new ViewerNotification(notification, |
| notification.getNotifier(), false, true)); |
| return; |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__OWNED_RULE : |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__ELEMENT_IMPORT : |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__PACKAGE_IMPORT : |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__EDGE : |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT : |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT : |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__VARIABLE : |
| case UMLPackage.STRUCTURED_ACTIVITY_NODE__NODE : |
| 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(UMLPackage.Literals.NAMESPACE__OWNED_RULE, |
| UMLFactory.eINSTANCE.createConstraint())); |
| |
| newChildDescriptors |
| .add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, |
| UMLFactory.eINSTANCE.createInteractionConstraint())); |
| |
| newChildDescriptors |
| .add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, |
| UMLFactory.eINSTANCE.createIntervalConstraint())); |
| |
| newChildDescriptors |
| .add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, |
| UMLFactory.eINSTANCE.createDurationConstraint())); |
| |
| newChildDescriptors |
| .add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, |
| UMLFactory.eINSTANCE.createTimeConstraint())); |
| |
| newChildDescriptors.add( |
| createChildParameter(UMLPackage.Literals.NAMESPACE__ELEMENT_IMPORT, |
| UMLFactory.eINSTANCE.createElementImport())); |
| |
| newChildDescriptors.add( |
| createChildParameter(UMLPackage.Literals.NAMESPACE__PACKAGE_IMPORT, |
| UMLFactory.eINSTANCE.createPackageImport())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE, |
| UMLFactory.eINSTANCE.createControlFlow())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE, |
| UMLFactory.eINSTANCE.createObjectFlow())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT, |
| UMLFactory.eINSTANCE.createInputPin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT, |
| UMLFactory.eINSTANCE.createActionInputPin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT, |
| UMLFactory.eINSTANCE.createValuePin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT, |
| UMLFactory.eINSTANCE.createOutputPin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__VARIABLE, |
| UMLFactory.eINSTANCE.createVariable())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createStructuredActivityNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createInputPin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createOutputPin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createValueSpecificationAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createAcceptEventAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createAcceptCallAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createActionInputPin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createAddStructuralFeatureValueAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createAddVariableValueAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createBroadcastSignalAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createCallBehaviorAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createCallOperationAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createClearAssociationAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createClearStructuralFeatureAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createClearVariableAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createConditionalNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createCreateLinkAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createCreateLinkObjectAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createCreateObjectAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createDestroyLinkAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createDestroyObjectAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createExpansionNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createExpansionRegion())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createLoopNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createOpaqueAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createRaiseExceptionAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadExtentAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadIsClassifiedObjectAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadLinkAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadLinkObjectEndAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadLinkObjectEndQualifierAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadSelfAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadStructuralFeatureAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReadVariableAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReclassifyObjectAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReduceAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createRemoveStructuralFeatureValueAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createRemoveVariableValueAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createReplyAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createSendObjectAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createSendSignalAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createSequenceNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createStartClassifierBehaviorAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createStartObjectBehaviorAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createTestIdentityAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createUnmarshallAction())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createValuePin())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createActivityFinalNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createActivityParameterNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createCentralBufferNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createDataStoreNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createDecisionNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createFlowFinalNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createForkNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createInitialNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createJoinNode())); |
| |
| newChildDescriptors.add(createChildParameter( |
| UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, |
| UMLFactory.eINSTANCE.createMergeNode())); |
| } |
| |
| /** |
| * 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 == UMLPackage.Literals.ACTION__LOCAL_POSTCONDITION |
| || childFeature == UMLPackage.Literals.ACTION__LOCAL_PRECONDITION |
| || childFeature == UMLPackage.Literals.NAMESPACE__OWNED_RULE |
| || childFeature == UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_INPUT |
| || childFeature == UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE |
| || childFeature == UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__STRUCTURED_NODE_OUTPUT; |
| |
| 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); |
| } |
| |
| } |