Bug 495775 - [preferences] Disable certain Content Assist > Advanced proposal kinds to prevent duplicates
Summary: [preferences] Disable certain Content Assist > Advanced proposal kinds to pre...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-09 06:53 EDT by Noopur Gupta CLA
Modified: 2022-05-16 17:15 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2016-06-09 06:53:01 EDT
In Content Assist > Advanced preferences, we should disable the proposals kinds which are already covered by an enabled and checked proposal kind.

For example, if 'Java Proposals' is enabled and checked, disable 'Java Non-Type Proposals' and 'Java Type Proposals'.

See bug 464850 for background.
Comment 1 Markus Keller CLA 2016-06-09 11:10:45 EDT
Maybe bug 464850 works as designed, but the design is bad.

It's confusing to:
- silently disable proposal kinds that are already included in other kinds
- only do that on restart and not directly on Apply / OK
  => after enabling all proposal kinds, you get duplicate proposals until restart

I would not try to explain the current hack in the UI or add even more hacks to special-case some "Java *" proposals, but rather fix the implementation so that the hack and the explanations become unnecessary. Fiddling with user preferences behind the scene is ugly, and offering an API to do that is even worse. PreferenceConstants#get/setExcludedCompletionProposalCategories(..) should be deprecated.


The general problem is that some proposal kinds replace the functionality of another kind. In JDT, the "Java Proposals" kind includes the two other "Java *" kinds. Mylyn (who asked for bug 140886) has proposal kinds that replace the "Java *" kinds.

The element "javaCompletionProposalComputer" of the extension point "org.eclipse.jdt.ui.javaCompletionProposalComputer" should get a new child element "overrides" whose values are ids that point to other javaCompletionProposalComputer ids.

Then, proposal computers that are overridden in other active computers can silently be skipped when computers are loaded. This strategy also nicely solves all the bugs that arise when a proposal computer that overrides others gets uninstalled. In that case, the previously skipped computers automatically become active again, and no hacks like bug 222403 and bug 250629 are necessary.

The UI could tell about the override mechanism, but that's no critical.
Comment 2 Eclipse Genie CLA 2020-05-21 11:49:00 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2022-05-16 17:15:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.