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
.Comparator
;
18 import java
.util
.Iterator
;
19 import java
.util
.List
;
21 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
22 import org
.eclipse
.core
.runtime
.NullProgressMonitor
;
23 import org
.eclipse
.jface
.action
.Action
;
24 import org
.eclipse
.jface
.action
.IToolBarManager
;
25 import org
.eclipse
.jface
.action
.Separator
;
26 import org
.eclipse
.linuxtools
.internal
.lttng2
.kernel
.core
.Attributes
;
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
.CtfKernelTrace
;
30 import org
.eclipse
.linuxtools
.tmf
.core
.ctfadaptor
.CtfTmfTimestamp
;
31 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEvent
;
32 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEvent
;
33 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimeRange
;
34 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
35 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.AttributeNotFoundException
;
36 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.StateValueTypeException
;
37 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.TimeRangeException
;
38 import org
.eclipse
.linuxtools
.tmf
.core
.interval
.ITmfStateInterval
;
39 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfExperimentSelectedSignal
;
40 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfRangeSynchSignal
;
41 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalHandler
;
42 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfStateSystemBuildCompleted
;
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
.TimeGraphRangeUpdateEvent
;
51 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphTimeEvent
;
52 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphViewer
;
53 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
54 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeGraphEntry
;
55 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.TimeEvent
;
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
.IActionBars
;
62 * Main implementation for the LTTng 2.0 kernel Resource view
64 * @author Patrick Tasse
66 public class ResourcesView
extends TmfView
{
68 // ------------------------------------------------------------------------
70 // ------------------------------------------------------------------------
73 public static final String ID
= "org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"; //$NON-NLS-1$
75 /** Initial time range */
76 private static final long INITIAL_WINDOW_OFFSET
= (1L * 100 * 1000 * 1000); // .1sec
78 // ------------------------------------------------------------------------
80 // ------------------------------------------------------------------------
82 // The time graph viewer
83 TimeGraphViewer fTimeGraphViewer
;
85 // The selected experiment
86 private TmfExperiment
<ITmfEvent
> fSelectedExperiment
;
88 // The time graph entry list
89 private ArrayList
<TraceEntry
> fEntryList
;
91 // The time graph entry list synchronization object
92 final private Object fEntryListSyncObj
= new Object();
95 private long fStartTime
;
98 private long fEndTime
;
101 private final int fDisplayWidth
;
103 // The next resource action
104 private Action fNextResourceAction
;
106 // The previous resource action
107 private Action fPreviousResourceAction
;
110 private ZoomThread fZoomThread
;
112 // ------------------------------------------------------------------------
114 // ------------------------------------------------------------------------
116 private class TraceEntry
implements ITimeGraphEntry
{
118 private final CtfKernelTrace fTrace
;
120 private final long fTraceStartTime
;
122 private final long fTraceEndTime
;
123 // The children of the entry
124 private final ArrayList
<ResourcesEntry
> fChildren
;
126 private final String fName
;
128 public TraceEntry(CtfKernelTrace trace
, String name
, long startTime
, long endTime
) {
130 fChildren
= new ArrayList
<ResourcesEntry
>();
132 fTraceStartTime
= startTime
;
133 fTraceEndTime
= endTime
;
137 public ITimeGraphEntry
getParent() {
142 public boolean hasChildren() {
143 return fChildren
!= null && fChildren
.size() > 0;
147 public ResourcesEntry
[] getChildren() {
148 return fChildren
.toArray(new ResourcesEntry
[0]);
152 public String
getName() {
157 public long getStartTime() {
158 return fTraceStartTime
;
162 public long getEndTime() {
163 return fTraceEndTime
;
167 public boolean hasTimeEvents() {
172 public Iterator
<ITimeEvent
> getTimeEventsIterator() {
177 public <T
extends ITimeEvent
> Iterator
<T
> getTimeEventsIterator(long startTime
, long stopTime
, long visibleDuration
) {
181 public CtfKernelTrace
getTrace() {
185 public void addChild(ResourcesEntry entry
) {
187 for (index
= 0; index
< fChildren
.size(); index
++) {
188 ResourcesEntry other
= fChildren
.get(index
);
189 if (entry
.getType().compareTo(other
.getType()) < 0) {
191 } else if (entry
.getType().equals(other
.getType())) {
192 if (entry
.getId() < other
.getId()) {
197 entry
.setParent(this);
198 fChildren
.add(index
, entry
);
202 private static class TraceEntryComparator
implements Comparator
<ITimeGraphEntry
> {
204 public int compare(ITimeGraphEntry o1
, ITimeGraphEntry o2
) {
205 int result
= o1
.getStartTime() < o2
.getStartTime() ?
-1 : o1
.getStartTime() > o2
.getStartTime() ?
1 : 0;
207 result
= o1
.getName().compareTo(o2
.getName());
213 private class ZoomThread
extends Thread
{
214 private final long fZoomStartTime
;
215 private final long fZoomEndTime
;
216 private final IProgressMonitor fMonitor
;
218 public ZoomThread(long startTime
, long endTime
) {
219 super("ResourcesView zoom"); //$NON-NLS-1$
220 fZoomStartTime
= startTime
;
221 fZoomEndTime
= endTime
;
222 fMonitor
= new NullProgressMonitor();
227 ArrayList
<TraceEntry
> entryList
= null;
228 synchronized (fEntryListSyncObj
) {
229 entryList
= fEntryList
;
231 if (entryList
== null) {
234 long resolution
= Math
.max(1, (fZoomEndTime
- fZoomStartTime
) / fDisplayWidth
);
235 for (TraceEntry traceEntry
: entryList
) {
236 for (ITimeGraphEntry child
: traceEntry
.getChildren()) {
237 if (fMonitor
.isCanceled()) {
240 ResourcesEntry entry
= (ResourcesEntry
) child
;
241 if (fZoomStartTime
<= fStartTime
&& fZoomEndTime
>= fEndTime
) {
242 entry
.setZoomedEventList(null);
244 List
<ITimeEvent
> zoomedEventList
= getEventList(entry
, fZoomStartTime
, fZoomEndTime
, resolution
, true, fMonitor
);
245 if (zoomedEventList
!= null) {
246 entry
.setZoomedEventList(zoomedEventList
);
254 public void cancel() {
255 fMonitor
.setCanceled(true);
259 // ------------------------------------------------------------------------
261 // ------------------------------------------------------------------------
264 * Default constructor
266 public ResourcesView() {
268 fDisplayWidth
= Display
.getDefault().getBounds().width
;
271 // ------------------------------------------------------------------------
273 // ------------------------------------------------------------------------
276 * @see org.eclipse.linuxtools.tmf.ui.views.TmfView#createPartControl(org.eclipse.swt.widgets.Composite)
279 public void createPartControl(Composite parent
) {
280 fTimeGraphViewer
= new TimeGraphViewer(parent
, SWT
.NONE
);
282 fTimeGraphViewer
.setTimeGraphProvider(new ResourcesPresentationProvider());
284 fTimeGraphViewer
.setTimeCalendarFormat(true);
286 fTimeGraphViewer
.addRangeListener(new ITimeGraphRangeListener() {
288 public void timeRangeUpdated(TimeGraphRangeUpdateEvent event
) {
289 long startTime
= event
.getStartTime();
290 long endTime
= event
.getEndTime();
291 TmfTimeRange range
= new TmfTimeRange(new CtfTmfTimestamp(startTime
), new CtfTmfTimestamp(endTime
));
292 TmfTimestamp time
= new CtfTmfTimestamp(fTimeGraphViewer
.getSelectedTime());
293 broadcast(new TmfRangeSynchSignal(ResourcesView
.this, range
, time
));
294 startZoomThread(startTime
, endTime
);
298 fTimeGraphViewer
.addTimeListener(new ITimeGraphTimeListener() {
300 public void timeSelected(TimeGraphTimeEvent event
) {
301 long time
= event
.getTime();
302 broadcast(new TmfTimeSynchSignal(ResourcesView
.this, new CtfTmfTimestamp(time
)));
306 final Thread thread
= new Thread("ResourcesView build") { //$NON-NLS-1$
309 if (TmfExperiment
.getCurrentExperiment() != null) {
310 selectExperiment(TmfExperiment
.getCurrentExperiment());
316 // View Action Handling
318 contributeToActionBars();
322 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
325 public void setFocus() {
326 fTimeGraphViewer
.setFocus();
329 // ------------------------------------------------------------------------
331 // ------------------------------------------------------------------------
334 * Handler for the ExperimentSelected signal
337 * The incoming signal
340 public void experimentSelected(final TmfExperimentSelectedSignal
<?
extends TmfEvent
> signal
) {
341 if (signal
.getExperiment().equals(fSelectedExperiment
)) {
345 final Thread thread
= new Thread("ResourcesView build") { //$NON-NLS-1$
348 selectExperiment(signal
.getExperiment());
355 * Handler for the TimeSynch signal
358 * The incoming signal
361 public void synchToTime(final TmfTimeSynchSignal signal
) {
362 if (signal
.getSource() == this || fSelectedExperiment
== null) {
365 final long time
= signal
.getCurrentTime().normalize(0, -9).getValue();
366 Display
.getDefault().asyncExec(new Runnable() {
369 if (fTimeGraphViewer
.getControl().isDisposed()) {
372 fTimeGraphViewer
.setSelectedTime(time
, true);
373 startZoomThread(fTimeGraphViewer
.getTime0(), fTimeGraphViewer
.getTime1());
379 * Handler for the RangeSynch signal
382 * The incoming signal
385 public void synchToRange(final TmfRangeSynchSignal signal
) {
386 if (signal
.getSource() == this || fSelectedExperiment
== null) {
389 final long startTime
= signal
.getCurrentRange().getStartTime().normalize(0, -9).getValue();
390 final long endTime
= signal
.getCurrentRange().getEndTime().normalize(0, -9).getValue();
391 final long time
= signal
.getCurrentTime().normalize(0, -9).getValue();
392 Display
.getDefault().asyncExec(new Runnable() {
395 if (fTimeGraphViewer
.getControl().isDisposed()) {
398 fTimeGraphViewer
.setStartFinishTime(startTime
, endTime
);
399 fTimeGraphViewer
.setSelectedTime(time
, false);
400 startZoomThread(startTime
, endTime
);
406 * Handler for the StatesystemBuildCompleted signal
409 * The incoming signal
412 public void stateSystemBuildCompleted (final TmfStateSystemBuildCompleted signal
) {
413 final TmfExperiment
<?
> selectedExperiment
= fSelectedExperiment
;
414 if (selectedExperiment
== null) {
417 for (ITmfTrace
<?
> trace
: selectedExperiment
.getTraces()) {
418 if (trace
== signal
.getTrace() && trace
instanceof CtfKernelTrace
) {
419 final Thread thread
= new Thread("ResourcesView build") { //$NON-NLS-1$
423 selectExperiment(selectedExperiment
);
431 // ------------------------------------------------------------------------
433 // ------------------------------------------------------------------------
435 @SuppressWarnings("unchecked")
436 private void selectExperiment(TmfExperiment
<?
> experiment
) {
437 fStartTime
= Long
.MAX_VALUE
;
438 fEndTime
= Long
.MIN_VALUE
;
439 fSelectedExperiment
= (TmfExperiment
<ITmfEvent
>) experiment
;
440 ArrayList
<TraceEntry
> entryList
= new ArrayList
<TraceEntry
>();
441 for (ITmfTrace
<?
> trace
: experiment
.getTraces()) {
442 if (trace
instanceof CtfKernelTrace
) {
443 CtfKernelTrace ctfKernelTrace
= (CtfKernelTrace
) trace
;
444 IStateSystemQuerier ssq
= ctfKernelTrace
.getStateSystem();
445 long startTime
= ssq
.getStartTime();
446 long endTime
= ssq
.getCurrentEndTime() + 1;
447 TraceEntry groupEntry
= new TraceEntry(ctfKernelTrace
, trace
.getName(), startTime
, endTime
);
448 entryList
.add(groupEntry
);
449 fStartTime
= Math
.min(fStartTime
, startTime
);
450 fEndTime
= Math
.max(fEndTime
, endTime
);
451 List
<Integer
> cpuQuarks
= ssq
.getQuarks(Attributes
.CPUS
, "*"); //$NON-NLS-1$
452 ResourcesEntry
[] cpuEntries
= new ResourcesEntry
[cpuQuarks
.size()];
453 for (int i
= 0; i
< cpuQuarks
.size(); i
++) {
454 int cpuQuark
= cpuQuarks
.get(i
);
455 int cpu
= Integer
.parseInt(ssq
.getAttributeName(cpuQuark
));
456 ResourcesEntry entry
= new ResourcesEntry(cpuQuark
, ctfKernelTrace
, Type
.CPU
, cpu
);
457 groupEntry
.addChild(entry
);
458 cpuEntries
[i
] = entry
;
460 List
<Integer
> irqQuarks
= ssq
.getQuarks(Attributes
.RESOURCES
, Attributes
.IRQS
, "*"); //$NON-NLS-1$
461 ResourcesEntry
[] irqEntries
= new ResourcesEntry
[irqQuarks
.size()];
462 for (int i
= 0; i
< irqQuarks
.size(); i
++) {
463 int irqQuark
= irqQuarks
.get(i
);
464 int irq
= Integer
.parseInt(ssq
.getAttributeName(irqQuark
));
465 ResourcesEntry entry
= new ResourcesEntry(irqQuark
, ctfKernelTrace
, Type
.IRQ
, irq
);
466 groupEntry
.addChild(entry
);
467 irqEntries
[i
] = entry
;
469 List
<Integer
> softIrqQuarks
= ssq
.getQuarks(Attributes
.RESOURCES
, Attributes
.SOFT_IRQS
, "*"); //$NON-NLS-1$
470 ResourcesEntry
[] softIrqEntries
= new ResourcesEntry
[softIrqQuarks
.size()];
471 for (int i
= 0; i
< softIrqQuarks
.size(); i
++) {
472 int softIrqQuark
= softIrqQuarks
.get(i
);
473 int softIrq
= Integer
.parseInt(ssq
.getAttributeName(softIrqQuark
));
474 ResourcesEntry entry
= new ResourcesEntry(softIrqQuark
, ctfKernelTrace
, Type
.SOFT_IRQ
, softIrq
);
475 groupEntry
.addChild(entry
);
476 softIrqEntries
[i
] = entry
;
480 synchronized (fEntryListSyncObj
) {
481 fEntryList
= (ArrayList
<TraceEntry
>) entryList
.clone();
483 refresh(INITIAL_WINDOW_OFFSET
);
484 for (TraceEntry traceEntry
: entryList
) {
485 CtfKernelTrace ctfKernelTrace
= traceEntry
.getTrace();
486 IStateSystemQuerier ssq
= ctfKernelTrace
.getStateSystem();
487 long startTime
= ssq
.getStartTime();
488 long endTime
= ssq
.getCurrentEndTime() + 1;
489 long resolution
= (endTime
- startTime
) / fDisplayWidth
;
490 for (ResourcesEntry entry
: traceEntry
.getChildren()) {
491 List
<ITimeEvent
> eventList
= getEventList(entry
, startTime
, endTime
, resolution
, false, new NullProgressMonitor());
492 entry
.setEventList(eventList
);
498 private static List
<ITimeEvent
> getEventList(ResourcesEntry entry
,
499 long startTime
, long endTime
, long resolution
, boolean includeNull
,
500 IProgressMonitor monitor
) {
501 IStateSystemQuerier ssq
= entry
.getTrace().getStateSystem();
502 startTime
= Math
.max(startTime
, ssq
.getStartTime());
503 endTime
= Math
.min(endTime
, ssq
.getCurrentEndTime() + 1);
504 if (endTime
<= startTime
) {
507 List
<ITimeEvent
> eventList
= null;
508 int quark
= entry
.getQuark();
510 if (entry
.getType().equals(Type
.CPU
)) {
511 int statusQuark
= ssq
.getQuarkRelative(quark
, Attributes
.STATUS
);
512 List
<ITmfStateInterval
> statusIntervals
= ssq
.queryHistoryRange(statusQuark
, startTime
, endTime
- 1, resolution
);
513 eventList
= new ArrayList
<ITimeEvent
>(statusIntervals
.size());
514 long lastEndTime
= -1;
515 for (ITmfStateInterval statusInterval
: statusIntervals
) {
516 if (monitor
.isCanceled()) {
519 int status
= statusInterval
.getStateValue().unboxInt();
520 long time
= statusInterval
.getStartTime();
521 long duration
= statusInterval
.getEndTime() - time
+ 1;
522 if (!statusInterval
.getStateValue().isNull()) {
523 if (lastEndTime
!= time
&& lastEndTime
!= -1) {
524 eventList
.add(new TimeEvent(entry
, lastEndTime
, time
- lastEndTime
));
526 eventList
.add(new ResourcesEvent(entry
, time
, duration
, status
));
527 lastEndTime
= time
+ duration
;
530 eventList
.add(new ResourcesEvent(entry
, time
, duration
));
534 } else if (entry
.getType().equals(Type
.IRQ
)) {
535 List
<ITmfStateInterval
> irqIntervals
= ssq
.queryHistoryRange(quark
, startTime
, endTime
- 1, resolution
);
536 eventList
= new ArrayList
<ITimeEvent
>(irqIntervals
.size());
537 long lastEndTime
= -1;
538 boolean lastIsNull
= true;
539 for (ITmfStateInterval irqInterval
: irqIntervals
) {
540 if (monitor
.isCanceled()) {
543 long time
= irqInterval
.getStartTime();
544 long duration
= irqInterval
.getEndTime() - time
+ 1;
545 if (!irqInterval
.getStateValue().isNull()) {
546 int cpu
= irqInterval
.getStateValue().unboxInt();
547 eventList
.add(new ResourcesEvent(entry
, time
, duration
, cpu
));
550 if (lastEndTime
!= time
&& lastEndTime
!= -1 && lastIsNull
) {
551 eventList
.add(new ResourcesEvent(entry
, lastEndTime
, time
- lastEndTime
, -1));
554 eventList
.add(new ResourcesEvent(entry
, time
, duration
));
558 lastEndTime
= time
+ duration
;
560 } else if (entry
.getType().equals(Type
.SOFT_IRQ
)) {
561 List
<ITmfStateInterval
> softIrqIntervals
= ssq
.queryHistoryRange(quark
, startTime
, endTime
- 1, resolution
);
562 eventList
= new ArrayList
<ITimeEvent
>(softIrqIntervals
.size());
563 long lastEndTime
= -1;
564 boolean lastIsNull
= true;
565 for (ITmfStateInterval softIrqInterval
: softIrqIntervals
) {
566 if (monitor
.isCanceled()) {
569 long time
= softIrqInterval
.getStartTime();
570 long duration
= softIrqInterval
.getEndTime() - time
+ 1;
571 if (!softIrqInterval
.getStateValue().isNull()) {
572 int cpu
= softIrqInterval
.getStateValue().unboxInt();
573 eventList
.add(new ResourcesEvent(entry
, time
, duration
, cpu
));
575 if (lastEndTime
!= time
&& lastEndTime
!= -1 && lastIsNull
) {
576 eventList
.add(new ResourcesEvent(entry
, lastEndTime
, time
- lastEndTime
, -1));
579 eventList
.add(new ResourcesEvent(entry
, time
, duration
));
583 lastEndTime
= time
+ duration
;
586 } catch (AttributeNotFoundException e
) {
588 } catch (TimeRangeException e
) {
590 } catch (StateValueTypeException e
) {
596 private void refresh(final long windowRange
) {
597 Display
.getDefault().asyncExec(new Runnable() {
600 if (fTimeGraphViewer
.getControl().isDisposed()) {
603 ITimeGraphEntry
[] entries
= null;
604 synchronized (fEntryListSyncObj
) {
605 entries
= fEntryList
.toArray(new ITimeGraphEntry
[0]);
607 Arrays
.sort(entries
, new TraceEntryComparator());
608 fTimeGraphViewer
.setInput(entries
);
609 fTimeGraphViewer
.setTimeBounds(fStartTime
, fEndTime
);
611 long endTime
= fStartTime
+ windowRange
;
613 if (fEndTime
< endTime
) {
616 fTimeGraphViewer
.setStartFinishTime(fStartTime
, endTime
);
618 startZoomThread(fStartTime
, endTime
);
624 private void redraw() {
625 Display
.getDefault().asyncExec(new Runnable() {
628 if (fTimeGraphViewer
.getControl().isDisposed()) {
631 fTimeGraphViewer
.getControl().redraw();
632 fTimeGraphViewer
.getControl().update();
637 private void startZoomThread(long startTime
, long endTime
) {
638 if (fZoomThread
!= null) {
639 fZoomThread
.cancel();
641 fZoomThread
= new ZoomThread(startTime
, endTime
);
645 private void makeActions() {
646 fPreviousResourceAction
= fTimeGraphViewer
.getPreviousItemAction();
647 fPreviousResourceAction
.setText(Messages
.ResourcesView_previousResourceActionNameText
);
648 fPreviousResourceAction
.setToolTipText(Messages
.ResourcesView_previousResourceActionToolTipText
);
649 fNextResourceAction
= fTimeGraphViewer
.getNextItemAction();
650 fNextResourceAction
.setText(Messages
.ResourcesView_nextResourceActionNameText
);
651 fNextResourceAction
.setToolTipText(Messages
.ResourcesView_previousResourceActionToolTipText
);
654 private void contributeToActionBars() {
655 IActionBars bars
= getViewSite().getActionBars();
656 fillLocalToolBar(bars
.getToolBarManager());
659 private void fillLocalToolBar(IToolBarManager manager
) {
660 manager
.add(fTimeGraphViewer
.getShowLegendAction());
661 manager
.add(new Separator());
662 manager
.add(fTimeGraphViewer
.getResetScaleAction());
663 manager
.add(fTimeGraphViewer
.getPreviousEventAction());
664 manager
.add(fTimeGraphViewer
.getNextEventAction());
665 manager
.add(fPreviousResourceAction
);
666 manager
.add(fNextResourceAction
);
667 manager
.add(fTimeGraphViewer
.getZoomInAction());
668 manager
.add(fTimeGraphViewer
.getZoomOutAction());
669 manager
.add(new Separator());