Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » EMF.Edit - How to get Children Multiplicity
EMF.Edit - How to get Children Multiplicity [message #195558] Thu, 22 February 2007 12:39 Go to next message
Nicholas Loulloudes is currently offline Nicholas LoulloudesFriend
Messages: 54
Registered: July 2009
Location: Cyprus
Member

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 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:About XSD Model Tool
Next Topic:Remote C++ Editing/Compile?
Goto Forum:
  


Current Time: Sat Apr 27 01:02:28 GMT 2024

Powered by FUDForum. Page generated in 0.07611 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top