Community
Participate
Working Groups
When refactoring is triggered on a parent segement of a qualified name, the rename linked mode throws an IllegalStateException. Reproducible in Xtend, dmodel etc., e.g. class X extends javaPackage.JavaClass {} where JavaClass is an existing Java class. Trigger refactoring on "javaPackage" -> Exception: Caused by: java.lang.IllegalStateException: Current selection is not within any linked editing position at org.eclipse.xtext.ui.refactoring.ui.RenameLinkedMode.start(RenameLinkedMode.java:82) at org.eclipse.xtext.ui.refactoring.ui.RenameRefactoringController$1.run(RenameRefactoringController.java:105) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) ... 51 more The cursor was inside 'example'. After that failure, other attempts give me java.lang.NullPointerException at org.eclipse.xtext.ui.refactoring.ui.RenameRefactoringController.startRefactoring(RenameRefactoringController.java:66) at org.eclipse.xtext.ui.refactoring.ui.RenameRefactoringController.startLinkedEditing(RenameRefactoringController.java:94) at org.eclipse.xtext.ui.refactoring.ui.RenameRefactoringController.startRefactoring(RenameRefactoringController.java:57) at org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler.startRenameElement(DefaultRenameElementHandler.java:80) at org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler.execute(DefaultRenameElementHandler.java:59)
*** Bug 354731 has been marked as a duplicate of this bug. ***
Continued from bug 354731
How should the implementation behave in this case. I think it is unpossible to find out what element leaded to a special part of a qualified name. Should the refactoring just jump to the offset of the last segment of a qualified name? Or should the refactoring open a dialog to point out that a refactoring is not possible. Or should the refactoring just not respond?
This should already be fixed on HEAD. The last segment is selected in this case. Please reopen if the problem persists.
Closing all bugs that were set to RESOLVED before Neon.0