tmf: Fix Marker Set action handling
authorPatrick Tasse <patrick.tasse@gmail.com>
Mon, 20 Mar 2017 21:37:28 +0000 (17:37 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Wed, 22 Mar 2017 17:36:19 +0000 (13:36 -0400)
commitf16950def6078e1408d1380aabb29185b0ac30bd
tree2858a655aa1f2445909cadb6dda4db419b019e1e
parenta5c7cc1d8a6c2c3233615173e97d9d54b8c332d7
tmf: Fix Marker Set action handling

When changing the active marker set, it didn't update the marker sources
when the opened trace is an experiment. The action only updated the
marker sources from the opened traces, but the marker sets were created
on each trace in the experiment's trace set, for the default
implementation of AbstractTimeGraphView.getTracesToBuild().

It wouldn't be good enough to update the traces using
TmfTraceManager.getTraceSet(), since we don't know the implementation of
getTracesToBuild() for each view. Also, calling
TmfTraceAdapterManager.getAdapters() on each opened trace could actually
create new adapter instances that weren't yet needed.

Instead the ConfigurableMarkerEventSource instances should handle the
TmfMarkerEventSourceUpdatedSignal, and reconfigure themselves.

Also, since the Marker Set menu items are radio, selecting a new marker
set first executes the action on the menu item that is being unchecked.
The action now only executes for the menu item that is being checked.

Change-Id: Ic8fd21b930ec29e8a619cbcedea712d4b7ee4d86
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/93463
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/markers/ConfigurableMarkerEventSource.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/markers/ConfigurableMarkerEventSourceFactory.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/markers/MarkerUtils.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java
This page took 0.025627 seconds and 5 git commands to generate.