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 162633 Details for
Bug 304394
IJavaElement#getAttachedJavadoc(IProgressMonitor) should support referenced entries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed Patch
patch_305043_a.txt (text/plain), 2.40 KB, created by
Jay Arthanareeswaran
on 2010-03-22 03:13:50 EDT
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2010-03-22 03:13:50 EDT
Size:
2.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavaElement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java,v >retrieving revision 1.137 >diff -u -r1.137 JavaElement.java >--- model/org/eclipse/jdt/internal/core/JavaElement.java 4 Mar 2010 02:55:13 -0000 1.137 >+++ model/org/eclipse/jdt/internal/core/JavaElement.java 22 Mar 2010 07:08:32 -0000 >@@ -649,42 +649,27 @@ > } > > if (root.getKind() == IPackageFragmentRoot.K_BINARY) { >- IClasspathEntry entry= root.getRawClasspathEntry(); >+ IClasspathEntry entry= null; >+ try { >+ entry= root.getResolvedClasspathEntry(); >+ URL url = getLibraryJavadocLocation(entry); >+ if (url != null) { >+ return url; >+ } >+ } >+ catch(JavaModelException jme) { >+ // Proceed with raw classpath >+ } >+ >+ entry= root.getRawClasspathEntry(); > if (entry == null) { > return null; > } >- if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { >- entry= getRealClasspathEntry(root.getJavaProject(), entry.getPath(), root.getPath()); >- if (entry == null) { >- return null; >- } >- } > return getLibraryJavadocLocation(entry); > } > return null; > } > >- private static IClasspathEntry getRealClasspathEntry(IJavaProject jproject, IPath containerPath, IPath libPath) throws JavaModelException { >- IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject); >- if (container != null) { >- IClasspathEntry[] entries= container.getClasspathEntries(); >- for (int i= 0; i < entries.length; i++) { >- IClasspathEntry curr = entries[i]; >- if (curr == null) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { >- JavaModelManager.getJavaModelManager().verbose_missbehaving_container(jproject, containerPath, entries); >- } >- break; >- } >- IClasspathEntry resolved= JavaCore.getResolvedClasspathEntry(curr); >- if (resolved != null && libPath.equals(resolved.getPath())) { >- return curr; // return the real entry >- } >- } >- } >- return null; // not found >- } >- > protected static URL getLibraryJavadocLocation(IClasspathEntry entry) throws JavaModelException { > switch(entry.getEntryKind()) { > case IClasspathEntry.CPE_LIBRARY :
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 304394
:
162633
|
163254