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 164349 Details for
Bug 306519
JavaCore#getReferencedClasspathEntries(IClasspathEntry, IJavaProject) should allow null project
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Path with updated doc
bug_306519.txt (text/plain), 4.28 KB, created by
Jay Arthanareeswaran
on 2010-04-09 06:12:59 EDT
(
hide
)
Description:
Path with updated doc
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2010-04-09 06:12:59 EDT
Size:
4.28 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/core/JavaCore.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v >retrieving revision 1.650 >diff -u -r1.650 JavaCore.java >--- model/org/eclipse/jdt/core/JavaCore.java 8 Apr 2010 17:57:19 -0000 1.650 >+++ model/org/eclipse/jdt/core/JavaCore.java 9 Apr 2010 10:09:15 -0000 >@@ -4602,15 +4602,18 @@ > * entries, they are processed recursively and added to the list. For entry kinds other > * than {@link IClasspathEntry#CPE_LIBRARY}, this method returns an empty array. > * <p> >- * If a referenced entry has already been stored >- * in the given project's .classpath, the stored attributes are populated in the corresponding >- * referenced entry. For more details on storing referenced entries see >- * see {@link IJavaProject#setRawClasspath(IClasspathEntry[], IClasspathEntry[], IPath, >+ * When a non-null project is passed, any additional attributes that may have been stored >+ * previously in the project's .classpath file are retrieved and populated in the >+ * corresponding referenced entry. If the project is <code>null</code>, the raw referenced >+ * entries are returned without any persisted attributes. >+ * For more details on storing referenced entries, see >+ * {@link IJavaProject#setRawClasspath(IClasspathEntry[], IClasspathEntry[], IPath, > * IProgressMonitor)}. > * </p> > * > * @param libraryEntry the library entry whose referenced entries are sought >- * @param project project where the persisted referenced entries to be retrieved from >+ * @param project project where the persisted referenced entries to be retrieved from. If <code>null</code> >+ * persisted attributes are not attempted to be retrived. > * @return an array of classpath entries that are referenced directly or indirectly by the given entry. > * If not applicable, returns an empty array. > * @since 3.6 >Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v >retrieving revision 1.447 >diff -u -r1.447 JavaModelManager.java >--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 8 Apr 2010 17:57:19 -0000 1.447 >+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 9 Apr 2010 10:09:18 -0000 >@@ -1850,8 +1850,11 @@ > public IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project) { > > IClasspathEntry[] referencedEntries = ((ClasspathEntry)libraryEntry).resolvedChainedLibraries(); >- PerProjectInfo perProjectInfo = getPerProjectInfo(project.getProject(), false); > >+ if (project == null) >+ return referencedEntries; >+ >+ PerProjectInfo perProjectInfo = getPerProjectInfo(project.getProject(), false); > if(perProjectInfo == null) > return referencedEntries; > >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ClasspathTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java,v >retrieving revision 1.212 >diff -u -r1.212 ClasspathTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 8 Apr 2010 14:44:20 -0000 1.212 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 9 Apr 2010 10:09:26 -0000 >@@ -6157,7 +6157,12 @@ > > // Test referenced entries for a particular entry appear in the right order and the referencingEntry > // attribute has the correct value >- IClasspathEntry[] chains = JavaCore.getReferencedClasspathEntries(rawClasspath[2], p); >+ IClasspathEntry[] chains = JavaCore.getReferencedClasspathEntries(rawClasspath[2], null); >+ assertClasspathEquals(chains, >+ "/P/lib2.jar[CPE_LIBRARY][K_BINARY][isExported:true]\n" + >+ "/P/lib3.jar[CPE_LIBRARY][K_BINARY][isExported:true]"); >+ >+ chains = JavaCore.getReferencedClasspathEntries(rawClasspath[2], p); > assertClasspathEquals(chains, > "/P/lib2.jar[CPE_LIBRARY][K_BINARY][isExported:true]\n" + > "/P/lib3.jar[CPE_LIBRARY][K_BINARY][isExported:true]");
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 306519
:
164347
| 164349