Creating a generic editor for an abstract class [message #141053] |
Tue, 03 July 2007 10:24  |
Eclipse User |
|
|
|
Originally posted by: Stefan.Warwas.freenet.de
Hi,
I want to avoid creating the same editor for all implementations of an
abstract class. Here is an example:
- A contains B
- B is abstract
- B contains B
- B1, B2, B3, ... implement B
I have created an editor for "A" where I can place instances of B1, B2,
B3, ... Now I want to create a generic editor for "B" where I can place
again instances of B1, B2, B3, ... The editor for "B" should open
whenever somebody double-clicks on an instance of B1, B2, B3, ...
(recursively). I realized that it is not possible to create a generic
editor for "B", because GMF complains that "B" is abstract.
I want to avoid creating the same editor for B1, B2, etc... Has somebody
an idea how I can solve this problem in an elegant way?
Thanks!
Stefan
|
|
|
Re: Creating a generic editor for an abstract class [message #141278 is a reply to message #141053] |
Wed, 04 July 2007 06:36  |
Eclipse User |
|
|
|
Hello Stefan,
Try generating the code for B (ignoring walidation errors) and then correct
it if necessary. I think, the reason why GMF complains about abstractness
of B is: there is a place in the code where GMF is trying to create diagram
for B and create underlying B instance. AFAIU in your situation this action
will never be called, so you can gust remove this part of the generated code.
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.23491 seconds