Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Non graphical model
Non graphical model [message #237166] Tue, 24 July 2007 15:37 Go to next message
Eclipse UserFriend
Originally posted by: freds.dtek.chalmers.se

Hi,
I have a predefined EMF model which I'm building a graphical tool for, so
I can't change the model. Problem is that the model doesn't use a
parent-child hierarchy, but a sort of database structure with Ids and
lookup-tables.
At first I solved the problem by doing all the lookup in the editparts,
but some parts doesn't have locational values stored in the model. Right
now that is also stored in the editpart which isn't a very good solution.

My question is, how do I solve this in best possible manner?
I was thinking about building a graphical model and map the graphical data
from the original model (and adding itself as adapter to the model). Is
that possible to do with another EMF model?


Thankful for help,
Fredrik
Re: Non graphical model [message #237232 is a reply to message #237166] Fri, 27 July 2007 06:29 Go to previous messageGo to next message
David Sciamma is currently offline David SciammaFriend
Messages: 78
Registered: July 2009
Member
Hi,

The solution is to have 2 kinds of model : the domain specific model
(your current model) and the graphical model storing all the graphical
informations.
The GMF project already implements this solution and will allow you to
quickly create your graphical editor without modifying you EMF model.

David Sciamma

Fredrik Svensson a écrit :
> Hi,
> I have a predefined EMF model which I'm building a graphical tool for,
> so I can't change the model. Problem is that the model doesn't use a
> parent-child hierarchy, but a sort of database structure with Ids and
> lookup-tables.
> At first I solved the problem by doing all the lookup in the editparts,
> but some parts doesn't have locational values stored in the model.
> Right now that is also stored in the editpart which isn't a very good
> solution.
>
> My question is, how do I solve this in best possible manner?
> I was thinking about building a graphical model and map the graphical
> data from the original model (and adding itself as adapter to the
> model). Is that possible to do with another EMF model?
>
>
> Thankful for help,
> Fredrik
>
Re: Non graphical model [message #237470 is a reply to message #237232] Thu, 02 August 2007 09:11 Go to previous message
Eclipse UserFriend
Originally posted by: freds.dtek.chalmers.se

Thank you for your reply,

I haven't been able to load my model into GMF. I got pretty frustrated
trying, problem is that the model is sort of database driven with only
id's in the parent-child hiarchy. Id's are then looked up separatly in
tables for the actual data (with bitmaps and such stored on disk), I
haven't found a way to solve any of that with GMF.

What I ended up doing was building a graphical model which registered as
an adapter to all the different tables and updates itself on notification.
At the moment the update is dirty (updates everything once notified), but
I will rewrite it so that every getter/setter is handling it's own
listning as well as notification.
Previous Topic:XY Coordinaten automaticly to Propertys
Next Topic:Use of Draw2d, outside Eclipse
Goto Forum:
  


Current Time: Wed Apr 24 14:17:02 GMT 2024

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

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

Back to the top