| Summary: | Models are downloaded before Intelligend Code Completion is enabled | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Johannes Dorn <johannes.dorn> |
| Component: | Recommenders | Assignee: | Project inbox <recommenders-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P5 | CC: | marcel.bruch |
| Version: | unspecified | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Johannes Dorn
The problematic line is in IntelligentCompletionProposalComputer#computeCompletionProposals:
@Override
public List<ICompletionProposal> computeCompletionProposals(ContentAssistInvocationContext context,
IProgressMonitor monitor) {
List<ICompletionProposal> res = super.computeCompletionProposals(context, monitor);
We have to call super to know whether we have to emit an "empty proposal" to shield against automatic application of the "enable recommenders?" proposal.
To make this work as expected, we could clear the list of session processors in #sessionStarted . Then only JDT default proposal are triggered.
The fix should be straight forward. Patch welcome.
While this would prevent model downloads, it does not prevent the download of the index. The case where the index is already available but Intelligent Code completion hasn't been activated is possible, when opening the models preference page or the model coordinates view before activating. This will trigger the index download. Clearing the session processors in the ProposalComputer would prevent a model download if the index is already present. I think a proper fix should also prevent the index download. This would require a a significant amount of work for a very small enhancement. If someone steps up to implement it or it raises significant issues, we could consider fixing it. |