@Override public void onClose(final IVetoable vetoable) { final QuestionResult result = Toolkit.getQuestionPane() .askYesNoQuestion("Would you really like to quit the application?"); if (result != QuestionResult.YES) { vetoable.veto(); } else { final ITrayItem trayItem = context.getWorkbenchContext().getTrayItem(); if (trayItem != null) { trayItem.showWarning("Application closed", "You really have closed the application!"); } } }