EMMA Coverage Report (generated Mon Sep 29 15:05:28 EDT 2008)
[all classes][org.eclipse.ui.internal.actions]

COVERAGE SUMMARY FOR SOURCE FILE [ClearWorkingSetAction.java]

nameclass, %method, %block, %line, %
ClearWorkingSetAction.java100% (1/1)50%  (1/2)77%  (23/30)79%  (7.9/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ClearWorkingSetAction100% (1/1)50%  (1/2)77%  (23/30)79%  (7.9/10)
run (): void 0%   (0/1)0%   (0/5)0%   (0/2)
ClearWorkingSetAction (WorkingSetFilterActionGroup): void 100% (1/1)92%  (23/25)99%  (7.9/8)

1/*******************************************************************************
2 * Copyright (c) 2000, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 *     IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 
12package org.eclipse.ui.internal.actions;
13 
14import org.eclipse.core.runtime.Assert;
15import org.eclipse.jface.action.Action;
16import org.eclipse.ui.PlatformUI;
17import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
18import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
19import org.eclipse.ui.internal.WorkbenchMessages;
20 
21/**
22 * Clears the selected working set in the working set action group.
23 * 
24 * @since 2.1
25 */
26public class ClearWorkingSetAction extends Action {
27    private WorkingSetFilterActionGroup actionGroup;
28 
29    /**
30     * Creates a new instance of the receiver.
31     * 
32     * @param actionGroup the action group this action is created in
33     */
34    public ClearWorkingSetAction(WorkingSetFilterActionGroup actionGroup) {
35        super(WorkbenchMessages.ClearWorkingSetAction_text);
36        Assert.isNotNull(actionGroup);
37        setToolTipText(WorkbenchMessages.ClearWorkingSetAction_toolTip);
38        setEnabled(actionGroup.getWorkingSet() != null);
39        PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
40                                IWorkbenchHelpContextIds.CLEAR_WORKING_SET_ACTION);
41        this.actionGroup = actionGroup;
42    }
43 
44    /**
45     * Overrides method from Action
46     * 
47     * @see Action#run
48     */
49    public void run() {
50        actionGroup.setWorkingSet(null);
51    }
52}

[all classes][org.eclipse.ui.internal.actions]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov