Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Hook for GMF editor startup?
Hook for GMF editor startup? [message #491426] Wed, 14 October 2009 13:13 Go to next message
Hauke Fuhrmann is currently offline Hauke Fuhrmann
Messages: 324
Registered: July 2009
Senior Member
Hi there,

I need a way to execute a function at a point in time before any GEF/GMF
editor has initialized. This way I want to globally register some
listeners and stuff.

So far I used the org.eclipse.ui.startup extension point to do this.
However, the earlyStartup method is only called after all Workbench
stuff was initialized. This might be *after* an GEF/GMF Diagram editor
has been initialized. Is there any hook available that lets me execute a
method call right before the first diagram editor opens up?

Not nure whether this is a GEF or GMF related question.

Example: I want to write a listener that gets informed about any
collapse or expand events or compartments in graphical editors,
regardless of the actual editor. Hence I have an IPartListener, that
listens to changes of the active editor and registers a
ResourceSetListener to the currently active editor. However, in my
current setup, no Notifications are fired for already open editors at
startup.

Cheers,
Hauke
Re: Hook for GMF editor startup? [message #491429 is a reply to message #491426] Wed, 14 October 2009 14:38 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe Bouhier
Messages: 937
Registered: July 2009
Senior Member
Hi,

Why not hookup to your plugin start(BundleContext ctx) methods or
workbench preWindowOpen(); ?

Christophe

Hauke Fuhrmann wrote:
> Hi there,
>
> I need a way to execute a function at a point in time before any GEF/GMF
> editor has initialized. This way I want to globally register some
> listeners and stuff.
>
> So far I used the org.eclipse.ui.startup extension point to do this.
> However, the earlyStartup method is only called after all Workbench
> stuff was initialized. This might be *after* an GEF/GMF Diagram editor
> has been initialized. Is there any hook available that lets me execute a
> method call right before the first diagram editor opens up?
>
> Not nure whether this is a GEF or GMF related question.
>
> Example: I want to write a listener that gets informed about any
> collapse or expand events or compartments in graphical editors,
> regardless of the actual editor. Hence I have an IPartListener, that
> listens to changes of the active editor and registers a
> ResourceSetListener to the currently active editor. However, in my
> current setup, no Notifications are fired for already open editors at
> startup.
>
> Cheers,
> Hauke
Re: Hook for GMF editor startup? [message #491579 is a reply to message #491429] Thu, 15 October 2009 07:17 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke Fuhrmann
Messages: 324
Registered: July 2009
Senior Member
Christophe Bouhier schrieb:
> Why not hookup to your plugin start(BundleContext ctx) methods or
> workbench preWindowOpen(); ?

Because it's not guaranteed that my plugin is started at all.

Hauke
Re: Hook for GMF editor startup? [message #491680 is a reply to message #491579] Thu, 15 October 2009 13:23 Go to previous message
Alex Shatalin is currently offline Alex Shatalin
Messages: 141
Registered: July 2009
Senior Member
Hello Hauke,

> Because it's not guaranteed that my plugin is started at all.
It should be started before instantiating diagram editor described there.

-----------------
Alex Shatalin
Previous Topic:Creating a Connection
Next Topic:ZoomManager reference for Zest GraphViewer
Goto Forum:
  


Current Time: Thu Oct 23 11:57:38 GMT 2014

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

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