Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 528901 - Code recommenders breaks module completion in module-info.java
Summary: Code recommenders breaks module completion in module-info.java
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Andreas Sewe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-18 10:53 EST by Fred Bricon CLA
Modified: 2019-07-24 14:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Bricon CLA 2017-12-18 10:53:49 EST
Whenever Code Recommenders (CR) is enabled, it's impossible to get module completion, there are 0 results. eg:

module demo {
  requires jav| //No default proposals
}

When CR is disabled, module autocompletion is back, working as expected.

Tested with CR 2.5.0 (Oxygen 2) and 2.5.1 (Photon M4)
Comment 1 Andreas Sewe CLA 2017-12-19 03:39:52 EST
Thanks for the excellent bug report, Fred. I'll try to reproduce.
Comment 2 Andreas Sewe CLA 2017-12-19 04:06:18 EST
(In reply to Andreas Sewe from comment #1)
> Thanks for the excellent bug report, Fred. I'll try to reproduce.

I can reproduce, even with all session processors except the Base-Relevance Processor disabled.
Comment 3 Andreas Sewe CLA 2017-12-19 04:47:23 EST
(In reply to Andreas Sewe from comment #2)
> (In reply to Andreas Sewe from comment #1)
> > Thanks for the excellent bug report, Fred. I'll try to reproduce.
> 
> I can reproduce, even with all session processors except the Base-Relevance
> Processor disabled.

OK, the problem seems to be in or near our ProposalCollectingCompletionRequestor, which doesn't collector the module proposals. Interestingly, JDT's FillArgumentNamesCompletionProposalCollector by default ignores all proposals whereas JDT's CompletionProposalCollector doesn't, so choosing the latter by disabling "Fill Method Arguments and show best guessed arguments" in Java > Editor > Content Assist causes the module proposals to show up -- but triggers Bug 528937 elsewhere. :-(
Comment 4 Eclipse Genie CLA 2017-12-19 08:41:03 EST
New Gerrit change created: https://git.eclipse.org/r/114392
Comment 5 Eclipse Genie CLA 2017-12-19 12:36:18 EST
New Gerrit change created: https://git.eclipse.org/r/114437
Comment 6 Andreas Sewe CLA 2017-12-20 03:37:04 EST
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/114437

This fix, slated for Code Recommenders 2.5.1 allows completion of module references as in comment 0. There is still a bug, however, that prevents completion of module *declarations*:

  module <ctrl+space>

See Bug 528981 for details. (TL;DR: Bug 528981 be fixed automatically when JDT publishes the fix for Bug 528954.)
Comment 8 Andreas Sewe CLA 2017-12-20 08:36:40 EST
(In reply to Eclipse Genie from comment #7)
> Gerrit change https://git.eclipse.org/r/114437 was merged to [maintenance].
> Commit:
> http://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/
> ?id=c027fdf35766bededfcb63c54e6f70b41e7a6297

@Fred: I have promoted a milestone with the fix (sans Bug 528981), if you want to do much appreciated some testing: <http://download.eclipse.org/recommenders/updates/maintenance-milestones/>