Community
Participate
Working Groups
When I type ImmutableSet.of( Eclipse thinks to know better and changes it into ImmutableSet.copyOf() which es extremely annoying. Note that this "feature" actives when typing `.` and finished when typing `(`, i.e., this happens pretty *always*. Similarly, I always get `flatMap` instead of `map`, despite that I surely use the latter much more often - so it can't be explained by frequency. IMHO no matter what the settings are, the following rules should be followed: 1. Never replace a correct code piece by something else. Writing `.of(` implies that I wanted just this. If I wanted `copyOf`, I'd write e.g., `.co(`. 2. Always prefer case-matching proposals. As `of` matches `copyOf` only case-insensitively, it should not take preference. 3. Prefer prefix-matching proposals. When I type `.p` and there're methods `.print` and `.copy`, I pretty always want the former.
This pretty much looks like bug 481752 comment 9, which was fixed via bug 483511 (4.6). Retesting today with Build id: I20180611-0500 it indeed works fine for me. Please check two things: (1) In Preferences > Java > Editor > Content Assist > Advanced: What Default Proposal Kinds do you see selected? Is Code Recommenders involved? What happens if it is deselected? (2) At the moment before pressing '(', what is the order of proposals shown? Which proposal appears at the top / first position?
> What Default Proposal Kinds do you see selected? > Is Code Recommenders involved? What happens if it is deselected? I can't reproduce it at the moment. I was suffering this bug for a long time, and tried hard to find a better setting. Now, it's gone and not reproducible. I'm rather sure, Code Recommenders were on. > At the moment before pressing '(', what is the order of proposals shown? Which proposal appears at the top / first position? Sorry, I can't tell anymore. This non-reproducibility looks like a bug, too. ;) Closing this for now. *** This bug has been marked as a duplicate of bug 481752 ***