Question

I am working on an Eclipse plugin project. Which extension point should I use to detect the activity of Eclipse. Like, when it is minimized or not on the top level of screen, plugin stops to counting. Right now, I can just use “org.eclipse.ui.startup“ extension point, and my plugin starts to count when Eclipse starts and keep counting until it is closed which is not good. Please help me with some advice!!! Thank you

Was it helpful?

Solution

One way is to use a ShellListener on the Shell for the workbench window:

IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();

Shell shell = window.getShell();

shell.addShellListener(listener);

The shell listener is notified when the shell is activated, deactivated, closed, minimized (iconified) and restored (deiconified).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top