Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Abstract item provider class
Abstract item provider class [message #1022807] Fri, 22 March 2013 15:01 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
Hi,

sounds philosophical, but still, always wanted to know:

The generated item provider for an abstract class is not abstract. Is there any specific reason for this?

The practical question is: How do I make it abstract? It seems that adding 'NOT' to the @generated annotation will prevent the generator to remove my manually added 'abstract' keyword, but it also seems that this prevents it from doing any modification on the class at all.

Any solution that works better?

Cheers,
Felix

Re: Abstract item provider class [message #1022891 is a reply to message #1022807] Fri, 22 March 2013 18:30 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Felix,

If you use lowercase 'not' in '@generated not', then only the class
declaration will be protected from the generator. All of its members
are still subject to re-generation.

But, of course, the question is why is it a problem that the item
provider be abstract? You may want to instantiate the class to use it,
for example, for dynamic EClasses that specialize your generated
abstract EClass (if such a thing is even possible).

HTH,

Christian


On 2013-03-22 15:02:02 +0000, Felix Dorner said:

> Hi,
>
> sounds philosophical, but still, always wanted to know:
>
> The generated item provider for an abstract class is not abstract. Is
> there any specific reason for this?
>
> The practical question is: How do I make it abstract? It seems that
> adding 'NOT' to the @generated annotation will prevent the generator to
> remove my manually added 'abstract' keyword, but it also seems that
> this prevents it from doing any modification on the class at all.
>
> Any solution that works better?
>
> Cheers,
> Felix
Previous Topic:[XCore] XCoreGenModel Builder NullPointerException
Next Topic:Problem with persistence....
Goto Forum:
  


Current Time: Tue Mar 19 06:48:29 GMT 2024

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

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

Back to the top