1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.cdt.internal.ui.filters;
13 import org.eclipse.cdt.core.model.IBinary;
14 import org.eclipse.cdt.core.model.IBinaryContainer;
16 import org.eclipse.jface.viewers.Viewer;
17 import org.eclipse.jface.viewers.ViewerFilter;
22 * The ExecutableFilter is a filter used to determine whether
23 * an executable is shown
25 public class ExecutableFilter extends ViewerFilter {
28 * Method declared on ViewerFilter.
31 public boolean select(Viewer viewer, Object parentElement, Object element) {
32 if (element instanceof IBinary) {
33 IBinary bin = (IBinary)element;
34 if (! (parentElement instanceof IBinaryContainer)) {
35 if (bin.isExecutable()) {