X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/filters/OutputFolderFilter.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/filters/OutputFolderFilter.java index c9c4781..579511f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/filters/OutputFolderFilter.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/filters/OutputFolderFilter.java @@ -10,7 +10,6 @@ *******************************************************************************/ package net.sourceforge.phpdt.internal.ui.filters; - import net.sourceforge.phpdt.core.IClasspathEntry; import net.sourceforge.phpdt.core.IJavaProject; import net.sourceforge.phpdt.core.JavaCore; @@ -23,49 +22,50 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; - -/** +/** * Filters out all output folders. *

- * Note: Folder which are direct children of a Java element - * are already filtered by the Java Model. + * Note: Folder which are direct children of a Java element are already filtered + * by the Java Model. *

* * @since 3.0 */ public class OutputFolderFilter extends ViewerFilter { - + /** - * Returns the result of this filter, when applied to the - * given element. - * - * @param element the element to test + * Returns the result of this filter, when applied to the given element. + * + * @param element + * the element to test * @return true if element should be included * @since 3.0 */ public boolean select(Viewer viewer, Object parent, Object element) { if (element instanceof IFolder) { - IFolder folder= (IFolder)element; - IProject proj= folder.getProject(); + IFolder folder = (IFolder) element; + IProject proj = folder.getProject(); try { if (!proj.hasNature(PHPeclipsePlugin.PHP_NATURE_ID)) return true; - - IJavaProject jProject= JavaCore.create(folder.getProject()); + + IJavaProject jProject = JavaCore.create(folder.getProject()); if (jProject == null || !jProject.exists()) return true; - + // Check default output location - IPath defaultOutputLocation= jProject.getOutputLocation(); - IPath folderPath= folder.getFullPath(); - if (defaultOutputLocation != null && defaultOutputLocation.equals(folderPath)) + IPath defaultOutputLocation = jProject.getOutputLocation(); + IPath folderPath = folder.getFullPath(); + if (defaultOutputLocation != null + && defaultOutputLocation.equals(folderPath)) return false; - + // Check output location for each class path entry - IClasspathEntry[] cpEntries= jProject.getRawClasspath(); - for (int i= 0, length= cpEntries.length; i < length; i++) { - IPath outputLocation= cpEntries[i].getOutputLocation(); - if (outputLocation != null && outputLocation.equals(folderPath)) + IClasspathEntry[] cpEntries = jProject.getRawClasspath(); + for (int i = 0, length = cpEntries.length; i < length; i++) { + IPath outputLocation = cpEntries[i].getOutputLocation(); + if (outputLocation != null + && outputLocation.equals(folderPath)) return false; } } catch (CoreException ex) {