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 76926 Details for
Bug 201104
JavaElement of a recovered type binding should not return a compilation unit with no parent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_201104.txt (text/plain), 1.56 KB, created by
Olivier Thomann
on 2007-08-24 12:42:44 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-08-24 12:42:44 EDT
Size:
1.56 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java,v >retrieving revision 1.6 >diff -u -r1.6 RecoveredTypeBinding.java >--- dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java 23 Jul 2007 18:41:09 -0000 1.6 >+++ dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java 24 Aug 2007 16:41:27 -0000 >@@ -19,6 +19,7 @@ > import org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope; > import org.eclipse.jdt.internal.compiler.util.Util; > import org.eclipse.jdt.internal.core.CompilationUnit; >+import org.eclipse.jdt.internal.core.PackageFragment; > > /** > * This class represents the recovered binding for a type >@@ -497,7 +498,13 @@ > */ > public IJavaElement getJavaElement() { > try { >- return new CompilationUnit(null, this.getInternalName(), this.resolver.getWorkingCopyOwner()).getWorkingCopy(this.resolver.getWorkingCopyOwner(), null); >+ IPackageBinding packageBinding = getPackage(); >+ if (packageBinding != null) { >+ final IJavaElement javaElement = packageBinding.getJavaElement(); >+ if (javaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT) { >+ return new CompilationUnit((PackageFragment) javaElement, this.getInternalName(), this.resolver.getWorkingCopyOwner()).getWorkingCopy(this.resolver.getWorkingCopyOwner(), null); >+ } >+ } > } catch (JavaModelException e) { > //ignore > }
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 201104
:
76926
|
76927
|
77026