Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Separating graphical and business data in the model
Separating graphical and business data in the model [message #216666] Tue, 23 May 2006 12:02 Go to next message
Eclipse UserFriend
Originally posted by: stephanie.deleamont.epfl.ch

Hi all,

I am working on a project based on EMF and GEF. I am trying to create an
editor to make diagrams for a modeling method developed in my university.
The tool is working already but I would like to change the model of the
application to separate the info related to graphical display (x, y,
height,...) and to the modeling elements themselves (properties, text,...)

I have check lots of documentation about EMF and GEF. I have also studied
the example org.eclipse.gef.examples.ediagram but I still don't understand
how it works...

Should I have 2 separated .ecore and .genmodel files? (One for graphical
and one for business)
When do you create the visual element and when do you create the model
element? How do you link them together?
How can you have multiple visual representations for the same model object?

Any help will be greatly appreciated! :-)

Thank you in advance.

Stéphanie
Re: Separating graphical and business data in the model [message #216695 is a reply to message #216666] Tue, 23 May 2006 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

There is a GEF example that uses EMF in the exact way you describe. You can
load it by connecting to our CVS repository anonymously. See the FAQ for
more on CVS.

example is called:
gef.examples....ediagram

""St
Re: Separating graphical and business data in the model [message #216711 is a reply to message #216695] Tue, 23 May 2006 21:04 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
Also, you should investigate the GMF project (www.eclipse.org/gmf) which
allows generation of GEF editors based on an EMF model.

-Steve

"Randy Hudson" <none@us.ibm.com> wrote in message
news:e4vhcf$qgj$1@utils.eclipse.org...
> There is a GEF example that uses EMF in the exact way you describe. You
can
> load it by connecting to our CVS repository anonymously. See the FAQ for
> more on CVS.
>
> example is called:
> gef.examples....ediagram
>
> ""St
Re: Separating graphical and business data in the model [message #216913 is a reply to message #216711] Fri, 26 May 2006 20:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: manjuj.yahoo.com

You can also check this http://wiki.eclipse.org/index.php/GMF_Tutorial
Re: Separating graphical and business data in the model [message #217006 is a reply to message #216913] Tue, 30 May 2006 16:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.chris-lott.org

I am also interested in the issue of separating graphical ("notational")
information from business ("semantic") information. I too checked out the
ediagram example. The article by Chris Aniszczyk about GEF-EMF
( http://www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html) that
documents this example also states that this kind of separation "is
considered good design." Unfortunately the example mushes them together
("For simplicity, this example will not separate visual information from
semantic information.").

In an earlier posting to this thread, Randy Hudson wrpte that the ediagram
example has the answers. I'm just writing to say that I've looked into
that example, like the poster who originated this thread, and I too did
not find that particular example helpful for understanding this separation
issue.

I also looked into the IBM workflow example, developed in Eclipse 2 and
documented in the Redbook. That models x, y, width, height right in the
same model, which to me is not separating them.

I'm starting to think my expectations might be wrong. Maybe somone can
answer, how do things work when files are stored in the filesystem? Will
an editor be required to read two files into order to show a graphical
diagram properly? And write two separate files to store all diagram info?
Are models for both supposed to be generated from EMF?

Please help. I would appreciate it if you don't point me to GMF. I know
about that project, it just looks a bit young for us to begin depending on
it. Thanks in advance.

chris...
Re: Separating graphical and business data in the model [message #217021 is a reply to message #217006] Wed, 31 May 2006 01:33 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
I'm not sure why you wouldn't want to explore GMF since one of the major
goals of the project is doing what you're describing. GMF has defined a
notation meta-model that is used only for persisting the diagram
information. Each "View" in the GMF notation meta-model has a reference to
a semantic element in the form of an EObject. This allows the notation
meta-model to be generic across domains and support different semantic
meta-models.

GMF is also in RC phase now scheduled for release at the end of June. After
that it, the goal is that it will quickly exit incubation from technology
and join the new top level modeling project. All Eclipse project api
constraints will exist on GMF after RC to ensure stability for clients
adopting it.

-Steve

"Chris Lott" <eclipse@chris-lott.org> wrote in message
news:5edd29d831945481eb1b1a94c26fe52b$1@www.eclipse.org...
> I am also interested in the issue of separating graphical ("notational")
> information from business ("semantic") information. I too checked out the
> ediagram example. The article by Chris Aniszczyk about GEF-EMF
> ( http://www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html) that
> documents this example also states that this kind of separation "is
> considered good design." Unfortunately the example mushes them together
> ("For simplicity, this example will not separate visual information from
> semantic information.").
>
> In an earlier posting to this thread, Randy Hudson wrpte that the ediagram
> example has the answers. I'm just writing to say that I've looked into
> that example, like the poster who originated this thread, and I too did
> not find that particular example helpful for understanding this separation
> issue.
>
> I also looked into the IBM workflow example, developed in Eclipse 2 and
> documented in the Redbook. That models x, y, width, height right in the
> same model, which to me is not separating them.
>
> I'm starting to think my expectations might be wrong. Maybe somone can
> answer, how do things work when files are stored in the filesystem? Will
> an editor be required to read two files into order to show a graphical
> diagram properly? And write two separate files to store all diagram info?
> Are models for both supposed to be generated from EMF?
>
> Please help. I would appreciate it if you don't point me to GMF. I know
> about that project, it just looks a bit young for us to begin depending on
> it. Thanks in advance.
>
> chris...
>
>
Re: Separating graphical and business data in the model [message #217046 is a reply to message #217021] Wed, 31 May 2006 08:56 Go to previous message
Eclipse UserFriend
Originally posted by: stephanie.deleamont.epfl.ch

Hi all,

Thank you for all your answers.
As a matter of fact, I cannot switch to GMF for my project because my
teaching assistant wants me to use GEF and EMF.
As I said in my first post, I have checked the ediagram example but I
don't understand it. The business model used is the ecore model itself and
thus things are confusing because the implementation of the business model
does not appear in the example code.

How can I have tree different visual representations of the same business
object? I have tried to have 2 different models: one for graphical
representations and one for business objects. But then how should the link
be between the 3 graphical representations and the model object?

I need tree modes in my tool (for tree different modeling methods), they
correspond to the tree graphical representations. Should I create 3
diagram objects (one for each mode) and change the contents of the viewer
when required? Is there a simpler way to do it?

Thank in advance for your help.

Stéphanie
Previous Topic:A figure like Mapforce
Next Topic:How to draw lines between tree items
Goto Forum:
  


Current Time: Tue Apr 16 14:02:03 GMT 2024

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

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

Back to the top