Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / IJavaProject.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  *     IBM Corporation - added getOption(String, boolean), getOptions(boolean) and setOptions(Map)
11  *     IBM Corporation - deprecated getPackageFragmentRoots(IClasspathEntry) and 
12  *                               added findPackageFragmentRoots(IClasspathEntry)
13  *     IBM Corporation - added isOnClasspath(IResource)
14  *******************************************************************************/
15 package net.sourceforge.phpdt.core;
16
17 import org.eclipse.core.resources.IProject;
18
19
20 /**
21  * A Java project represents a view of a project resource in terms of Java 
22  * elements such as package fragments, types, methods and fields.
23  * A project may contain several package roots, which contain package fragments. 
24  * A package root corresponds to an underlying folder or JAR.
25  * <p>
26  * Each Java project has a classpath, defining which folders contain source code and
27  * where required libraries are located. Each Java project also has an output location,
28  * defining where the builder writes <code>.class</code> files. A project that
29  * references packages in another project can access the packages by including
30  * the required project in a classpath entry. The Java model will present the
31  * source elements in the required project; when building, the compiler will use
32  * the corresponding generated class files from the required project's output
33  * location(s)). The classpath format is a sequence of classpath entries
34  * describing the location and contents of package fragment roots.
35  * </p>
36  * Java project elements need to be opened before they can be navigated or manipulated.
37  * The children of a Java project are the package fragment roots that are 
38  * defined by the classpath and contained in this project (in other words, it
39  * does not include package fragment roots for other projects).
40  * </p>
41  * <p>
42  * This interface is not intended to be implemented by clients. An instance
43  * of one of these handles can be created via 
44  * <code>JavaCore.create(project)</code>.
45  * </p>
46  *
47  * @see JavaCore#create(org.eclipse.core.resources.IProject)
48  * @see IClasspathEntry
49  */
50 public interface IJavaProject extends IParent, IJavaElement, IOpenable {
51
52         /**
53          * Returns the <code>IJavaElement</code> corresponding to the given
54          * classpath-relative path, or <code>null</code> if no such 
55          * <code>IJavaElement</code> is found. The result is one of an
56          * <code>ICompilationUnit</code>, <code>IClassFile</code>, or
57          * <code>IPackageFragment</code>. 
58          * <p>
59          * When looking for a package fragment, there might be several potential
60          * matches; only one of them is returned.
61          *
62          * <p>For example, the path "java/lang/Object.java", would result in the
63          * <code>ICompilationUnit</code> or <code>IClassFile</code> corresponding to
64          * "java.lang.Object". The path "java/lang" would result in the
65          * <code>IPackageFragment</code> for "java.lang".
66          * @param path the given classpath-relative path
67          * @exception JavaModelException if the given path is <code>null</code>
68          *  or absolute
69          * @return the <code>IJavaElement</code> corresponding to the given
70          * classpath-relative path, or <code>null</code> if no such 
71          * <code>IJavaElement</code> is found
72          */
73 //      IJavaElement findElement(IPath path) throws JavaModelException;
74
75         /**
76          * Returns the first existing package fragment on this project's classpath
77          * whose path matches the given (absolute) path, or <code>null</code> if none
78          * exist.
79          * The path can be:
80          *      - internal to the workbench: "/Project/src"
81          *  - external to the workbench: "c:/jdk/classes.zip/java/lang"
82          * @param path the given absolute path
83          * @exception JavaModelException if this element does not exist or if an
84          *              exception occurs while accessing its corresponding resource
85          * @return the first existing package fragment on this project's classpath
86          * whose path matches the given (absolute) path, or <code>null</code> if none
87          * exist
88          */
89 //      IPackageFragment findPackageFragment(IPath path) throws JavaModelException;
90
91         /**
92          * Returns the existing package fragment root on this project's classpath
93          * whose path matches the given (absolute) path, or <code>null</code> if
94          * one does not exist.
95          * The path can be:
96          *      - internal to the workbench: "/Compiler/src"
97          *      - external to the workbench: "c:/jdk/classes.zip"
98          * @param path the given absolute path
99          * @exception JavaModelException if this element does not exist or if an
100          *              exception occurs while accessing its corresponding resource
101          * @return the existing package fragment root on this project's classpath
102          * whose path matches the given (absolute) path, or <code>null</code> if
103          * one does not exist
104          */
105 //      IPackageFragmentRoot findPackageFragmentRoot(IPath path)
106 //              throws JavaModelException;
107         /**
108          * Returns the existing package fragment roots identified by the given entry.
109          * Note that a classpath entry that refers to another project may
110          * have more than one root (if that project has more than on root
111          * containing source), and classpath entries within the current
112          * project identify a single root.
113          * <p>
114          * If the classpath entry denotes a variable, it will be resolved and return
115          * the roots of the target entry (empty if not resolvable).
116          * <p>
117          * If the classpath entry denotes a container, it will be resolved and return
118          * the roots corresponding to the set of container entries (empty if not resolvable).
119          * 
120          * @param entry the given entry
121          * @return the existing package fragment roots identified by the given entry
122          * @see IClasspathContainer
123          * @since 2.1
124          */
125 //      IPackageFragmentRoot[] findPackageFragmentRoots(IClasspathEntry entry);
126         /**
127          * Returns the first type found following this project's classpath 
128          * with the given fully qualified name or <code>null</code> if none is found.
129          * The fully qualified name is a dot-separated name. For example,
130          * a class B defined as a member type of a class A in package x.y should have a 
131          * the fully qualified name "x.y.A.B".
132          * 
133          * Note that in order to be found, a type name (or its toplevel enclosing
134          * type name) must match its corresponding compilation unit name. As a 
135          * consequence, secondary types cannot be found using this functionality.
136          * Secondary types can however be explicitely accessed through their enclosing
137          * unit or found by the <code>SearchEngine</code>.
138          * 
139          * @param fullyQualifiedName the given fully qualified name
140          * @exception JavaModelException if this element does not exist or if an
141          *              exception occurs while accessing its corresponding resource
142          * @return the first type found following this project's classpath 
143          * with the given fully qualified name or <code>null</code> if none is found
144          * @see IType#getFullyQualifiedName(char)
145          * @since 2.0
146          */
147 //      IType findType(String fullyQualifiedName) throws JavaModelException;
148         /**
149          * Returns the first type found following this project's classpath 
150          * with the given package name and type qualified name
151          * or <code>null</code> if none is found.
152          * The package name is a dot-separated name.
153          * The type qualified name is also a dot-separated name. For example,
154          * a class B defined as a member type of a class A should have the 
155          * type qualified name "A.B".
156          * 
157          * Note that in order to be found, a type name (or its toplevel enclosing
158          * type name) must match its corresponding compilation unit name. As a 
159          * consequence, secondary types cannot be found using this functionality.
160          * Secondary types can however be explicitely accessed through their enclosing
161          * unit or found by the <code>SearchEngine</code>.
162          * 
163          * @param packageName the given package name
164          * @param typeQualifiedName the given type qualified name
165          * @exception JavaModelException if this element does not exist or if an
166          *              exception occurs while accessing its corresponding resource
167          * @return the first type found following this project's classpath 
168          * with the given package name and type qualified name
169          * or <code>null</code> if none is found
170          * @see IType#getTypeQualifiedName(char)
171
172          * @since 2.0
173          */
174 //      IType findType(String packageName, String typeQualifiedName) throws JavaModelException;
175
176         /**
177          * Returns all of the existing package fragment roots that exist
178          * on the classpath, in the order they are defined by the classpath.
179          *
180          * @return all of the existing package fragment roots that exist
181          * on the classpath
182          * @exception JavaModelException if this element does not exist or if an
183          *              exception occurs while accessing its corresponding resource
184          */
185 //      IPackageFragmentRoot[] getAllPackageFragmentRoots() throws JavaModelException;
186
187         /**
188          * Returns an array of non-Java resources directly contained in this project.
189          * It does not transitively answer non-Java resources contained in folders;
190          * these would have to be explicitly iterated over.
191          * <p>
192          * Non-Java resources includes other files and folders located in the
193          * project not accounted for by any of it source or binary package fragment
194          * roots. If the project is a source folder itself, resources excluded from the
195          * corresponding source classpath entry by one or more exclusion patterns
196          * are considered non-Java resources and will appear in the result
197          * (possibly in a folder)
198          * </p>
199          * 
200          * @return an array of non-Java resources directly contained in this project
201          * @exception JavaModelException if this element does not exist or if an
202          *              exception occurs while accessing its corresponding resource
203          */
204 //      Object[] getNonJavaResources() throws JavaModelException;
205
206         /**
207          * Helper method for returning one option value only. Equivalent to <code>(String)this.getOptions(inheritJavaCoreOptions).get(optionName)</code>
208          * Note that it may answer <code>null</code> if this option does not exist, or if there is no custom value for it.
209          * <p>
210          * For a complete description of the configurable options, see <code>JavaCore#getDefaultOptions</code>.
211          * </p>
212          * 
213          * @param optionName the name of an option
214          * @param inheritJavaCoreOptions - boolean indicating whether JavaCore options should be inherited as well
215          * @return the String value of a given option
216          * @see JavaCore#getDefaultOptions
217          * @since 2.1
218          */
219 //      String getOption(String optionName, boolean inheritJavaCoreOptions);
220         
221         /**
222          * Returns the table of the current custom options for this project. Projects remember their custom options,
223          * in other words, only the options different from the the JavaCore global options for the workspace.
224          * A boolean argument allows to directly merge the project options with global ones from <code>JavaCore</code>.
225          * <p>
226          * For a complete description of the configurable options, see <code>JavaCore#getDefaultOptions</code>.
227          * </p>
228          * 
229          * @param inheritJavaCoreOptions - boolean indicating whether JavaCore options should be inherited as well
230          * @return table of current settings of all options 
231          *   (key type: <code>String</code>; value type: <code>String</code>)
232          * @see JavaCore#getDefaultOptions
233          * @since 2.1
234          */
235 //      Map getOptions(boolean inheritJavaCoreOptions);
236
237         /**
238          * Returns the default output location for this project as a workspace-
239          * relative absolute path.
240          * <p>
241          * The default output location is where class files are ordinarily generated
242          * (and resource files, copied). Each source classpath entry can also
243          * specify an output location for the generated class files (and copied
244          * resource files) corresponding to compilation units under that source
245          * folder. This makes it possible to arrange generated class files for
246          * different source folders in different output folders, and not
247          * necessarily the default output folder. This means that the generated
248          * class files for the project may end up scattered across several folders,
249          * rather than all in the default output folder (which is more standard).
250          * </p>
251          * 
252          * @return the workspace-relative absolute path of the default output folder
253          * @exception JavaModelException if this element does not exist
254          * @see #setOutputLocation
255          * @see IClasspathEntry#getOutputLocation
256          */
257 //      IPath getOutputLocation() throws JavaModelException;
258
259         /**
260          * Returns a package fragment root for the JAR at the specified file system path.
261          * This is a handle-only method.  The underlying <code>java.io.File</code>
262          * may or may not exist. No resource is associated with this local JAR
263          * package fragment root.
264          * 
265          * @param jarPath the jars's file system path
266          * @return a package fragment root for the JAR at the specified file system path
267          */
268 //      IPackageFragmentRoot getPackageFragmentRoot(String jarPath);
269
270         /**
271          * Returns a package fragment root for the given resource, which
272          * must either be a folder representing the top of a package hierarchy,
273          * or a <code>.jar</code> or <code>.zip</code> file.
274          * This is a handle-only method.  The underlying resource may or may not exist. 
275          * 
276          * @param resource the given resource
277          * @return a package fragment root for the given resource, which
278          * must either be a folder representing the top of a package hierarchy,
279          * or a <code>.jar</code> or <code>.zip</code> file
280          */
281 //      IPackageFragmentRoot getPackageFragmentRoot(IResource resource);
282
283         /**
284          * Returns all of the  package fragment roots contained in this
285          * project, identified on this project's resolved classpath. The result
286          * does not include package fragment roots in other projects referenced
287          * on this project's classpath.
288          *
289          * <p>NOTE: This is equivalent to <code>getChildren()</code>.
290          *
291          * @return all of the  package fragment roots contained in this
292          * project, identified on this project's resolved classpath
293          * @exception JavaModelException if this element does not exist or if an
294          *              exception occurs while accessing its corresponding resource
295          */
296 //      IPackageFragmentRoot[] getPackageFragmentRoots() throws JavaModelException;
297
298         /**
299          * Returns the existing package fragment roots identified by the given entry.
300          * Note that a classpath entry that refers to another project may
301          * have more than one root (if that project has more than on root
302          * containing source), and classpath entries within the current
303          * project identify a single root.
304          * <p>
305          * If the classpath entry denotes a variable, it will be resolved and return
306          * the roots of the target entry (empty if not resolvable).
307          * <p>
308          * If the classpath entry denotes a container, it will be resolved and return
309          * the roots corresponding to the set of container entries (empty if not resolvable).
310          * 
311          * @param entry the given entry
312          * @return the existing package fragment roots identified by the given entry
313          * @see IClasspathContainer
314          * @deprecated Use IJavaProject#findPackageFragmentRoots instead
315          */
316 //      IPackageFragmentRoot[] getPackageFragmentRoots(IClasspathEntry entry);
317
318         /**
319          * Returns all package fragments in all package fragment roots contained
320          * in this project. This is a convenience method.
321          *
322          * Note that the package fragment roots corresponds to the resolved
323          * classpath of the project.
324          *
325          * @return all package fragments in all package fragment roots contained
326          * in this project
327          * @exception JavaModelException if this element does not exist or if an
328          *              exception occurs while accessing its corresponding resource
329          */
330 //      IPackageFragment[] getPackageFragments() throws JavaModelException;
331
332         /**
333          * Returns the <code>IProject</code> on which this <code>IJavaProject</code>
334          * was created. This is handle-only method.
335          * 
336          * @return the <code>IProject</code> on which this <code>IJavaProject</code>
337          * was created
338          */
339         IProject getProject();
340
341         /**
342          * Returns the raw classpath for the project, as a list of classpath entries. This corresponds to the exact set
343          * of entries which were assigned using <code>setRawClasspath</code>, in particular such a classpath may contain
344          * classpath variable entries. Classpath variable entries can be resolved individually (see <code>JavaCore#getClasspathVariable</code>),
345          * or the full classpath can be resolved at once using the helper method <code>getResolvedClasspath</code>.
346          * <p>
347          * A classpath variable provides an indirection level for better sharing a classpath. As an example, it allows
348          * a classpath to no longer refer directly to external JARs located in some user specific location. The classpath
349          * can simply refer to some variables defining the proper locations of these external JARs.
350          *  <p>
351          * Note that in case the project isn't yet opened, the classpath will directly be read from the associated <tt>.classpath</tt> file.
352          * <p>
353          * 
354          * @return the raw classpath for the project, as a list of classpath entries
355          * @exception JavaModelException if this element does not exist or if an
356          *              exception occurs while accessing its corresponding resource
357          * @see IClasspathEntry
358          */
359 //      IClasspathEntry[] getRawClasspath() throws JavaModelException;
360
361         /**
362          * Returns the names of the projects that are directly required by this
363          * project. A project is required if it is in its classpath.
364          * <p>
365          * The project names are returned in the order they appear on the classpath.
366          *
367          * @return the names of the projects that are directly required by this
368          * project in classpath order
369          * @exception JavaModelException if this element does not exist or if an
370          *              exception occurs while accessing its corresponding resource
371          */
372 //      String[] getRequiredProjectNames() throws JavaModelException;
373
374         /**
375          * This is a helper method returning the resolved classpath for the project
376          * as a list of simple (non-variable, non-container) classpath entries.
377          * All classpath variable and classpath container entries in the project's
378          * raw classpath will be replaced by the simple classpath entries they
379          * resolve to.
380          * <p>
381          * The resulting resolved classpath is accurate for the given point in time.
382          * If the project's raw classpath is later modified, or if classpath
383          * variables are changed, the resolved classpath can become out of date.
384          * Because of this, hanging on resolved classpath is not recommended.
385          * </p>
386          * 
387          * @param ignoreUnresolvedEntry indicates how to handle unresolvable
388          * variables and containers; <code>true</code> indicates that missing
389          * variables and unresolvable classpath containers should be silently
390          * ignored, and that the resulting list should consist only of the
391          * entries that could be successfully resolved; <code>false</code> indicates
392          * that a <code>JavaModelException</code> should be thrown for the first
393          * unresolved variable or container
394          * @return the resolved classpath for the project as a list of simple 
395          * classpath entries, where all classpath variable and container entries
396          * have been resolved and substituted with their final target entries
397          * @exception JavaModelException in one of the corresponding situation:
398          * <ul>
399          *    <li>this element does not exist</li>
400          *    <li>an exception occurs while accessing its corresponding resource</li>
401          *    <li>a classpath variable or classpath container was not resolvable
402          *    and <code>ignoreUnresolvedEntry</code> is <code>false</code>.</li>
403          * </ul>
404          * @see IClasspathEntry
405          */
406 //      IClasspathEntry[] getResolvedClasspath(boolean ignoreUnresolvedEntry)
407 //           throws JavaModelException;
408
409         /**
410          * Returns whether this project has been built at least once and thus whether it has a build state.
411          * @return true if this project has been built at least once, false otherwise
412          */
413 //      boolean hasBuildState();
414
415         /**
416          * Returns whether setting this project's classpath to the given classpath entries
417          * would result in a cycle.
418          *
419          * If the set of entries contains some variables, those are resolved in order to determine
420          * cycles.
421          * 
422          * @param entries the given classpath entries
423          * @return true if the given classpath entries would result in a cycle, false otherwise
424          */
425 //      boolean hasClasspathCycle(IClasspathEntry[] entries);
426         /**
427          * Returns whether the given element is on the classpath of this project, 
428          * that is, referenced from a classpath entry and not explicitly excluded
429          * using an exclusion pattern. 
430          * 
431          * @param element the given element
432          * @return <code>true</code> if the given element is on the classpath of
433          * this project, <code>false</code> otherwise
434          * @see IClasspathEntry#getExclusionPatterns
435          * @since 2.0
436          */
437 //      boolean isOnClasspath(IJavaElement element);
438         /**
439          * Returns whether the given resource is on the classpath of this project,
440          * that is, referenced from a classpath entry and not explicitly excluded
441          * using an exclusion pattern.
442          * 
443          * @param element the given element
444          * @return <code>true</code> if the given resource is on the classpath of
445          * this project, <code>false</code> otherwise
446          * @see IClasspathEntry#getExclusionPatterns
447          * @since 2.1
448          */
449 //      boolean isOnClasspath(IResource resource);
450
451         /**
452          * Creates a new evaluation context.
453          * @return a new evaluation context.
454          */
455 //      IEvaluationContext newEvaluationContext();
456
457         /**
458          * Creates and returns a type hierarchy for all types in the given
459          * region, considering subtypes within that region.
460          *
461          * @param monitor the given progress monitor
462          * @param region the given region
463          * @exception JavaModelException if this element does not exist or if an
464          *              exception occurs while accessing its corresponding resource
465          * @exception IllegalArgumentException if region is <code>null</code>
466          * @return a type hierarchy for all types in the given
467          * region, considering subtypes within that region
468          */
469 //      ITypeHierarchy newTypeHierarchy(IRegion region, IProgressMonitor monitor)
470 //              throws JavaModelException;
471
472         /**
473          * Creates and returns a type hierarchy for the given type considering
474          * subtypes in the specified region.
475          * 
476          * @param monitor the given monitor
477          * @param region the given region
478          * @param type the given type
479          * 
480          * @exception JavaModelException if this element does not exist or if an
481          *              exception occurs while accessing its corresponding resource
482          *
483          * @exception IllegalArgumentException if type or region is <code>null</code>
484          * @return a type hierarchy for the given type considering
485          * subtypes in the specified region
486          */
487 //      ITypeHierarchy newTypeHierarchy(
488 //              IType type,
489 //              IRegion region,
490 //              IProgressMonitor monitor)
491 //              throws JavaModelException;
492
493         /**
494          * Sets the project custom options. All and only the options explicitly included in the given table 
495          * are remembered; all previous option settings are forgotten, including ones not explicitly
496          * mentioned.
497          * <p>
498          * For a complete description of the configurable options, see <code>JavaCore#getDefaultOptions</code>.
499          * </p>
500          * 
501          * @param newOptions the new options (key type: <code>String</code>; value type: <code>String</code>),
502          *   or <code>null</code> to flush all custom options (clients will automatically get the global JavaCore options).
503          * @see JavaCore#getDefaultOptions
504          * @since 2.1
505          */
506 //      void setOptions(Map newOptions);
507
508         /**
509          * Sets the default output location of this project to the location
510          * described by the given workspace-relative absolute path.
511          * <p>
512          * The default output location is where class files are ordinarily generated
513          * (and resource files, copied). Each source classpath entries can also
514          * specify an output location for the generated class files (and copied
515          * resource files) corresponding to compilation units under that source
516          * folder. This makes it possible to arrange that generated class files for
517          * different source folders to end up in different output folders, and not
518          * necessarily the default output folder. This means that the generated
519          * class files for the project may end up scattered across several folders,
520          * rather than all in the default output folder (which is more standard).
521          * </p>
522          * 
523          * @param path the workspace-relative absolute path of the default output
524          * folder
525          * @param monitor the progress monitor
526          * 
527          * @exception JavaModelException if the classpath could not be set. Reasons include:
528          * <ul>
529          *  <li> This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
530          *  <li> The path refers to a location not contained in this project (<code>PATH_OUTSIDE_PROJECT</code>)
531          *  <li> The path is not an absolute path (<code>RELATIVE_PATH</code>)
532          *  <li> The path is nested inside a package fragment root of this project (<code>INVALID_PATH</code>)
533          *  <li> The output location is being modified during resource change event notification (CORE_EXCEPTION)        
534          * </ul>
535          * @see #getOutputLocation
536      * @see IClasspathEntry#getOutputLocation
537          */
538 //      void setOutputLocation(IPath path, IProgressMonitor monitor)
539 //              throws JavaModelException;
540
541         /**
542          * Sets the classpath of this project using a list of classpath entries. In particular such a classpath may contain
543          * classpath variable entries. Classpath variable entries can be resolved individually (see <code>JavaCore#getClasspathVariable</code>),
544          * or the full classpath can be resolved at once using the helper method <code>getResolvedClasspath</code>.
545          * <p>
546          * A classpath variable provides an indirection level for better sharing a classpath. As an example, it allows
547          * a classpath to no longer refer directly to external JARs located in some user specific location. The classpath
548          * can simply refer to some variables defining the proper locations of these external JARs.
549          * <p>
550          * Setting the classpath to <code>null</code> specifies a default classpath
551          * (the project root). Setting the classpath to an empty array specifies an
552          * empty classpath.
553          * <p>
554          * If a cycle is detected while setting this classpath, an error marker will be added
555          * to the project closing the cycle.
556          * To avoid this problem, use <code>hasClasspathCycle(IClasspathEntry[] entries)</code>
557          * before setting the classpath.
558          *
559          * @param entries a list of classpath entries
560          * @param monitor the given progress monitor
561          * @exception JavaModelException if the classpath could not be set. Reasons include:
562          * <ul>
563          * <li> This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
564          * <li> The classpath is being modified during resource change event notification (CORE_EXCEPTION)
565          * <li> The classpath failed the validation check as defined by <code>JavaConventions#validateClasspath</code>
566          * </ul>
567          * @see IClasspathEntry
568          */
569 //      void setRawClasspath(IClasspathEntry[] entries, IProgressMonitor monitor)
570 //              throws JavaModelException;
571                 
572         /**
573          * Sets the both the classpath of this project and its default output
574          * location at once. The classpath is defined using a list of classpath
575          * entries. In particular, such a classpath may contain classpath variable
576          * entries. Classpath variable entries can be resolved individually (see
577          * <code>JavaCore#getClasspathVariable</code>), or the full classpath can be
578          * resolved at once using the helper method
579          * <code>getResolvedClasspath</code>.
580          * <p>
581          * A classpath variable provides an indirection level for better sharing a
582          * classpath. As an example, it allows a classpath to no longer refer
583          * directly to external JARs located in some user specific location. The
584          * classpath can simply refer to some variables defining the proper
585          * locations of these external JARs.
586          * </p>
587          * <p>
588          * Setting the classpath to <code>null</code> specifies a default classpath
589          * (the project root). Setting the classpath to an empty array specifies an
590          * empty classpath.
591          * </p>
592          * <p>
593          * If a cycle is detected while setting this classpath, an error marker will
594          * be added to the project closing the cycle. To avoid this problem, use
595          * <code>hasClasspathCycle(IClasspathEntry[] entries)</code> before setting
596          * the classpath.
597          * </p>
598          * 
599          * @param entries a list of classpath entries
600          * @param monitor the progress monitor
601          * @param outputLocation the default output location
602          * @exception JavaModelException if the classpath could not be set. Reasons
603          * include:
604          * <ul>
605          * <li> This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
606          * <li> Two or more entries specify source roots with the same or overlapping paths (NAME_COLLISION)
607          * <li> A entry of kind <code>CPE_PROJECT</code> refers to this project (INVALID_PATH)
608          *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
609          *      <li>The output location path refers to a location not contained in this project (<code>PATH_OUTSIDE_PROJECT</code>)
610          *      <li>The output location path is not an absolute path (<code>RELATIVE_PATH</code>)
611          *  <li>The output location path is nested inside a package fragment root of this project (<code>INVALID_PATH</code>)
612          * <li> The classpath is being modified during resource change event notification (CORE_EXCEPTION)
613          * </ul>
614          * @see IClasspathEntry
615          * @since 2.0
616          */
617 //      void setRawClasspath(IClasspathEntry[] entries, IPath outputLocation, IProgressMonitor monitor)
618 //              throws JavaModelException;
619 }