1 /*******************************************************************************
2 * Copyright (c) 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.views
.timechart
;
15 import java
.util
.ArrayList
;
16 import java
.util
.HashMap
;
17 import java
.util
.Iterator
;
20 import org
.eclipse
.core
.resources
.IFile
;
21 import org
.eclipse
.core
.resources
.IMarker
;
22 import org
.eclipse
.core
.resources
.IMarkerDelta
;
23 import org
.eclipse
.core
.resources
.IResourceChangeEvent
;
24 import org
.eclipse
.core
.resources
.IResourceChangeListener
;
25 import org
.eclipse
.core
.resources
.IResourceDelta
;
26 import org
.eclipse
.core
.resources
.ResourcesPlugin
;
27 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEvent
;
28 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
29 import org
.eclipse
.linuxtools
.tmf
.core
.filter
.ITmfFilter
;
30 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalHandler
;
31 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTimeSynchSignal
;
32 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTraceSelectedSignal
;
33 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTraceUpdatedSignal
;
34 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfContext
;
35 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfTrace
;
36 import org
.eclipse
.linuxtools
.tmf
.ui
.editors
.ITmfTraceEditor
;
37 import org
.eclipse
.linuxtools
.tmf
.ui
.signal
.TmfTraceClosedSignal
;
38 import org
.eclipse
.linuxtools
.tmf
.ui
.signal
.TmfTraceOpenedSignal
;
39 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.events
.ITmfEventsFilterListener
;
40 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.events
.ITmfEventsFilterProvider
;
41 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.TmfView
;
42 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.colors
.ColorSetting
;
43 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.colors
.ColorSettingsManager
;
44 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.colors
.IColorSettingsListener
;
45 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.timechart
.TimeChartEvent
.RankRange
;
46 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.ITimeGraphPresentationProvider
;
47 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.ITimeGraphRangeListener
;
48 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.ITimeGraphSelectionListener
;
49 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.ITimeGraphTimeListener
;
50 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphRangeUpdateEvent
;
51 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphSelectionEvent
;
52 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphTimeEvent
;
53 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphViewer
;
54 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
55 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeGraphEntry
;
56 import org
.eclipse
.swt
.SWT
;
57 import org
.eclipse
.swt
.widgets
.Composite
;
58 import org
.eclipse
.swt
.widgets
.Display
;
59 import org
.eclipse
.ui
.IEditorPart
;
60 import org
.eclipse
.ui
.IEditorReference
;
62 public class TimeChartView
extends TmfView
implements ITimeGraphRangeListener
, ITimeGraphSelectionListener
, ITimeGraphTimeListener
, IColorSettingsListener
,
63 IResourceChangeListener
, ITmfEventsFilterListener
{
65 public static final String ID
= "org.eclipse.linuxtools.tmf.ui.views.timechart"; //$NON-NLS-1$
67 private static final int TIMESTAMP_SCALE
= -9;
69 private final int fDisplayWidth
;
70 private TimeGraphViewer fViewer
;
71 private final ArrayList
<TimeChartAnalysisEntry
> fTimeAnalysisEntries
= new ArrayList
<TimeChartAnalysisEntry
>();
72 private final Map
<ITmfTrace
<?
>, TimeChartDecorationProvider
> fDecorationProviders
= new HashMap
<ITmfTrace
<?
>, TimeChartDecorationProvider
>();
73 private ArrayList
<DecorateThread
> fDecorateThreads
;
74 private long fStartTime
= 0;
75 private long fStopTime
= Long
.MAX_VALUE
;
76 private boolean fRefreshBusy
= false;
77 private boolean fRefreshPending
= false;
78 private final Object fSyncObj
= new Object();
79 private ITimeGraphPresentationProvider fPresentationProvider
;
81 public TimeChartView() {
82 super("Time Chart"); //$NON-NLS-1$
83 fDisplayWidth
= Display
.getDefault().getBounds().width
;
87 public void createPartControl(Composite parent
) {
88 fViewer
= new TimeGraphViewer(parent
, SWT
.NONE
);
89 fPresentationProvider
= new TimeChartAnalysisProvider();
90 fViewer
.setTimeGraphProvider(fPresentationProvider
);
91 fViewer
.setTimeCalendarFormat(true);
92 fViewer
.addRangeListener(this);
93 fViewer
.addSelectionListener(this);
94 fViewer
.setMinimumItemWidth(1);
96 IEditorReference
[] editorReferences
= getSite().getPage().getEditorReferences();
97 for (IEditorReference editorReference
: editorReferences
) {
98 IEditorPart editor
= editorReference
.getEditor(false);
99 if (editor
instanceof ITmfTraceEditor
) {
100 ITmfTrace
<?
> trace
= ((ITmfTraceEditor
) editor
).getTrace();
102 IFile bookmarksFile
= ((ITmfTraceEditor
) editor
).getBookmarksFile();
103 TimeChartAnalysisEntry timeAnalysisEntry
= new TimeChartAnalysisEntry(trace
, fDisplayWidth
* 2);
104 fTimeAnalysisEntries
.add(timeAnalysisEntry
);
105 fDecorationProviders
.put(trace
, new TimeChartDecorationProvider(bookmarksFile
));
106 Thread thread
= new ProcessTraceThread(timeAnalysisEntry
);
111 fViewer
.setInput(fTimeAnalysisEntries
.toArray(new TimeChartAnalysisEntry
[0]));
113 fDecorateThreads
= new ArrayList
<DecorateThread
>();
114 ColorSettingsManager
.addColorSettingsListener(this);
115 ResourcesPlugin
.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent
.POST_CHANGE
);
119 public void dispose() {
120 ResourcesPlugin
.getWorkspace().removeResourceChangeListener(this);
121 for (DecorateThread thread
: fDecorateThreads
) {
124 ColorSettingsManager
.removeColorSettingsListener(this);
129 public void setFocus() {
133 private class ProcessTraceThread
extends Thread
{
135 private final TimeChartAnalysisEntry fTimeAnalysisEntry
;
137 public ProcessTraceThread(TimeChartAnalysisEntry timeAnalysisEntry
) {
138 super("ProcessTraceJob:" + timeAnalysisEntry
.getName()); //$NON-NLS-1$
139 fTimeAnalysisEntry
= timeAnalysisEntry
;
144 updateTraceEntry(fTimeAnalysisEntry
, Long
.MAX_VALUE
, 0, Long
.MAX_VALUE
);
148 private void updateTraceEntry(TimeChartAnalysisEntry timeAnalysisEntry
, long stopRank
, long startTime
, long stopTime
) {
149 ITmfTrace
<?
> trace
= timeAnalysisEntry
.getTrace();
150 TimeChartDecorationProvider decorationProvider
= fDecorationProviders
.get(trace
);
151 if (decorationProvider
== null) {
152 return; // the trace has been closed
154 ITmfContext context
= null;
155 // TmfTimestamp lastTimestamp = null;
156 boolean done
= false;
158 synchronized (timeAnalysisEntry
) {
159 if (timeAnalysisEntry
.getLastRank() >= trace
.getNbEvents()) {
163 if (context
== null || context
.getRank() != timeAnalysisEntry
.getLastRank()) {
164 if (context
!= null) {
167 if (timeAnalysisEntry
.getLastRank() != -1) {
168 context
= trace
.seekEvent(timeAnalysisEntry
.getLastRank());
170 // context = trace.seekLocation(null);
171 context
= trace
.seekEvent(0);
175 long rank
= context
.getRank();
176 ITmfEvent event
= trace
.getNext(context
);
181 // if (!event.getTimestamp().equals(lastTimestamp)) {
182 TimeChartEvent timeEvent
= new TimeChartEvent(timeAnalysisEntry
, event
, rank
, decorationProvider
);
183 if (timeEvent
.getTime() >= startTime
&& timeEvent
.getTime() <= stopTime
) {
184 timeAnalysisEntry
.addTraceEvent(timeEvent
);
186 // lastTimestamp = event.getTimestamp();
187 // } *** commented out so that color setting priority gets
188 // set even if the event has same time
189 if (context
.getRank() == trace
.getNbEvents() || context
.getRank() == stopRank
) {
193 if (context
.getRank() % trace
.getCacheSize() == 1) {
194 // break for UI refresh
198 // timeAnalysisEntry.setLastRank(Math.min(trace.getNbEvents(),
200 timeAnalysisEntry
.setLastRank(context
.getRank());
202 refreshViewer(false);
204 if (context
!= null) {
209 private void refreshViewer(boolean resetTimeIntervals
) {
210 synchronized (fSyncObj
) {
212 fRefreshPending
= true;
218 final boolean reset
= resetTimeIntervals
;
219 // Perform the refresh on the UI thread
220 Display
.getDefault().asyncExec(new Runnable() {
223 if (fViewer
.getControl().isDisposed())
225 fViewer
.setInput(fTimeAnalysisEntries
.toArray(new TimeChartAnalysisEntry
[0]));
227 fViewer
.resetStartFinishTime();
229 synchronized (fSyncObj
) {
230 fRefreshBusy
= false;
231 if (fRefreshPending
) {
232 fRefreshPending
= false;
233 refreshViewer(reset
);
240 private void itemize(long startTime
, long stopTime
) {
241 for (int i
= 0; i
< fTimeAnalysisEntries
.size(); i
++) {
242 Thread thread
= new ItemizeThread(fTimeAnalysisEntries
.get(i
), startTime
, stopTime
);
247 private class ItemizeThread
extends Thread
{
249 private final TimeChartAnalysisEntry fTimeAnalysisEntry
;
250 private final long fStartTime
;
251 private final long fStopTime
;
252 private final long fMaxDuration
;
254 private ItemizeThread(TimeChartAnalysisEntry timeAnalysisEntry
, long startTime
, long stopTime
) {
255 super("Itemize Thread:" + timeAnalysisEntry
.getName()); //$NON-NLS-1$
256 fTimeAnalysisEntry
= timeAnalysisEntry
;
257 fStartTime
= startTime
;
258 fStopTime
= stopTime
;
259 fMaxDuration
= 3 * (fStopTime
- fStartTime
) / fDisplayWidth
;
264 itemizeTraceEntry(fTimeAnalysisEntry
);
267 public void itemizeTraceEntry(TimeChartAnalysisEntry timeAnalysisEntry
) {
268 Iterator
<ITimeEvent
> iterator
= timeAnalysisEntry
.getTimeEventsIterator();
269 TimeChartEvent event
= null;
270 boolean hasNext
= true;
272 synchronized (timeAnalysisEntry
) {
273 while (hasNext
= iterator
.hasNext()) {
274 event
= (TimeChartEvent
) iterator
.next();
275 if (event
.getTime() + event
.getDuration() > fStartTime
&& event
.getTime() < fStopTime
&& event
.getDuration() > fMaxDuration
276 && event
.getNbEvents() > 1) {
282 if (event
.getItemizedEntry() == null) {
285 itemizeTraceEntry(event
.getItemizedEntry());
291 public void itemizeEvent(TimeChartEvent event
) {
292 synchronized (event
) {
293 if (event
.isItemizing()) {
296 event
.setItemizing(true);
298 TimeChartAnalysisEntry timeAnalysisEntry
= new TimeChartAnalysisEntry(fTimeAnalysisEntry
.getTrace(), (int) Math
.min(
299 event
.getNbEvents() + 1, fDisplayWidth
* 2));
300 synchronized (event
.getRankRangeList()) {
301 for (RankRange range
: event
.getRankRangeList()) {
302 timeAnalysisEntry
.setLastRank(range
.getFirstRank());
303 updateTraceEntry(timeAnalysisEntry
, range
.getLastRank() + 1, event
.getTime(), event
.getTime() + event
.getDuration());
306 event
.setItemizedEntry(timeAnalysisEntry
);
307 refreshViewer(false);
308 itemizeTraceEntry(timeAnalysisEntry
);
309 synchronized (event
) {
310 event
.setItemizing(false);
315 private void redecorate() {
316 synchronized (fDecorateThreads
) {
317 for (DecorateThread thread
: fDecorateThreads
) {
320 fDecorateThreads
.clear();
321 for (int i
= 0; i
< fTimeAnalysisEntries
.size(); i
++) {
322 DecorateThread thread
= new DecorateThread(fTimeAnalysisEntries
.get(i
));
324 fDecorateThreads
.add(thread
);
329 private class DecorateThread
extends Thread
{
330 private volatile boolean interrupted
= false;
331 private final TimeChartAnalysisEntry fTimeAnalysisEntry
;
332 private final TimeChartDecorationProvider fDecorationProvider
;
333 private ITmfContext fContext
;
334 private int fCount
= 0;
336 private DecorateThread(TimeChartAnalysisEntry timeAnalysisEntry
) {
337 super("Decorate Thread:" + timeAnalysisEntry
.getName()); //$NON-NLS-1$
338 fTimeAnalysisEntry
= timeAnalysisEntry
;
339 fDecorationProvider
= fDecorationProviders
.get(timeAnalysisEntry
.getTrace());
344 resetTraceEntry(fTimeAnalysisEntry
);
345 refreshViewer(false);
346 decorateTraceEntry(fTimeAnalysisEntry
, null);
347 refreshViewer(false);
348 synchronized (fDecorateThreads
) {
349 fDecorateThreads
.remove(this);
351 if (fContext
!= null) {
356 public void resetTraceEntry(TimeChartAnalysisEntry timeAnalysisEntry
) {
357 Iterator
<ITimeEvent
> iterator
= timeAnalysisEntry
.getTimeEventsIterator();
358 TimeChartEvent event
= null;
359 boolean hasNext
= true;
360 while (!interrupted
&& hasNext
) {
361 synchronized (timeAnalysisEntry
) {
362 while (hasNext
= iterator
.hasNext()) {
363 event
= (TimeChartEvent
) iterator
.next();
368 // TODO possible concurrency problem here with ItemizeJob
369 event
.setColorSettingPriority(ColorSettingsManager
.PRIORITY_NONE
);
370 if (event
.getItemizedEntry() != null) {
371 resetTraceEntry(event
.getItemizedEntry());
377 public void decorateTraceEntry(TimeChartAnalysisEntry timeAnalysisEntry
, TimeChartEvent parentEvent
) {
378 // Set max duration high to ensure iterator does not consider
380 Iterator
<ITimeEvent
> iterator
= timeAnalysisEntry
.getTimeEventsIterator(0, Long
.MAX_VALUE
, Long
.MAX_VALUE
);
381 TimeChartEvent event
= null;
382 int entryPriority
= ColorSettingsManager
.PRIORITY_NONE
;
383 boolean entryIsBookmarked
= false;
384 boolean entryIsVisible
= false;
385 boolean entryIsSearchMatch
= false;
386 boolean hasNext
= true;
387 while (!interrupted
&& hasNext
) {
388 synchronized (timeAnalysisEntry
) {
389 while (hasNext
= iterator
.hasNext()) {
390 event
= (TimeChartEvent
) iterator
.next();
395 // TODO possible concurrency problem here with ItemizeJob
396 if (event
.getItemizedEntry() == null) {
397 decorateEvent(event
);
399 decorateTraceEntry(event
.getItemizedEntry(), event
);
401 entryPriority
= Math
.min(entryPriority
, event
.getColorSettingPriority());
402 entryIsBookmarked
|= event
.isBookmarked();
403 entryIsVisible
|= event
.isVisible();
404 entryIsSearchMatch
|= event
.isSearchMatch();
405 if (++fCount
% timeAnalysisEntry
.getTrace().getCacheSize() == 0) {
406 refreshViewer(false);
410 if (parentEvent
!= null) {
411 parentEvent
.setColorSettingPriority(entryPriority
);
412 parentEvent
.setIsBookmarked(entryIsBookmarked
);
413 parentEvent
.setIsVisible(entryIsVisible
);
414 parentEvent
.setIsSearchMatch(entryIsSearchMatch
);
418 public void decorateEvent(TimeChartEvent timeChartEvent
) {
419 // TODO possible concurrency problem here with ItemizeJob
420 TimeChartAnalysisEntry timeAnalysisEntry
= (TimeChartAnalysisEntry
) timeChartEvent
.getEntry();
421 ITmfTrace
<?
> trace
= timeAnalysisEntry
.getTrace();
422 int priority
= ColorSettingsManager
.PRIORITY_NONE
;
423 boolean isBookmarked
= false;
424 boolean isVisible
= false;
425 boolean isSearchMatch
= false;
426 synchronized (timeChartEvent
.getRankRangeList()) {
427 for (RankRange range
: timeChartEvent
.getRankRangeList()) {
430 if (fContext
== null || fContext
.getRank() != range
.getFirstRank()) {
431 if (fContext
!= null) {
434 fContext
= trace
.seekEvent(range
.getFirstRank());
435 fContext
.setRank(range
.getFirstRank());
440 long rank
= fContext
.getRank();
441 ITmfEvent event
= trace
.getNext(fContext
);
445 long eventTime
= event
.getTimestamp().normalize(0, -9).getValue();
446 if (eventTime
>= timeChartEvent
.getTime() && eventTime
<= timeChartEvent
.getTime() + timeChartEvent
.getDuration()) {
447 priority
= Math
.min(priority
, ColorSettingsManager
.getColorSettingPriority(event
));
449 isBookmarked
|= fDecorationProvider
.isBookmark(rank
);
450 isVisible
|= fDecorationProvider
.isVisible(event
);
451 isSearchMatch
|= fDecorationProvider
.isSearchMatch(event
);
452 if (fContext
.getRank() > range
.getLastRank()) {
458 timeChartEvent
.setColorSettingPriority(priority
);
459 timeChartEvent
.setIsBookmarked(isBookmarked
);
460 timeChartEvent
.setIsVisible(isVisible
);
461 timeChartEvent
.setIsSearchMatch(isSearchMatch
);
464 public void cancel() {
469 // ------------------------------------------------------------------------
471 // ------------------------------------------------------------------------
474 public void timeRangeUpdated(TimeGraphRangeUpdateEvent event
) {
475 fStartTime
= event
.getStartTime();
476 fStopTime
= event
.getEndTime();
477 itemize(fStartTime
, fStopTime
);
481 public void selectionChanged(TimeGraphSelectionEvent event
) {
482 ITimeGraphEntry timeAnalysisEntry
= null;
483 if (event
.getSelection() instanceof TimeChartAnalysisEntry
) {
484 timeAnalysisEntry
= (TimeChartAnalysisEntry
) event
.getSelection();
485 } else if (event
.getSelection() instanceof TimeChartEvent
) {
486 timeAnalysisEntry
= ((TimeChartEvent
) event
.getSelection()).getEntry();
488 if (timeAnalysisEntry
instanceof TimeChartAnalysisEntry
) {
489 broadcast(new TmfTraceSelectedSignal(this, ((TimeChartAnalysisEntry
) timeAnalysisEntry
).getTrace()));
494 public void timeSelected(TimeGraphTimeEvent event
) {
495 broadcast(new TmfTimeSynchSignal(this, new TmfTimestamp(event
.getTime(), TIMESTAMP_SCALE
)));
499 public void colorSettingsChanged(ColorSetting
[] colorSettings
) {
500 // Set presentation provider again to trigger re-creation of new color settings which are stored
501 // in the TimeGraphControl class
502 fViewer
.setTimeGraphProvider(fPresentationProvider
);
507 public void resourceChanged(IResourceChangeEvent event
) {
508 for (IMarkerDelta delta
: event
.findMarkerDeltas(IMarker
.BOOKMARK
, false)) {
509 for (TimeChartDecorationProvider provider
: fDecorationProviders
.values()) {
510 if (delta
.getResource().equals(provider
.getBookmarksFile())) {
511 if (delta
.getKind() == IResourceDelta
.CHANGED
&& delta
.getMarker().getAttribute(IMarker
.LOCATION
, -1) != -1) {
512 provider
.refreshBookmarks();
513 } else if (delta
.getKind() == IResourceDelta
.REMOVED
) {
514 provider
.refreshBookmarks();
523 public void filterApplied(ITmfFilter filter
, ITmfTrace
<?
> trace
) {
524 TimeChartDecorationProvider decorationProvider
= fDecorationProviders
.get(trace
);
525 decorationProvider
.filterApplied(filter
);
530 public void searchApplied(ITmfFilter filter
, ITmfTrace
<?
> trace
) {
531 TimeChartDecorationProvider decorationProvider
= fDecorationProviders
.get(trace
);
532 decorationProvider
.searchApplied(filter
);
536 // ------------------------------------------------------------------------
538 // ------------------------------------------------------------------------
541 public void traceOpened(TmfTraceOpenedSignal signal
) {
542 if (fTimeAnalysisEntries
== null)
544 final ITmfTrace
<?
> trace
= signal
.getTrace();
545 final IFile bookmarksFile
= signal
.getBookmarksFile();
546 final ITmfEventsFilterProvider eventsFilterProvider
= signal
.getEventsFilterProvider();
547 TimeChartAnalysisEntry timeAnalysisEntry
= null;
548 for (int i
= 0; i
< fTimeAnalysisEntries
.size(); i
++) {
549 if (fTimeAnalysisEntries
.get(i
).getTrace().equals(trace
)) {
550 timeAnalysisEntry
= fTimeAnalysisEntries
.get(i
);
554 if (timeAnalysisEntry
== null) {
555 timeAnalysisEntry
= new TimeChartAnalysisEntry(trace
, fDisplayWidth
* 2);
556 fTimeAnalysisEntries
.add(timeAnalysisEntry
);
557 fDecorationProviders
.put(trace
, new TimeChartDecorationProvider(bookmarksFile
));
558 Thread thread
= new ProcessTraceThread(timeAnalysisEntry
);
562 if (eventsFilterProvider
!= null) {
563 eventsFilterProvider
.addEventsFilterListener(this);
568 public void traceClosed(TmfTraceClosedSignal signal
) {
569 if (fTimeAnalysisEntries
== null)
571 final ITmfTrace
<?
> trace
= signal
.getTrace();
572 for (int i
= 0; i
< fTimeAnalysisEntries
.size(); i
++) {
573 if (fTimeAnalysisEntries
.get(i
).getTrace().equals(trace
)) {
574 fTimeAnalysisEntries
.remove(i
);
575 fDecorationProviders
.remove(trace
);
583 public void traceSelected(TmfTraceSelectedSignal signal
) {
584 if (signal
.getSource() != this && fTimeAnalysisEntries
!= null) {
585 ITmfTrace
<?
> trace
= signal
.getTrace();
586 for (int i
= 0; i
< fTimeAnalysisEntries
.size(); i
++) {
587 if (fTimeAnalysisEntries
.get(i
).getTrace().equals(trace
)) {
588 fViewer
.setSelection(fTimeAnalysisEntries
.get(i
));
596 public void traceUpdated(TmfTraceUpdatedSignal signal
) {
597 if (fTimeAnalysisEntries
== null)
599 final ITmfTrace
<?
> trace
= signal
.getTrace();
600 for (int i
= 0; i
< fTimeAnalysisEntries
.size(); i
++) {
601 TimeChartAnalysisEntry timeAnalysisEntry
= fTimeAnalysisEntries
.get(i
);
602 if (timeAnalysisEntry
.getTrace().equals(trace
)) {
603 updateTraceEntry(timeAnalysisEntry
, Long
.MAX_VALUE
, 0, Long
.MAX_VALUE
);
610 public void currentTimeUpdated(TmfTimeSynchSignal signal
) {
611 long time
= signal
.getCurrentTime().normalize(0, TIMESTAMP_SCALE
).getValue();
612 fViewer
.setSelectedTime(time
, true, this);