Summary: | ASTParser cannot resolve binding of PackageDeclaration if class name is equal to the first segment of the package name | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Missing name Mising name <hjs.becker> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | Olivier_Thomann, srikanth_sankaran | ||||
Version: | 3.8 | ||||||
Target Milestone: | 3.8 M3 | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Missing name Mising name
2011-09-13 07:39:46 EDT
I'll take a look. Created attachment 203277 [details]
Patch v1
Could you please give it a try ? The patch works perfectly. The bindings of the PackageDeclarations can now be resolved. Since the call to org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(char[][]) with "one.two" as the name doesn't work when resolved in the context of the package "one.two" (it considers that one is the type inside the package instead of the package 'one' itself), I suggest to add a method that retrieves packages only. Srikanth, please let me know what you think. I found quite weird that getPackage(..) doesn't do the job, but trying to change it is causing more trouble. Released for 3.8M3. Fix verified by reporter via comment#4. (In reply to comment #5) > Srikanth, please let me know what you think. I found quite weird that > getPackage(..) doesn't do the job, but trying to change it is causing more > trouble. Agree with the approach. VERIFIED for 3.8 M3. |