blob: 6fb2bb90e308689d57659b046a5a02a18cd6fa9c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation 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 API and implementation
*******************************************************************************/
package org.eclipse.jdt.astview.views;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
public class ASTViewFilter extends ViewerFilter {
private boolean fShowBinding;
public boolean isShowBinding() {
return fShowBinding;
}
public void setShowBinding(boolean showBinding) {
fShowBinding= showBinding;
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
if (!fShowBinding && element instanceof Binding) {
return false;
}
return true;
}
}