Skip to content

Modified content assist preferences for editor are not loaded on IDE startup #1518

Closed

Description

@chrisipa

I have lately updated my Spring Tools Suite IDE to the latest version (4.29.0.RELEASE). After that I have noticed that the proposals for the content assist in the editor have changed quite a bit.

I'm getting a lot of unwanted entries which are related to the Language Server Proposals:

Image

I have tried to deactivate this option in the preferences section for the editor (Java -> Editor -> Content Assist Advanced):

Image

When I press Apply & Close then the preferences are saved and I get the correct proposals for my use case:

Image

But whenever I restart my IDE, the default preferences for the content assist are loaded. Then I always have to go to the preferences section for editor again and click on Apply & Close and the proposals are back to normal.

That's why I think there's a bug at the IDE startup which prevents the user modified content assist preferences to be loaded correctly.

I have seen that the content assist functionality was modified with this release:

https://github.com/spring-projects/sts4/releases/tag/4.24.0.RELEASE

So maybe this bug was introduced with the changes that have been made there.

Can you please fix this bug, as it is very annoying to always manually change the content assist preferences after every IDE restart.

Thank you very much.

Activity

  1. martinlippert commented on Mar 18, 2025

    @martinlippert
    Member

    This is a duplicate of #1505. You can disable this specific bean completion proposals specifically as described as a workaround in the mentioned issue. The fix for this will be released as part of a patch release 4.29.1, most likely tomorrow.

  2. martinlippert commented on Mar 18, 2025

    @martinlippert
    Member

    For the duplicates showing up in the completion proposal list, I created #1519

  3. chrisipa commented on Mar 18, 2025

    @chrisipa
    Author

    Hi Martin, thanks a lot for the clarification. Then I'm eagerly waiting for the 4.29.1 release :-)

  4. chrisipa commented on Mar 19, 2025

    @chrisipa
    Author

    Hi @martinlippert, I did the update to 4.29.1 today, but it did not fix my issue. Can you please reopen this ticket?

  5. BoykoAlex commented on Mar 19, 2025

    @BoykoAlex
    Contributor

    @chrisipa Any chance you can trim down your project to something you can share with us please? I don't normally get the duplicates... Were you able to reproduce this with some sample spring apps such as petclinic or any of the getting started guides projects?

  6. martinlippert commented on Mar 19, 2025

    @martinlippert
    Member

    @chrisipa You are really describing three different issues here and the question is which one you still observe.

    • that the default content-assist shows duplicated bean names?
    • that the default content-assist shows completions with bean names where it should not (in your example roleStrategy should be proposed first, not ecpprofile etc.)
    • the fact that when you disable the Language Server Proposals, this setting seems to be reset when you restart the IDE?

    Can you shed some light on this?

    As a side note: #1505 contains a simple way to disable the bean completion mechanism (there is a specific preference for this, so that you don't need to disable all Language Server Proposals from the content-assist preferences.

  7. chrisipa commented on Mar 21, 2025

    @chrisipa
    Author

    Hi @BoykoAlex,

    I'm sadly not able to provide my project as it is closed source. But my problem is really not the duplicates in the Spring Bean Inject Proposal list. I want to completely get rid of all these proposals.

    @martinlippert: I did some more testing and it seems that this Spring preference

    Image

    is overriding the content assist preferences on application startup:

    Image

    I think this should not be the case, especially because the Language Server Proposals should be a super set of the Spring Bean Inject Proposals.

    I also think that the preference Inject Bean completion proposals in Java editor should be disabled by default. In my opinion the current default behaviour will probably confuse a lot of STS users, because they get a lot of unwanted proposals for the content assist.

    What do you think?

    Thanks for your help.

  8. martinlippert commented on Mar 22, 2025

    @martinlippert
    Member

    The Language Server Proposals in the Java -> Editor -> Content-Assist -> Advanced section enables/disables all the content-assist proposals that the Spring Boot language server will contribute to the Java editor from the perspective of the Java editor. The specific setting about the bean completion proposals is directly enabling/disabling this specific functionality in the Spring language server (because we wanted to provide a way to enable/disable this experimental specific content-assist feature.

    So if the bean completion proposal do not work for you, you can disable that specific piece of the puzzle, while keeping all the other Spring content-assist features around (e.g. property keys in @Value and @ConditionalOnProperty annotations, auto-completions for bean names in @DependsOnor @ConditionalOnBean, and many more).

    When you disable the Language Server Proposals, you will disable all of them entirely.

    In addition to that: in case you updated to the latest Spring Tools for Eclipse 4.29.1 and the bean completions still show up more often than they should, get in your way, or show duplicate proposals, please continue to report that, but having a small sample project or sample code snippets would help us a lot to reproduce and fix this.

  9. chrisipa commented on Mar 25, 2025

    @chrisipa
    Author

    Hi @martinlippert,

    I have now deactivated this option to get rid of the unwanted content assist proposals:

    Image

    That's why this issue is basically solved for me.

    PS: Please rethink your decision to activate this option by default. I think this really confuses a lot of users.

  10. martinlippert commented on Mar 25, 2025

    @martinlippert
    Member

    PS: Please rethink your decision to activate this option by default. I think this really confuses a lot of users.

    I absolutely agree, this is the reason why we immediately shipped a patch release 4.29.1 to address this and to not confuse users here. It should not show the bean completion proposals as the highest priority ones anymore when working on Java source code - even if you keep the preference enabled.

    Did you upgrade to 4.29.1 and still see the issue when you enable the preference again?

  11. chrisipa commented on Mar 28, 2025

    @chrisipa
    Author

    Yes I'm still facing the same issue. Only the workaround helped in my case:

    Hi @martinlippert, I did the update to 4.29.1 today, but it did not fix my issue. Can you please reopen this ticket?

  12. martinlippert commented on Mar 28, 2025

    @martinlippert
    Member

    Can you maybe assemble a small sample project or paste code snippets that illustrate the issue? And maybe a few screenshots of the completion proposals showing up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions