Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 93267 - [typing] Incorrect cursor movement during Rename in File
Summary: [typing] Incorrect cursor movement during Rename in File
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Tom Hofmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-29 10:07 EDT by Darin Swanson CLA
Modified: 2005-05-02 11:44 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2005-04-29 10:07:26 EDT
I20050426-1700

Using the /buildfiles/exportplugin.xml of org.eclipse.ui.externaltools
Turn on occurrence marking in the Ant editor
Place the cursor in the first occurrence of "destdir" (line 11)
Alt-Shift-R
Tab twice to get to the third occurrence
Move the cursor in the middle of the third occurrence and start typing

The letters typed are added to the linked location but the cursor moves in the 
opposite direction that the user would expect.
Comment 1 Darin Swanson CLA 2005-04-29 10:09:22 EDT
Dani, could any of your team take a quick look at this to see where the error 
lies? I have done a pass and cannot see any obvious errors on the Ant use of 
the framework...but it is early :-)
Comment 2 Dani Megert CLA 2005-04-29 12:23:08 EDT
One difference I see is that you move the caret as soon as rename is invoked
(e.g. if the caret is inside the second match it gets moved at the end of the
first match). Changing this might "fix" the problem which looks like a bug in
our land. 

Feel free to move (but without the M7 target milestone ;-)
Comment 3 Darin Swanson CLA 2005-04-29 18:04:53 EDT
Cursor movement addressed with bug 89265...did not "fix" the problem :-)
Comment 4 Tom Hofmann CLA 2005-05-02 11:44:45 EDT
fixed > 20050502

LinkedModeUI registers an AutoEditVetoer that ensures that any changes during
linked edit mode are not directly executed by StyledText but only after any
postnotification changes have been executed. LinkedModeModel uses
PostNotificationChanges to implement the forwarding of modification to linked
positions.

The reason this did not work for Ant was that the AutoEditVetoer was only
installed for all content types in the default partitioning. Since Ant uses a
different partitioning, this did not work. 

The fix is to register the Vetoer for all content types for all possible
partitionings.