package net.sourceforge.phpdt.sql.actions; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; import net.sourceforge.phpdt.sql.wizards.BookmarkWizard; /** * @author root * * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. * To enable and disable the creation of type comments go to * Window>Preferences>Java>Code Generation. */ public class NewBookmarkAction extends Action implements IViewActionDelegate { IViewPart view; /** * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart) */ public void init(IViewPart view) { this.view = view; } /** * @see org.eclipse.ui.IActionDelegate#run(IAction) */ public void run(IAction action) { run(); } public void run() { System.out.println("Wizard.."); //$NON-NLS-1$ BookmarkWizard wizard = new BookmarkWizard(); wizard.init(); WizardDialog dialog = new WizardDialog (view.getSite().getShell(),wizard); dialog.open(); } /** * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection) */ public void selectionChanged(IAction action, ISelection selection) { } }