Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 96490 - [linked mode][navigation] Consider linked position boundaries as word stops
Summary: [linked mode][navigation] Consider linked position boundaries as word stops
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-24 14:45 EDT by Randy Hudson CLA
Modified: 2007-10-09 07:04 EDT (History)
2 users (show)

See Also:


Attachments
Fix for the JavaEditor (4.62 KB, patch)
2007-04-25 14:18 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2005-05-24 14:45:39 EDT
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.
Comment 1 Tom Hofmann CLA 2005-05-24 14:55:35 EDT
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?
Comment 2 Dani Megert CLA 2005-05-24 15:09:39 EDT
>Propose to won't fix - Dani?
Almost ;-) I'm marking it as works for me (using Alt+Shift+ArrowUp).
Comment 3 Randy Hudson CLA 2005-05-24 15:17:54 EDT
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.
Comment 4 Randy Hudson CLA 2005-05-24 15:18:48 EDT
I think this is a valid enhancement. For example, you want to append to the 
variable name.
Comment 5 Randy Hudson CLA 2005-05-25 09:49:26 EDT
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.
Comment 6 Markus Keller CLA 2007-04-25 14:18:53 EDT
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.
Comment 7 Dani Megert CLA 2007-04-26 13:20:33 EDT
Thanks Markus.
Fix committed to HEAD for 3.3 M7.
Comment 8 Dani Megert CLA 2007-10-09 07:04:38 EDT
.