Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 396823 - Use JavaModelUtil.isPackageInfo(ICompilationUnit) util where applicable
Summary: Use JavaModelUtil.isPackageInfo(ICompilationUnit) util where applicable
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.3 M6   Edit
Assignee: Martin Mathew CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 05:59 EST by Dani Megert CLA
Modified: 2013-01-31 08:41 EST (History)
1 user (show)

See Also:
daniel_megert: review+


Attachments
Proposed Fix. (868 bytes, patch)
2013-01-30 05:00 EST, Martin Mathew CLA
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2012-12-18 05:59:39 EST
Use JavaModelUtil.isPackageInfo(ICompilationUnit) util where applicable.


This should only be done when the Package hover work is in 'master'.
Comment 1 Martin Mathew CLA 2013-01-30 05:00:45 EST
Created attachment 226303 [details]
Proposed Fix.

JavadocView is modified to use the util method.

Did not make changes in ImportReferencesCollector as the code after refactoring looked complicated than before the change.
Comment 2 Dani Megert CLA 2013-01-31 08:41:31 EST
Thanks for the patch.

We could consider to change #isPackageInfo(ICompilationUnit) to #isPackageInfo(ITypeRoot) and then change the implementation that it works for IClassFile too, but that seems overkill at this point.

Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=52ff99eb9b2828612fe521d9d8c881b170bf8b02