]> git.uio.no Git - ifi-stolz-refaktor.git/blame - case-study/jdt-before/ui/org/eclipse/jdt/internal/ui/viewsupport/MemberFilterAction.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-before / ui / org / eclipse / jdt / internal / ui / viewsupport / MemberFilterAction.java
CommitLineData
1b2798f6
EK
1/*******************************************************************************
2 * Copyright (c) 2000, 2011 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 *******************************************************************************/
11package org.eclipse.jdt.internal.ui.viewsupport;
12
13import org.eclipse.jface.action.Action;
14
15import org.eclipse.ui.PlatformUI;
16
17import org.eclipse.jdt.ui.actions.MemberFilterActionGroup;
18
19/**
20 * Action used to enable / disable method filter properties
21 */
22public class MemberFilterAction extends Action {
23
24 private int fFilterProperty;
25 private MemberFilterActionGroup fFilterActionGroup;
26
27 public MemberFilterAction(MemberFilterActionGroup actionGroup, String title, int property, String contextHelpId, boolean initValue) {
28 super(title);
29 fFilterActionGroup= actionGroup;
30 fFilterProperty= property;
31
32 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, contextHelpId);
33
34 setChecked(initValue);
35 }
36
37 /**
38 * Returns this action's filter property.
39 * @return returns the property
40 */
41 public int getFilterProperty() {
42 return fFilterProperty;
43 }
44
45 /*
46 * @see Action#actionPerformed
47 */
48 @Override
49 public void run() {
50 fFilterActionGroup.setMemberFilter(fFilterProperty, isChecked());
51 }
52
53}