Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 579339 - name refactoring doesn't work
Summary: name refactoring doesn't work
Status: CLOSED DUPLICATE of bug 579168
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.23   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-20 17:16 EDT by Serhii Pylypenko CLA
Modified: 2022-03-22 03:47 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serhii Pylypenko CLA 2022-03-20 17:16:47 EDT
I can't change the names in Version: 2022-03 (4.23.0), Build id: 20220310-1457. Alt+Shift+R has no effect. Same with Refactor/Rename menu option. No input for new name appears, no visual changes at all, so I can't enter changes.
Comment 1 Dirk Steinkamp CLA 2022-03-21 05:05:27 EDT
(In reply to Serhii Pylypenko from comment #0)
> I can't change the names in Version: 2022-03 (4.23.0), Build id:
> 20220310-1457. Alt+Shift+R has no effect. Same with Refactor/Rename menu
> option. No input for new name appears, no visual changes at all, so I can't
> enter changes.

do you happen to use Lombok?
There's an issue in Lombok, that makes it break with 2022-03: https://bugs.eclipse.org/bugs/show_bug.cgi?id=579168

The issue is fixed on the Lombok side, I'm not sure if it's integrated in the Lombok-Snapshot-Build, but from the timing I'd say it should be.
Comment 2 Andrey Loskutov CLA 2022-03-21 10:36:22 EDT

*** This bug has been marked as a duplicate of bug 579168 ***
Comment 3 Serhii Pylypenko CLA 2022-03-21 15:38:25 EDT
(In reply to Dirk Steinkamp from comment #1)
> (In reply to Serhii Pylypenko from comment #0)
> > I can't change the names in Version: 2022-03 (4.23.0), Build id:
> > 20220310-1457. Alt+Shift+R has no effect. Same with Refactor/Rename menu
> > option. No input for new name appears, no visual changes at all, so I can't
> > enter changes.
> 
> do you happen to use Lombok?
> There's an issue in Lombok, that makes it break with 2022-03:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=579168
> 
> The issue is fixed on the Lombok side, I'm not sure if it's integrated in
> the Lombok-Snapshot-Build, but from the timing I'd say it should be.

Yes, you are correct, I'm using Lombok. It worked perfectly well until Eclipse was updated to version 4.23.0. Anyway thank you for the hint.
Comment 4 Serhii Pylypenko CLA 2022-03-21 16:07:05 EDT
It's definitely Lombok. Removed its javaagent line from eclipse.ini and refactoring back live again. Not integrated in latest snapshot yet.
Comment 5 Dirk Steinkamp CLA 2022-03-21 18:21:17 EDT
(In reply to Serhii Pylypenko from comment #4)
> It's definitely Lombok. Removed its javaagent line from eclipse.ini and
> refactoring back live again. Not integrated in latest snapshot yet.

Check out the lombok issue on github -- there's a link to some early fix close to the end of the discussion, if I remember correctly.

The issue behind all this is that lombok uses reflection to detect a method of eclipse, but this method has been overloaded by a second variant with a different parameter set in eclipse 2020-03. Lombok gets confused as it didn't check for parameter lists when looking up the method. This has been fixed in the source code of lombok, but apparently not made it into the snapshot release yet.
Comment 7 Serhii Pylypenko CLA 2022-03-22 03:47:10 EDT
(In reply to Dirk Steinkamp from comment #5)
> Check out the lombok issue on github -- there's a link to some early fix
> close to the end of the discussion, if I remember correctly.
> 
> The issue behind all this is that lombok uses reflection to detect a method
> of eclipse, but this method has been overloaded by a second variant with a
> different parameter set in eclipse 2020-03. Lombok gets confused as it
> didn't check for parameter lists when looking up the method. This has been
> fixed in the source code of lombok, but apparently not made it into the
> snapshot release yet.

Thanks for detailed explanation, it's very interesting to know better the mechanics behind Eclipse & Lombok.
I've found that early fix you mentioned and it works flawlessly thus far.
Thanks again for help!