1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core.builder;
13 import net.sourceforge.phpdt.core.compiler.CharOperation;
15 import org.eclipse.core.resources.IContainer;
17 class ClasspathMultiDirectory extends ClasspathDirectory {
19 IContainer sourceFolder;
21 char[][] exclusionPatterns; // used by builders when walking source folders
23 boolean hasIndependentOutputFolder; // if output folder is not equal to any
24 // of the source folders
26 ClasspathMultiDirectory(IContainer sourceFolder, IContainer binaryFolder,
27 char[][] exclusionPatterns) {
28 super(binaryFolder, true);
30 this.sourceFolder = sourceFolder;
31 this.exclusionPatterns = exclusionPatterns;
32 this.hasIndependentOutputFolder = false;
34 // handle the case when a state rebuilds a source folder
35 if (this.exclusionPatterns != null
36 && this.exclusionPatterns.length == 0)
37 this.exclusionPatterns = null;
40 public boolean equals(Object o) {
43 if (!(o instanceof ClasspathMultiDirectory))
46 ClasspathMultiDirectory md = (ClasspathMultiDirectory) o;
47 return sourceFolder.equals(md.sourceFolder)
48 && binaryFolder.equals(md.binaryFolder)
50 .equals(exclusionPatterns, md.exclusionPatterns);
53 public String toString() {
54 return "Source classpath directory " + sourceFolder.getFullPath().toString() + //$NON-NLS-1$
55 " with binary directory "
56 + binaryFolder.getFullPath().toString(); //$NON-NLS-1$