Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdt-papyrus.dev] Finding out possible target (or source) types of relationship

Hi,

I'm trying to figure out how to get a list of the valid element types for sources or targets of a relationship.

I tried 'IElementType[] possibleTargets = ElementTypeRegistry.getInstance().getContainedTypes(directedRelationship, targetReference);' - however the list is empty.

'directedRelationship' is org.eclipse.uml2.uml.internal.impl.DependencyImpl.
'targetReference' is the EReference that is later used to set the targets of the directedRelationship.

From the documentation:
"Gets the array of types that can be contained in the structural feature of eContainer"

/Patrik


Back to the top