Let CallActivity and SubProcess implement InteractionNode. This allows MessageFlows to be connected to these elements which, according to the BPMN2 spec, is valid.
diff --git a/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/CallActivityItemProvider.java b/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/CallActivityItemProvider.java index 5ff49dc..1fef3e9 100644 --- a/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/CallActivityItemProvider.java +++ b/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/CallActivityItemProvider.java
@@ -60,12 +60,46 @@ if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); + addIncomingConversationLinksPropertyDescriptor(object); + addOutgoingConversationLinksPropertyDescriptor(object); addCalledElementRefPropertyDescriptor(object); } return itemPropertyDescriptors; } /** + * This adds a property descriptor for the Incoming Conversation Links feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addIncomingConversationLinksPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_InteractionNode_incomingConversationLinks_feature"), + getString("_UI_InteractionNode_incomingConversationLinks_description"), + Bpmn2Package.Literals.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS, false, false, + true, null, null, null)); + } + + /** + * This adds a property descriptor for the Outgoing Conversation Links feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addOutgoingConversationLinksPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_InteractionNode_outgoingConversationLinks_feature"), + getString("_UI_InteractionNode_outgoingConversationLinks_description"), + Bpmn2Package.Literals.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS, false, false, + true, null, null, null)); + } + + /** * This adds a property descriptor for the Called Element Ref feature. * <!-- begin-user-doc --> * <!-- end-user-doc -->
diff --git a/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/SubProcessItemProvider.java b/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/SubProcessItemProvider.java index 1ef5a00..f98ca46 100644 --- a/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/SubProcessItemProvider.java +++ b/org.eclipse.bpmn2.edit/src/org/eclipse/bpmn2/provider/SubProcessItemProvider.java
@@ -1,320 +1,354 @@ -/** - * <copyright> - * - * Copyright (c) 2010 SAP AG. - * 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: - * Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation - * - * </copyright> - * - */ -package org.eclipse.bpmn2.provider; - -import java.util.Collection; -import java.util.List; - -import org.eclipse.bpmn2.Bpmn2Factory; -import org.eclipse.bpmn2.Bpmn2Package; -import org.eclipse.bpmn2.SubProcess; -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.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.ViewerNotification; - -/** - * This is the item provider adapter for a {@link org.eclipse.bpmn2.SubProcess} object. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ -public class SubProcessItemProvider extends ActivityItemProvider implements - IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, - IItemLabelProvider, IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public SubProcessItemProvider(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); - - addTriggeredByEventPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Triggered By Event feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void addTriggeredByEventPropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor( - ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_SubProcess_triggeredByEvent_feature"), - getString("_UI_PropertyDescriptor_description", - "_UI_SubProcess_triggeredByEvent_feature", "_UI_SubProcess_type"), - Bpmn2Package.Literals.SUB_PROCESS__TRIGGERED_BY_EVENT, true, false, false, - ItemPropertyDescriptor.BOOLEAN_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(Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__LANE_SETS); - childrenFeatures.add(Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS); - childrenFeatures.add(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS); - } - 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 SubProcess.png. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object getImage(Object object) { - try { - return overlayImage(object, getResourceLocator().getImage("full/obj16/SubProcess.png")); - } catch (java.util.MissingResourceException e) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/SubProcess.gif")); - } - } - - /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String getText(Object object) { - String label = ((SubProcess) object).getName(); - return label == null || label.length() == 0 ? getString("_UI_SubProcess_type") - : getString("_UI_SubProcess_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(SubProcess.class)) { - case Bpmn2Package.SUB_PROCESS__TRIGGERED_BY_EVENT: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), - false, true)); - return; - case Bpmn2Package.SUB_PROCESS__LANE_SETS: - case Bpmn2Package.SUB_PROCESS__FLOW_ELEMENTS: - case Bpmn2Package.SUB_PROCESS__ARTIFACTS: - 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( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__LANE_SETS, - Bpmn2Factory.eINSTANCE.createLaneSet())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createSubProcess())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createAdHocSubProcess())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createBoundaryEvent())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createBusinessRuleTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createCallActivity())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createCallChoreography())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createChoreographyTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createComplexGateway())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createDataObject())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createDataObjectReference())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createDataStoreReference())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createEndEvent())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createEventBasedGateway())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createExclusiveGateway())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createImplicitThrowEvent())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createInclusiveGateway())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createIntermediateCatchEvent())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createIntermediateThrowEvent())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createManualTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createParallelGateway())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createReceiveTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createScriptTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createSendTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createSequenceFlow())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createServiceTask())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createStartEvent())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createSubChoreography())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createTransaction())); - - newChildDescriptors.add(createChildParameter( - Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, - Bpmn2Factory.eINSTANCE.createUserTask())); - - newChildDescriptors.add(createChildParameter(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS, - Bpmn2Factory.eINSTANCE.createAssociation())); - - newChildDescriptors.add(createChildParameter(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS, - Bpmn2Factory.eINSTANCE.createGroup())); - - newChildDescriptors.add(createChildParameter(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS, - Bpmn2Factory.eINSTANCE.createTextAnnotation())); - } - -} +/** + * <copyright> + * + * Copyright (c) 2010 SAP AG. + * 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: + * Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation + * + * </copyright> + * + */ +package org.eclipse.bpmn2.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.bpmn2.Bpmn2Factory; +import org.eclipse.bpmn2.Bpmn2Package; +import org.eclipse.bpmn2.SubProcess; +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.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.ViewerNotification; + +/** + * This is the item provider adapter for a {@link org.eclipse.bpmn2.SubProcess} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class SubProcessItemProvider extends ActivityItemProvider implements + IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SubProcessItemProvider(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); + + addIncomingConversationLinksPropertyDescriptor(object); + addOutgoingConversationLinksPropertyDescriptor(object); + addTriggeredByEventPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Incoming Conversation Links feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addIncomingConversationLinksPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_InteractionNode_incomingConversationLinks_feature"), + getString("_UI_InteractionNode_incomingConversationLinks_description"), + Bpmn2Package.Literals.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS, false, false, + true, null, null, null)); + } + + /** + * This adds a property descriptor for the Outgoing Conversation Links feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addOutgoingConversationLinksPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_InteractionNode_outgoingConversationLinks_feature"), + getString("_UI_InteractionNode_outgoingConversationLinks_description"), + Bpmn2Package.Literals.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS, false, false, + true, null, null, null)); + } + + /** + * This adds a property descriptor for the Triggered By Event feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addTriggeredByEventPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_SubProcess_triggeredByEvent_feature"), + getString("_UI_PropertyDescriptor_description", + "_UI_SubProcess_triggeredByEvent_feature", "_UI_SubProcess_type"), + Bpmn2Package.Literals.SUB_PROCESS__TRIGGERED_BY_EVENT, true, false, false, + ItemPropertyDescriptor.BOOLEAN_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(Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__LANE_SETS); + childrenFeatures.add(Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS); + childrenFeatures.add(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS); + } + 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 SubProcess.png. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + try { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SubProcess.png")); + } catch (java.util.MissingResourceException e) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SubProcess.gif")); + } + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((SubProcess) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_SubProcess_type") + : getString("_UI_SubProcess_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(SubProcess.class)) { + case Bpmn2Package.SUB_PROCESS__TRIGGERED_BY_EVENT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), + false, true)); + return; + case Bpmn2Package.SUB_PROCESS__LANE_SETS: + case Bpmn2Package.SUB_PROCESS__FLOW_ELEMENTS: + case Bpmn2Package.SUB_PROCESS__ARTIFACTS: + 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( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__LANE_SETS, + Bpmn2Factory.eINSTANCE.createLaneSet())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createSubProcess())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createAdHocSubProcess())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createBoundaryEvent())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createBusinessRuleTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createCallActivity())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createCallChoreography())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createChoreographyTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createComplexGateway())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createDataObject())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createDataObjectReference())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createDataStoreReference())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createEndEvent())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createEventBasedGateway())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createExclusiveGateway())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createImplicitThrowEvent())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createInclusiveGateway())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createIntermediateCatchEvent())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createIntermediateThrowEvent())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createManualTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createParallelGateway())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createReceiveTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createScriptTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createSendTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createSequenceFlow())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createServiceTask())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createStartEvent())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createSubChoreography())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createTransaction())); + + newChildDescriptors.add(createChildParameter( + Bpmn2Package.Literals.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS, + Bpmn2Factory.eINSTANCE.createUserTask())); + + newChildDescriptors.add(createChildParameter(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS, + Bpmn2Factory.eINSTANCE.createAssociation())); + + newChildDescriptors.add(createChildParameter(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS, + Bpmn2Factory.eINSTANCE.createGroup())); + + newChildDescriptors.add(createChildParameter(Bpmn2Package.Literals.SUB_PROCESS__ARTIFACTS, + Bpmn2Factory.eINSTANCE.createTextAnnotation())); + } + +}
diff --git a/org.eclipse.bpmn2/model/BPMN20.ecore b/org.eclipse.bpmn2/model/BPMN20.ecore index 7c4bbbb..05384ec 100644 --- a/org.eclipse.bpmn2/model/BPMN20.ecore +++ b/org.eclipse.bpmn2/model/BPMN20.ecore
@@ -1588,7 +1588,7 @@ </eAnnotations> </eStructuralFeatures> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="CallActivity" eSuperTypes="#//Activity"> + <eClassifiers xsi:type="ecore:EClass" name="CallActivity" eSuperTypes="#//Activity #//InteractionNode"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> <details key="name" value="tCallActivity"/> <details key="kind" value="elementOnly"/> @@ -4300,7 +4300,7 @@ </eAnnotations> </eStructuralFeatures> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SubProcess" eSuperTypes="#//Activity #//FlowElementsContainer"> + <eClassifiers xsi:type="ecore:EClass" name="SubProcess" eSuperTypes="#//Activity #//FlowElementsContainer #//InteractionNode"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> <details key="name" value="tSubProcess"/> <details key="kind" value="elementOnly"/>
diff --git a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/Bpmn2Package.java b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/Bpmn2Package.java index abd9b7a..3c297f4 100644 --- a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/Bpmn2Package.java +++ b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/Bpmn2Package.java
@@ -2082,13 +2082,31 @@ int SUB_PROCESS__FLOW_ELEMENTS = ACTIVITY_FEATURE_COUNT + 1; /** + * The feature id for the '<em><b>Incoming Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUB_PROCESS__INCOMING_CONVERSATION_LINKS = ACTIVITY_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Outgoing Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SUB_PROCESS__OUTGOING_CONVERSATION_LINKS = ACTIVITY_FEATURE_COUNT + 3; + + /** * The feature id for the '<em><b>Artifacts</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SUB_PROCESS__ARTIFACTS = ACTIVITY_FEATURE_COUNT + 2; + int SUB_PROCESS__ARTIFACTS = ACTIVITY_FEATURE_COUNT + 4; /** * The feature id for the '<em><b>Triggered By Event</b></em>' attribute. @@ -2097,7 +2115,7 @@ * @generated * @ordered */ - int SUB_PROCESS__TRIGGERED_BY_EVENT = ACTIVITY_FEATURE_COUNT + 3; + int SUB_PROCESS__TRIGGERED_BY_EVENT = ACTIVITY_FEATURE_COUNT + 5; /** * The number of structural features of the '<em>Sub Process</em>' class. @@ -2106,7 +2124,7 @@ * @generated * @ordered */ - int SUB_PROCESS_FEATURE_COUNT = ACTIVITY_FEATURE_COUNT + 4; + int SUB_PROCESS_FEATURE_COUNT = ACTIVITY_FEATURE_COUNT + 6; /** * The meta object id for the '{@link org.eclipse.bpmn2.impl.AdHocSubProcessImpl <em>Ad Hoc Sub Process</em>}' class. @@ -2344,6 +2362,24 @@ int AD_HOC_SUB_PROCESS__FLOW_ELEMENTS = SUB_PROCESS__FLOW_ELEMENTS; /** + * The feature id for the '<em><b>Incoming Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AD_HOC_SUB_PROCESS__INCOMING_CONVERSATION_LINKS = SUB_PROCESS__INCOMING_CONVERSATION_LINKS; + + /** + * The feature id for the '<em><b>Outgoing Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AD_HOC_SUB_PROCESS__OUTGOING_CONVERSATION_LINKS = SUB_PROCESS__OUTGOING_CONVERSATION_LINKS; + + /** * The feature id for the '<em><b>Artifacts</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -4001,13 +4037,31 @@ int CALL_ACTIVITY__START_QUANTITY = ACTIVITY__START_QUANTITY; /** + * The feature id for the '<em><b>Incoming Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS = ACTIVITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Outgoing Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS = ACTIVITY_FEATURE_COUNT + 1; + + /** * The feature id for the '<em><b>Called Element Ref</b></em>' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int CALL_ACTIVITY__CALLED_ELEMENT_REF = ACTIVITY_FEATURE_COUNT + 0; + int CALL_ACTIVITY__CALLED_ELEMENT_REF = ACTIVITY_FEATURE_COUNT + 2; /** * The number of structural features of the '<em>Call Activity</em>' class. @@ -4016,7 +4070,7 @@ * @generated * @ordered */ - int CALL_ACTIVITY_FEATURE_COUNT = ACTIVITY_FEATURE_COUNT + 1; + int CALL_ACTIVITY_FEATURE_COUNT = ACTIVITY_FEATURE_COUNT + 3; /** * The meta object id for the '{@link org.eclipse.bpmn2.impl.ChoreographyActivityImpl <em>Choreography Activity</em>}' class. @@ -17810,6 +17864,24 @@ int TRANSACTION__FLOW_ELEMENTS = SUB_PROCESS__FLOW_ELEMENTS; /** + * The feature id for the '<em><b>Incoming Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TRANSACTION__INCOMING_CONVERSATION_LINKS = SUB_PROCESS__INCOMING_CONVERSATION_LINKS; + + /** + * The feature id for the '<em><b>Outgoing Conversation Links</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TRANSACTION__OUTGOING_CONVERSATION_LINKS = SUB_PROCESS__OUTGOING_CONVERSATION_LINKS; + + /** * The feature id for the '<em><b>Artifacts</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc -->
diff --git a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/CallActivity.java b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/CallActivity.java index d4ce569..29b8094 100644 --- a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/CallActivity.java +++ b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/CallActivity.java
@@ -30,7 +30,7 @@ * @model extendedMetaData="name='tCallActivity' kind='elementOnly'" * @generated */ -public interface CallActivity extends Activity { +public interface CallActivity extends Activity, InteractionNode { /** * Returns the value of the '<em><b>Called Element Ref</b></em>' reference. * <!-- begin-user-doc -->
diff --git a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/SubProcess.java b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/SubProcess.java index e4ae2a4..e2155cf 100644 --- a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/SubProcess.java +++ b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/SubProcess.java
@@ -33,7 +33,7 @@ * @model extendedMetaData="name='tSubProcess' kind='elementOnly'" * @generated */ -public interface SubProcess extends Activity, FlowElementsContainer { +public interface SubProcess extends Activity, FlowElementsContainer, InteractionNode { /** * Returns the value of the '<em><b>Artifacts</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.bpmn2.Artifact}.
diff --git a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/CallActivityImpl.java b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/CallActivityImpl.java index 87d1a04..20e58af 100644 --- a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/CallActivityImpl.java +++ b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/CallActivityImpl.java
@@ -14,9 +14,14 @@ */ package org.eclipse.bpmn2.impl; +import java.util.List; + import org.eclipse.bpmn2.Bpmn2Package; import org.eclipse.bpmn2.CallActivity; import org.eclipse.bpmn2.CallableElement; +import org.eclipse.bpmn2.ConversationLink; +import org.eclipse.bpmn2.InteractionNode; +import org.eclipse.bpmn2.util.Bpmn2Resource; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; @@ -29,6 +34,8 @@ * <p> * The following features are implemented: * <ul> + * <li>{@link org.eclipse.bpmn2.impl.CallActivityImpl#getIncomingConversationLinks <em>Incoming Conversation Links</em>}</li> + * <li>{@link org.eclipse.bpmn2.impl.CallActivityImpl#getOutgoingConversationLinks <em>Outgoing Conversation Links</em>}</li> * <li>{@link org.eclipse.bpmn2.impl.CallActivityImpl#getCalledElementRef <em>Called Element Ref</em>}</li> * </ul> * </p> @@ -68,6 +75,34 @@ /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * @generated NOT + */ + public List<ConversationLink> getIncomingConversationLinks() { + if (eResource() instanceof Bpmn2Resource) { + return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList( + ConversationLink.class, this, + Bpmn2Package.Literals.CONVERSATION_LINK__TARGET_REF); + } + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public List<ConversationLink> getOutgoingConversationLinks() { + if (eResource() instanceof Bpmn2Resource) { + return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList( + ConversationLink.class, this, + Bpmn2Package.Literals.CONVERSATION_LINK__SOURCE_REF); + } + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> * @generated */ public CallableElement getCalledElementRef() { @@ -115,6 +150,10 @@ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { + case Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS: + return getIncomingConversationLinks(); + case Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS: + return getOutgoingConversationLinks(); case Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF: if (resolve) return getCalledElementRef(); @@ -161,10 +200,54 @@ @Override public boolean eIsSet(int featureID) { switch (featureID) { + case Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS: + return !getIncomingConversationLinks().isEmpty(); + case Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS: + return !getOutgoingConversationLinks().isEmpty(); case Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF: return calledElementRef != null; } return super.eIsSet(featureID); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == InteractionNode.class) { + switch (derivedFeatureID) { + case Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS: + return Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS; + case Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS: + return Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS; + 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 == InteractionNode.class) { + switch (baseFeatureID) { + case Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS: + return Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS; + case Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS: + return Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + } //CallActivityImpl
diff --git a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/SubProcessImpl.java b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/SubProcessImpl.java index 77fbd75..6f38b03 100644 --- a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/SubProcessImpl.java +++ b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/SubProcessImpl.java
@@ -19,10 +19,13 @@ import org.eclipse.bpmn2.Artifact; import org.eclipse.bpmn2.Bpmn2Package; +import org.eclipse.bpmn2.ConversationLink; import org.eclipse.bpmn2.FlowElement; import org.eclipse.bpmn2.FlowElementsContainer; +import org.eclipse.bpmn2.InteractionNode; import org.eclipse.bpmn2.LaneSet; import org.eclipse.bpmn2.SubProcess; +import org.eclipse.bpmn2.util.Bpmn2Resource; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; @@ -41,6 +44,8 @@ * <ul> * <li>{@link org.eclipse.bpmn2.impl.SubProcessImpl#getLaneSets <em>Lane Sets</em>}</li> * <li>{@link org.eclipse.bpmn2.impl.SubProcessImpl#getFlowElements <em>Flow Elements</em>}</li> + * <li>{@link org.eclipse.bpmn2.impl.SubProcessImpl#getIncomingConversationLinks <em>Incoming Conversation Links</em>}</li> + * <li>{@link org.eclipse.bpmn2.impl.SubProcessImpl#getOutgoingConversationLinks <em>Outgoing Conversation Links</em>}</li> * <li>{@link org.eclipse.bpmn2.impl.SubProcessImpl#getArtifacts <em>Artifacts</em>}</li> * <li>{@link org.eclipse.bpmn2.impl.SubProcessImpl#isTriggeredByEvent <em>Triggered By Event</em>}</li> * </ul> @@ -147,6 +152,34 @@ /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * @generated NOT + */ + public List<ConversationLink> getIncomingConversationLinks() { + if (eResource() instanceof Bpmn2Resource) { + return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList( + ConversationLink.class, this, + Bpmn2Package.Literals.CONVERSATION_LINK__TARGET_REF); + } + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public List<ConversationLink> getOutgoingConversationLinks() { + if (eResource() instanceof Bpmn2Resource) { + return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList( + ConversationLink.class, this, + Bpmn2Package.Literals.CONVERSATION_LINK__SOURCE_REF); + } + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> * @generated */ public List<Artifact> getArtifacts() { @@ -211,6 +244,10 @@ return getLaneSets(); case Bpmn2Package.SUB_PROCESS__FLOW_ELEMENTS: return getFlowElements(); + case Bpmn2Package.SUB_PROCESS__INCOMING_CONVERSATION_LINKS: + return getIncomingConversationLinks(); + case Bpmn2Package.SUB_PROCESS__OUTGOING_CONVERSATION_LINKS: + return getOutgoingConversationLinks(); case Bpmn2Package.SUB_PROCESS__ARTIFACTS: return getArtifacts(); case Bpmn2Package.SUB_PROCESS__TRIGGERED_BY_EVENT: @@ -283,6 +320,10 @@ return laneSets != null && !laneSets.isEmpty(); case Bpmn2Package.SUB_PROCESS__FLOW_ELEMENTS: return flowElements != null && !flowElements.isEmpty(); + case Bpmn2Package.SUB_PROCESS__INCOMING_CONVERSATION_LINKS: + return !getIncomingConversationLinks().isEmpty(); + case Bpmn2Package.SUB_PROCESS__OUTGOING_CONVERSATION_LINKS: + return !getOutgoingConversationLinks().isEmpty(); case Bpmn2Package.SUB_PROCESS__ARTIFACTS: return artifacts != null && !artifacts.isEmpty(); case Bpmn2Package.SUB_PROCESS__TRIGGERED_BY_EVENT: @@ -308,6 +349,16 @@ return -1; } } + if (baseClass == InteractionNode.class) { + switch (derivedFeatureID) { + case Bpmn2Package.SUB_PROCESS__INCOMING_CONVERSATION_LINKS: + return Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS; + case Bpmn2Package.SUB_PROCESS__OUTGOING_CONVERSATION_LINKS: + return Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS; + default: + return -1; + } + } return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); } @@ -328,6 +379,16 @@ return -1; } } + if (baseClass == InteractionNode.class) { + switch (baseFeatureID) { + case Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS: + return Bpmn2Package.SUB_PROCESS__INCOMING_CONVERSATION_LINKS; + case Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS: + return Bpmn2Package.SUB_PROCESS__OUTGOING_CONVERSATION_LINKS; + default: + return -1; + } + } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); }
diff --git a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/bpmn2.ecore b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/bpmn2.ecore index aae858c..5b7cc6c 100644 --- a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/bpmn2.ecore +++ b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/impl/bpmn2.ecore
@@ -1588,7 +1588,7 @@ </eAnnotations> </eStructuralFeatures> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="CallActivity" eSuperTypes="#//Activity"> + <eClassifiers xsi:type="ecore:EClass" name="CallActivity" eSuperTypes="#//Activity #//InteractionNode"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> <details key="name" value="tCallActivity"/> <details key="kind" value="elementOnly"/> @@ -4301,7 +4301,7 @@ </eAnnotations> </eStructuralFeatures> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SubProcess" eSuperTypes="#//Activity #//FlowElementsContainer"> + <eClassifiers xsi:type="ecore:EClass" name="SubProcess" eSuperTypes="#//Activity #//FlowElementsContainer #//InteractionNode"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> <details key="name" value="tSubProcess"/> <details key="kind" value="elementOnly"/>
diff --git a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/util/Bpmn2Switch.java b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/util/Bpmn2Switch.java index 83c9db5..2ca4c73 100644 --- a/org.eclipse.bpmn2/src/org/eclipse/bpmn2/util/Bpmn2Switch.java +++ b/org.eclipse.bpmn2/src/org/eclipse/bpmn2/util/Bpmn2Switch.java
@@ -257,6 +257,8 @@ if (result == null) result = caseFlowElementsContainer(adHocSubProcess); if (result == null) + result = caseInteractionNode(adHocSubProcess); + if (result == null) result = caseFlowNode(adHocSubProcess); if (result == null) result = caseFlowElement(adHocSubProcess); @@ -355,6 +357,8 @@ if (result == null) result = caseActivity(callActivity); if (result == null) + result = caseInteractionNode(callActivity); + if (result == null) result = caseFlowNode(callActivity); if (result == null) result = caseFlowElement(callActivity); @@ -1783,6 +1787,8 @@ if (result == null) result = caseFlowElementsContainer(subProcess); if (result == null) + result = caseInteractionNode(subProcess); + if (result == null) result = caseFlowNode(subProcess); if (result == null) result = caseFlowElement(subProcess); @@ -1873,6 +1879,8 @@ if (result == null) result = caseFlowElementsContainer(transaction); if (result == null) + result = caseInteractionNode(transaction); + if (result == null) result = caseFlowNode(transaction); if (result == null) result = caseFlowElement(transaction);