KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > internal > ui > coverageview > HideUnusedTypesAction


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 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: HideUnusedTypesAction.java 393 2007-08-28 13:05:34Z mtnminds $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.internal.ui.coverageview;
9
10 import org.eclipse.jface.action.Action;
11
12 import com.mountainminds.eclemma.internal.ui.UIMessages;
13
14 /**
15  * Action to hide types not loaded at all. Internally used by the coverage view.
16  *
17  * @author Marc R. Hoffmann
18  * @version $Revision: 393 $
19  */

20 class HideUnusedTypesAction extends Action {
21
22   private final ViewSettings settings;
23   private final CoverageView view;
24   
25   HideUnusedTypesAction(ViewSettings settings, CoverageView view) {
26     super(UIMessages.CoverageViewHideUnusedTypesAction_label, AS_CHECK_BOX);
27     this.settings = settings;
28     this.view = view;
29     setChecked(settings.getHideUnusedTypes());
30   }
31
32   public void run() {
33     settings.setHideUnusedTypes(isChecked());
34     view.refreshViewer();
35   }
36
37 }
38
Popular Tags