Rename is still badly broken with @Data #389

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

Projects

None yet

2 participants

@lombokissues
Collaborator

Migrated from Google Code (issue 316)

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Dec 16, 2011 at 21:03 UTC

v0.10.4

Similar to issue #359

Create an inner class:

public class Foo {
@ Data
public class Messages {
private String bar;
}
}

Select 'Messages' and hit option-command-r (on a mac) or do it from the contextual menu. For me, nothing happens.

If I remove the @ Data, then the rename works.

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Dec 16, 2011 at 21:06 UTC

This is what shows up in the logs:

!ENTRY org.eclipse.jdt.ui 4 10001 2011-12-16 13:05:49.598
!MESSAGE Internal Error
!STACK 0
org.eclipse.jface.text.BadLocationException: First position: 'Messages' at 110, this position: '@ Data' at 90
at org.eclipse.jface.text.link.LinkedPositionGroup.enforceEqualContent(LinkedPositionGroup.java:132)
at org.eclipse.jface.text.link.LinkedPositionGroup.addPosition(LinkedPositionGroup.java:113)
at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.start(RenameLinkedMode.java:254)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:212)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.doRun(RenameJavaElementAction.java:159)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:138)
at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:118)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:279)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

@lombokissues
Collaborator

๐Ÿ‘ค askoning ย  ๐Ÿ•— Jan 16, 2012 at 20:40 UTC

Fixed in 06dceeb, thanks to Jappe

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

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Jan 16, 2012 at 21:10 UTC

Sweet! Thanks!

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Jan 17, 2012 at 09:09 UTC

Nope, this isn't fixed. I just tried git cloning the repo, building it myself and I still can't rename anything.

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Jan 17, 2012 at 09:10 UTC

Actually, I take that back. This is fixed. Renaming a member variable isn't fixed.

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Jan 19, 2012 at 13:37 UTC

This should be fixed in 0.10.8, together with issue #398, issue #359, and issue #336 (these were all related).

@lombokissues
Collaborator

๐Ÿ‘ค r.spilker ย  ๐Ÿ•— Jan 19, 2012 at 16:03 UTC

I think renaming a field is still broken, not sure though.

@lombokissues
Collaborator

๐Ÿ‘ค latchkey ย  ๐Ÿ•— Jan 19, 2012 at 17:01 UTC

Renaming a field is definitely broken as of a couple of days ago (I tried with latest head) @ see ๏นŸ137

@lombokissues
Collaborator

End of migration

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