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 |