Refactor bug with @Data #359

Closed
lombokissues opened this Issue Jul 14, 2015 · 13 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 286)

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Oct 10, 2011 at 21:39 UTC

Using Lombok 0.10.1, Eclipse 3.7.

Create a class:

@ Data
@ ToString
public class BlahBlah {
private final String account_id;
}

Right click in the package explorer and say Refactor...Rename...'AckAck'

I'm getting...

AckAck
@ ToString
public class AckAck {
private final String account_id;
}

It oddly replaces the @ Data with AckAck.

@lombokissues
Collaborator

๐Ÿ‘ค pe.fips ย  ๐Ÿ•— Oct 11, 2011 at 09:55 UTC

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Oct 23, 2011 at 20:06 UTC

Not sure why this is a low priority. Not being able to correctly rename classes is a pretty annoying thing.

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Nov 15, 2011 at 13:59 UTC

Should be addressed by Jappe van der Hel's work on refactors and save actions, commit 9c469dc. Will be in version after 0.10.2.

Can all people affected by this give the latest edge build a whirl? Please report back here if formatting now works (or doesn't work!) You can find the edge release at:

https://projectlombok.org/download-edge.html

@lombokissues lombokissues added this to the 0.10.3 milestone Jul 14, 2015
@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Nov 20, 2011 at 15:01 UTC

@lombokissues lombokissues removed the accepted label Jul 14, 2015
@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Nov 20, 2011 at 17:24 UTC

Sorry, I've only been working on front-end code (coffeescript/html/css mostly) so I haven't had a chance to try this out, but I do have it installed... as soon as I refactor something, I'll let you know.

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Nov 21, 2011 at 20:32 UTC

Just tried renaming a field on a @ Data annotated class and it appears to take for a second, but then immediately switches back to the original value.

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Nov 21, 2011 at 23:03 UTC

Now in release 0.10.4

@lombokissues lombokissues modified the milestone: 0.10.3, 0.10.4 Jul 14, 2015
@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Nov 28, 2011 at 06:54 UTC

I'm using 0.10.4 and renaming isn't working for me at all as I described in ๏นŸ7.

@lombokissues
Collaborator

๐Ÿ‘ค Jappe.vanderHel ย  ๐Ÿ•— Nov 29, 2011 at 19:30 UTC

Renaming is working for me when using the reproduction path in the original report.
Thus rightclick the package explorer and choose rename.

However when opening the class, selecting the classname in sourcecode and then use the rename shortcut (Alt+Shift+R) Eclipse still fails...

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Dec 19, 2011 at 20:31 UTC

Fixed in de1bc35. Will be present in 0.10.6.

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Dec 19, 2011 at 22:04 UTC

@lombokissues lombokissues modified the milestone: 0.10.4, 0.10.6 Jul 14, 2015
@lombokissues
Collaborator

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment