Class AbstractTimeGraphView

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.tracecompass.tmf.ui.views.TmfView
org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView
All Implemented Interfaces:
EventListener, org.eclipse.core.resources.IResourceChangeListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, ITmfComponent, ITmfAllowMultiple, ITmfFilterableControl, ITmfPinnable, ITmfTimeAligned, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
Direct Known Subclasses:
AbstractStateSystemTimeGraphView, BaseDataProviderTimeGraphView

public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeAligned, ITmfAllowMultiple, ITmfPinnable, org.eclipse.core.resources.IResourceChangeListener, ITmfFilterableControl
An abstract view all time graph views can inherit This view contains a time graph viewer.
  • Constructor Details

    • AbstractTimeGraphView

      public AbstractTimeGraphView(String id, TimeGraphPresentationProvider pres)
      Constructs a time graph view that contains a time graph viewer. By default, the view uses a single default column in the name space that shows the time graph entry name. To use multiple columns and/or customized label texts, the subclass constructor must call setTreeColumns(String[]) and/or setTreeLabelProvider(TreeLabelProvider).
      Parameters:
      id - The id of the view
      pres - The presentation provider
  • Method Details

    • getTimeGraphViewer

      public TimeGraphViewer getTimeGraphViewer()
      Getter for the time graph viewer
      Returns:
      The time graph viewer
      Since:
      4.1
    • getTrace

      public ITmfTrace getTrace()
      Description copied from interface: ITmfPinnable
      Gets the trace displayed in the view.
      Specified by:
      getTrace in interface ITmfPinnable
      Returns:
      the trace
      Since:
      3.2
    • setLegendProvider

      public void setLegendProvider(ITimeGraphLegendProvider legendProvider)
      Sets the legend provider
      Parameters:
      legendProvider - the legend provider
      Since:
      3.3
    • createPartControl

      public void createPartControl(org.eclipse.swt.widgets.Composite parent)
      Specified by:
      createPartControl in interface org.eclipse.ui.IWorkbenchPart
      Overrides:
      createPartControl in class TmfView
    • setFocus

      public void setFocus()
      Specified by:
      setFocus in interface org.eclipse.ui.IWorkbenchPart
      Specified by:
      setFocus in class org.eclipse.ui.part.WorkbenchPart
    • dispose

      public void dispose()
      Description copied from class: TmfView
      Disposes this view and de-registers itself from the signal manager
      Specified by:
      dispose in interface ITmfComponent
      Specified by:
      dispose in interface org.eclipse.ui.IWorkbenchPart
      Overrides:
      dispose in class TmfView
    • resourceChanged

      public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
      Specified by:
      resourceChanged in interface org.eclipse.core.resources.IResourceChangeListener
      Since:
      2.0
    • traceOpened

      public void traceOpened(TmfTraceOpenedSignal signal)
      Handler for the trace opened signal.
      Parameters:
      signal - The incoming signal
    • traceSelected

      public void traceSelected(TmfTraceSelectedSignal signal)
      Handler for the trace selected signal
      Parameters:
      signal - The incoming signal
    • traceClosed

      public void traceClosed(TmfTraceClosedSignal signal)
      Trace is closed: clear the data structures and the view
      Parameters:
      signal - the signal received
    • traceUpdated

      public void traceUpdated(TmfTraceUpdatedSignal signal)
      Trace is updated: update the view range
      Parameters:
      signal - the signal received
      Since:
      3.1
    • selectionRangeUpdated

      public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal)
      Handler for the selection range signal.
      Parameters:
      signal - The signal that's received
      Since:
      1.0
    • windowRangeUpdated

      public void windowRangeUpdated(TmfWindowRangeUpdatedSignal signal)
      Handler for the window range signal.
      Parameters:
      signal - The signal that's received
      Since:
      1.0
    • updateTimeFormat

      public void updateTimeFormat(TmfTimestampFormatUpdateSignal signal)
      Parameters:
      signal - the format of the timestamps was updated.
    • markerEventSourceUpdated

      public void markerEventSourceUpdated(TmfMarkerEventSourceUpdatedSignal signal)
      A marker event source has been updated
      Parameters:
      signal - the signal
      Since:
      2.1
    • getTimeViewAlignmentInfo

      public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo()
      Description copied from interface: ITmfTimeAligned
      Get the time alignment information. The view provides information about where the time-axis is in addition to information necessary to decide whether or not views should be time-aligned with each other (Shell, location).
      Specified by:
      getTimeViewAlignmentInfo in interface ITmfTimeAligned
      Returns:
      the time alignment information
      Since:
      1.0
    • getAvailableWidth

      public int getAvailableWidth(int requestedOffset)
      Description copied from interface: ITmfTimeAligned
      Get the available width for the specified time-axis offset. The implementation should return the width that would be available if the time-axis was to be at that offset. When about to perform a re-alignment, the alignment algorithm will choose the narrowest width to accommodate all views.
      Specified by:
      getAvailableWidth in interface ITmfTimeAligned
      Parameters:
      requestedOffset - the requested time-axis offset. Greater or equal to zero.
      Returns:
      the available width. Should be greater or equal to zero.
      Since:
      1.0
    • performAlign

      public void performAlign(int offset, int width)
      Description copied from interface: ITmfTimeAligned
      Perform the alignment by moving the time-axis to the specified offset and the resizing it to the specified width. Implementations should handle cases were the requested width is greater than the width of the view. For example, Integer.MAX_VALUE can be requested in order to obtain the largest width possible.
      Specified by:
      performAlign in interface ITmfTimeAligned
      Parameters:
      offset - the time-axis offset. Greater or equal to zero.
      width - the time-axis width. Greater or equal to zero. Can be Integer.MAX_VALUE.
      Since:
      1.0
    • setPinned

      public void setPinned(ITmfTrace trace)
      Description copied from interface: ITmfPinnable
      Set the pin state.
      Specified by:
      setPinned in interface ITmfPinnable
      Parameters:
      trace - The trace that the view should be pinned to, or null to unpin
    • isDirty

      public boolean isDirty()
      Returns whether or not the time graph view is dirty. The time graph view is considered dirty if it has yet to completely update its model. This method is meant to be used by tests in order to know when it is safe to proceed. Note: If a trace is smaller than the initial window range (see ITmfTrace.getInitialRangeOffset()) this method will return true forever.
      Returns:
      true if the time graph view has yet to completely update its model, false otherwise
      Since:
      2.0
    • restartZoomThread

      public void restartZoomThread()
      Cancel and restart the zoom thread.
      Since:
      4.0
    • addPaintListener

      public void addPaintListener(org.eclipse.swt.events.PaintListener listener)
      Add a paint listener to the view
      Parameters:
      listener - The paint listener
      Since:
      4.0
    • getFilterAction

      public org.eclipse.jface.action.Action getFilterAction()
      Description copied from interface: ITmfFilterableControl
      Get the action to execute when the users asks for a filter
      Specified by:
      getFilterAction in interface ITmfFilterableControl
      Returns:
      The action to execute
    • filterUpdated

      public void filterUpdated(String regex, Set<@NonNull String> filterRegexes)
      Description copied from interface: ITmfFilterableControl
      The filters were updated by the user. This is where the view can act on the filters entered by the user.
      Specified by:
      filterUpdated in interface ITmfFilterableControl
      Parameters:
      regex - The filter being entered in the textbox
      filterRegexes - The saved filters, after the user has pressed enter on the filter box.
    • regexFilterApplied

      public void regexFilterApplied(org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal signal)
      Set or remove the global regex filter value
      Parameters:
      signal - the signal carrying the regex value
      Since:
      4.2
    • selectionChanged

      public void selectionChanged(TmfDataModelSelectedSignal signal)
      Signal indicating a data model element was selected somewhere
      Parameters:
      signal - the signal carrying the select data model metadata
      Since:
      4.2
    • getAdapter

      public <T> T getAdapter(Class<T> adapter)
      Specified by:
      getAdapter in interface org.eclipse.core.runtime.IAdaptable
      Overrides:
      getAdapter in class org.eclipse.ui.part.WorkbenchPart