Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 30480 Details for
Bug 113944
[plan] Support for refactoring of JAR files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
API to set a raw classpath without modifying the .classpath file
113944.txt (text/plain), 4.40 KB, created by
Jerome Lanneluc
on 2005-11-23 07:54:32 EST
(
hide
)
Description:
API to set a raw classpath without modifying the .classpath file
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-11-23 07:54:32 EST
Size:
4.40 KB
patch
obsolete
>### 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. >+ * </p><p> >+ * 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. >+ * </p><p> >+ * Setting the classpath to <code>null</code> specifies a default classpath >+ * (the project root). Setting the classpath to an empty array specifies an >+ * empty classpath. >+ * </p><p> >+ * 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 <code>hasClasspathCycle(IClasspathEntry[] entries)</code> >+ * before setting the classpath. >+ * <p> >+ * 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: >+ * <ul> >+ * <li> This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li> >+ * <li> The classpath is being modified during resource change event notification (CORE_EXCEPTION) >+ * <li> The classpath failed the validation check as defined by <code>JavaConventions#validateClasspath</code> >+ * </ul> >+ * @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 <code>JavaCore#getClasspathVariable</code>), >+ * or the full classpath can be resolved at once using the helper method <code>getResolvedClasspath</code>. >+ * <p> >+ * 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. > * <p> > * Setting the classpath to <code>null</code> specifies a default classpath > * (the project root). Setting the classpath to an empty array specifies an
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 113944
: 30480