eclipse / xtext

Eclipse Xtext™ is a language development framework

Home Page:http://www.eclipse.org/Xtext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.