1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson, École Polytechnique de Montréal
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 * Bernd Hufmann - Updated signal handling
12 * Geneviève Bastien - Move code to provide base classes for time graph view
13 * Marc-Andre Laperle - Add time zone preference
14 *******************************************************************************/
16 package org
.eclipse
.linuxtools
.tmf
.ui
.views
.timegraph
;
18 import java
.util
.ArrayList
;
19 import java
.util
.Arrays
;
20 import java
.util
.Collections
;
21 import java
.util
.Comparator
;
22 import java
.util
.HashMap
;
23 import java
.util
.List
;
26 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
27 import org
.eclipse
.core
.runtime
.NullProgressMonitor
;
28 import org
.eclipse
.jface
.action
.Action
;
29 import org
.eclipse
.jface
.action
.IStatusLineManager
;
30 import org
.eclipse
.jface
.action
.IToolBarManager
;
31 import org
.eclipse
.jface
.action
.Separator
;
32 import org
.eclipse
.jface
.viewers
.ILabelProviderListener
;
33 import org
.eclipse
.jface
.viewers
.ITableLabelProvider
;
34 import org
.eclipse
.jface
.viewers
.ITreeContentProvider
;
35 import org
.eclipse
.jface
.viewers
.Viewer
;
36 import org
.eclipse
.linuxtools
.tmf
.core
.ctfadaptor
.CtfTmfTimestamp
;
37 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfRangeSynchSignal
;
38 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalHandler
;
39 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTimeSynchSignal
;
40 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTimestampFormatUpdateSignal
;
41 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTraceClosedSignal
;
42 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTraceOpenedSignal
;
43 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTraceSelectedSignal
;
44 import org
.eclipse
.linuxtools
.tmf
.core
.timestamp
.ITmfTimestamp
;
45 import org
.eclipse
.linuxtools
.tmf
.core
.timestamp
.TmfTimeRange
;
46 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfTrace
;
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
.ITimeGraphSelectionListener
;
50 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.ITimeGraphTimeListener
;
51 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphCombo
;
52 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphPresentationProvider
;
53 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphRangeUpdateEvent
;
54 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphSelectionEvent
;
55 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.TimeGraphTimeEvent
;
56 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
57 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeGraphEntry
;
58 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.TimeGraphEntry
;
59 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.widgets
.Utils
.TimeFormat
;
60 import org
.eclipse
.swt
.SWT
;
61 import org
.eclipse
.swt
.graphics
.Image
;
62 import org
.eclipse
.swt
.widgets
.Composite
;
63 import org
.eclipse
.swt
.widgets
.Display
;
64 import org
.eclipse
.swt
.widgets
.TreeColumn
;
65 import org
.eclipse
.ui
.IActionBars
;
68 * An abstract view all time graph views can inherit
70 * This view contains a time graph combo, divided between a treeview on the
71 * left, showing entries and a canvas on the right to draw something for these
76 public abstract class AbstractTimeGraphView
extends TmfView
{
78 private final String
[] fColumns
;
79 private final String
[] fFilterColumns
;
88 // ------------------------------------------------------------------------
90 // ------------------------------------------------------------------------
92 /** The timegraph combo */
93 private TimeGraphCombo fTimeGraphCombo
;
95 /** The selected trace */
96 private ITmfTrace fTrace
;
98 /** The timegraph entry list */
99 private List
<TimeGraphEntry
> fEntryList
;
101 /** The trace to entry list hash map */
102 private final Map
<ITmfTrace
, List
<TimeGraphEntry
>> fEntryListMap
= new HashMap
<ITmfTrace
, List
<TimeGraphEntry
>>();
104 /* The trace to build thread hash map */
105 private final Map
<ITmfTrace
, BuildThread
> fBuildThreadMap
= new HashMap
<ITmfTrace
, BuildThread
>();
107 /** The start time */
108 private long fStartTime
;
111 private long fEndTime
;
113 /** The display width */
114 private final int fDisplayWidth
;
116 /** The zoom thread */
117 private ZoomThread fZoomThread
;
119 /** The next resource action */
120 private Action fNextResourceAction
;
122 /** The previous resource action */
123 private Action fPreviousResourceAction
;
125 /** The relative weight of the sash */
126 private int[] fWeight
= { 1, 1 };
128 /** A comparator class */
129 private Comparator
<ITimeGraphEntry
> fEntryComparator
= null;
131 /** The redraw state used to prevent unnecessary queuing of display runnables */
132 private State fRedrawState
= State
.IDLE
;
134 /** The redraw synchronization object */
135 private final Object fSyncObj
= new Object();
137 /** The presentation provider for this view */
138 private final TimeGraphPresentationProvider fPresentation
;
140 private TreeLabelProvider fLabelProvider
= new TreeLabelProvider();
142 // ------------------------------------------------------------------------
143 // Getters and setters
144 // ------------------------------------------------------------------------
147 * Getter for the time graph combo
149 * @return The Time graph combo
151 protected TimeGraphCombo
getTimeGraphCombo() {
152 return fTimeGraphCombo
;
156 * Sets the tree label provider
159 * The tree label provider
161 protected void setTreeLabelProvider(final TreeLabelProvider tlp
) {
162 fLabelProvider
= tlp
;
166 * Sets the relative weight of each part of the time graph combo
169 * The array of relative weights of each part of the combo
171 protected void setWeight(final int[] weights
) {
176 * Gets the display width
178 * @return the display width
180 protected int getDisplayWidth() {
181 return fDisplayWidth
;
185 * Gets the comparator for the entries
187 * @return The entry comparator
189 protected Comparator
<ITimeGraphEntry
> getEntryComparator() {
190 return fEntryComparator
;
194 * Sets the comparator class for the entries * Gets the display width
197 * A comparator object
199 protected void setEntryComparator(final Comparator
<ITimeGraphEntry
> comparator
) {
200 fEntryComparator
= comparator
;
204 * Gets the trace displayed in the view
208 protected ITmfTrace
getTrace() {
213 * Sets the trace to display
218 protected void setTrace(final ITmfTrace trace
) {
223 * Gets the start time
225 * @return The start time
227 protected long getStartTime() {
232 * Sets the start time
237 protected void setStartTime(long time
) {
244 * @return The end time
246 protected long getEndTime() {
256 protected void setEndTime(long time
) {
261 * Gets the entry list map
263 * @return the entry list map
265 protected Map
<ITmfTrace
, List
<TimeGraphEntry
>> getEntryListMap() {
266 return Collections
.unmodifiableMap(fEntryListMap
);
270 * Adds an entry to the entry list
275 * The list of time graph entries
277 protected void putEntryList(ITmfTrace trace
, List
<TimeGraphEntry
> list
) {
278 synchronized(fEntryListMap
) {
279 fEntryListMap
.put(trace
, list
);
284 * Text for the "next" button
286 * @return The "next" button text
288 protected String
getNextText() {
289 return Messages
.AbstractTimeGraphtView_NextText
;
293 * Tooltip for the "next" button
295 * @return Tooltip for the "next" button
297 protected String
getNextTooltip() {
298 return Messages
.AbstractTimeGraphView_NextTooltip
;
302 * Text for the "Previous" button
304 * @return The "Previous" button text
306 protected String
getPrevText() {
307 return Messages
.AbstractTimeGraphView_PreviousText
;
311 * Tooltip for the "previous" button
313 * @return Tooltip for the "previous" button
315 protected String
getPrevTooltip() {
316 return Messages
.AbstractTimeGraphView_PreviousTooltip
;
319 // ------------------------------------------------------------------------
321 // ------------------------------------------------------------------------
323 private class TreeContentProvider
implements ITreeContentProvider
{
326 public void dispose() {
330 public void inputChanged(Viewer viewer
, Object oldInput
, Object newInput
) {
334 public Object
[] getElements(Object inputElement
) {
335 return (ITimeGraphEntry
[]) inputElement
;
339 public Object
[] getChildren(Object parentElement
) {
340 ITimeGraphEntry entry
= (ITimeGraphEntry
) parentElement
;
341 List
<?
extends ITimeGraphEntry
> children
= entry
.getChildren();
342 return children
.toArray(new ITimeGraphEntry
[children
.size()]);
346 public Object
getParent(Object element
) {
347 ITimeGraphEntry entry
= (ITimeGraphEntry
) element
;
348 return entry
.getParent();
352 public boolean hasChildren(Object element
) {
353 ITimeGraphEntry entry
= (ITimeGraphEntry
) element
;
354 return entry
.hasChildren();
360 * Base class to provide the labels for the left tree view entry. Views
361 * extending this class typically need to override the getColumnText method
362 * if they have more than one column to display
364 protected static class TreeLabelProvider
implements ITableLabelProvider
{
367 public void addListener(ILabelProviderListener listener
) {
371 public void dispose() {
375 public boolean isLabelProperty(Object element
, String property
) {
380 public void removeListener(ILabelProviderListener listener
) {
384 public Image
getColumnImage(Object element
, int columnIndex
) {
389 public String
getColumnText(Object element
, int columnIndex
) {
390 TimeGraphEntry entry
= (TimeGraphEntry
) element
;
391 if (columnIndex
== 0) {
392 return entry
.getName();
394 return ""; //$NON-NLS-1$
399 private class BuildThread
extends Thread
{
400 private final ITmfTrace fBuildTrace
;
401 private final IProgressMonitor fMonitor
;
403 public BuildThread(final ITmfTrace trace
, final String name
) {
404 super(name
+ " build"); //$NON-NLS-1$
406 fMonitor
= new NullProgressMonitor();
411 buildEventList(fBuildTrace
, fMonitor
);
412 synchronized (fBuildThreadMap
) {
413 fBuildThreadMap
.remove(this);
417 public void cancel() {
418 fMonitor
.setCanceled(true);
422 private class ZoomThread
extends Thread
{
423 private final List
<TimeGraphEntry
> fZoomEntryList
;
424 private final long fZoomStartTime
;
425 private final long fZoomEndTime
;
426 private final long fResolution
;
427 private final IProgressMonitor fMonitor
;
429 public ZoomThread(List
<TimeGraphEntry
> entryList
, long startTime
, long endTime
, String name
) {
430 super(name
+ " zoom"); //$NON-NLS-1$
431 fZoomEntryList
= entryList
;
432 fZoomStartTime
= startTime
;
433 fZoomEndTime
= endTime
;
434 fResolution
= Math
.max(1, (fZoomEndTime
- fZoomStartTime
) / fDisplayWidth
);
435 fMonitor
= new NullProgressMonitor();
440 if (fZoomEntryList
== null) {
443 for (TimeGraphEntry entry
: fZoomEntryList
) {
444 if (fMonitor
.isCanceled()) {
447 zoom(entry
, fMonitor
);
451 private void zoom(TimeGraphEntry entry
, IProgressMonitor monitor
) {
452 if (fZoomStartTime
<= fStartTime
&& fZoomEndTime
>= fEndTime
) {
453 entry
.setZoomedEventList(null);
455 List
<ITimeEvent
> zoomedEventList
= getEventList(entry
, fZoomStartTime
, fZoomEndTime
, fResolution
, monitor
);
456 if (zoomedEventList
!= null) {
457 entry
.setZoomedEventList(zoomedEventList
);
461 for (TimeGraphEntry child
: entry
.getChildren()) {
462 if (fMonitor
.isCanceled()) {
465 zoom(child
, monitor
);
469 public void cancel() {
470 fMonitor
.setCanceled(true);
474 // ------------------------------------------------------------------------
476 // ------------------------------------------------------------------------
484 * The columns to display in the tree view on the left
486 * The columns list to filter the view
488 * The presentation provider
490 public AbstractTimeGraphView(String id
, String
[] cols
, String
[] filterCols
,
491 TimeGraphPresentationProvider pres
) {
494 fFilterColumns
= filterCols
;
495 fPresentation
= pres
;
496 fDisplayWidth
= Display
.getDefault().getBounds().width
;
499 // ------------------------------------------------------------------------
501 // ------------------------------------------------------------------------
504 public void createPartControl(Composite parent
) {
505 fTimeGraphCombo
= new TimeGraphCombo(parent
, SWT
.NONE
, fWeight
);
507 fTimeGraphCombo
.setTreeContentProvider(new TreeContentProvider());
509 fTimeGraphCombo
.setTreeLabelProvider(fLabelProvider
);
511 fTimeGraphCombo
.setTimeGraphProvider(fPresentation
);
513 fTimeGraphCombo
.setTreeColumns(fColumns
);
515 fTimeGraphCombo
.setFilterContentProvider(new TreeContentProvider());
517 fTimeGraphCombo
.setFilterLabelProvider(new TreeLabelProvider());
519 fTimeGraphCombo
.setFilterColumns(fFilterColumns
);
521 fTimeGraphCombo
.getTimeGraphViewer().addRangeListener(new ITimeGraphRangeListener() {
523 public void timeRangeUpdated(TimeGraphRangeUpdateEvent event
) {
524 final long startTime
= event
.getStartTime();
525 final long endTime
= event
.getEndTime();
526 TmfTimeRange range
= new TmfTimeRange(new CtfTmfTimestamp(startTime
), new CtfTmfTimestamp(endTime
));
527 broadcast(new TmfRangeSynchSignal(AbstractTimeGraphView
.this, range
));
528 if (fZoomThread
!= null) {
529 fZoomThread
.cancel();
531 startZoomThread(startTime
, endTime
);
535 fTimeGraphCombo
.getTimeGraphViewer().addTimeListener(new ITimeGraphTimeListener() {
537 public void timeSelected(TimeGraphTimeEvent event
) {
538 CtfTmfTimestamp startTime
= new CtfTmfTimestamp(event
.getBeginTime());
539 CtfTmfTimestamp endTime
= new CtfTmfTimestamp(event
.getEndTime());
540 broadcast(new TmfTimeSynchSignal(AbstractTimeGraphView
.this, startTime
, endTime
));
544 fTimeGraphCombo
.addSelectionListener(new ITimeGraphSelectionListener() {
546 public void selectionChanged(TimeGraphSelectionEvent event
) {
547 // ITimeGraphEntry selection = event.getSelection();
551 fTimeGraphCombo
.getTimeGraphViewer().setTimeFormat(TimeFormat
.CALENDAR
);
553 IStatusLineManager statusLineManager
= getViewSite().getActionBars().getStatusLineManager();
554 fTimeGraphCombo
.getTimeGraphViewer().getTimeGraphControl().setStatusLineManager(statusLineManager
);
556 // View Action Handling
558 contributeToActionBars();
560 ITmfTrace trace
= getActiveTrace();
562 traceSelected(new TmfTraceSelectedSignal(this, trace
));
565 // make selection available to other views
566 getSite().setSelectionProvider(fTimeGraphCombo
.getTreeViewer());
570 public void setFocus() {
571 fTimeGraphCombo
.setFocus();
574 // ------------------------------------------------------------------------
576 // ------------------------------------------------------------------------
579 * Handler for the trace opened signal.
582 * The incoming signal
586 public void traceOpened(TmfTraceOpenedSignal signal
) {
587 fTrace
= signal
.getTrace();
592 * Handler for the trace selected signal
595 * The incoming signal
598 public void traceSelected(final TmfTraceSelectedSignal signal
) {
599 if (signal
.getTrace() == fTrace
) {
602 fTrace
= signal
.getTrace();
608 * Trace is closed: clear the data structures and the view
611 * the signal received
614 public void traceClosed(final TmfTraceClosedSignal signal
) {
615 synchronized (fBuildThreadMap
) {
616 BuildThread buildThread
= fBuildThreadMap
.remove(signal
.getTrace());
617 if (buildThread
!= null) {
618 buildThread
.cancel();
621 synchronized (fEntryListMap
) {
622 fEntryListMap
.remove(signal
.getTrace());
624 if (signal
.getTrace() == fTrace
) {
628 if (fZoomThread
!= null) {
629 fZoomThread
.cancel();
636 * Handler for the time synch signal
639 * The signal that's received
642 public void synchToTime(final TmfTimeSynchSignal signal
) {
643 if (signal
.getSource() == this || fTrace
== null) {
646 final long beginTime
= signal
.getBeginTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
647 final long endTime
= signal
.getEndTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
649 Display
.getDefault().asyncExec(new Runnable() {
652 if (fTimeGraphCombo
.isDisposed()) {
655 if (beginTime
== endTime
) {
656 fTimeGraphCombo
.getTimeGraphViewer().setSelectedTime(beginTime
, true);
658 fTimeGraphCombo
.getTimeGraphViewer().setSelectionRange(beginTime
, endTime
);
660 startZoomThread(fTimeGraphCombo
.getTimeGraphViewer().getTime0(), fTimeGraphCombo
.getTimeGraphViewer().getTime1());
662 synchingToTime(beginTime
);
668 * Handler for the range synch signal
671 * The signal that's received
674 public void synchToRange(final TmfRangeSynchSignal signal
) {
675 if (signal
.getSource() == this || fTrace
== null) {
678 if (signal
.getCurrentRange().getIntersection(fTrace
.getTimeRange()) == null) {
681 final long startTime
= signal
.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
682 final long endTime
= signal
.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
683 Display
.getDefault().asyncExec(new Runnable() {
686 if (fTimeGraphCombo
.isDisposed()) {
689 fTimeGraphCombo
.getTimeGraphViewer().setStartFinishTime(startTime
, endTime
);
690 startZoomThread(startTime
, endTime
);
696 * @param signal the format of the timestamps was updated.
699 public void updateTimeFormat( final TmfTimestampFormatUpdateSignal signal
){
700 this.fTimeGraphCombo
.refresh();
703 // ------------------------------------------------------------------------
705 // ------------------------------------------------------------------------
707 private void loadTrace() {
708 synchronized (fEntryListMap
) {
709 fEntryList
= fEntryListMap
.get(fTrace
);
710 if (fEntryList
== null) {
711 synchronized (fBuildThreadMap
) {
712 BuildThread buildThread
= new BuildThread(fTrace
, this.getName());
713 fBuildThreadMap
.put(fTrace
, buildThread
);
717 fStartTime
= fTrace
.getStartTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
718 fEndTime
= fTrace
.getEndTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
725 * Method called when synching to a given timestamp. Inheriting classes can
726 * perform actions here to update the view at the given timestamp.
729 * The currently selected time
731 protected void synchingToTime(long time
) {
736 * Build the entries list to show in this time graph
738 * Called from the BuildThread
741 * The trace being built
743 * The progress monitor object
745 protected abstract void buildEventList(final ITmfTrace trace
, IProgressMonitor monitor
);
748 * Gets the list of event for an entry in a given timerange
751 * The entry to get events for
753 * Start of the time range
755 * End of the time range
759 * The progress monitor object
760 * @return The list of events for the entry
762 protected abstract List
<ITimeEvent
> getEventList(TimeGraphEntry entry
,
763 long startTime
, long endTime
, long resolution
,
764 IProgressMonitor monitor
);
767 * Refresh the display
769 protected void refresh() {
770 Display
.getDefault().asyncExec(new Runnable() {
773 if (fTimeGraphCombo
.isDisposed()) {
776 ITimeGraphEntry
[] entries
= null;
777 synchronized (fEntryListMap
) {
778 fEntryList
= fEntryListMap
.get(fTrace
);
779 if (fEntryList
== null) {
780 fEntryList
= new ArrayList
<TimeGraphEntry
>();
782 entries
= fEntryList
.toArray(new ITimeGraphEntry
[0]);
784 if (fEntryComparator
!= null) {
785 Arrays
.sort(entries
, fEntryComparator
);
787 fTimeGraphCombo
.setInput(entries
);
788 fTimeGraphCombo
.getTimeGraphViewer().setTimeBounds(fStartTime
, fEndTime
);
790 long selectionBeginTime
= fTrace
== null ?
0 : fTraceManager
.getSelectionBeginTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
791 long selectionEndTime
= fTrace
== null ?
0 : fTraceManager
.getSelectionEndTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
792 long startTime
= fTrace
== null ?
0 : fTraceManager
.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
793 long endTime
= fTrace
== null ?
0 : fTraceManager
.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp
.NANOSECOND_SCALE
).getValue();
794 startTime
= Math
.max(startTime
, fStartTime
);
795 endTime
= Math
.min(endTime
, fEndTime
);
796 fTimeGraphCombo
.getTimeGraphViewer().setSelectionRange(selectionBeginTime
, selectionEndTime
);
797 fTimeGraphCombo
.getTimeGraphViewer().setStartFinishTime(startTime
, endTime
);
799 for (TreeColumn column
: fTimeGraphCombo
.getTreeViewer().getTree().getColumns()) {
803 startZoomThread(startTime
, endTime
);
811 protected void redraw() {
812 synchronized (fSyncObj
) {
813 if (fRedrawState
== State
.IDLE
) {
814 fRedrawState
= State
.BUSY
;
816 fRedrawState
= State
.PENDING
;
820 Display
.getDefault().asyncExec(new Runnable() {
823 if (fTimeGraphCombo
.isDisposed()) {
826 fTimeGraphCombo
.redraw();
827 fTimeGraphCombo
.update();
828 synchronized (fSyncObj
) {
829 if (fRedrawState
== State
.PENDING
) {
830 fRedrawState
= State
.IDLE
;
833 fRedrawState
= State
.IDLE
;
840 private void startZoomThread(long startTime
, long endTime
) {
841 if (fZoomThread
!= null) {
842 fZoomThread
.cancel();
844 fZoomThread
= new ZoomThread(fEntryList
, startTime
, endTime
, getName());
848 private void makeActions() {
849 fPreviousResourceAction
= fTimeGraphCombo
.getTimeGraphViewer().getPreviousItemAction();
850 fPreviousResourceAction
.setText(getPrevText());
851 fPreviousResourceAction
.setToolTipText(getPrevTooltip());
852 fNextResourceAction
= fTimeGraphCombo
.getTimeGraphViewer().getNextItemAction();
853 fNextResourceAction
.setText(getNextText());
854 fNextResourceAction
.setToolTipText(getNextTooltip());
857 private void contributeToActionBars() {
858 IActionBars bars
= getViewSite().getActionBars();
859 fillLocalToolBar(bars
.getToolBarManager());
862 private void fillLocalToolBar(IToolBarManager manager
) {
863 if (fFilterColumns
.length
> 0) {
864 manager
.add(fTimeGraphCombo
.getShowFilterAction());
866 manager
.add(fTimeGraphCombo
.getTimeGraphViewer().getShowLegendAction());
867 manager
.add(new Separator());
868 manager
.add(fTimeGraphCombo
.getTimeGraphViewer().getResetScaleAction());
869 manager
.add(fTimeGraphCombo
.getTimeGraphViewer().getPreviousEventAction());
870 manager
.add(fTimeGraphCombo
.getTimeGraphViewer().getNextEventAction());
871 manager
.add(fPreviousResourceAction
);
872 manager
.add(fNextResourceAction
);
873 manager
.add(fTimeGraphCombo
.getTimeGraphViewer().getZoomInAction());
874 manager
.add(fTimeGraphCombo
.getTimeGraphViewer().getZoomOutAction());
875 manager
.add(new Separator());