Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359931 - [block selection] Projection Viewer invokes AutoEditStrategies twice when in Block Selection Mode
Summary: [block selection] Projection Viewer invokes AutoEditStrategies twice when in ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6.2+   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 363194 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-04 18:43 EDT by Jeremy Flicker CLA
Modified: 2011-12-13 08:51 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Flicker CLA 2011-10-04 18:43:05 EDT
Build Identifier: Version: 3.6.1 Build id: M20100909-0800

In the method ProjectionViewer.handleVerifyEvent(VerifyEvent)

It is possible for the super.handleVerifyEvent to be invoked twice.
This can result in two customizeDocumentCommand sessions, which in turn can result in double insertions into a projection viewer when there are AutoEditStrategies that act on the forwarded DocumentCommand.

In my editor, i have an AutoEditStrategy that customizes the DocumentCommand in order to customize the text that is inserted into the editor when the user types.  This behavior is causing duplicating effects in the editor when in Block Selection Mode, for example, the user presses the letter 'd' and two 'dd' is inserted into the editor. 

Reproducible: Always

Steps to Reproduce:
1. Create an editor with an AutoEditStrategy
2. Have that strategy invoke the addCommand() method on the document command to add an additional text insert/deletion
3. Set the doit flag to the original DocumentCommand to false
4. You will then see duplicate insertions when the user types a key in the editor when they are in block selection mode
Comment 1 Dani Megert CLA 2011-10-10 09:20:09 EDT
Fixed in master: 53acc00120134b42b3d43456552c500c757ac621
Comment 2 Dani Megert CLA 2011-10-26 04:14:41 EDT
Verified in 3.8-I20111025-1800 through code inspection.
Comment 3 John W Snyder CLA 2011-11-08 11:30:22 EST
Created Bug 363194 for backport to Eclipse 3.6.2
Comment 4 Dani Megert CLA 2011-11-09 02:45:30 EST
*** Bug 363194 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2011-12-13 08:51:18 EST
Fixed in R3_6_maintenance: 80740f3f67927d8e2b8506ebc1e2f0504feb40eb
Fixed in R3_7_maintenance: 382d4127323d0b2621a3336b3122a60194a7f372