Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Problem with redefining enum property
Re: Problem with redefining enum property [message #624092] Thu, 26 July 2007 18:26
Ed Merks is currently offline Ed MerksFriend
Messages: 30992
Registered: July 2009
Senior Member

It's not possible to define a new enumeration based on an existing one
since Java has no concept of one enumeration restricting or extending
another. So to me it seems that you can't expect this concept to map
properly onto Java. It's best to ask about this on the UML2 newsgroup,
because I don't understand some of these concepts very well, so I've
added it to the "to" list of the reply.

Andreas Werner wrote:
> Hi newsgroup,
> I have created a uml metamodel containing a class X that extends
> uml::Class from the UML2 metamodel. In X I redefined the property
> visibility : VisibilityKind, which is initially defined in
> uml::PackagableElement. Therefore I created a new Enumeration
> NewVisibilityKind which extends VisibilityKind and put it into X as a
> redefining type for visibility. So far in the UML World everything
> works fine!
> But if I create an Ecore model from it, the problem is that
> NewVisibilityKind is not defined as a sub type from VibilityKind but
> an enum. Thus the generated code won't work, because the getter for
> NewVisibilityKind is not returning an instance of VisibilotyKind!
> Does anyone know a workaround for this issue?
> Please help, Andreas
Previous Topic:How to add a SendOperationEvent to a Package?
Next Topic:Optimal way of getting superclass hierarchy of a given uml Class
Goto Forum:

Current Time: Sun Mar 29 06:56:34 GMT 2020

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

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

Back to the top