f662e06e00607ca80fcfe727e91321d7160ee688
1 package eu
.etaxonomy
.taxeditor
;
3 import org
.eclipse
.jface
.action
.Action
;
4 import org
.eclipse
.jface
.dialogs
.MessageDialog
;
5 import org
.eclipse
.ui
.IWorkbenchWindow
;
8 public class MessagePopupAction
extends Action
{
10 private final IWorkbenchWindow window
;
12 MessagePopupAction(String text
, IWorkbenchWindow window
) {
15 // The id is used to refer to the action in a menu or toolbar
16 setId(ICommandIds
.CMD_OPEN_MESSAGE
);
17 // Associate the action with a pre-defined command, to allow key bindings.
18 setActionDefinitionId(ICommandIds
.CMD_OPEN_MESSAGE
);
19 setImageDescriptor(eu
.etaxonomy
.taxeditor
.Activator
.getImageDescriptor("/icons/sample3.gif"));
23 MessageDialog
.openInformation(window
.getShell(), "Open", "Open Message Dialog!");