sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Shortcut key not working in release 4.14.0.RELEASE

Open shankarwww opened this issue 4 years ago • 32 comments

In the 4.14.0.RELEASE, shortcut key like rename-refactoring(Alt+Shift+R) is not working. Open a class, select a method or class name to rename, some other dialog box is getting opened. The was issue in 4.13.0.RELEASE too where window use to shake when u try Alt+Shift+R.

shankarwww avatar Mar 22 '22 19:03 shankarwww

I am also facing this issue and can confirm this. unable to rename anything in Java sources.

imtiaz-rahi avatar Mar 23 '22 12:03 imtiaz-rahi

I tried to reproduce this. I am on a Mac, so maybe the exact keyboard shortcuts are not 100% identical to other platforms. In my case, the latest STS 4.14.0 release invokes the rename operation on Alt-Cmd-R in a Java editor for example. This is identical to the behavior of a standard Eclipse 2022-03 installation.

The shortcut doesn't show up on the menu items (for some reason), but if you open the Preferences -> General -> Keys and search for Rename, you can find the active bindings there. There seems to be a conflict, but nevertheless the shortcut that is listed there seems to work.

Can you take a look at this to see whether the shortcut has maybe changed or is on a different key combination for you?

martinlippert avatar Mar 23 '22 14:03 martinlippert

I am having this issue also on a Mac. For me it is not working since the update to STS 4.14. Settings should be correct - see image settings

ThomasD281 avatar Mar 24 '22 06:03 ThomasD281

Can confirm on Linux, Eclipse 20220310-1457 with STS addon site. I even had a conflict with "Rename" in category "File" and "Rename - Refactoring" in category "Refactor - Java" on "Shift + Alt + R", but didn't help to resolve this.

mweirauch avatar Mar 24 '22 07:03 mweirauch

Is this behavior different from a plain Eclipse installation?

martinlippert avatar Mar 24 '22 09:03 martinlippert

Is this behavior different from a plain Eclipse installation?

Yes, for me in eclipse Version: 2022-03 (4.23.0) with the default key settings the renaming shortcut is working

ThomasD281 avatar Mar 24 '22 10:03 ThomasD281

@ThomasD281 Which exact distribution of Eclipse? On which OS? And what exact keybinding on your system? Asking to be able to understand and reproduce this exactly... :-)

martinlippert avatar Mar 24 '22 10:03 martinlippert

The shortcut doesn't work, yes, but if select with left-button over class name, parameter, property or variable, and entry 'refactor->rename' the renaming operation itself doesn't work. An error is produced.

But only if select renaming on editor file. If select renaming classes from project explorer, all will be fine. Attach the log for error I was get. Untitled.log

ofornes-basecat avatar Mar 24 '22 11:03 ofornes-basecat

@ofornes-basecat This sounds/looks like a slightly different problem. Is this an upgraded instance of STS4? The error log that you attached is pointing into a direction where multiple versions of JDT types are around, so I am wondering what might have caused this.

Question to all here: Are you all running an upgraded version or does this happen with a fresh and clean install of STS 4.14.0.RELEASE as well? And if so, is there also an error showing up somewhere or is this purely the key binding not working?

martinlippert avatar Mar 24 '22 11:03 martinlippert

@ThomasD281 Which exact distribution of Eclipse? On which OS? And what exact keybinding on your system? Asking to be able to understand and reproduce this exactly... :-)

I have been having this problem for last 1 month (STS 4.9.0.RELEASE-e4.18.0) surely and upgraded to STS 4.14.0 yesterday and yet the problem persisted. So, tried by downloading STS 4.14.0 on Eclipse 4.23.0 and still problem exists. I am running Linux PopOS (Ubuntu variant v 21.10).

imtiaz-rahi avatar Mar 24 '22 12:03 imtiaz-rahi

Question to all here: Are you all running an upgraded version or does this happen with a fresh and clean install of STS 4.14.0.RELEASE as well? And if so, is there also an error showing up somewhere or is this purely the key binding not working?

Running upgraded version of STS from 4.13.1 to 4.14.0 on mac os. Error log when pressing shortcut for refactor -> rename in java source window see attached log error.log

ThomasD281 avatar Mar 24 '22 13:03 ThomasD281

@ThomasD281 This looks like the same error as @ofornes-basecat reported above, but I am still puzzled why that happens or how to reproduce that. Installed a fresh STS 4.13.1 release on my machine (macOS), upgraded to 4.14.0, but the keyboard shortcut (Cmd-Alt-R) still works when the cursor is, for example, on a class name in the Java editor.

Can you open a Console view, then choose "Host OSGi Console" from the drop-down, and type in ss (for short status) and press enter. It lists all the running plugins in your installation. Then, look for all plugins/bundles with the name org.eclipse.jdt.core and org.eclipse.jdt.ui. Can you paste the details of those installed bundles? Are there multiple versions of those bundles around?

martinlippert avatar Mar 24 '22 13:03 martinlippert

found only these 2 (attached the whole output of the ss command) 704 STARTING org.eclipse.jdt.core.formatterapp_1.1.0.v20210618-1653 1324 ACTIVE org.eclipse.jdt.core.manipulation_1.16.0.v20220214-0655

osgi-ss.txt

ThomasD281 avatar Mar 24 '22 13:03 ThomasD281

Do you have Lombok installed/added to your IDEs?

martinlippert avatar Mar 24 '22 14:03 martinlippert

This is just a wild guess... From the installed bundles, everything looks fine, right versions of JDT are installed, so there no reason why the exception that you see in the logs should appear. I know that Lombok modifies JDT core at load time, therefore that could be an explanation (if you have the Lombok extension installed in your .ini file).

martinlippert avatar Mar 24 '22 14:03 martinlippert

Do you have Lombok installed/added to your IDEs?

yes - I will re-install it again - maybe this helps

ThomasD281 avatar Mar 24 '22 14:03 ThomasD281

Ok, can you uninstall Lombok and try again?

martinlippert avatar Mar 24 '22 14:03 martinlippert

The issue is already filed and marked as fixed on Lombok: https://github.com/projectlombok/lombok/issues/3134 - fix version seems to be 1.18.24. So closing this one here as a duplicate of the Lombok issue.

In case someone runs across this issue without Lombok being involved, please comment and we can re-open or create a new issue for that.

martinlippert avatar Mar 24 '22 14:03 martinlippert

Ok, can you uninstall Lombok and try again?

uninstalling lombok and shortcut works again. thx for the help ...

ThomasD281 avatar Mar 24 '22 14:03 ThomasD281

Can confirm on Linux, Eclipse 20220310-1457 with STS addon site. I even had a conflict with "Rename" in category "File" and "Rename - Refactoring" in category "Refactor - Java" on "Shift + Alt + R", but didn't help to resolve this.

found same (running Ubuntu). resolved conflict but no joy.

imtiaz-rahi avatar Mar 24 '22 14:03 imtiaz-rahi