Bug 268044 - StyledText should provide grouping information if multiple events are sent to describe one source modification
Summary: StyledText should provide grouping information if multiple events are sent to...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 03:52 EDT by Tom Hofmann CLA
Modified: 2019-09-06 15:29 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2009-03-11 03:52:42 EDT
Bug 267913 was fixed in order to allow TextViewer in jface.text to group a sequence of VerifyEvents that belong to one logical modification (key press) in the widget.

While this works, it requires TextViewer to run its own editing story, as it currently vetoes any VerifyEvents and then modifies the text content itself. This is necessary because there is no way to detect the last event of a sequence if it relies on the event timestamp.

It would be much easier for jface.text if the events shared a tag that would let TextViewer know that

1) an event is part of an event sequence
2) an event is the first or last event of the sequence

For example, the event could state the total number of events in the current sequence (1 for the trivial case), and the rank of the event in the sequence. Perhaps some of the many fields of VerifyEvent could be re-used for that purpose?
Comment 1 Felipe Heidrich CLA 2009-03-23 16:47:19 EDT
Do you need that information only during Verify ?

I guess we could use Event#index and Event#count to indicate for that.

Steve ?
Comment 2 Tom Hofmann CLA 2009-03-24 04:37:19 EDT
(In reply to comment #1)
> Do you need that information only during Verify ?

Hm, it would be enough to have it on Verify to tackle the problem we solved using the event time - however, from an API perspective, it would probably make sense to have the same information on other batched events, notably Modify.
Comment 3 Eclipse Webmaster CLA 2019-09-06 15:29:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.