1. Fix #1589403 - wrap double/single quoted strings
[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  *      Edits a bookmark
18  */
19 public class EditBookmarkAction extends Action  implements IViewActionDelegate {
20    IViewPart view;
21         /**
22          * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart)
23          */
24         public void init(IViewPart view) {
25                 this.view = view;
26                 
27         }
28
29         /**
30          * @see org.eclipse.ui.IActionDelegate#run(IAction)
31          */
32         public void run(IAction action) {
33                 run();
34         }
35         public void run() {
36                 System.out.println("Wizard.."); //$NON-NLS-1$
37                 BookmarkWizard wizard = new BookmarkWizard();
38                 
39                 BookmarkNode b = BookmarkView.getInstance().getCurrentBookmark();
40                 wizard.init(b);
41                 WizardDialog dialog = new WizardDialog (view.getSite().getShell(),wizard); 
42                 dialog.open();
43                 
44         }
45
46         /**
47          * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
48          */
49         public void selectionChanged(IAction action, ISelection selection) {
50         }
51
52 }