From 9b03edacd35a40eaaa1c1f38565b4600a67f2bbd Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Fri, 5 Dec 2014 21:03:43 -0500 Subject: tmf.ui: fix callsite and model lookup regression Change-Id: If1de2ec83fb2ec783cff6799f9d889de4bb8a97d Signed-off-by: Bernd Hufmann Reviewed-on: https://git.eclipse.org/r/37703 Tested-by: Hudson CI Reviewed-by: Matthew Khouzam Reviewed-by: Bernd Hufmann --- .../linuxtools/tmf/ui/viewers/events/TmfEventsTable.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java index ca21e89bf6..29e23dd6f8 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java @@ -1115,9 +1115,15 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS */ protected void setItemData(final TableItem item, final ITmfEvent event, final long rank) { String[] itemStrings = getItemStrings(fColumns, event); + + // Get the actual ITmfEvent from the CachedEvent + ITmfEvent tmfEvent = event; + if (event instanceof CachedEvent) { + tmfEvent = ((CachedEvent) event).event; + } item.setText(itemStrings); - item.setData(event); - item.setData(Key.TIMESTAMP, new TmfTimestamp(event.getTimestamp())); + item.setData(tmfEvent); + item.setData(Key.TIMESTAMP, new TmfTimestamp(tmfEvent.getTimestamp())); item.setData(Key.RANK, rank); final Collection markerIds = fBookmarksMap.get(rank); @@ -1144,14 +1150,13 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS boolean searchNoMatch = false; final ITmfFilter searchFilter = (ITmfFilter) fTable.getData(Key.SEARCH_OBJ); if (searchFilter != null) { - if (searchFilter.matches(event)) { + if (searchFilter.matches(tmfEvent)) { searchMatch = true; } else { searchNoMatch = true; } } - - final ColorSetting colorSetting = ColorSettingsManager.getColorSetting(event); + final ColorSetting colorSetting = ColorSettingsManager.getColorSetting(tmfEvent); if (searchNoMatch) { item.setForeground(colorSetting.getDimmedForegroundColor()); item.setBackground(colorSetting.getDimmedBackgroundColor()); -- cgit v1.2.3