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.uml2sd.SDView
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPartListener, 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

public class SDView extends org.eclipse.ui.part.ViewPart implements org.eclipse.ui.IPartListener

This class is a generic sequence diagram view implementation.

Version:
1.0
Author:
sveyrier
  • Field Details

    • UML2SD_VIEW_MODES_SEPARATOR

      public static final String UML2SD_VIEW_MODES_SEPARATOR
      Name of menu separator for view modes
      See Also:
    • UML2SD_WORKING_SET_SEPARATOR

      public static final String UML2SD_WORKING_SET_SEPARATOR
      Name of menu separator for working set
      See Also:
    • UML2SD_SORTING_SEPARATOR

      public static final String UML2SD_SORTING_SEPARATOR
      Name of menu separator for sorting
      See Also:
    • UML2SD_FILTERING_SEPARATOR

      public static final String UML2SD_FILTERING_SEPARATOR
      Name of menu separator for filtering
      See Also:
    • UML2SD_VIEW_LAYOUT_SEPARATOR

      public static final String UML2SD_VIEW_LAYOUT_SEPARATOR
      Name of menu separator for view layout
      See Also:
    • UML2SD_OTHER_COMMANDS_SEPARATOR

      public static final String UML2SD_OTHER_COMMANDS_SEPARATOR
      Name of menu separator for other commands
      See Also:
    • UML2SD_OTHER_PLUGINS_COMMANDS_SEPARATOR

      public static final String UML2SD_OTHER_PLUGINS_COMMANDS_SEPARATOR
      Name of menu separator for other plug-in commands
      See Also:
  • Constructor Details

    • SDView

      public SDView()
  • Method Details

    • createPartControl

      public void createPartControl(org.eclipse.swt.widgets.Composite c)
      Specified by:
      createPartControl in interface org.eclipse.ui.IWorkbenchPart
      Specified by:
      createPartControl in class org.eclipse.ui.part.WorkbenchPart
    • 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()
      Specified by:
      dispose in interface org.eclipse.ui.IWorkbenchPart
      Overrides:
      dispose in class org.eclipse.ui.part.WorkbenchPart
    • getSDWidget

      public SDWidget getSDWidget()
      Returns the SD widget.
      Returns:
      The SD widget.
    • setSDFindProvider

      public void setSDFindProvider(ISDFindProvider provider)
      Set the find provider for the opened sequence diagram viewer
      If the provider is not set, the find menu item will not be available in the viewer
      A find provider is called back when the user perform a find action
      The find provider is responsible to move the sequence diagram to the GraphNode which match the find criteria as well as to highlight the GraphNode
      Parameters:
      provider - the search provider
    • setExtendedFindProvider

      public void setExtendedFindProvider(IExtendedFindProvider provider)
      Set the find provider for the opened sequence diagram viewer
      If the provider is not set, the find menu item will not be available in the viewer
      A find provider is called back when the user perform a find action
      If the extended find provider is set, it replaces the regular find provider (sdFindProvider).
      Parameters:
      provider - The provider to set
    • getExtendedFindProvider

      public IExtendedFindProvider getExtendedFindProvider()
      Returns the extended find provider
      Returns:
      extended find provider.
    • resetProviders

      public void resetProviders()
      Resets all providers.
    • setSDFilterProvider

      public void setSDFilterProvider(ISDFilterProvider provider)
      Set the filter provider for the opened sequence diagram viewer
      If the provider is not set, the filter menu item will not be available in the viewer
      A filter provider is called back when the user perform a filter action
      Parameters:
      provider - the filter provider
    • setExtendedFilterProvider

      public void setExtendedFilterProvider(IExtendedFilterProvider provider)
      Sets the extended filter provider for the opened sequence diagram viewer.
      Parameters:
      provider - The provider to set
    • getExtendedFilterProvider

      public IExtendedFilterProvider getExtendedFilterProvider()
      Returns the extended find provider.
      Returns:
      The extended find provider.
    • setCollapsingProvider

      public void setCollapsingProvider(ISDCollapseProvider provider)
      Register the given provider to support Drag and Drop collapsing. This provider is responsible of updating the Frame.
      Parameters:
      provider - - the provider to register
    • setSDPagingProvider

      public void setSDPagingProvider(ISDPagingProvider provider)
      Set the page provider for the opened sequence diagram viewer
      If the sequence diagram provided (see setFrame) need to be split in many parts, a paging provider must be provided in order to handle page change requested by the user
      Set a page provider will create the next and previous page buttons in the viewer coolBar
      Parameters:
      provider - the paging provider
    • getSDPagingProvider

      public ISDPagingProvider getSDPagingProvider()
      Returns the current page provider for the view
      Returns:
      the paging provider
    • getSDFindProvider

      public ISDFindProvider getSDFindProvider()
      Returns the current find provider for the view
      Returns:
      the find provider
    • getSDFilterProvider

      public ISDFilterProvider getSDFilterProvider()
      Returns the current filter provider for the view
      Returns:
      the filter provider
    • setSDExtendedActionBarProvider

      public void setSDExtendedActionBarProvider(ISDExtendedActionBarProvider provider)
      Set the extended action bar provider for the opened sequence diagram viewer
      This allow to add programmatically actions in the coolbar and/or in the drop-down menu
      Parameters:
      provider - the search provider
    • getSDExtendedActionBarProvider

      public ISDExtendedActionBarProvider getSDExtendedActionBarProvider()
      Returns the current extended action bar provider for the view
      Returns:
      the extended action bar provider
    • setSDPropertiesProvider

      public void setSDPropertiesProvider(ISDPropertiesProvider provider)
      Set the properties view provider for the opened sequence diagram viewer
      Parameters:
      provider - the properties provider
    • getSDPropertiesProvider

      public ISDPropertiesProvider getSDPropertiesProvider()
      Returns the current extended action bar provider for the view.
      Returns:
      the extended action bar provider
    • getMenuManager

      public org.eclipse.jface.action.MenuManager getMenuManager()
      Returns the context menu manager
      Returns:
      the menu manager
    • setEnableAction

      public void setEnableAction(String actionName, boolean state)
      Enables/Disables an action with given name.
      Parameters:
      actionName - The action name
      state - true or false
    • updateCoolBar

      public void updateCoolBar()
      Updates the view coolbar buttons state according to the value return by: - ISDExtendedActionBarProvider.hasNextPage()
      - ISDExtendedActionBarProvider.hasPrevPage()
    • setFrame

      public void setFrame(Frame frame)
      The frame to render (the sequence diagram)
      Parameters:
      frame - the frame to display
    • setEnableCommand

      public void setEnableCommand(String id, boolean value)
      Activate or deactivate the short key command given in parameter (see plugin.xml)
      Parameters:
      id - the command id defined in the plugin.xml
      value - the state value
    • setFrameSync

      public void setFrameSync(Frame frame)
      Set the frame from an other thread than the one executing the main loop
      Parameters:
      frame - The frame to set (and display)
    • ensureVisibleSync

      public void ensureVisibleSync(GraphNode sm)
      Ensure an object is visible from an other thread than the one executing the main loop
      Parameters:
      sm - The node to make visible in view
    • setFrameAndEnsureVisibleSync

      public void setFrameAndEnsureVisibleSync(Frame frame, GraphNode sm)
      Set the frame and ensure an object is visible from an other thread than the one executing the main loop
      Parameters:
      sm - The node to make visible in view
      frame - Frame The frame to set
    • setFrameAndEnsureVisible

      public void setFrameAndEnsureVisible(Frame frame, GraphNode sm)
      Set the frame and ensure an object is visible
      Parameters:
      sm - The node to make visible in view
      frame - Frame The frame to set
    • setFrameAndEnsureVisibleSync

      public void setFrameAndEnsureVisibleSync(Frame frame, int x, int y)
      Set the frame and ensure an object is visible from an other thread than the one executing the main loop
      Parameters:
      frame - The frame to set.
      x - The x coordinate to make visible.
      y - The y coordinate to make visible.
    • setFrameAndEnsureVisible

      public void setFrameAndEnsureVisible(Frame frame, int x, int y)
      Set the frame and ensure an object is visible
      Parameters:
      frame - The frame to set.
      x - The x coordinate to make visible.
      y - The y coordinate to make visible.
    • toggleWaitCursorAsync

      public void toggleWaitCursorAsync(boolean wait)
      Toggle between default and wait cursors from an other thread than the one executing the main loop
      Parameters:
      wait - true for wait cursor else false for default cursor.
    • getTimeCompressionBar

      public TimeCompressionBar getTimeCompressionBar()
      Return the time compression bar widget
      Returns:
      the time compression bar
    • getFrame

      public Frame getFrame()
      Returns the current Frame (the sequence diagram container)
      Returns:
      the current frame
    • 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
    • partActivated

      public void partActivated(org.eclipse.ui.IWorkbenchPart part)
      Specified by:
      partActivated in interface org.eclipse.ui.IPartListener
    • partBroughtToTop

      public void partBroughtToTop(org.eclipse.ui.IWorkbenchPart part)
      Specified by:
      partBroughtToTop in interface org.eclipse.ui.IPartListener
    • partClosed

      public void partClosed(org.eclipse.ui.IWorkbenchPart part)
      Specified by:
      partClosed in interface org.eclipse.ui.IPartListener
    • partDeactivated

      public void partDeactivated(org.eclipse.ui.IWorkbenchPart part)
      Specified by:
      partDeactivated in interface org.eclipse.ui.IPartListener
    • partOpened

      public void partOpened(org.eclipse.ui.IWorkbenchPart part)
      Specified by:
      partOpened in interface org.eclipse.ui.IPartListener