diff options
Diffstat (limited to 'examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java')
-rw-r--r-- | examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java index 09cf1f900..c1d2104f3 100644 --- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java +++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java @@ -4,22 +4,23 @@ import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.ui.IWorkbenchWindow; - public class MessagePopupAction extends Action { - private final IWorkbenchWindow window; + private final IWorkbenchWindow window; - MessagePopupAction(String text, IWorkbenchWindow window) { - super(text); - this.window = window; - // The id is used to refer to the action in a menu or toolbar - setId(ICommandIds.CMD_OPEN_MESSAGE); - // Associate the action with a pre-defined command, to allow key bindings. - setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE); - setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator.getImageDescriptor("/icons/sample3.gif")); - } + MessagePopupAction(String text, IWorkbenchWindow window) { + super(text); + this.window = window; + // The id is used to refer to the action in a menu or toolbar + setId(ICommandIds.CMD_OPEN_MESSAGE); + // Associate the action with a pre-defined command, to allow key bindings. + setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE); + setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator + .getImageDescriptor("/icons/sample3.gif")); + } - public void run() { - MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!"); - } + @Override + public void run() { + MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!"); + } }
\ No newline at end of file |