Skip to main content

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

Hi, Patrik,

User questions are best asked on the newsgroup.

This API is a query about object containment in the literal EMF sense, in support of GMF’s generic new element creation command.  Very few, if any, relationships in UML contain either their source or their target end.  Even in the case of connectors and associations that can contain “ends”, the logical sources and targets are things referenced by those “ends”.

I don’t think the registry provides the API that you’re looking for, but it’s quite possible that Papyrus has already some utility that does what you need.

HTH,

Christian





On Thu, Feb 26, 2015 at 6:43 AM, Patrik Nandorf <patrik.nandorf@xxxxxxxxxxxx> wrote:

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
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev



Back to the top