### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: model/org/eclipse/jdt/internal/core/JavaProject.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java,v retrieving revision 1.351 diff -u -r1.351 JavaProject.java --- model/org/eclipse/jdt/internal/core/JavaProject.java 5 Oct 2005 09:20:16 -0000 1.351 +++ model/org/eclipse/jdt/internal/core/JavaProject.java 23 Nov 2005 12:52:54 -0000 @@ -2846,6 +2846,25 @@ } /** + * @see IJavaProject#setRawClasspath(IClasspathEntry[],boolean,IProgressMonitor) + */ + public void setRawClasspath( + IClasspathEntry[] entries, + boolean canModifyResources, + IProgressMonitor monitor) + throws JavaModelException { + + setRawClasspath( + entries, + SetClasspathOperation.DO_NOT_SET_OUTPUT, + monitor, + canModifyResources, + getResolvedClasspath(true/*ignoreUnresolvedEntry*/, false/*don't generateMarkerOnError*/, false/*don't returnResolutionInProgress*/), + true, // needValidation + canModifyResources); // save only if modifying resources is allowed + } + + /** * @see IJavaProject#setRawClasspath(IClasspathEntry[],IPath,IProgressMonitor) */ public void setRawClasspath( Index: model/org/eclipse/jdt/core/IJavaProject.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java,v retrieving revision 1.76 diff -u -r1.76 IJavaProject.java --- model/org/eclipse/jdt/core/IJavaProject.java 5 Oct 2005 09:20:16 -0000 1.76 +++ model/org/eclipse/jdt/core/IJavaProject.java 23 Nov 2005 12:52:53 -0000 @@ -812,6 +812,43 @@ * A classpath variable provides an indirection level for better sharing a classpath. As an example, it allows * a classpath to no longer refer directly to external JARs located in some user specific location. The classpath * can simply refer to some variables defining the proper locations of these external JARs. + *

+ * If it is specified that this operation cannot modify resources, the .classpath file will not be written to disk + * and no error marker will be generated. + *

+ * Setting the classpath to null specifies a default classpath + * (the project root). Setting the classpath to an empty array specifies an + * empty classpath. + *

+ * If a cycle is detected while setting this classpath (and if resources can be modified), an error marker will be added + * to the project closing the cycle. + * To avoid this problem, use hasClasspathCycle(IClasspathEntry[] entries) + * before setting the classpath. + *

+ * This operation acquires a lock on the workspace's root. + * + * @param entries a list of classpath entries + * @param canModifyResources whether resources should be written to disk if needed + * @param monitor the given progress monitor + * @exception JavaModelException if the classpath could not be set. Reasons include: + *

+ * @see IClasspathEntry + * @since 3.2 + */ + void setRawClasspath(IClasspathEntry[] entries, boolean canModifyResources, IProgressMonitor monitor) throws JavaModelException; + + /** + * Sets the classpath of this project using a list of classpath entries. In particular such a classpath may contain + * classpath variable entries. Classpath variable entries can be resolved individually (see JavaCore#getClasspathVariable), + * or the full classpath can be resolved at once using the helper method getResolvedClasspath. + *

+ * A classpath variable provides an indirection level for better sharing a classpath. As an example, it allows + * a classpath to no longer refer directly to external JARs located in some user specific location. The classpath + * can simply refer to some variables defining the proper locations of these external JARs. *

* Setting the classpath to null specifies a default classpath * (the project root). Setting the classpath to an empty array specifies an