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