RC2 compatibility
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / builder / ClasspathLocation.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.internal.compiler.env.NameEnvironmentAnswer;
14
15 import org.eclipse.core.resources.IContainer;
16 import org.eclipse.core.runtime.IPath;
17
18 public abstract class ClasspathLocation {
19
20 static ClasspathLocation forSourceFolder(IContainer sourceFolder, IContainer outputFolder, char[][] exclusionPatterns) {
21         return new ClasspathMultiDirectory(sourceFolder, outputFolder, exclusionPatterns);
22 }
23
24 public static ClasspathLocation forBinaryFolder(IContainer binaryFolder, boolean isOutputFolder) {
25         return new ClasspathDirectory(binaryFolder, isOutputFolder);
26 }
27
28 //static ClasspathLocation forLibrary(String libraryPathname) {
29 //      return new ClasspathJar(libraryPathname);
30 //}
31
32 //static ClasspathLocation forLibrary(IFile library) {
33 //      return new ClasspathJar(library);
34 //}
35
36 public abstract NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName);
37
38 public abstract IPath getProjectRelativePath();
39
40 public boolean isOutputFolder() {
41         return false;
42 }
43
44 public abstract boolean isPackage(String qualifiedPackageName);
45
46 // free anything which is not required when the state is saved
47 public void cleanup() {
48 }
49 // reset any internal caches before another compile loop starts
50 public void reset() {
51 }
52 }