DataType? [message #161682] |
Tue, 20 November 2007 16:11 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02930 seconds