EMF.Edit - How to get Children Multiplicity [message #195558] |
Thu, 22 February 2007 12:39 |
|
Hello,
Do you know if it is possible to get the multiplicity of any element on my
EMF model using ...TypeItemProvider? or by using any other way?
Basically i want to check how many times i can use an element on my custom
build editor
Thank you in advanced...
Nicholas.
|
|
|
Re: EMF.Edit - How to get Children Multiplicity [message #195583 is a reply to message #195558] |
Thu, 22 February 2007 13:46 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Nicholas,
This question would be best asked on the EMF newsgroup (which I've added
to the "to" list). I'm not exactly sure what type of information you
have available when you need to ask this multiplicity question. In
general, given an EObject x, you can use x.eClass() to determine its
class, and then you can determine the features of that class by calling
getEAllStructuralFeatures(). For any such EStructuralFeature, you can
use getUpperBound and getLowerBound to determine the multiplicity. If
you know all this information statically, you can use
XyzPackage.Literals.ABC__DEF to access the feature and determine the
bounds using the above methods; here Xyz is the prefix of the package,
ABC is the name of the class and DEF is the name of the feature.
Nicholas Loulloudes wrote:
> Hello,
>
> Do you know if it is possible to get the multiplicity of any element
> on my EMF model using ...TypeItemProvider? or by using any other way?
>
> Basically i want to check how many times i can use an element on my
> custom build editor
>
> Thank you in advanced...
>
>
> Nicholas.
>
|
|
|
Powered by
FUDForum. Page generated in 0.07611 seconds