Infer EReference from a CompartmentEditPart [message #923887] |
Wed, 26 September 2012 09:26  |
Eclipse User |
|
|
|
Hi all,
i'm wondering if it is possible to infer the corresponding EReference in the semantic model from a CompartmentEditPart in the notational model.
I know how to retrieve the EObject the CompartmentEditPart refers to, but is it also possible to get the EReference that is used to store the child objects?
|
|
|
|
|
Re: Infer EReference from a CompartmentEditPart [message #940028 is a reply to message #939175] |
Thu, 11 October 2012 08:45  |
Eclipse User |
|
|
|
Thomas,
I doubt it is possible to get access to the meta-information at the diagram runtime.
(Also there may be a lot of the different children types associated with same compartment, so it is more correct to tell about the List<EReference> instead of just EReference).
However, if you are using GMF-Tooling, you may add custom template to generate into every XXComartmentEditPart a new method that will provide access to this meta-, and then use it at runtime in your custom code.
Please let me know if you need more help with that way of solving the problem.
Regards,
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.02490 seconds