You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Modified content assist preferences for editor are not loaded on IDE startup #1518
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:
I have tried to deactivate this option in the preferences section for the editor (Java -> Editor -> Content Assist Advanced):
When I press Apply & Close then the preferences are saved and I get the correct proposals for my use case:
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:
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.
@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?
@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.
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
is overriding the content assist preferences on application startup:
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.
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.
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?
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?
Activity
martinlippert commentedon Mar 18, 2025
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.martinlippert commentedon Mar 18, 2025
For the duplicates showing up in the completion proposal list, I created #1519
chrisipa commentedon Mar 18, 2025
Hi Martin, thanks a lot for the clarification. Then I'm eagerly waiting for the
4.29.1release :-)chrisipa commentedon Mar 19, 2025
Hi @martinlippert, I did the update to
4.29.1today, but it did not fix my issue. Can you please reopen this ticket?BoykoAlex commentedon Mar 19, 2025
@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?
martinlippert commentedon Mar 19, 2025
@chrisipa You are really describing three different issues here and the question is which one you still observe.
roleStrategyshould be proposed first, notecpprofileetc.)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 Proposalsfrom the content-assist preferences.chrisipa commentedon Mar 21, 2025
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
is overriding the content assist preferences on application startup:
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.
martinlippert commentedon Mar 22, 2025
The
Language Server Proposalsin theJava -> Editor -> Content-Assist -> Advancedsection 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
@Valueand@ConditionalOnPropertyannotations, 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.
chrisipa commentedon Mar 25, 2025
Hi @martinlippert,
I have now deactivated this option to get rid of the unwanted content assist proposals:
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.
martinlippert commentedon Mar 25, 2025
I absolutely agree, this is the reason why we immediately shipped a patch release
4.29.1to 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.1and still see the issue when you enable the preference again?chrisipa commentedon Mar 28, 2025
Yes I'm still facing the same issue. Only the workaround helped in my case:
martinlippert commentedon Mar 28, 2025
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?