Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.ant.internal.ui.model;
public class InternalTargetFilter extends ViewerFilter {
	private int fFiltered= 0;
Returns whether the given target is an internal target. Internal targets are targets which have no description. The default target is never considered internal.
	public boolean select(Viewer viewerObject parentElementObject element) {
		boolean resulttrue;
		if (viewer instanceof CheckboxTableViewer) {
		    if (((CheckboxTableViewer)viewer).getChecked(element)) {
		        //do not filter out (selected) checked items
		        return true;
		if (element instanceof AntTargetNode) {
			Target target= ((AntTargetNode)element).getTarget();
			resulttarget.getDescription() != null || ((AntTargetNode)element).isDefaultTarget();
		if (!result) {
		return result;
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.ViewerFilter#filter(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object[])
	public Object[] filter(Viewer viewerObject parentObject[] elements) {
		return super.filter(viewerparentelements);
	public int getNumberOfTargetsFiltered() {
		return ;
New to GrepCode? Check out our FAQ X