Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » DataType?
DataType? [message #161682] Tue, 20 November 2007 16:11 Go to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Hi all,

I'm asking me a question about DataType!
In one class of my metamodel, there is an element with a type that can
be an ENum OR one EClass instances, and that's impossible(I think) to
combine those two types into one to avoid to have an attribute (for the
ENum) AND a reference (for the EClass)! Is it possible (and how?) to
resolve that with DataType in order to have only one attribute(or
anything else) with the choice with all ENum elements AND all EClass
instances? Or do you have another solution?

Thanks a lot.
Etienne
Re: DataType? [message #161684 is a reply to message #161682] Tue, 20 November 2007 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Etienne,

An EStructuralFeature can be either an EReference or an EAttribute and
the eType of the former must be an EClass while the eType of the latter
must be an EDataType (where EEnum is a subclass of EDataType). So you
will definitely need two different features for this, unless you can use
an instance of the XMLTypePackage's SimpleAnyType that acts as an
EObject which wraps a simple type value of any EDataType. The editor
support for SimpleAnyType is not very good though...


user@domain.invalid wrote:
> Hi all,
>
> I'm asking me a question about DataType!
> In one class of my metamodel, there is an element with a type that can
> be an ENum OR one EClass instances, and that's impossible(I think) to
> combine those two types into one to avoid to have an attribute (for
> the ENum) AND a reference (for the EClass)! Is it possible (and how?)
> to resolve that with DataType in order to have only one attribute(or
> anything else) with the choice with all ENum elements AND all EClass
> instances? Or do you have another solution?
>
> Thanks a lot.
> Etienne
Re: DataType? [message #725120 is a reply to message #161682] Wed, 14 September 2011 02:20 Go to previous message
Cindy  is currently offline Cindy Friend
Messages: 59
Registered: May 2011
Member
Hey have you solve the problem then? i have got the same problem now and i wonder what could be done now?
Previous Topic:Get diagram element
Next Topic:Views+GMF editor on a webbrowser
Goto Forum:
  


Current Time: Thu Apr 25 16:03:57 GMT 2024

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

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

Back to the top