1 11 12 package org.eclipse.debug.internal.ui.importexport.breakpoints; 13 14 import org.eclipse.debug.core.DebugException; 15 import org.eclipse.debug.core.DebugPlugin; 16 import org.eclipse.debug.internal.ui.DebugUIPlugin; 17 import org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate; 18 import org.eclipse.debug.ui.IDebugUIConstants; 19 import org.eclipse.jface.action.IAction; 20 import org.eclipse.jface.viewers.ISelection; 21 import org.eclipse.jface.viewers.IStructuredSelection; 22 import org.eclipse.jface.wizard.WizardDialog; 23 import org.eclipse.ui.IViewPart; 24 25 38 public class ExportBreakpoints extends AbstractDebugActionDelegate { 39 40 45 public void run(IAction action) { 46 IViewPart fViewpart = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage().findView(IDebugUIConstants.ID_BREAKPOINT_VIEW); 47 WizardExportBreakpoints wiz = new WizardExportBreakpoints(); 48 wiz.init(DebugUIPlugin.getDefault().getWorkbench(), (IStructuredSelection)fViewpart.getViewSite().getSelectionProvider().getSelection()); 49 WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz); 50 wizdialog.setBlockOnOpen(true); 51 wizdialog.open(); 52 } 53 54 57 protected void update(IAction action, ISelection s) { 58 getAction().setEnabled(DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints()); 59 } 60 61 64 protected void doAction(Object element) throws DebugException {} 65 } 66 | Popular Tags |