Community
Participate
Working Groups
I20091124-0800 For bug 218487, OrganizeImportsOperation would like to get access restrictions from SearchEngine#searchAllTypeNames(.., TypeNameMatchRequestor,..). The API could be similar to what we already have in org.eclipse.jdt.core.CompletionProposal#getAccessibility(), e.g.: TypeNameMatchRequestor#getAccessibility() It looks like most of this is already there, but TypeNameMatchRequestorWrapper#acceptType(..) drops the access restriction in the last second.
Created attachment 153231 [details] Proposed patch Implementation copied from CompletionProposal and InternalCompletionProposal. Note that the accessibility setter needs to be public in this case as the TypeNameMatchRequestorWrapper does not inherit from TypeNameMatchRequestor...
Comment on attachment 153231 [details] Proposed patch > TypeNameMatchRequestor#getAccessibility() Oops, sorry, that was a Copy/Paste error. I actually meant TypeNameMatch#getAccessibility(). The TypeNameMatchRequestor should not be touched.
Created attachment 153444 [details] New proposed patch
(In reply to comment #3) Looks good. TypeNameMatch#getAccessibility() could also be abstract since its default value is never used (and clients must not subclass).
Created attachment 153806 [details] Last proposed patch I've set the getAccessibility() method abstract on TypeNameMatch and also replaced the 'This class is not intended to be overridden by clients.' comment by the @noextend javadoc tag on this class...
Released for 3.6M4 in HEAD stream.
Verified for 3.6M4 using Build id: I20091207-1800
Verified.