Bug 304157 - Avoid deprecated API from jdt.core (re hierarchy scope)
Summary: Avoid deprecated API from jdt.core (re hierarchy scope)
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: Other All
: P3 normal (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-28 07:45 EST by Stephan Herrmann CLA
Modified: 2010-03-03 12:16 EST (History)
1 user (show)

See Also:


Attachments
proposed patch (999 bytes, patch)
2010-02-28 08:15 EST, Stephan Herrmann CLA
no flags Details | Diff
mylyn/context/zip (939 bytes, application/octet-stream)
2010-03-03 12:15 EST, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-02-28 07:45:52 EST
The method org.eclipse.jdt.core.search.SearchEngine.createHierarchyScope(IJavaProject, IType, boolean, boolean, WorkingCopyOwner)
has been deprecated, but is still used in org.eclipse.pde.internal.ui.util.PDEJavaHelperUI
Comment 1 Stephan Herrmann CLA 2010-02-28 08:15:38 EST
Created attachment 160418 [details]
proposed patch

This patch migrates to the new method createStrictHierarchyScope.

Note, that the boolean arguments have different semantics (hence the
renaming):

Old flag noMemberTypes is now implicitly true (-> "strict")
New flag includeFocusType: I'm explicitly passing false here, because
that's how I'm reading the documentation: the specified class itself
is not a valid value for a basedOn attribute.

I didn't test the patch because I didn't succeed in building pde.ui
in HEAD without pulling all of p2 into my workspace. (And sorry,
while not working on p2 sources I don't feel like cluttering my
workspace with gazillions of p2 projects). OTOH, the patch is pretty
low risk.

For your reference: the change in jdt.core is discussed in bug 295894.
Comment 2 Chris Aniszczyk CLA 2010-03-03 12:15:20 EST
Thanks for the fix.
Comment 3 Chris Aniszczyk CLA 2010-03-03 12:15:24 EST
Created attachment 160809 [details]
mylyn/context/zip
Comment 4 Chris Aniszczyk CLA 2010-03-03 12:16:16 EST
> 20100303