1 /*******************************************************************************
2 * Copyright (c) 2012 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
.internal
.lttng2
.kernel
.ui
.views
.resources
;
15 import java
.util
.ArrayList
;
16 import java
.util
.Arrays
;
17 import java
.util
.HashMap
;
18 import java
.util
.Iterator
;
19 import java
.util
.List
;
22 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
23 import org
.eclipse
.core
.runtime
.NullProgressMonitor
;
24 import org
.eclipse
.jface
.action
.Action
;
25 import org
.eclipse
.jface
.action
.IToolBarManager
;
26 import org
.eclipse
.jface
.action
.Separator
;
27 import org
.eclipse
.linuxtools
.internal
.lttng2
.kernel
.ui
.Messages
;
28 import org
.eclipse
.linuxtools
.internal
.lttng2
.kernel
.ui
.views
.resources
.ResourcesEntry
.Type
;
29 import org
.eclipse
.linuxtools
.lttng2
.kernel
.core
.trace
.Attributes
;
30 import org
.eclipse
.linuxtools
.lttng2
.kernel
.core
.trace
.CtfKernelTrace
;
31 import org
.eclipse
.linuxtools
.tmf
.core
.ctfadaptor
.CtfTmfTimestamp
;
32 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEvent
;
33 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEvent
;
34 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimeRange
;
35 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
36 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.AttributeNotFoundException
;
37 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.StateValueTypeException
;
38 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.TimeRangeException
;
39 import org
.eclipse
.linuxtools
.tmf
.core
.interval
.ITmfStateInterval
;
40 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfExperimentSelectedSignal
;
41 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfRangeSynchSignal
;
42 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalHandler
;
43 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTimeSynchSignal
;
44 import org
.eclipse
.linuxtools
.tmf
.core
.statesystem
.IStateSystemQuerier
;
45 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfTrace
;
46 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.TmfExperiment
;
47 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.TmfView
;
48 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.ITimeGraphRangeListener
;
49 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.ITimeGraphTimeListener
;
50 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.StateItem
;
51 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphPresentationProvider
;
52 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphRangeUpdateEvent
;
53 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphTimeEvent
;
54 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphViewer
;
55 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
56 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeGraphEntry
;
57 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.TimeEvent
;
58 import org
.eclipse
.swt
.SWT
;
59 import org
.eclipse
.swt
.graphics
.RGB
;
60 import org
.eclipse
.swt
.widgets
.Composite
;
61 import org
.eclipse
.swt
.widgets
.Display
;
62 import org
.eclipse
.ui
.IActionBars
;
64 public class ResourcesView
extends TmfView
{
66 // ------------------------------------------------------------------------
68 // ------------------------------------------------------------------------
73 public static final String ID
= "org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"; //$NON-NLS-1$
78 private static final long INITIAL_WINDOW_OFFSET
= (1L * 100 * 1000 * 1000); // .1sec
80 // ------------------------------------------------------------------------
82 // ------------------------------------------------------------------------
84 // The time graph viewer
85 TimeGraphViewer fTimeGraphViewer
;
87 // The selected experiment
88 private TmfExperiment
<ITmfEvent
> fSelectedExperiment
;
90 // The time graph entry list
91 private ArrayList
<TraceEntry
> fEntryList
;
94 private long fStartTime
;
97 private long fEndTime
;
100 private int fDisplayWidth
;
102 // The next resource action
103 private Action fNextResourceAction
;
105 // The previous resource action
106 private Action fPreviousResourceAction
;
109 private ZoomThread fZoomThread
;
111 // ------------------------------------------------------------------------
113 // ------------------------------------------------------------------------
115 private class TraceEntry
implements ITimeGraphEntry
{
116 private CtfKernelTrace fTrace
;
117 public ArrayList
<ResourcesEntry
> fChildren
;
120 public TraceEntry(CtfKernelTrace trace
, String name
) {
122 fChildren
= new ArrayList
<ResourcesEntry
>();
127 public ITimeGraphEntry
getParent() {
132 public boolean hasChildren() {
133 return fChildren
!= null && fChildren
.size() > 0;
137 public ResourcesEntry
[] getChildren() {
138 return fChildren
.toArray(new ResourcesEntry
[0]);
142 public String
getName() {
147 public long getStartTime() {
152 public long getEndTime() {
157 public Iterator
<ITimeEvent
> getTimeEventsIterator() {
162 public <T
extends ITimeEvent
> Iterator
<T
> getTimeEventsIterator(long startTime
, long stopTime
, long visibleDuration
) {
166 public CtfKernelTrace
getTrace() {
170 public void addChild(ResourcesEntry entry
) {
172 for (index
= 0; index
< fChildren
.size(); index
++) {
173 ResourcesEntry other
= fChildren
.get(index
);
174 if (entry
.getType().compareTo(other
.getType()) < 0) {
176 } else if (entry
.getType().equals(other
.getType())) {
177 if (entry
.getId() < other
.getId()) {
182 entry
.setParent(this);
183 fChildren
.add(index
, entry
);
187 private class ZoomThread
extends Thread
{
188 private long fZoomStartTime
;
189 private long fZoomEndTime
;
190 private IProgressMonitor fMonitor
;
192 public ZoomThread(long startTime
, long endTime
) {
193 super("ResourcesView zoom"); //$NON-NLS-1$
194 fZoomStartTime
= startTime
;
195 fZoomEndTime
= endTime
;
196 fMonitor
= new NullProgressMonitor();
201 if (fEntryList
== null) {
204 long resolution
= Math
.max(1, (fZoomEndTime
- fZoomStartTime
) / fDisplayWidth
);
205 for (TraceEntry traceEntry
: fEntryList
) {
206 for (ITimeGraphEntry child
: traceEntry
.getChildren()) {
207 ResourcesEntry entry
= (ResourcesEntry
) child
;
208 if (fMonitor
.isCanceled()) {
211 List
<ITimeEvent
> zoomedEventList
= getEventList(entry
, fZoomStartTime
, fZoomEndTime
, resolution
, true, fMonitor
);
212 if (fMonitor
.isCanceled()) {
215 entry
.setZoomedEventList(zoomedEventList
);
221 public void cancel() {
222 fMonitor
.setCanceled(true);
226 // ------------------------------------------------------------------------
228 // ------------------------------------------------------------------------
230 public ResourcesView() {
232 fDisplayWidth
= Display
.getDefault().getBounds().width
;
235 // ------------------------------------------------------------------------
237 // ------------------------------------------------------------------------
240 * @see org.eclipse.linuxtools.tmf.ui.views.TmfView#createPartControl(org.eclipse.swt.widgets.Composite)
243 public void createPartControl(Composite parent
) {
244 fTimeGraphViewer
= new TimeGraphViewer(parent
, SWT
.NONE
);
246 fTimeGraphViewer
.setTimeGraphProvider(new TimeGraphPresentationProvider() {
247 private static final String UNKNOWN
= "UNKNOWN"; //$NON-NLS-1$
248 private static final String IDLE
= "IDLE"; //$NON-NLS-1$
249 private static final String BUSY
= "BUSY"; //$NON-NLS-1$
250 private static final String INTERRUPTED
= "INTERRUPTED"; //$NON-NLS-1$
251 private static final String RAISED
= "RAISED"; //$NON-NLS-1$
252 private static final String ACTIVE
= "ACTIVE"; //$NON-NLS-1$
255 public String
getStateTypeName() {
256 return Messages
.ResourcesView_stateTypeName
;
260 public String
getEventName(ITimeEvent event
) {
261 if (event
instanceof ResourcesEvent
) {
262 ResourcesEvent resourcesEvent
= (ResourcesEvent
) event
;
263 if (resourcesEvent
.getType() == Type
.CPU
) {
264 int currentThread
= resourcesEvent
.getValue();
265 if (currentThread
== 0) {
270 } else if (resourcesEvent
.getType() == Type
.IRQ
|| resourcesEvent
.getType() == Type
.SOFT_IRQ
) {
271 int cpu
= resourcesEvent
.getValue();
272 if (cpu
== Attributes
.SOFT_IRQ_RAISED
) {
284 public Map
<String
, String
> getEventHoverToolTipInfo(ITimeEvent event
) {
285 return new HashMap
<String
, String
>();
289 public StateItem
[] getStateTable() {
290 return new StateItem
[] {
291 new StateItem(new RGB(100, 100, 100), UNKNOWN
),
292 new StateItem(new RGB(200, 200, 200), IDLE
),
293 new StateItem(new RGB(0, 200, 0), BUSY
),
294 new StateItem(new RGB(200, 100, 100), INTERRUPTED
),
295 new StateItem(new RGB(200, 200, 0), RAISED
),
296 new StateItem(new RGB(200, 150, 100), ACTIVE
)
301 public int getStateTableIndex(ITimeEvent event
) {
302 if (event
instanceof ResourcesEvent
) {
303 ResourcesEvent resourcesEvent
= (ResourcesEvent
) event
;
304 if (resourcesEvent
.getType() == Type
.CPU
) {
305 int currentThread
= resourcesEvent
.getValue();
306 if (currentThread
== 0) {
311 } else if (resourcesEvent
.getType() == Type
.IRQ
|| resourcesEvent
.getType() == Type
.SOFT_IRQ
) {
312 int cpu
= resourcesEvent
.getValue();
313 if (cpu
== Attributes
.SOFT_IRQ_RAISED
) {
325 fTimeGraphViewer
.setTimeCalendarFormat(true);
327 fTimeGraphViewer
.addRangeListener(new ITimeGraphRangeListener() {
329 public void timeRangeUpdated(TimeGraphRangeUpdateEvent event
) {
330 long startTime
= event
.getStartTime();
331 long endTime
= event
.getEndTime();
332 TmfTimeRange range
= new TmfTimeRange(new CtfTmfTimestamp(startTime
), new CtfTmfTimestamp(endTime
));
333 TmfTimestamp time
= new CtfTmfTimestamp(fTimeGraphViewer
.getSelectedTime());
334 broadcast(new TmfRangeSynchSignal(ResourcesView
.this, range
, time
));
335 startZoomThread(startTime
, endTime
);
339 fTimeGraphViewer
.addTimeListener(new ITimeGraphTimeListener() {
341 public void timeSelected(TimeGraphTimeEvent event
) {
342 long time
= event
.getTime();
343 broadcast(new TmfTimeSynchSignal(ResourcesView
.this, new CtfTmfTimestamp(time
)));
347 final Thread thread
= new Thread("ResourcesView build") { //$NON-NLS-1$
350 if (TmfExperiment
.getCurrentExperiment() != null) {
351 selectExperiment(TmfExperiment
.getCurrentExperiment());
357 // View Action Handling
359 contributeToActionBars();
363 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
366 public void setFocus() {
367 fTimeGraphViewer
.setFocus();
370 // ------------------------------------------------------------------------
372 // ------------------------------------------------------------------------
375 public void experimentSelected(final TmfExperimentSelectedSignal
<?
extends TmfEvent
> signal
) {
376 if (signal
.getExperiment().equals(fSelectedExperiment
)) {
380 final Thread thread
= new Thread("ResourcesView build") { //$NON-NLS-1$
383 selectExperiment(signal
.getExperiment());
390 public void synchToTime(final TmfTimeSynchSignal signal
) {
391 if (signal
.getSource() == this) {
394 final long time
= signal
.getCurrentTime().normalize(0, -9).getValue();
395 Display
.getDefault().asyncExec(new Runnable() {
398 if (fTimeGraphViewer
.getControl().isDisposed()) {
401 fTimeGraphViewer
.setSelectedTime(time
, true);
407 public void synchToRange(final TmfRangeSynchSignal signal
) {
408 if (signal
.getSource() == this) {
411 final long startTime
= signal
.getCurrentRange().getStartTime().normalize(0, -9).getValue();
412 final long endTime
= signal
.getCurrentRange().getEndTime().normalize(0, -9).getValue();
413 final long time
= signal
.getCurrentTime().normalize(0, -9).getValue();
414 Display
.getDefault().asyncExec(new Runnable() {
417 if (fTimeGraphViewer
.getControl().isDisposed()) {
420 fTimeGraphViewer
.setStartFinishTime(startTime
, endTime
);
421 fTimeGraphViewer
.setSelectedTime(time
, true);
422 startZoomThread(startTime
, endTime
);
427 // ------------------------------------------------------------------------
429 // ------------------------------------------------------------------------
431 @SuppressWarnings("unchecked")
432 private void selectExperiment(TmfExperiment
<?
> experiment
) {
433 fStartTime
= Long
.MAX_VALUE
;
434 fEndTime
= Long
.MIN_VALUE
;
435 fSelectedExperiment
= (TmfExperiment
<ITmfEvent
>) experiment
;
436 fEntryList
= new ArrayList
<TraceEntry
>();
437 for (ITmfTrace
<?
> trace
: experiment
.getTraces()) {
438 if (trace
instanceof CtfKernelTrace
) {
439 CtfKernelTrace ctfKernelTrace
= (CtfKernelTrace
) trace
;
440 TraceEntry groupEntry
= new TraceEntry(ctfKernelTrace
, trace
.getName());
441 fEntryList
.add(groupEntry
);
442 IStateSystemQuerier ssq
= ctfKernelTrace
.getStateSystem();
443 long startTime
= ssq
.getStartTime();
444 long endTime
= ssq
.getCurrentEndTime() + 1;
445 fStartTime
= Math
.min(fStartTime
, startTime
);
446 fEndTime
= Math
.max(fEndTime
, endTime
);
447 List
<Integer
> cpuQuarks
= ssq
.getQuarks(Attributes
.CPUS
, "*"); //$NON-NLS-1$
448 ResourcesEntry
[] cpuEntries
= new ResourcesEntry
[cpuQuarks
.size()];
449 for (int i
= 0; i
< cpuQuarks
.size(); i
++) {
450 int cpuQuark
= cpuQuarks
.get(i
);
451 int cpu
= Integer
.parseInt(ssq
.getAttributeName(cpuQuark
));
452 ResourcesEntry entry
= new ResourcesEntry(cpuQuark
, ctfKernelTrace
, Type
.CPU
, cpu
);
453 groupEntry
.addChild(entry
);
454 cpuEntries
[i
] = entry
;
456 List
<Integer
> irqQuarks
= ssq
.getQuarks(Attributes
.RESOURCES
, Attributes
.IRQS
, "*"); //$NON-NLS-1$
457 ResourcesEntry
[] irqEntries
= new ResourcesEntry
[irqQuarks
.size()];
458 for (int i
= 0; i
< irqQuarks
.size(); i
++) {
459 int irqQuark
= irqQuarks
.get(i
);
460 int irq
= Integer
.parseInt(ssq
.getAttributeName(irqQuark
));
461 ResourcesEntry entry
= new ResourcesEntry(irqQuark
, ctfKernelTrace
, Type
.IRQ
, irq
);
462 groupEntry
.addChild(entry
);
463 irqEntries
[i
] = entry
;
465 List
<Integer
> softIrqQuarks
= ssq
.getQuarks(Attributes
.RESOURCES
, Attributes
.SOFT_IRQS
, "*"); //$NON-NLS-1$
466 ResourcesEntry
[] softIrqEntries
= new ResourcesEntry
[softIrqQuarks
.size()];
467 for (int i
= 0; i
< softIrqQuarks
.size(); i
++) {
468 int softIrqQuark
= softIrqQuarks
.get(i
);
469 int softIrq
= Integer
.parseInt(ssq
.getAttributeName(softIrqQuark
));
470 ResourcesEntry entry
= new ResourcesEntry(softIrqQuark
, ctfKernelTrace
, Type
.SOFT_IRQ
, softIrq
);
471 groupEntry
.addChild(entry
);
472 softIrqEntries
[i
] = entry
;
476 refresh(INITIAL_WINDOW_OFFSET
);
477 for (TraceEntry traceEntry
: fEntryList
) {
478 CtfKernelTrace ctfKernelTrace
= ((TraceEntry
) traceEntry
).getTrace();
479 IStateSystemQuerier ssq
= ctfKernelTrace
.getStateSystem();
480 long startTime
= ssq
.getStartTime();
481 long endTime
= ssq
.getCurrentEndTime() + 1;
482 long resolution
= (endTime
- startTime
) / fDisplayWidth
;
483 for (ResourcesEntry entry
: traceEntry
.getChildren()) {
484 List
<ITimeEvent
> eventList
= getEventList(entry
, startTime
, endTime
, resolution
, false, new NullProgressMonitor());
485 entry
.setEventList(eventList
);
491 private List
<ITimeEvent
> getEventList(ResourcesEntry entry
, long startTime
, long endTime
, long resolution
, boolean includeNull
, IProgressMonitor monitor
) {
492 if (endTime
<= startTime
) {
495 IStateSystemQuerier ssq
= entry
.getTrace().getStateSystem();
496 List
<ITimeEvent
> eventList
= null;
497 int quark
= entry
.getQuark();
499 if (entry
.getType().equals(Type
.CPU
)) {
500 int currentThreadQuark
= ssq
.getQuarkRelative(quark
, Attributes
.CURRENT_THREAD
);
501 List
<ITmfStateInterval
> currentThreadIntervals
= ssq
.queryHistoryRange(currentThreadQuark
, startTime
, endTime
- 1, resolution
);
502 eventList
= new ArrayList
<ITimeEvent
>(currentThreadIntervals
.size());
503 long lastEndTime
= -1;
504 for (ITmfStateInterval currentThreadInterval
: currentThreadIntervals
) {
505 if (monitor
.isCanceled()) {
508 if (!currentThreadInterval
.getStateValue().isNull()) {
509 int currentThread
= currentThreadInterval
.getStateValue().unboxInt();
510 long time
= currentThreadInterval
.getStartTime();
511 long duration
= currentThreadInterval
.getEndTime() - time
+ 1;
512 if (lastEndTime
!= time
&& lastEndTime
!= -1) {
513 eventList
.add(new TimeEvent(entry
, lastEndTime
, time
- lastEndTime
));
515 eventList
.add(new ResourcesEvent(entry
, time
, duration
, currentThread
));
516 lastEndTime
= time
+ duration
;
519 } else if (entry
.getType().equals(Type
.IRQ
)) {
520 List
<ITmfStateInterval
> irqIntervals
= ssq
.queryHistoryRange(quark
, startTime
, endTime
- 1, resolution
);
521 eventList
= new ArrayList
<ITimeEvent
>(irqIntervals
.size());
522 long lastEndTime
= -1;
523 boolean lastIsNull
= true;
524 for (ITmfStateInterval irqInterval
: irqIntervals
) {
525 if (monitor
.isCanceled()) {
528 long time
= irqInterval
.getStartTime();
529 long duration
= irqInterval
.getEndTime() - time
+ 1;
530 if (!irqInterval
.getStateValue().isNull()) {
531 int cpu
= irqInterval
.getStateValue().unboxInt();
532 eventList
.add(new ResourcesEvent(entry
, time
, duration
, cpu
));
535 if (lastEndTime
!= time
&& lastEndTime
!= -1 && lastIsNull
) {
536 eventList
.add(new ResourcesEvent(entry
, lastEndTime
, time
- lastEndTime
, -1));
539 eventList
.add(new ResourcesEvent(entry
, time
, duration
));
543 lastEndTime
= time
+ duration
;
545 } else if (entry
.getType().equals(Type
.SOFT_IRQ
)) {
546 List
<ITmfStateInterval
> softIrqIntervals
= ssq
.queryHistoryRange(quark
, startTime
, endTime
- 1, resolution
);
547 eventList
= new ArrayList
<ITimeEvent
>(softIrqIntervals
.size());
548 long lastEndTime
= -1;
549 boolean lastIsNull
= true;
550 for (ITmfStateInterval softIrqInterval
: softIrqIntervals
) {
551 if (monitor
.isCanceled()) {
554 long time
= softIrqInterval
.getStartTime();
555 long duration
= softIrqInterval
.getEndTime() - time
+ 1;
556 if (!softIrqInterval
.getStateValue().isNull()) {
557 int cpu
= softIrqInterval
.getStateValue().unboxInt();
558 eventList
.add(new ResourcesEvent(entry
, time
, duration
, cpu
));
560 if (lastEndTime
!= time
&& lastEndTime
!= -1 && lastIsNull
) {
561 eventList
.add(new ResourcesEvent(entry
, lastEndTime
, time
- lastEndTime
, -1));
564 eventList
.add(new ResourcesEvent(entry
, time
, duration
));
568 lastEndTime
= time
+ duration
;
571 } catch (AttributeNotFoundException e
) {
573 } catch (TimeRangeException e
) {
575 } catch (StateValueTypeException e
) {
581 private void refresh(final long windowRange
) {
582 Display
.getDefault().asyncExec(new Runnable() {
585 if (fTimeGraphViewer
.getControl().isDisposed()) {
588 ITimeGraphEntry
[] entries
= fEntryList
.toArray(new ITimeGraphEntry
[0]);
589 Arrays
.sort(entries
);
590 fTimeGraphViewer
.setInput(entries
);
591 fTimeGraphViewer
.setTimeBounds(fStartTime
, fEndTime
);
593 long endTime
= fStartTime
+ windowRange
;
595 if (fEndTime
< endTime
) {
598 fTimeGraphViewer
.setStartFinishTime(fStartTime
, endTime
);
600 startZoomThread(fStartTime
, endTime
);
606 private void redraw() {
607 Display
.getDefault().asyncExec(new Runnable() {
610 if (fTimeGraphViewer
.getControl().isDisposed()) {
613 fTimeGraphViewer
.getControl().redraw();
614 fTimeGraphViewer
.getControl().update();
619 private void startZoomThread(long startTime
, long endTime
) {
620 if (fZoomThread
!= null) {
621 fZoomThread
.cancel();
623 fZoomThread
= new ZoomThread(startTime
, endTime
);
627 private void makeActions() {
628 fPreviousResourceAction
= fTimeGraphViewer
.getPreviousItemAction();
629 fPreviousResourceAction
.setText(Messages
.ResourcesView_previousResourceActionNameText
);
630 fPreviousResourceAction
.setToolTipText(Messages
.ResourcesView_previousResourceActionToolTipText
);
631 fNextResourceAction
= fTimeGraphViewer
.getNextItemAction();
632 fNextResourceAction
.setText(Messages
.ResourcesView_nextResourceActionNameText
);
633 fNextResourceAction
.setToolTipText(Messages
.ResourcesView_previousResourceActionToolTipText
);
636 private void contributeToActionBars() {
637 IActionBars bars
= getViewSite().getActionBars();
638 fillLocalToolBar(bars
.getToolBarManager());
641 private void fillLocalToolBar(IToolBarManager manager
) {
642 manager
.add(fTimeGraphViewer
.getShowLegendAction());
643 manager
.add(new Separator());
644 manager
.add(fTimeGraphViewer
.getResetScaleAction());
645 manager
.add(fTimeGraphViewer
.getPreviousEventAction());
646 manager
.add(fTimeGraphViewer
.getNextEventAction());
647 manager
.add(fPreviousResourceAction
);
648 manager
.add(fNextResourceAction
);
649 manager
.add(fTimeGraphViewer
.getZoomInAction());
650 manager
.add(fTimeGraphViewer
.getZoomOutAction());
651 manager
.add(new Separator());