b3dbd19004f15cb94dffeb9c66951019f8c14ad8
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / actions / NewBookmarkAction.java
1 package com.quantum.actions;
2
3 import com.quantum.Messages;
4 import com.quantum.QuantumPlugin;
5 import com.quantum.wizards.BookmarkWizard;
6
7 import org.eclipse.jface.action.Action;
8 import org.eclipse.jface.wizard.WizardDialog;
9 import org.eclipse.ui.IViewPart;
10
11 /**
12  * @author root
13  *
14  */
15 public class NewBookmarkAction extends Action {
16     private IViewPart view;
17
18     public NewBookmarkAction(IViewPart view) {
19         this.view = view;
20         setText(Messages.getString(getClass().getName() + ".text")); //$NON-NLS-1$
21         setToolTipText(Messages.getString(getClass().getName() + ".text")); //$NON-NLS-1$
22         setImageDescriptor(QuantumPlugin.getImageDescriptor("bookmarks.gif")); //$NON-NLS-1$
23     }
24
25     public void run() {
26         BookmarkWizard wizard = new BookmarkWizard();
27         wizard.init();
28         WizardDialog dialog =
29             new WizardDialog(view.getSite().getShell(), wizard);
30         dialog.open();
31     }
32 }