Skip to main content



      Home
Home » Eclipse Projects » GEF » The Command in GEF & EMF
The Command in GEF & EMF [message #50985] Tue, 24 December 2002 11:43 Go to next message
Eclipse UserFriend
Originally posted by: eric_to_jeff.hotmail.com

Hi,

I write a program use EMF as model framework & GEF as presentation,
Now the problem is both gef & emf have its undo mechanism, and they have
the same api but does not implements the same interface. How about merge
them? Just like WSAD do!

Regards

Eric Suen
Re: The Command in GEF & EMF [message #51039 is a reply to message #50985] Tue, 24 December 2002 16:01 Go to previous messageGo to next message
Eclipse UserFriend
Eric,

GEF is using its own copy of the EMF common command package. It should be
using the official library.

Frank.


Eric Suen wrote:

> Hi,
>
> I write a program use EMF as model framework & GEF as presentation,
> Now the problem is both gef & emf have its undo mechanism, and they have
> the same api but does not implements the same interface. How about merge
> them? Just like WSAD do!
>
> Regards
>
> Eric Suen
Re: The Command in GEF & EMF [message #51178 is a reply to message #50985] Thu, 26 December 2002 12:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

EMF does not require you to use their Command implementation unless you are
using EMF Edit. I would recommend avoiding EMF Edit.

"Eric Suen" <eric_to_jeff@hotmail.com> wrote in message
news:aua23r$gkf$1@rogue.oti.com...
> Hi,
>
> I write a program use EMF as model framework & GEF as presentation,
> Now the problem is both gef & emf have its undo mechanism, and they have
> the same api but does not implements the same interface. How about merge
> them? Just like WSAD do!
>
> Regards
>
> Eric Suen
>
>
Re: The Command in GEF & EMF [message #51284 is a reply to message #51178] Fri, 27 December 2002 04:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eric_to_jeff.hotmail.com

Hi,

>>I would recommend avoiding EMF Edit
Can you give me some reason?

Regards,

Eric Suen
Re: The Command in GEF & EMF [message #51310 is a reply to message #51178] Fri, 27 December 2002 11:04 Go to previous messageGo to next message
Eclipse UserFriend
Randy,

I know of several people that are going to hit this problem soon. It makes
perfect sense to add a GEF view to an EMF editor. Omondo is already doing this
with EclipseUML; they're using EMF.Edit for the outline view, GEF for the
graphical UML view. If they want to make undo/redo work properly, and I'm sure
they will eventually, they'll need GEF and EMF.Edit to share the same command
stack.

How about GEF provide an alternate packaging for EMF users, gef_for_emf.zip, or
something like that, that doesn't include it's own copy of the common command
interfaces, but instead "requires" the EMF ones to be there.

Frank.


Randy Hudson wrote:

> EMF does not require you to use their Command implementation unless you are
> using EMF Edit. I would recommend avoiding EMF Edit.
>
> "Eric Suen" <eric_to_jeff@hotmail.com> wrote in message
> news:aua23r$gkf$1@rogue.oti.com...
> > Hi,
> >
> > I write a program use EMF as model framework & GEF as presentation,
> > Now the problem is both gef & emf have its undo mechanism, and they have
> > the same api but does not implements the same interface. How about merge
> > them? Just like WSAD do!
> >
> > Regards
> >
> > Eric Suen
> >
> >
Re: The Command in GEF & EMF [message #51365 is a reply to message #51284] Fri, 27 December 2002 17:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

"Eric Suen" <eric_to_jeff@hotmail.com> wrote in message
news:auh48a$pkm$1@rogue.oti.com...
> Hi,
>
> >>I would recommend avoiding EMF Edit
> Can you give me some reason?

I would try writing your own content provider and label provider
implementations first. I've done this for a very complex EMF application
before, and it is pretty straightforward. EMF Edit generates complicated
code that just gets in the way of doing anything different from the
defaults, such as displaying "grouping" treeitems that have no corresponding
model object. EMF Edit also complicates things when you try to have some
control over the contents of the property sheet. I found it was much easier
just to write an IPropertySource adapter myself for the property sheet.

> Regards,
>
> Eric Suen
>
>
Re: The Command in GEF & EMF [message #51701 is a reply to message #51365] Mon, 30 December 2002 13:24 Go to previous messageGo to next message
Eclipse UserFriend
Randy,

Non-modeled "grouping" tree items are one of the most common customizations;
it's not very hard to do at all. I don't know what kind of property sheet
control you were looking for, but I've managed to categorize and add properties
from completely different objects with only about 20 lines of code. (These are
both examples in our EMF book - to be published Spring 2003.) Rather than
recommending people not use EMF.Edit, lets try the more constructive approach of
making GEF work with it.

Frank.


Randy Hudson wrote:

> "Eric Suen" <eric_to_jeff@hotmail.com> wrote in message
> news:auh48a$pkm$1@rogue.oti.com...
> > Hi,
> >
> > >>I would recommend avoiding EMF Edit
> > Can you give me some reason?
>
> I would try writing your own content provider and label provider
> implementations first. I've done this for a very complex EMF application
> before, and it is pretty straightforward. EMF Edit generates complicated
> code that just gets in the way of doing anything different from the
> defaults, such as displaying "grouping" treeitems that have no corresponding
> model object. EMF Edit also complicates things when you try to have some
> control over the contents of the property sheet. I found it was much easier
> just to write an IPropertySource adapter myself for the property sheet.
>
> > Regards,
> >
> > Eric Suen
> >
> >
Re: The Command in GEF & EMF [message #51706 is a reply to message #51310] Mon, 30 December 2002 14:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: julien.omondo.com

Hi all,

Frank Budinsky wrote:

> Randy,

> I know of several people that are going to hit this problem soon. It makes
> perfect sense to add a GEF view to an EMF editor. Omondo is already doing
this
> with EclipseUML; they're using EMF.Edit for the outline view, GEF for the
> graphical UML view. If they want to make undo/redo work properly, and I'm
sure
> they will eventually, they'll need GEF and EMF.Edit to share the same command
> stack.

Frank is correct. Right now we didn't support undo/redo on EMF model.

> How about GEF provide an alternate packaging for EMF users, gef_for_emf.zip,
or
> something like that, that doesn't include it's own copy of the common command
> interfaces, but instead "requires" the EMF ones to be there.
> Frank.

That will be very helpful.

Julien
omondo

> Randy Hudson wrote:

> > EMF does not require you to use their Command implementation unless you are
> > using EMF Edit. I would recommend avoiding EMF Edit.
> >
> > "Eric Suen" <eric_to_jeff@hotmail.com> wrote in message
> > news:aua23r$gkf$1@rogue.oti.com...
> > > Hi,
> > >
> > > I write a program use EMF as model framework & GEF as presentation,
> > > Now the problem is both gef & emf have its undo mechanism, and they have
> > > the same api but does not implements the same interface. How about merge
> > > them? Just like WSAD do!
> > >
> > > Regards
> > >
> > > Eric Suen
> > >
> > >
Re: The Command in GEF & EMF [message #52302 is a reply to message #51365] Sat, 04 January 2003 18:04 Go to previous messageGo to next message
Eclipse UserFriend
Randy Hudson wrote:
>
> Eric Suen wrote:
> >
> > >>I would recommend avoiding EMF Edit
> > Can you give me some reason?
>
> I would try writing your own content provider and label provider
> implementations first. I've done this for a very complex EMF application
> before, and it is pretty straightforward. EMF Edit generates complicated
> code that just gets in the way of doing anything different from the
> defaults, such as displaying "grouping" treeitems that have no
corresponding
> model object. EMF Edit also complicates things when you try to have some
> control over the contents of the property sheet. I found it was much
easier
> just to write an IPropertySource adapter myself for the property sheet.
>

To truly understand the runtime environment it is definitely worth while to
hand code an addition to the package. I just finished writing code to add an
import command to my editor. I did it step by step, first modifying the
toolbar, then creating an ActionItem, then creating an ImportCommand then
dealing with the execution. At each iteration I stepped through the EMF
chain to see what was happening by default if I didn't provide an override.
It gave me a much better feeling for what was going on behind the scenes. It
turns out that for my special case the call chain was much longer than
necessary but I got a better feeling for what can be overridden.
Re: The Command in GEF & EMF [message #56862 is a reply to message #51310] Tue, 21 January 2003 11:14 Go to previous messageGo to next message
Eclipse UserFriend
Will this package available soon?

Thanks.

"Frank Budinsky" <frankb@ca.ibm.com> wrote in message
news:3E0C7A28.19F7EDA1@ca.ibm.com...

>
> How about GEF provide an alternate packaging for EMF users,
gef_for_emf.zip, or
> something like that, that doesn't include it's own copy of the common
command
> interfaces, but instead "requires" the EMF ones to be there.
>
> Frank.
>
>
> Randy Hudson wrote:
>
> > EMF does not require you to use their Command implementation unless you
are
> > using EMF Edit. I would recommend avoiding EMF Edit.
> >
> > "Eric Suen" <eric_to_jeff@hotmail.com> wrote in message
> > news:aua23r$gkf$1@rogue.oti.com...
> > > Hi,
> > >
> > > I write a program use EMF as model framework & GEF as
presentation,
> > > Now the problem is both gef & emf have its undo mechanism, and they
have
> > > the same api but does not implements the same interface. How about
merge
> > > them? Just like WSAD do!
> > >
> > > Regards
> > >
> > > Eric Suen
> > >
> > >
>
Re: The Command in GEF & EMF [message #56988 is a reply to message #51310] Wed, 22 January 2003 01:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.planet-wagenknecht.de

Hi!

"Frank Budinsky" <frankb@ca.ibm.com> schrieb im Newsbeitrag
news:3E0C7A28.19F7EDA1@ca.ibm.com...

> How about GEF provide an alternate packaging for EMF users,
gef_for_emf.zip, or
> something like that, that doesn't include it's own copy of the common
command
> interfaces, but instead "requires" the EMF ones to be there.

Why? How about make a seperate "command" package that can be shared not only
between GEF and EMF? It can be publicized via an "Eclipse Common Tools"
page.

It's always the same. There are a lot of good implementations in several
Eclipse plugins and every plugin copies the code insted of sharing it. It's
really anoying. Look into CDT and JDT they have complete redundant UI
packaged which could be really helpfull for other developers.

Cu, Gunnar
Re: The Command in GEF & EMF [message #57016 is a reply to message #56988] Wed, 22 January 2003 01:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.planet-wagenknecht.de

http://dev.eclipse.org/bugs/show_bug.cgi?id=29939

Cu, Gunnar
Re: The Command in GEF & EMF [message #57126 is a reply to message #56988] Wed, 22 January 2003 14:25 Go to previous message
Eclipse UserFriend
Gunnar,

I agree with you. We are starting to discuss the possibility of moving the
command package to a common eclipse plugin.

Frank.


Gunnar Wagenknecht wrote:

> Hi!
>
> "Frank Budinsky" <frankb@ca.ibm.com> schrieb im Newsbeitrag
> news:3E0C7A28.19F7EDA1@ca.ibm.com...
>
> > How about GEF provide an alternate packaging for EMF users,
> gef_for_emf.zip, or
> > something like that, that doesn't include it's own copy of the common
> command
> > interfaces, but instead "requires" the EMF ones to be there.
>
> Why? How about make a seperate "command" package that can be shared not only
> between GEF and EMF? It can be publicized via an "Eclipse Common Tools"
> page.
>
> It's always the same. There are a lot of good implementations in several
> Eclipse plugins and every plugin copies the code insted of sharing it. It's
> really anoying. Look into CDT and JDT they have complete redundant UI
> packaged which could be really helpfull for other developers.
>
> Cu, Gunnar
Previous Topic:ContextMenu
Next Topic:Anyone tried Java2D and SVG with SWT/Draw2D?
Goto Forum:
  


Current Time: Fri Apr 25 01:22:17 EDT 2025

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

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

Back to the top