KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > internal > ui > actions > ExportSessionAction


1 /*******************************************************************************
2  * Copyright (c) 2006 Mountainminds GmbH & Co. KG
3  * This software is provided under the terms of the Eclipse Public License v1.0
4  * See http://www.eclipse.org/legal/epl-v10.html.
5  *
6  * $Id: ExportSessionAction.java 95 2006-09-18 16:40:45Z mho $
7  ******************************************************************************/

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.SessionExportWizard;
19
20 /**
21  * This action launches the export session wizard.
22  *
23  * @author Marc R. Hoffmann
24  * @version $Revision: 95 $
25  */

26 public class ExportSessionAction extends Action {
27   
28   private final IWorkbenchWindow window;
29   
30   public ExportSessionAction(IWorkbenchWindow window) {
31     this.window = window;
32     setText(UIMessages.ExportSessionAction_label);
33     setToolTipText(UIMessages.ExportSessionAction_tooltip);
34     setImageDescriptor(EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.ELCL_EXPORT));
35     setDisabledImageDescriptor(EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.DLCL_EXPORT));
36   }
37   
38   public void run() {
39     IWorkbenchWizard wizard = new SessionExportWizard();
40     wizard.init(window.getWorkbench(), StructuredSelection.EMPTY);
41     WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
42     dialog.open();
43   }
44
45 }
46
Popular Tags