package com.quantum.actions; import com.quantum.Messages; import com.quantum.QuantumPlugin; import com.quantum.wizards.BookmarkWizard; import org.eclipse.jface.action.Action; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.IViewPart; /** * @author root * */ public class NewBookmarkAction extends Action { private IViewPart view; public NewBookmarkAction(IViewPart view) { this.view = view; setText(Messages.getString(getClass().getName() + ".text")); //$NON-NLS-1$ setToolTipText(Messages.getString(getClass().getName() + ".text")); //$NON-NLS-1$ setImageDescriptor(QuantumPlugin.getImageDescriptor("bookmarks.gif")); //$NON-NLS-1$ } public void run() { BookmarkWizard wizard = new BookmarkWizard(); wizard.init(); WizardDialog dialog = new WizardDialog(view.getSite().getShell(), wizard); dialog.open(); } }