/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public InputPin createTarget(String name, Type type, EClass eClass) { InputPin newTarget = (InputPin) create(eClass); setTarget(newTarget); if (name != null) newTarget.setName(name); if (type != null) newTarget.setType(type); return newTarget; }
/** * {@inheritDoc} * * @see * org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) */ public void updateSemanticModel(final IPropertiesEditionEvent event) { InputPin inputPin = (InputPin) semanticObject; if (UmlViewsRepository.InputPin.Properties.name == event.getAffectedEditor()) { inputPin.setName( (java.lang.String) EEFConverterUtil.createFromString( UMLPackage.eINSTANCE.getString(), (String) event.getNewValue())); } if (UmlViewsRepository.InputPin.Properties.visibility == event.getAffectedEditor()) { inputPin.setVisibility((VisibilityKind) event.getNewValue()); } if (UmlViewsRepository.InputPin.Properties.clientDependency == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.ADD) { if (event.getNewValue() instanceof Dependency) { clientDependencySettings.addToReference((EObject) event.getNewValue()); } } else if (event.getKind() == PropertiesEditionEvent.REMOVE) { clientDependencySettings.removeFromReference((EObject) event.getNewValue()); } } if (UmlViewsRepository.InputPin.Properties.isLeaf == event.getAffectedEditor()) { inputPin.setIsLeaf((Boolean) event.getNewValue()); } if (UmlViewsRepository.InputPin.Properties.inStructuredNode == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.SET) { inStructuredNodeSettings.setToReference((StructuredActivityNode) event.getNewValue()); } else if (event.getKind() == PropertiesEditionEvent.ADD) { StructuredActivityNode eObject = UMLFactory.eINSTANCE.createStructuredActivityNode(); EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext( editingContext, this, eObject, editingContext.getAdapterFactory()); PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class); if (provider != null) { PropertiesEditingPolicy policy = provider.getPolicy(context); if (policy != null) { policy.execute(); } } inStructuredNodeSettings.setToReference(eObject); } } if (UmlViewsRepository.InputPin.Properties.activity == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.SET) { activitySettings.setToReference((Activity) event.getNewValue()); } else if (event.getKind() == PropertiesEditionEvent.ADD) { Activity eObject = UMLFactory.eINSTANCE.createActivity(); EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext( editingContext, this, eObject, editingContext.getAdapterFactory()); PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class); if (provider != null) { PropertiesEditingPolicy policy = provider.getPolicy(context); if (policy != null) { policy.execute(); } } activitySettings.setToReference(eObject); } } if (UmlViewsRepository.InputPin.Properties.outgoing == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.ADD) { if (event.getNewValue() instanceof ActivityEdge) { outgoingSettings.addToReference((EObject) event.getNewValue()); } } else if (event.getKind() == PropertiesEditionEvent.REMOVE) { outgoingSettings.removeFromReference((EObject) event.getNewValue()); } } if (UmlViewsRepository.InputPin.Properties.incoming == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.ADD) { if (event.getNewValue() instanceof ActivityEdge) { incomingSettings.addToReference((EObject) event.getNewValue()); } } else if (event.getKind() == PropertiesEditionEvent.REMOVE) { incomingSettings.removeFromReference((EObject) event.getNewValue()); } } if (UmlViewsRepository.InputPin.Properties.inPartition == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.ADD) { if (event.getNewValue() instanceof ActivityPartition) { inPartitionSettings.addToReference((EObject) event.getNewValue()); } } else if (event.getKind() == PropertiesEditionEvent.REMOVE) { inPartitionSettings.removeFromReference((EObject) event.getNewValue()); } } if (UmlViewsRepository.InputPin.Properties.inInterruptibleRegion == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.ADD) { if (event.getNewValue() instanceof InterruptibleActivityRegion) { inInterruptibleRegionSettings.addToReference((EObject) event.getNewValue()); } } else if (event.getKind() == PropertiesEditionEvent.REMOVE) { inInterruptibleRegionSettings.removeFromReference((EObject) event.getNewValue()); } } if (UmlViewsRepository.InputPin.Properties.redefinedNode == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.ADD) { if (event.getNewValue() instanceof ActivityNode) { redefinedNodeSettings.addToReference((EObject) event.getNewValue()); } } else if (event.getKind() == PropertiesEditionEvent.REMOVE) { redefinedNodeSettings.removeFromReference((EObject) event.getNewValue()); } } if (UmlViewsRepository.InputPin.Properties.type == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.SET) { typeSettings.setToReference((Type) event.getNewValue()); } else if (event.getKind() == PropertiesEditionEvent.ADD) { EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext( editingContext, this, typeSettings, editingContext.getAdapterFactory()); PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext .getAdapterFactory() .adapt(semanticObject, PropertiesEditingProvider.class); if (provider != null) { PropertiesEditingPolicy policy = provider.getPolicy(context); if (policy instanceof CreateEditingPolicy) { policy.execute(); } } } } if (UmlViewsRepository.InputPin.Properties.ordering == event.getAffectedEditor()) { inputPin.setOrdering((ObjectNodeOrderingKind) event.getNewValue()); } if (UmlViewsRepository.InputPin.Properties.isControlType == event.getAffectedEditor()) { inputPin.setIsControlType((Boolean) event.getNewValue()); } if (UmlViewsRepository.InputPin.Properties.inState == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.ADD) { if (event.getNewValue() instanceof State) { inStateSettings.addToReference((EObject) event.getNewValue()); } } else if (event.getKind() == PropertiesEditionEvent.REMOVE) { inStateSettings.removeFromReference((EObject) event.getNewValue()); } } if (UmlViewsRepository.InputPin.Properties.selection == event.getAffectedEditor()) { if (event.getKind() == PropertiesEditionEvent.SET) { selectionSettings.setToReference((Behavior) event.getNewValue()); } else if (event.getKind() == PropertiesEditionEvent.ADD) { EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext( editingContext, this, selectionSettings, editingContext.getAdapterFactory()); PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext .getAdapterFactory() .adapt(semanticObject, PropertiesEditingProvider.class); if (provider != null) { PropertiesEditingPolicy policy = provider.getPolicy(context); if (policy instanceof CreateEditingPolicy) { policy.execute(); } } } } if (UmlViewsRepository.InputPin.Properties.isOrdered == event.getAffectedEditor()) { inputPin.setIsOrdered((Boolean) event.getNewValue()); } if (UmlViewsRepository.InputPin.Properties.isUnique == event.getAffectedEditor()) { inputPin.setIsUnique((Boolean) event.getNewValue()); } if (UmlViewsRepository.InputPin.Properties.isControl == event.getAffectedEditor()) { inputPin.setIsControl((Boolean) event.getNewValue()); } }