Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / builder / ClasspathMultiDirectory.java
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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core.builder;
12
13 import net.sourceforge.phpdt.core.compiler.CharOperation;
14
15 import org.eclipse.core.resources.IContainer;
16
17 class ClasspathMultiDirectory extends ClasspathDirectory {
18
19         IContainer sourceFolder;
20
21         char[][] exclusionPatterns; // used by builders when walking source folders
22
23         boolean hasIndependentOutputFolder; // if output folder is not equal to any
24                                                                                 // of the source folders
25
26         ClasspathMultiDirectory(IContainer sourceFolder, IContainer binaryFolder,
27                         char[][] exclusionPatterns) {
28                 super(binaryFolder, true);
29
30                 this.sourceFolder = sourceFolder;
31                 this.exclusionPatterns = exclusionPatterns;
32                 this.hasIndependentOutputFolder = false;
33
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;
38         }
39
40         public boolean equals(Object o) {
41                 if (this == o)
42                         return true;
43                 if (!(o instanceof ClasspathMultiDirectory))
44                         return false;
45
46                 ClasspathMultiDirectory md = (ClasspathMultiDirectory) o;
47                 return sourceFolder.equals(md.sourceFolder)
48                                 && binaryFolder.equals(md.binaryFolder)
49                                 && CharOperation
50                                                 .equals(exclusionPatterns, md.exclusionPatterns);
51         }
52
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$
57         }
58 }