Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Minimize e4 RCP applicati9on to system tray

Hi Christoph, thank you for testing Eclipse 4.

On Wed, Nov 30, 2011 at 9:20 AM, Glanzmann Christoph (K-IT-BA-SLS-SCE-JV2) <christoph.glanzmann@xxxxxx> wrote:
> I am trying to port an Eclipse 3.x application to e4. I would like to
> minimize my new e4 RCP application to tray when the close button is clicked
> and restore workbench window when tray icon is double clicked.
>
>
>
> In Eclipse 3.x i did this within the preWindowShellClose() method in
> WorkbenchWindowAdvisor class. There i created the tray icon and set the
> shell invisible.
>
>
>
> - How can i achieve this in e4 to overwrite the default behaivor of the
> application close button and

There is an IWindowCloseHandler interface for this. If you set it in your window's context then it will be queried when the close button is clicked on. Returning 'false' will prevent SWT from closing the window.

> - Are there some special application life cycle hooks?

There is a life cycle manager with which you can annotate with methods with the @PostContextCreate annotation during startup. Though I'm not sure if this will satisfy your use case.

Regards,
Remy

----------
Remy Suen
Eclipse Platform/UI Committer
IBM Ottawa
1-613-356-5162


Back to the top