sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Dialog for open-rewrite recipes shows "Loading..." and nothing happens

Open ahoehma opened this issue 1 year ago • 2 comments

Describe the bug I try to select and run a recipe but there no recipes shown.

image

I have these recipe filters:

image

To Reproduce

  1. Right click on a Java File
  2. Spring->Refactor....

Versions

Spring Tool Suite 4

Version: 4.22.0.RELEASE Build Id: 202403071427 Revision: 44291b464093d161f115d8e16059e5272ed3c81d

Copyright (c) 2007 - 2024 Broadcom All rights reserved. Visit https://spring.io/tools

This product includes software developed by the Eclipse Foundation https://www.eclipse.org

This product includes software developed by the Apache Software Foundation https://www.apache.org

Lombok v1.18.32 "Envious Ferret" is installed. https://projectlombok.org/

ahoehma avatar May 02 '24 06:05 ahoehma

There is a problem in that version with the dialog showing up twice and one of the dialogs stays in the "loading..." state. Do you see the same? Multiple dialogs showing up?

In addition to that it would be interesting to see what happens on the log output of the Spring Boot language server process. To get that log output, you would need to enable this via Preferences -> Language Servers -> Spring Boot Language Server and then enable the Logging to Console checkbox. After a restart, you will see log output being streamed to a console view. You should see something like

INFO  o.s.i.v.b.j.r.RewriteRecipeRepository - Loading Rewrite Recipes...
INFO  o.s.i.v.b.j.r.RewriteRecipeRepository - Done loading Rewrite Recipes

when you select that action. But maybe there is an error showing up, so would be interesting to see the output.

One side note: the refactoring recipes that this action offers run on the entire project, not just a single Java source file - just in case you are trying to use this specifically for one source file.

martinlippert avatar May 02 '24 07:05 martinlippert

In addition to that you could also try a latest snapshot build from https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html to see if that makes a difference. The issue with the dialog showing up twice should already be fixed there.

martinlippert avatar May 02 '24 07:05 martinlippert

I installed the nightly version and now I see many recipes :D

image

ahoehma avatar May 03 '24 16:05 ahoehma

@BoykoAlex fixed this with https://github.com/spring-projects/sts4/commit/71bcc7a580385ea1ae7aa7af1ae8bef30aaea50a, included in the 4.22.1 release already.

martinlippert avatar May 04 '24 17:05 martinlippert

And thanks @ahoehma for checking this out and letting us know, much appreciated.

martinlippert avatar May 04 '24 17:05 martinlippert