Since you can build a TrayItem
around the SystemTray
from any windows:
final Tray tray = window.getShell().getDisplay().getSystemTray();
TrayItem trayItem = new TrayItem(tray, SWT.NONE);
, do you have to access that TrayItem
instance from ApplicationWorkbenchWindowAdvisor
?
You could put it in a more accessible class or even build one where and when you need it.
Speaking of showing percentage while doing lengthy operations, I just wanted to mentioned the latest tasks icons improvements in Eclipse3.6M6 (not system tray, but related at they now can provide a good status indicator). See Snippet 336 for an example.
The new API TaskItem#setOverlayImage(Image)
allows clients to set an image to be displayed on top of the application button in the taskbar.
The new API TaskItem#setOverlayText(String)
allows clients to set a short text to be displayed on top of the application button in the taskbar.
The new APIs TaskItem#setProgress(int)
and TaskItem#setProgressState(int)
allows clients to show progress indication in the application button in the taskbar.