1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.ui.viewsupport;
13 import net.sourceforge.phpdt.ui.actions.MemberFilterActionGroup;
15 import org.eclipse.jface.action.Action;
16 import org.eclipse.ui.PlatformUI;
19 * Action used to enable / disable method filter properties
21 public class MemberFilterAction extends Action {
23 private int fFilterProperty;
25 private MemberFilterActionGroup fFilterActionGroup;
27 public MemberFilterAction(MemberFilterActionGroup actionGroup,
28 String title, int property, String contextHelpId, boolean initValue) {
30 fFilterActionGroup = actionGroup;
31 fFilterProperty = property;
33 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, contextHelpId);
35 setChecked(initValue);
39 * Returns this action's filter property.
41 public int getFilterProperty() {
42 return fFilterProperty;
46 * @see Action#actionPerformed
49 fFilterActionGroup.setMemberFilter(fFilterProperty, isChecked());