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