// Path: core/fr.opensagres.eclipse.jsbuild.ui/src/fr/opensagres/eclipse/jsbuild/internal/ui/JSBuildFileUIPlugin.java
// public class JSBuildFileUIPlugin extends AbstractUIPlugin {
// 
// 	// The plug-in ID
// 	public static final String PLUGIN_ID = "fr.opensagres.eclipse.jsbuild.ui"; //$NON-NLS-1$
// 
// 	// The shared instance
// 	private static JSBuildFileUIPlugin plugin;
// 
// 	/**
// 	 * The constructor
// 	 */
// 	public JSBuildFileUIPlugin() {
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * 
// 	 * @see
// 	 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
// 	 * )
// 	 */
// 	public void start(BundleContext context) throws Exception {
// 		super.start(context);
// 		plugin = this;
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * 
// 	 * @see
// 	 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
// 	 * )
// 	 */
// 	public void stop(BundleContext context) throws Exception {
// 		plugin = null;
// 		super.stop(context);
// 	}
// 
// 	/**
// 	 * Returns the shared instance
// 	 * 
// 	 * @return the shared instance
// 	 */
// 	public static JSBuildFileUIPlugin getDefault() {
// 		return plugin;
// 	}
// 
// 	/**
// 	 * Returns the standard display to be used. The method first checks, if the
// 	 * thread calling this method has an associated display. If so, this display
// 	 * is returned. Otherwise the method returns the default display.
// 	 */
// 	public static Display getStandardDisplay() {
// 		Display display = Display.getCurrent();
// 		if (display == null) {
// 			display = Display.getDefault();
// 		}
// 		return display;
// 	}
// 
// 	/**
// 	 * Returns the {@link IDialogSettings} section with the given name. Creates
// 	 * a new section if one does not exist.
// 	 * 
// 	 * @param name
// 	 * @return the {@link IDialogSettings} section with the given name
// 	 */
// 	public IDialogSettings getDialogSettingsSection(String name) {
// 		IDialogSettings dialogSettings = getDialogSettings();
// 		IDialogSettings section = dialogSettings.getSection(name);
// 		if (section == null) {
// 			section = dialogSettings.addNewSection(name);
// 		}
// 		return section;
// 	}
// 
// 	/**
// 	 * Returns the active workbench window or <code>null</code> if none
// 	 */
// 	public static IWorkbenchWindow getActiveWorkbenchWindow() {
// 		return getDefault().getWorkbench().getActiveWorkbenchWindow();
// 	}
// 
// 	public static IWorkbenchPage getActivePage() {
// 		return getActiveWorkbenchWindow().getActivePage();
// 	}
// 
// }


import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.custom.BusyIndicator;
import fr.opensagres.eclipse.jsbuild.internal.ui.JSBuildFileUIPlugin;
	 * @see
	 * org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers
	 * .Viewer, java.lang.Object, java.lang.Object)
	 */
	@Override
	public boolean select(Viewer viewer, Object parentElement, Object element) {
		return fFiles.contains(element) && !fFilter.contains(element);
	}

	/**
	 * Search for all the matching files in the workspace.
	 */
	private void init() {
		BusyIndicator.showWhile(JSBuildFileUIPlugin.getStandardDisplay(),
				new Runnable() {
					@Override
					public void run() {
						fFiles = new HashSet<IResource>();
						traverse(ResourcesPlugin.getWorkspace().getRoot(),
								fFiles);
					}
				});
	}

	/**
	 * Traverse the given container, adding files to the given set. Returns
	 * whether any files were added
	 */
	private boolean traverse(IContainer container, Set<IResource> set) {
		boolean added = false;
// Path: core/fr.opensagres.eclipse.jsbuild.ui/src/fr/opensagres/eclipse/jsbuild/internal/ui/JSBuildFileUIPlugin.java
// public class JSBuildFileUIPlugin extends AbstractUIPlugin {
// 
// 	// The plug-in ID
// 	public static final String PLUGIN_ID = "fr.opensagres.eclipse.jsbuild.ui"; //$NON-NLS-1$
// 
// 	// The shared instance
// 	private static JSBuildFileUIPlugin plugin;
// 
// 	/**
// 	 * The constructor
// 	 */
// 	public JSBuildFileUIPlugin() {
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * 
// 	 * @see
// 	 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
// 	 * )
// 	 */
// 	public void start(BundleContext context) throws Exception {
// 		super.start(context);
// 		plugin = this;
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * 
// 	 * @see
// 	 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
// 	 * )
// 	 */
// 	public void stop(BundleContext context) throws Exception {
// 		plugin = null;
// 		super.stop(context);
// 	}
// 
// 	/**
// 	 * Returns the shared instance
// 	 * 
// 	 * @return the shared instance
// 	 */
// 	public static JSBuildFileUIPlugin getDefault() {
// 		return plugin;
// 	}
// 
// 	/**
// 	 * Returns the standard display to be used. The method first checks, if the
// 	 * thread calling this method has an associated display. If so, this display
// 	 * is returned. Otherwise the method returns the default display.
// 	 */
// 	public static Display getStandardDisplay() {
// 		Display display = Display.getCurrent();
// 		if (display == null) {
// 			display = Display.getDefault();
// 		}
// 		return display;
// 	}
// 
// 	/**
// 	 * Returns the {@link IDialogSettings} section with the given name. Creates
// 	 * a new section if one does not exist.
// 	 * 
// 	 * @param name
// 	 * @return the {@link IDialogSettings} section with the given name
// 	 */
// 	public IDialogSettings getDialogSettingsSection(String name) {
// 		IDialogSettings dialogSettings = getDialogSettings();
// 		IDialogSettings section = dialogSettings.getSection(name);
// 		if (section == null) {
// 			section = dialogSettings.addNewSection(name);
// 		}
// 		return section;
// 	}
// 
// 	/**
// 	 * Returns the active workbench window or <code>null</code> if none
// 	 */
// 	public static IWorkbenchWindow getActiveWorkbenchWindow() {
// 		return getDefault().getWorkbench().getActiveWorkbenchWindow();
// 	}
// 
// 	public static IWorkbenchPage getActivePage() {
// 		return getActiveWorkbenchWindow().getActivePage();
// 	}
// 
// }


// Path: core/fr.opensagres.eclipse.jsbuild.ui/src/fr/opensagres/eclipse/jsbuild/internal/ui/dialogs/FileFilter.java
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.custom.BusyIndicator;
import fr.opensagres.eclipse.jsbuild.internal.ui.JSBuildFileUIPlugin;

	 * @see
	 * org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers
	 * .Viewer, java.lang.Object, java.lang.Object)
	 */
	@Override
	public boolean select(Viewer viewer, Object parentElement, Object element) {
		return fFiles.contains(element) && !fFilter.contains(element);
	}

	/**
	 * Search for all the matching files in the workspace.
	 */
	private void init() {
		BusyIndicator.showWhile(JSBuildFileUIPlugin.getStandardDisplay(),
				new Runnable() {
					@Override
					public void run() {
						fFiles = new HashSet<IResource>();
						traverse(ResourcesPlugin.getWorkspace().getRoot(),
								fFiles);
					}
				});
	}

	/**
	 * Traverse the given container, adding files to the given set. Returns
	 * whether any files were added
	 */
	private boolean traverse(IContainer container, Set<IResource> set) {
		boolean added = false;
		try {