Community
Participate
Working Groups
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
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.
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.
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.
Patch committed. Thanks Patrick.
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.
Delivered with 0.8