Community
Participate
Working Groups
Now that "Rename in File" quickfix no longer selects the current token, I am trying to do it manually by typing CTRL+LEFT, CTRL+SHIFT+RIGHT. The problem with this is that it includes the whitespace coming after the variable, which is outside of the linked-edit box, and overwriting deactives the linked edit mode, which is not what I want. It should be easier to select a word. Perhaps "Next Word" should go to the end of the current word instead of the beginning of the next. Or, the linked edit box should be considered a word boundary.
This would require different word stops depending on whether the selection is to the left or to the right of the selection anchor (| marks the selection anchor, ¦ mark possible boundaries): - selection from the left |word¦ boundary¦ next¦ - jumping from the left (no selection) ¦word ¦boundary ¦next - selecting from the right ¦word ¦boundary ¦next| - jumping from the right (possibly, but not clear) word¦ boundary¦ next¦ Anyway, we discussed this at one point and decided this was a bad idea because no standard text editor does this. But: Try Alt+Shift+ArrowUp - this will select the java syntax element surrounding the caret, which is probably what you want to rename. Propose to won't fix - Dani?
>Propose to won't fix - Dani? Almost ;-) I'm marking it as works for me (using Alt+Shift+ArrowUp).
What about the other idea of clipping the next word location to the linked box range? That might be a simple case. In fact, it would be cool if I could press END or SHIFT+END inside the linked box and go/append to the end of the box.
I think this is a valid enhancement. For example, you want to append to the variable name.
I would like HOME and END to also work similarly to prev/next word. So if you press END, and the caret is inside the box, it should go to the end of the box. If you press END again, it goes to the end of the line.
Created attachment 64904 [details] Fix for the JavaEditor The fix is only active in Java editors if smart caret positioning in Java names is enabled. Smart Home/End with linked positions is bug 81790.
Thanks Markus. Fix committed to HEAD for 3.3 M7.
.