Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHook for GMF editor startup?
https://www.eclipse.org/forums/index.php/mv/msg/155950/491426/#msg_491426
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]]>Hauke Fuhrmann2009-10-14T13:13:05-00:00Re: Hook for GMF editor startup?
https://www.eclipse.org/forums/index.php/mv/msg/155950/491429/#msg_491429
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]]>Christophe Bouhier2009-10-14T14:38:09-00:00Re: Hook for GMF editor startup?
https://www.eclipse.org/forums/index.php/mv/msg/155950/491579/#msg_491579
> 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]]>Hauke Fuhrmann2009-10-15T07:17:07-00:00Re: Hook for GMF editor startup?
https://www.eclipse.org/forums/index.php/mv/msg/155950/491680/#msg_491680
> Because it's not guaranteed that my plugin is started at all.
It should be started before instantiating diagram editor described there.
-----------------
Alex Shatalin]]>Alex Shatalin2009-10-15T13:23:11-00:00