Rename refactoring takes the first occurance - even in comment - to start linked-editing
frankbenoit opened this issue · comments
// MyClass
class MyClass { ...
Starting renaming of MyClass
will start the renaming in the comment.
org.eclipse.xtext.ui.refactoring2.rename.DefaultLinkedPositionGroupCalculator2.createLinkedGroupFromReplaceEdits(List, XtextEditor, String, SubMonitor)
This takes the whole text of the "class", which is inclusive the comment. Then searches in there for "MyClass" and finds the position of the comment as the first (and only) result position.