Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Reusable editor
Reusable editor [message #658106] Sun, 06 March 2011 14:08 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
I found several references (including bug108470) to a reusable editor
for EMF models.
This is obviously not what is generated by "Generate editor".
The generated editor is monolithic and even the simple task of
extracting the Outline view in it's own file proved non-trivial (for me).

Two questions:

Is there a really reusable and modifiable EMF Editor with Master-detail
support somewhere?

Would it be possible to have the "Generate editor" to produce separate
classes for the various components of the editor? This would make
reusing single pieces and modifying them much simpler, especially where
the editor is a standalone RCP editor.

Background:
I started building my RCP application from scratch using Forms, created
a model via annotated java and bound the two using EMF Databinding.
Doing this I lost a lot of goodies already provided by the generated
editor (e.g.: undo/redo, node D&D).
Now I'm trying to recode it the "Right Way" starting from the generated
editor, cutting out what is unneeded and adding features; Unfortunately
the generated editor structure seems really monolithic and I don't think
it is a good idea to keep all my app in one single class.

Can someone suggest the "best practice" for such a scenario?

TiA
Mauro
Re: Reusable editor [message #658113 is a reply to message #658106] Sun, 06 March 2011 16:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
Mauro,

Comments below.

Mauro Condarelli wrote:
> I found several references (including bug108470) to a reusable editor
> for EMF models.
> This is obviously not what is generated by "Generate editor".
> The generated editor is monolithic and even the simple task of
> extracting the Outline view in it's own file proved non-trivial (for me).
>
> Two questions:
>
> Is there a really reusable and modifiable EMF Editor with Master-detail
> support somewhere?
>
You' googled "EMF Forms Editor"?
> Would it be possible to have the "Generate editor" to produce separate
> classes for the various components of the editor?
Anything is possible, but no one will have time to do this. I'm not
sure what you'd want to separate out. There aren't that many nested
classes.
> This would make
> reusing single pieces and modifying them much simpler, especially where
> the editor is a standalone RCP editor.
>
You'd still need to understand how to compose the pieces.
> Background:
> I started building my RCP application from scratch using Forms, created
> a model via annotated java and bound the two using EMF Databinding.
> Doing this I lost a lot of goodies already provided by the generated
> editor (e.g.: undo/redo, node D&D).
> Now I'm trying to recode it the "Right Way" starting from the generated
> editor, cutting out what is unneeded and adding features; Unfortunately
> the generated editor structure seems really monolithic and I don't think
> it is a good idea to keep all my app in one single class.
>
Certainly it would be possible to have all the code you see in the
generated editor in a base class in the framework and have the generated
editor be just a tiny thing. But you'd then have the problem of how to
specialize a large thing you can't directly edit and modify to your
heart's content.
> Can someone suggest the "best practice" for such a scenario?
>
There's no avoiding learning how all these things work. Often people
stare at a big chunk of code and hope for it all to make sense. Better
you set breakpoints in specific places, run the code, and get a sense of
what the pieces are doing a runtime to support the things you you're
doing in the running process. You do after all have a fully functional
running example which is a lot better than a bucket of pieces with "some
assembly required".
> TiA
> Mauro
>
Previous Topic:[CDO] since API breakage occurred since version 3.0.0.v20100618-1451
Next Topic:[Teneo/EclipseLink]Entity class [class model.impl.BookImpl] has no primary key specified
Goto Forum:
  


Current Time: Sun Oct 20 14:23:35 GMT 2019

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

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

Back to the top