tmf: TmfTraceManager improvements
Since the #getCurrentContext() can change at any time, but the
trace context object itself is immutable, it's safer to expose
the context rather than individual getters.
Many views gather all available timestamps in the following fashion
(assuming here we "expand" the calls to getCurrentContext()):
selectionStart = tm.getCurrentContext().getSelectionStart();
selectionEnd = tm.getCurrentContext().getSelectionEnd();
windowStart = tm.getCurrentContext().getWindowRange().getStart();
windowEnd = tm.getCurrentContext().getWindowRange().getEnd();
...
If the context changes mid-way during these calls, the gathered time
ranges will be inconsistent. It'd be safer to extract the context
locally first.
Also updated the TmfTraceContext to return a TimeRange for the current
selection (it used to be a single timestamp, now we support a range).
This required updating the tests.
Change-Id: Ia44dc7157a2b98f320dcd92fd3856148dac4f47b
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/41986
Reviewed-by: Hudson CI
18 files changed:
This page took 0.031378 seconds and 5 git commands to generate.