-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STS on Eclipse: quick fix for "unknown property" always shows just "Computing..." on first invocation #593
Comments
I think this is closely related to #579 and most likely caused by some internal mechanism inside of the language server blocking it, so that the client waits a very long time before getting an answer for this quick fix proposals. For #579, I re-worked quite a huge part of the way the language server reacts to those messages and removed a lot of situations where this blocking could have happened. Therefore I will close this issue here as well - as fixed for the upcoming 4.10.0.RELEASE. If you want to give it a quick try, feel free to try the latest CI builds from here: If this still happens, please capture a thread dump of the IDE process as well as the Spring Boot language server process while this takes so long to show up the warning and the quickfix and we can re-open this issue here. |
Hi Martin, |
@mauromol The usual policy that we follow is to ship a release on the latest Eclipse release and provide a separate update repo for the previous Eclipse release. Therefore the Spring Tools for Eclipse 4.10.0 release will be based on Eclipse 2021-03 and the separate update repo will be around for the Eclipse 2020-12 release. The main p2 repo that Spring Tools 4 for Eclipse distributions use always point at the latest Spring Tools 4 release as well as the latest Eclipse release, so that automatic updates will update your installation to the latest Spring Tools release as well as the latest Eclipse release - so I hope that most of the Spring Tools users are always on the latest Eclipse release. Nevertheless, you asked for a separate p2 update repository for Eclipse 2020-09, so I enabled those compatibility builds again and you will find that p2 repo on the mentioned nightly CI update download page again. And I will build that for the upcoming 4.10.0 release as well. Hope that helps you and makes the update path more convenient... :-) |
Hi Martin, This long story just to tell you that: it's really annoying being forced to upgrade your development environment with a so fast pace and I really hope that you could take into consideration the option to give users at least two older releases support for your STS Eclipse base. I don't know how much work it is for you :-( This said, I tested your nightly and this is what I see. When I start to type a new property in If suggestions exist, a new popup will show up and list all the possible known properties. If no property is known which matches your input (like in the example above, where I typed some bogus characters) no new popup is shown and hitting Ctrl+Space seems to do nothing. This is a bit inconsistent with Eclipse content assist experience in general, which will always fire a popup with possibly a "No XXX proposals" message if no suggestions are available. But going back to my original issue: if I hit Ctrl+1 on an uknown property I see two different behaviours:
I could even capture a case in which "Computing" is shown twice: By the way, I have many errors like this in my Eclipse log, perhaps they are related?
I can't understand the nature of these log entries, I'm regularly running Eclipse with an OpenJDK 11 which is working fine... I never saw these errors before performing the upgrade to STS 4.10 nightly this morning... |
Your detailed explanation of your update story is much appreciated and I understand the efforts and pain that is involved here. As a consequence, I will keep the Eclipse 2020-09-based builds running for the upcoming release and afterwards will keep the builds for 2020-12 running for the next release (so having builds for the latest Eclipse release, the one before, and the one before that). Did you see https://gist.github.com/martinlippert/5155155 ? Maybe that helps you installing third-party plugins more easily into a new installation. At least you can script it that any and don't need to use the UI manually. With regards to the problem with the content-assist and the quick fixes: Can you capture a thread dump of the IDE process as well as the spring-boot-language-server process while the content-assist seems to wait for proposals and attach them here? That would be great. Also it would be good to enable the log output of the Spring Boot Language Server in the Thanks a lot for your help and detailed reports, much appreciated. |
Hi Martin, I may try to take thread dumps, my only fear is that I won't capture anything. Indeed, the IDE does not seem to be stuck at doing some lengthy computation: IMHO it's just a problem of updating that "Computing..." message with the result of the computed quick assist options. It seems like just an UI update problem: Ctrl+1 is invoked, options to be shown in the popup dialog are not yet been computed, so "Computing..." is shown; when computation has ended, that popup window should be updated so that the "Computing..." message is replaced with the available Quick Assist options, however no update is performed and the "Computing... " message remains stuck. Or, as an alternative, proposals should be computed synchronously and the popup should appear only after the proposals are ready: this would cause the UI thread to be frozen for a moment, but since this computation is indeed extremely quick I don't think it would hurt so much the user experience. Of course, a working asynch solution would be better though. |
If this turns out to be an issue with the underlying completion dialog of the generic editor, we will have to report this for the LSP4E or the platform at Eclipse, but let me first try to investigate this in a bit more detail. |
This looks like an issue with the marker resolution mechanism of the LSP4E project, so I filed this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=571827 Not sure yet how to solve this, but at least I have an idea about what is going wrong here... :-) And indeed we don't need a thread dump of the language server process - which seems to work just fine here. |
This has been fixed a while ago in LSP4E and the fixed version is also included in the recent Spring Tools releases. Therefore closing this one here. |
Describe the bug
When you enter a new unknown property in
application.properties
, a warning shows up saying it's an unknown property. Using quick fix (Ctrl+1) you should be able to create the corresponding metadata inadditional-spring-configuration-metadata.json
file.However, the very first time you invoke Ctrl+1 on a specific property, only "Computing..." is shown and it is never replaced with the actual quick assist action.
To Reproduce
Open
application.properties
.Add a new property like:
foobar.enabled=true
.foobar.enabled
gets underlined in yellow; do not hit F2 or wait for explanation tooltip to show upQuickly place the cursor within
foobar.enabled
name and hit Ctrl+1.Please note: if you wait enough for the rendering of the tooltip explaining that the property is unknown to be shown, then you probably won't hit this bug. Perhaps, if you have a super-fast system you won't hit it either, but on my system, unless I wait for every tooltip to show up, I will certainly have to hit Ctrl+1 twice for each property in order to trigger the requested action.
The text was updated successfully, but these errors were encountered: