| Summary: | content assist ordering does not use the preference | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | nimo mayr <enegy> | ||||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||||
| Status: | CLOSED INVALID | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | rgrunber, stephan.herrmann | ||||||
| Version: | 4.15 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
nimo mayr
Created attachment 281589 [details]
the first content assist in the cycle though this is not defined as the first
the other screenshot.
The manual ordering of the "content assist cycling" within the preference settings does not work.
It always shows the "Basic Proposals" at first although the first should be "Java Proposals" (as I defined it to be the first in the cycle). For example:
user.{open content assist}
After "user.", the content assist is shown but instead of showing related java proposals, it shows the unrelated stuff of https://bugs.eclipse.org/bugs/attachment.cgi?id=281589.
Please try *deselecting* the proposal category which you want to see first. If I'm not mistaken, the list you show is intended to order the categories to show *later* using additional Ctrl+Space hits. FWIW, the second screenshot shows Java Postfix Template Proposals. Thanks, so I must *de-select* the proposal category which I want to show first? In my case I must deselect "Java Proposals (Task Focused)" to show it at first within the cycle. Not very intuitive. I tried it, it does not work. However, I installed "Eclipse Code Recommenders" again (which is actually no more supported in Eclipse) and after that it works out of the box. The content assist does what it should. Java code completion is shown at first within the cycle. Switching to javascript, javascript code completion is first shown within the cycle. That`s nice. What is not so nice is that "Eclipse Code Recommenders" is not supported anymore on latest eclipse release and on every code completion the following error log in "metadata/.log": !ENTRY org.eclipse.recommenders.completion.rcp 4 11 2020-01-26 23:22:31.603 !MESSAGE Session processor ‘org.eclipse.recommenders.statics.rcp.sessionprocessors.statics’ failed with exception. !STACK 0 java.lang.NoClassDefFoundError: javax/annotation/PostConstruct at org.eclipse.recommenders.internal.rcp.RcpModule$Listener$1.afterInjection(RcpModule.java:278) at com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:97) at However, code recommenders works with even with the error above. Uninstalling code completion gives exact the result described at the first post (with the 2 s creenshots). So I stick with "eclipse code recommenders" as long as eclipse does not provide any better code completion out of the box. Maybe use this bug report as a motivation to provide a little improved code completion in eclipse out of the box. Look at the code completion of "visual studio code" or "IntelliJ". Just to clarify a few things. The "default content assist list" is the one that comes up immediately upon triggering content assist. I don't think it has the ability to be ordered (like the cycling list). Presumably each category contributes its own relevance and that's how it is sorted. I think Postfix completion just inherits the standard template relevance. The "content assist cycling" list is the only one that allows you to select/order the categories on subsequent invocations of ctrl + space. I don't think there are plans to allow for users to control the relevance settings of every category in the first invocation of content assist (default). There is a Bug 550226 to ensure that newly added proposal categories get disabled by default on workspaces where users have their own content assist preferences set. Some of the features of Code Recommenders and beyond are slowly migrating into JDT itself (eg. Chain Completion, Postfix Completion, Subword Completion, etc.), but getting them exactly right does take some time. In Recommenders, many features took advantage of JDT internals and I believe it disabled other completions to get things working well. >The "default content assist list" is the one that comes up immediately upon triggering content assist. I don't think it has the ability to be ordered So the second picture shows "the default content assist" which I cannot change. I think having a "fixed default content assist" is nice, but then the "default" should adapt to the actual editor. It does not really make sense to provide such defaults as seen in picture 2 ranked first within a java editor when the only thing the user wants in most cases to get some java methods fast. This is actually not possible without cycling. >Some of the features of Code Recommenders and beyond are slowly migrating into JDT itself good to know. (In reply to nimo mayr from comment #4) > Look at the code completion of "visual studio code" Aren't those implemented using JDT? :) If so, then "the code completion usability" and especially the "defaults" are better than the actual eclipse. I really dont understand why eclipse shows such unneccessary defaults like the one in "picture 2" at the first place. The most of us dont use these things and must do a second keystroke on every call to get into the right code completion. (In reply to nimo mayr from comment #8) > If so, then "the code completion usability" and especially the "defaults" > are better than the actual eclipse. I really dont understand why eclipse > shows such unneccessary defaults like the one in "picture 2" at the first > place. The most of us dont use these things and must do a second keystroke > on every call to get into the right code completion. Don't forget that Eclipse is a highly customizable IDE. I, e.g., never saw the Postfix Template Proposals (which are cool in their on right) as the only initial proposals. To help us understand your situation please tell us more about what exactly you installed. I am using Jboss Tools and Wildwebdeveloper plugin and Code Recommender. Btw, I tried something like https://marketplace.eclipse.org/content/yakode-code-recommender which has also very code code completion. But it is not free. (In reply to nimo mayr from comment #10) > I am using Jboss Tools and Wildwebdeveloper plugin and Code Recommender. Thanks. I think the defaults might be defined by the Eclipse package which you originally downloaded, and into which you then probably installed the above. Anyway, obviously my hint in comment 3 didn't quite hit the mark. Roland's comment 5 was much closer. I could now reproduce your problem with these steps (using Java Proposals because I don't have Mylyn's task focused variant installed): * In the upper box ("... 'default' content assist list") deselect Java Proposal * In the lower box ("Content assist cyclying ...") select Java Proposal Now, as Roland explained, Java Proposals is no longer shown after the first Ctrl+Space (while all kinds of Template proposals still are), but you have to hit Ctrl+Space again to see Java Proposals. Conversely, you should be able to fix your configuration by selecting everything you want to see immediately in the *upper box*. If it still doesn't work try selecting *only* your one preferred category in the upper box. If you get it to work using these hints, then the question is no longer whether or not preferences are used, but why / how you came up with an undesired configuration. As I mentioned, I guess your initial configuration is determined by the Package you initially downloaded (or perhaps by some prior work on the same workspace?). >you should be able to fix your configuration by selecting everything you want to see immediately in the *upper box*.
Thanks. Yes, this worked for me. So the upper box defines what is shown in the "default proposals". Did not know it. So I think we can close this issue as it was only a configuration issue. Thanks!
|