Bug 207418 - Need API on CompletionRequestor to ignore all proposals
Summary: Need API on CompletionRequestor to ignore all proposals
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-25 05:02 EDT by Dani Megert CLA
Modified: 2007-10-29 13:37 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (4.15 KB, patch)
2007-10-25 05:36 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2007-10-25 05:02:15 EDT
I20071023-0800.

Currently there's no way for clients to specify exactly the proposal kinds they want. Each time a new proposal kind is added they have to go and ignore it (assuming they want exactly proposal kind A and B).

I suggest to add a new constructor that takes a boolean 'ignoreAll'. If set to 'true' all proposal kinds will be ignored.
Comment 1 David Audel CLA 2007-10-25 05:36:30 EDT
Created attachment 81144 [details]
Proposed fix

The proposed API is:

/**
 * Creates a new completion requestor.
 * If <code>ignoreAll</code> is <code>true</code> the requestor is not interested in
 * all kinds of completion proposals; all will be ignored. For each kind of completion proposals
 * that is of interest, <code>setIgnored(kind, false)</code> must be called.
 * If <code>ignoreAll</code> is <code>false</code> the requestor is interested in
 * all kinds of completion proposals; none will be ignored.
 *
 * @param ignoreAll <code>true</code> to ignore all kinds of completion proposals,
 * and <code>false</code> to propose all kinds
 * 
 * @since 3.4
 */
public CompletionRequestor(boolean ignoreAll)
Comment 2 David Audel CLA 2007-10-25 05:51:47 EDT
Released for 3.4M3.

Test added
  CompletionTests#testCompletionBasicType3()
Comment 3 Jerome Lanneluc CLA 2007-10-29 13:37:06 EDT
Verified for 3.4M3 using I20071029-0010