Non graphical model [message #237166] |
Tue, 24 July 2007 15:37 |
Eclipse User |
|
|
|
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 #237470 is a reply to message #237232] |
Thu, 02 August 2007 09:11 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 2.36525 seconds