Bug 426292 - Use type context to filter methods and fields in auto-complete
Summary: Use type context to filter methods and fields in auto-complete
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 14:54 EST by David Harkness CLA
Modified: 2014-01-21 14:54 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Harkness CLA 2014-01-21 14:54:42 EST
When activating auto-complete in a context bound to a type, recommend fields and constants of that type and methods that return that type. This would help mostly with staticly-imported members.

For example, this contrived helper class:

    public class Dates {
        public static final Date TODAY = ...

        public static Date dayBefore(Date date) { ... }
        public static Date midnightOf(Date date) { ... }
    }

In this calling code

    Date reportStart = [CTRL-SPACE]

you would see

    TODAY                   Dates
    dayBefore(Date)         Dates
    midnightOf(Date)        Dates

Selecting dayBefore and activating again would recommend the same items:

    Date reportStart = dayBefore([CTRL-SPACE])