Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Extending the UML2 metamodel and customizing the ItemProvider super class
Extending the UML2 metamodel and customizing the ItemProvider super class [message #499257] Fri, 20 November 2009 15:14 Go to next message
Cristian Spiescu is currently offline Cristian SpiescuFriend
Messages: 100
Registered: July 2009
Senior Member
Hello,

I have a metamodel that extends the UML2 metamodel and adds a couple of new elements to some existing UML2 elements.

I would like to know if it is possible somehow to customize the generation of the ItemProvider class, so that it extends from a custom class.

E.g. I have MyClass that extends the Class element. MyClassItemProvider would extend ClassItemProvider, but I would like it to extend from MyBaseItemProvider.

I know that I could put the "@generated NOT" tag on the provider class, but this way the whole class won't be generated any more. I know that there is also the @extends tag that I can put in the comment, but if I specify something a class with it, it will be treated like an interface (appended to the implements ... list).

Would there be a way to achieve this?

Thank you in advance,

Cristi.
Re: Extending the UML2 metamodel and customizing the ItemProvider super class [message #499259 is a reply to message #499257] Fri, 20 November 2009 15:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Christian,

You can marked it "@generated not", i.e., something other than NOT which
has special significance in a class/interface in that it blocks all
nested merging. Then only the merging of the header is blocked, but
nested merging will still take place.

Cristian wrote:
> Hello,
>
> I have a metamodel that extends the UML2 metamodel and adds a couple
> of new elements to some existing UML2 elements.
> I would like to know if it is possible somehow to customize the
> generation of the ItemProvider class, so that it extends from a custom
> class.
>
> E.g. I have MyClass that extends the Class element.
> MyClassItemProvider would extend ClassItemProvider, but I would like
> it to extend from MyBaseItemProvider.
>
> I know that I could put the "@generated NOT" tag on the provider
> class, but this way the whole class won't be generated any more. I
> know that there is also the @extends tag that I can put in the
> comment, but if I specify something a class with it, it will be
> treated like an interface (appended to the implements ... list).
>
> Would there be a way to achieve this?
>
> Thank you in advance,
>
> Cristi.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Extending the UML2 metamodel and customizing the ItemProvider super class [message #499263 is a reply to message #499257] Fri, 20 November 2009 15:42 Go to previous message
Cristian Spiescu is currently offline Cristian SpiescuFriend
Messages: 100
Registered: July 2009
Senior Member
Dear Ed,

Thank you very much for your reply. I am realizing now that the EMF Book (btw great book, congratulations) states this in the chapter regarding the EMF generator, but It slipped me.

Best regards,
Cristi.
Previous Topic:need clarification about "package import"
Next Topic:Extending the UML2 metamodel and customizing the ItemProvider super class
Goto Forum:
  


Current Time: Thu Mar 28 13:42:25 GMT 2024

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

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

Back to the top