KickJava   Java API By Example, From Geeks To Geeks.

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


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: RemoveAllSessionsAction.java 96 2006-09-18 16:50:45Z mho $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.internal.ui.actions;
9
10 import org.eclipse.jface.action.Action;
11
12 import com.mountainminds.eclemma.core.CoverageTools;
13 import com.mountainminds.eclemma.core.ISessionManager;
14 import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
15 import com.mountainminds.eclemma.internal.ui.UIMessages;
16
17 /**
18  * This action removes all coverage sessions.
19  *
20  * @author Marc R. Hoffmann
21  * @version $Revision: 96 $
22  */

23 public class RemoveAllSessionsAction extends Action {
24   
25   public RemoveAllSessionsAction() {
26     setText(UIMessages.RemoveAllSessionsAction_label);
27     setToolTipText(UIMessages.RemoveAllSessionsAction_tooltip);
28     setImageDescriptor(EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.ELCL_REMOVEALL));
29     setDisabledImageDescriptor(EclEmmaUIPlugin.getImageDescriptor(EclEmmaUIPlugin.DLCL_REMOVEALL));
30   }
31   
32   public void run() {
33     ISessionManager manager = CoverageTools.getSessionManager();
34     manager.removeAllSessions();
35   }
36
37 }
38
Popular Tags