View | Details | Raw Unified | Return to bug 113944
Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/JavaProject.java (+19 lines)
Lines 2846-2851 Link Here
2846
	}
2846
	}
2847
2847
2848
	/**
2848
	/**
2849
	 * @see IJavaProject#setRawClasspath(IClasspathEntry[],boolean,IProgressMonitor)
2850
	 */
2851
	public void setRawClasspath(
2852
		IClasspathEntry[] entries,
2853
		boolean canModifyResources,
2854
		IProgressMonitor monitor)
2855
		throws JavaModelException {
2856
2857
		setRawClasspath(
2858
			entries, 
2859
			SetClasspathOperation.DO_NOT_SET_OUTPUT,
2860
			monitor, 
2861
			canModifyResources, 
2862
			getResolvedClasspath(true/*ignoreUnresolvedEntry*/, false/*don't generateMarkerOnError*/, false/*don't returnResolutionInProgress*/),
2863
			true, // needValidation
2864
			canModifyResources); // save only if modifying resources is allowed
2865
	}
2866
2867
	/**
2849
	 * @see IJavaProject#setRawClasspath(IClasspathEntry[],IPath,IProgressMonitor)
2868
	 * @see IJavaProject#setRawClasspath(IClasspathEntry[],IPath,IProgressMonitor)
2850
	 */
2869
	 */
2851
	public void setRawClasspath(
2870
	public void setRawClasspath(
(-)model/org/eclipse/jdt/core/IJavaProject.java (+37 lines)
Lines 812-817 Link Here
812
	 * A classpath variable provides an indirection level for better sharing a classpath. As an example, it allows
812
	 * A classpath variable provides an indirection level for better sharing a classpath. As an example, it allows
813
	 * a classpath to no longer refer directly to external JARs located in some user specific location. The classpath
813
	 * a classpath to no longer refer directly to external JARs located in some user specific location. The classpath
814
	 * can simply refer to some variables defining the proper locations of these external JARs.
814
	 * can simply refer to some variables defining the proper locations of these external JARs.
815
	 * </p><p>
816
	 * If it is specified that this operation cannot modify resources, the .classpath file will not be written to disk
817
	 * and no error marker will be generated. 
818
	 * </p><p>
819
	 * Setting the classpath to <code>null</code> specifies a default classpath
820
	 * (the project root). Setting the classpath to an empty array specifies an
821
	 * empty classpath.
822
	 * </p><p>
823
	 * If a cycle is detected while setting this classpath (and if resources can be modified), an error marker will be added
824
	 * to the project closing the cycle.
825
	 * To avoid this problem, use <code>hasClasspathCycle(IClasspathEntry[] entries)</code>
826
	 * before setting the classpath.
827
	 * <p>
828
	 * This operation acquires a lock on the workspace's root.
829
	 *
830
	 * @param entries a list of classpath entries
831
	 * @param canModifyResources whether resources should be written to disk if needed
832
	 * @param monitor the given progress monitor
833
	 * @exception JavaModelException if the classpath could not be set. Reasons include:
834
	 * <ul>
835
	 * <li> This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
836
	 * <li> The classpath is being modified during resource change event notification (CORE_EXCEPTION)
837
	 * <li> The classpath failed the validation check as defined by <code>JavaConventions#validateClasspath</code>
838
	 * </ul>
839
	 * @see IClasspathEntry
840
	 * @since 3.2
841
	 */
842
	void setRawClasspath(IClasspathEntry[] entries, boolean canModifyResources, IProgressMonitor monitor) throws JavaModelException;
843
	
844
	/**
845
	 * Sets the classpath of this project using a list of classpath entries. In particular such a classpath may contain
846
	 * classpath variable entries. Classpath variable entries can be resolved individually (see <code>JavaCore#getClasspathVariable</code>),
847
	 * or the full classpath can be resolved at once using the helper method <code>getResolvedClasspath</code>.
848
	 * <p>
849
	 * A classpath variable provides an indirection level for better sharing a classpath. As an example, it allows
850
	 * a classpath to no longer refer directly to external JARs located in some user specific location. The classpath
851
	 * can simply refer to some variables defining the proper locations of these external JARs.
815
	 * <p>
852
	 * <p>
816
	 * Setting the classpath to <code>null</code> specifies a default classpath
853
	 * Setting the classpath to <code>null</code> specifies a default classpath
817
	 * (the project root). Setting the classpath to an empty array specifies an
854
	 * (the project root). Setting the classpath to an empty array specifies an

Return to bug 113944