1 8 package com.mountainminds.eclemma.internal.ui.actions; 9 10 import org.eclipse.jface.action.Action; 11 import org.eclipse.jface.viewers.StructuredSelection; 12 import org.eclipse.jface.wizard.WizardDialog; 13 import org.eclipse.ui.IWorkbenchWindow; 14 import org.eclipse.ui.IWorkbenchWizard; 15 16 import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin; 17 import com.mountainminds.eclemma.internal.ui.UIMessages; 18 import com.mountainminds.eclemma.internal.ui.wizards.SessionImportWizard; 19 20 26 public class ImportSessionAction extends Action { 27 28 private final IWorkbenchWindow window; 29 30 public ImportSessionAction(IWorkbenchWindow window) { 31 this.window = window; 32 setText(UIMessages.ImportSessionAction_label); 33 setToolTipText(UIMessages.ImportSessionAction_tooltip); 34 setImageDescriptor(EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.ELCL_IMPORT)); 35 setDisabledImageDescriptor(EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.DLCL_IMPORT)); 36 } 37 38 public void run() { 39 IWorkbenchWizard wizard = new SessionImportWizard(); 40 wizard.init(window.getWorkbench(), StructuredSelection.EMPTY); 41 WizardDialog dialog = new WizardDialog(window.getShell(), wizard); 42 dialog.open(); 43 } 44 45 } 46 | Popular Tags |