Skip to content
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

Shortcut key not working in release 4.14.0.RELEASE #746

Closed
shankarwww opened this issue Mar 22, 2022 · 32 comments
Closed

Shortcut key not working in release 4.14.0.RELEASE #746

shankarwww opened this issue Mar 22, 2022 · 32 comments
Labels
for: eclipse something that is specific for Eclipse type: bug

Comments

@shankarwww
Copy link

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.

@imtiaz-rahi
Copy link

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

@martinlippert martinlippert added for: eclipse something that is specific for Eclipse and removed status: waiting-for-triage labels Mar 23, 2022
@martinlippert
Copy link
Member

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?

@ThomasD281
Copy link

ThomasD281 commented Mar 24, 2022

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

@mweirauch
Copy link

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.

@martinlippert
Copy link
Member

Is this behavior different from a plain Eclipse installation?

@ThomasD281
Copy link

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

@martinlippert
Copy link
Member

@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... :-)

@ofornes-basecat
Copy link

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

@martinlippert
Copy link
Member

@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?

@imtiaz-rahi
Copy link

imtiaz-rahi commented Mar 24, 2022

@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).

@ThomasD281
Copy link

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

@martinlippert
Copy link
Member

@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?

@ThomasD281
Copy link

ThomasD281 commented Mar 24, 2022

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

@martinlippert
Copy link
Member

Do you have Lombok installed/added to your IDEs?

@martinlippert
Copy link
Member

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).

@ThomasD281
Copy link

ThomasD281 commented Mar 24, 2022

Do you have Lombok installed/added to your IDEs?

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

@martinlippert
Copy link
Member

Ok, can you uninstall Lombok and try again?

@martinlippert
Copy link
Member

The issue is already filed and marked as fixed on Lombok: projectlombok/lombok#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.

@ThomasD281
Copy link

Ok, can you uninstall Lombok and try again?

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

@imtiaz-rahi
Copy link

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
Copy link

Ok, can you uninstall Lombok and try again?

Just installed latest lombok "v1.18.23 "Edgy Guinea Pig" - 2022-03-16" from here and it worked. Thanks a lot.

@ofornes-basecat
Copy link

ofornes-basecat commented Mar 25, 2022

@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
I use an upgrade version of STS. The original was sts-4.13.1.RELEASE

@ofornes-basecat
Copy link

Do you have Lombok installed/added to your IDEs?

@martinlippert Yes, I have added lombok installed in my IDE

@ofornes-basecat
Copy link

I can confirm that lombok agent is the problem. Under the same context but without lombok agent, all works like a charm

@ofornes-basecat
Copy link

@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 I test STS 13 upgraded to 14 and fresh install of STS 14.
In both cases, the lombok agent produces the error.

  • Without lombok agent, both cases run with no problem
  • With lombok agent, both cases crashes

I think the problem is only the lombok agent.

@martinlippert
Copy link
Member

@ofornes-basecat Thanks for double checking and confirming our initial results here. So everybody who uses Lombok should make sure to use the latest Lombok extension for Eclipse with the latest STS 4.14.0 release.

@shankarwww
Copy link
Author

It seems the issue is still not completely fixed. Try to rename the file using Crtl+Shift+R by clicking the on the file in the package explorer. The window and different options in the toolbar menu starts flickering.

@shankarwww
Copy link
Author

sts_flickering_issue

Please refer to above pic for more details and steps to replicate this flickering issue

@martinlippert
Copy link
Member

@shankarwww Do you have the Lombok extension installed as well? Or does the problem appear even without anything Lombok-related being installed?

@ofornes-basecat
Copy link

I found that this problem doesn't occur in STS 4.7.2, but in 4.8.0 and upper versions.

@shankarwww
Copy link
Author

@shankarwww Do you have the Lombok extension installed as well? Or does the problem appear even without anything Lombok-related being installed?

yes, I have lombok plugin installed.

@martinlippert
Copy link
Member

@shankarwww Do you have the Lombok extension installed as well? Or does the problem appear even without anything Lombok-related being installed?

yes, I have lombok plugin installed.

As discussed in this issue, the problem got fixed in Lombok 1.18.24 (here is the related Lombok issue: projectlombok/lombok#3134), so please make sure you have the latest Lombok extension installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse type: bug
Projects
None yet
Development

No branches or pull requests

6 participants