3f4d9367be0c8d8ea5860051440c90022237d381
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / src / net / sourceforge / phpdt / sql / actions / NewBookmarkAction.java
1 package net.sourceforge.phpdt.sql.actions;
2
3 import org.eclipse.jface.action.Action;
4 import org.eclipse.jface.action.IAction;
5 import org.eclipse.jface.viewers.ISelection;
6 import org.eclipse.jface.wizard.WizardDialog;
7 import org.eclipse.ui.IViewActionDelegate;
8 import org.eclipse.ui.IViewPart;
9
10 import net.sourceforge.phpdt.sql.wizards.BookmarkWizard;
11
12 /**
13  * @author root
14  *
15  * To change this generated comment edit the template variable "typecomment":
16  * Window>Preferences>Java>Templates.
17  * To enable and disable the creation of type comments go to
18  * Window>Preferences>Java>Code Generation.
19  */
20 public class NewBookmarkAction extends Action implements IViewActionDelegate {
21    IViewPart view;
22         /**
23          * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart)
24          */
25         public void init(IViewPart view) {
26                 this.view = view;
27                 
28         }
29
30         /**
31          * @see org.eclipse.ui.IActionDelegate#run(IAction)
32          */
33         public void run(IAction action) {
34                 run();
35         }
36         public void run() {
37                 System.out.println("Wizard..");
38                 BookmarkWizard wizard = new BookmarkWizard();
39                 
40                 wizard.init();
41                 
42                 WizardDialog dialog = new WizardDialog (view.getSite().getShell(),wizard); 
43                 dialog.open();
44                 
45         }
46
47         /**
48          * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
49          */
50         public void selectionChanged(IAction action, ISelection selection) {
51         }
52
53 }