Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338162 - [TMF] Implementation of raw event viewer
Summary: [TMF] Implementation of raw event viewer
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LinuxTools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Francois Chouinard CLA
QA Contact: Francois Chouinard CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 348104
  Show dependency tree
 
Reported: 2011-02-24 17:39 EST by Patrick Tasse CLA
Modified: 2022-01-13 14:53 EST (History)
0 users

See Also:


Attachments
Proposed patch in org.eclipse.linuxtools.tmf.ui package (44.49 KB, patch)
2011-02-24 17:40 EST, Patrick Tasse CLA
fchouinard: iplog+
Details | Diff
Proposed patch in org.eclipse.linuxtools.tmf package (3.74 KB, patch)
2011-02-24 17:41 EST, Patrick Tasse CLA
fchouinard: iplog+
Details | Diff
Proposed patch in org.eclipse.linuxtools.tmf.tests package (1.19 KB, patch)
2011-02-24 17:42 EST, Patrick Tasse CLA
fchouinard: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Tasse CLA 2011-02-24 17:39:11 EST
Build Identifier: 

Submitting a patch to implement add the raw event viewer to TMF.

The raw event viewer is a widget that provides a scrollable text area displaying the rank-ordered raw text representation of TMF events. The raw text representation is by default the toString result of the event content, but each TmfEvent subclass can override this and provide any multi-line formatted text.

Navigation can be done using the keyboard, mouse wheel, and scroll bars.

Successive events have different backgrounds to help distinguish the boundaries of multi-line event's text. The selected event at the cursor position is highlighted, as is the event hovered by the mouse.

The raw event viewer manages an event cache that stores a limited number of event text lines to improve performance.

An API is provided to modify the trace displayed by the viewer and the trace event count.

An API is provided to select and reveal the visible event by rank.

A listener interface is provided to be notified of event selection rank changes.

The vertical scroll bar allows the user to position the viewer at a location specified by a percentage of the total trace. To achieve this, an interface is added to ITmfTrace that allows to get the location corresponding to a ratio (between 0.0 and 1.0), and to the get ratio corresponding to a location.

The default implementation in TmfTrace is to align the ratio with the event rank divided by the total number of events. However a trace can override this behavior depending on the underlying resource corresponding to the trace, for example calculating the ratio using the file position divided by the file size. This can allow the viewer to position itself at any position immediately, even while the trace indexing is ongoing and the final event count is still unknown.

However the drawback is that using the horizontal scroll bar, the selected event rank becomes unknown and the synchronization with other components using the widget is disconnected.

Furthermore, the behavior of the widget is undefined if the ratio to location relation changes over time (for example if it is based on file size and the file size increases by appending to the file).


Reproducible: Always
Comment 1 Patrick Tasse CLA 2011-02-24 17:40:37 EST
Created attachment 189754 [details]
Proposed patch in org.eclipse.linuxtools.tmf.ui package

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 2 Patrick Tasse CLA 2011-02-24 17:41:08 EST
Created attachment 189755 [details]
Proposed patch in org.eclipse.linuxtools.tmf package

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 3 Patrick Tasse CLA 2011-02-24 17:42:09 EST
Created attachment 189756 [details]
Proposed patch in org.eclipse.linuxtools.tmf.tests package

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 4 Francois Chouinard CLA 2011-03-29 18:23:13 EDT
Patch committed. Thanks Patrick.
Comment 5 Francois Chouinard CLA 2011-03-29 20:54:54 EDT
I wonder if the "raw view" shouldn't rather be a "detailed content" for the event selected. This would imply some improvements in the Event model.
Comment 6 Francois Chouinard CLA 2011-07-22 15:06:43 EDT
Delivered with 0.8