KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > $packageName$ > $actionClass$


1 package $packageName$;
2
3 import org.eclipse.jface.action.IAction;
4 import org.eclipse.jface.dialogs.MessageDialog;
5 import org.eclipse.jface.viewers.ISelection;
6 import org.eclipse.swt.widgets.Shell;
7 import org.eclipse.ui.IObjectActionDelegate;
8 import org.eclipse.ui.IWorkbenchPart;
9
10 public class $actionClass$ implements IObjectActionDelegate {
11
12     /**
13      * Constructor for Action1.
14      */

15     public $actionClass$() {
16         super();
17     }
18
19     /**
20      * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
21      */

22     public void setActivePart(IAction action, IWorkbenchPart targetPart) {
23     }
24
25     /**
26      * @see IActionDelegate#run(IAction)
27      */

28     public void run(IAction action) {
29         Shell shell = new Shell();
30         MessageDialog.openInformation(
31             shell,
32             "$pluginName$",
33             "$actionLabel$ was executed.");
34     }
35
36     /**
37      * @see IActionDelegate#selectionChanged(IAction, ISelection)
38      */

39     public void selectionChanged(IAction action, ISelection selection) {
40     }
41
42 }
43
Popular Tags