blob: dd307615b4df5ac90861240062f9b67b9d930dae [file] [log] [blame]
/**********************************************************************
Copyright (c) 2000, 2002 IBM Corp. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Common Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/cpl-v10.html
Contributors:
IBM Corporation - Initial implementation
**********************************************************************/
package org.eclipse.ui.views.properties;
import org.eclipse.ui.help.WorkbenchHelp;
/**
* This action hides or shows expert properties in the <code>PropertySheetViewer</code>.
*/
/*package*/ class FilterAction extends PropertySheetAction {
/**
* Create the Filter action. This action is used to show
* or hide expert properties.
*/
public FilterAction(PropertySheetViewer viewer, String name) {
super(viewer, name);
WorkbenchHelp.setHelp(this, IPropertiesHelpContextIds.FILTER_ACTION);
}
/**
* Toggle the display of expert properties.
*/
public void run() {
PropertySheetViewer ps = getPropertySheet();
ps.deactivateCellEditor();
if (isChecked()) {
ps.showExpert();
} else {
ps.hideExpert();
}
}
}