Class SDView
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Loader for a blank sequence diagram. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of menu separator for filteringstatic final String
Name of menu separator for link editorstatic final String
Name of menu separator for other commandsstatic final String
Name of menu separator for other plug-in commandsstatic final String
Name of menu separator for sortingstatic final String
Name of menu separator for view layoutstatic final String
Name of menu separator for view modesstatic final String
Name of menu separator for working setFields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createPartControl
(org.eclipse.swt.widgets.Composite c) void
dispose()
void
Ensure an object is visible from an other thread than the one executing the main loop<T> T
getAdapter
(Class<T> adapter) Returns the extended find provider.Returns the extended find providergetFrame()
Returns the current Frame (the sequence diagram container)org.eclipse.jface.action.MenuManager
Returns the context menu managerReturns the current extended action bar provider for the viewReturns the current filter provider for the viewReturns the current find provider for the viewReturns the current page provider for the viewReturns the current extended action bar provider for the view.Returns the SD widget.Return the time compression bar widgetvoid
partActivated
(org.eclipse.ui.IWorkbenchPart part) void
partBroughtToTop
(org.eclipse.ui.IWorkbenchPart part) void
partClosed
(org.eclipse.ui.IWorkbenchPart part) void
partDeactivated
(org.eclipse.ui.IWorkbenchPart part) void
partOpened
(org.eclipse.ui.IWorkbenchPart part) void
Resets all providers.void
setCollapsingProvider
(ISDCollapseProvider provider) Register the given provider to support Drag and Drop collapsing.void
setEnableAction
(String actionName, boolean state) Enables/Disables an action with given name.void
setEnableCommand
(String id, boolean value) Activate or deactivate the short key command given in parameter (see plugin.xml)void
Sets the extended filter provider for the opened sequence diagram viewer.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).void
setFocus()
void
The frame to render (the sequence diagram)void
setFrameAndEnsureVisible
(Frame frame, int x, int y) Set the frame and ensure an object is visiblevoid
setFrameAndEnsureVisible
(Frame frame, GraphNode sm) Set the frame and ensure an object is visiblevoid
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 loopvoid
setFrameAndEnsureVisibleSync
(Frame frame, GraphNode sm) Set the frame and ensure an object is visible from an other thread than the one executing the main loopvoid
setFrameSync
(Frame frame) Set the frame from an other thread than the one executing the main loopvoid
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 menuvoid
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 actionvoid
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 GraphNodevoid
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 coolBarvoid
setSDPropertiesProvider
(ISDPropertiesProvider provider) Set the properties view provider for the opened sequence diagram viewervoid
toggleWaitCursorAsync
(boolean wait) Toggle between default and wait cursors from an other thread than the one executing the main loopvoid
Updates the view coolbar buttons state according to the value return by: - ISDExtendedActionBarProvider.hasNextPage()
- ISDExtendedActionBarProvider.hasPrevPage()Methods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init, init, saveState, setInitializationData
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Field Details
-
UML2SD_VIEW_MODES_SEPARATOR
Name of menu separator for view modes- See Also:
-
UML2SD_WORKING_SET_SEPARATOR
Name of menu separator for working set- See Also:
-
UML2SD_SORTING_SEPARATOR
Name of menu separator for sorting- See Also:
-
UML2SD_FILTERING_SEPARATOR
Name of menu separator for filtering- See Also:
-
UML2SD_VIEW_LAYOUT_SEPARATOR
Name of menu separator for view layout- See Also:
-
UML2SD_LINK_EDITOR_SEPARATOR
Name of menu separator for link editor- See Also:
-
UML2SD_OTHER_COMMANDS_SEPARATOR
Name of menu separator for other commands- See Also:
-
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 interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
createPartControl
in classorg.eclipse.ui.part.WorkbenchPart
-
setFocus
public void setFocus()- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in classorg.eclipse.ui.part.WorkbenchPart
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classorg.eclipse.ui.part.WorkbenchPart
-
getSDWidget
Returns the SD widget.- Returns:
- The SD widget.
-
setSDFindProvider
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
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
Returns the extended find provider- Returns:
- extended find provider.
-
resetProviders
public void resetProviders()Resets all providers. -
setSDFilterProvider
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
Sets the extended filter provider for the opened sequence diagram viewer.- Parameters:
provider
- The provider to set
-
getExtendedFilterProvider
Returns the extended find provider.- Returns:
- The extended find provider.
-
setCollapsingProvider
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
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
Returns the current page provider for the view- Returns:
- the paging provider
-
getSDFindProvider
Returns the current find provider for the view- Returns:
- the find provider
-
getSDFilterProvider
Returns the current filter provider for the view- Returns:
- the filter provider
-
setSDExtendedActionBarProvider
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
Returns the current extended action bar provider for the view- Returns:
- the extended action bar provider
-
setSDPropertiesProvider
Set the properties view provider for the opened sequence diagram viewer- Parameters:
provider
- the properties provider
-
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
Enables/Disables an action with given name.- Parameters:
actionName
- The action namestate
- true or false
-
updateCoolBar
public void updateCoolBar()Updates the view coolbar buttons state according to the value return by: - ISDExtendedActionBarProvider.hasNextPage()
- ISDExtendedActionBarProvider.hasPrevPage() -
setFrame
The frame to render (the sequence diagram)- Parameters:
frame
- the frame to display
-
setEnableCommand
Activate or deactivate the short key command given in parameter (see plugin.xml)- Parameters:
id
- the command id defined in the plugin.xmlvalue
- the state value
-
setFrameSync
Set the frame from an other thread than the one executing the main loop- Parameters:
frame
- The frame to set (and display)
-
ensureVisibleSync
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
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 viewframe
- Frame The frame to set
-
setFrameAndEnsureVisible
Set the frame and ensure an object is visible- Parameters:
sm
- The node to make visible in viewframe
- Frame The frame to set
-
setFrameAndEnsureVisibleSync
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
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 elsefalse
for default cursor.
-
getTimeCompressionBar
Return the time compression bar widget- Returns:
- the time compression bar
-
getFrame
Returns the current Frame (the sequence diagram container)- Returns:
- the current frame
-
getAdapter
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
- Overrides:
getAdapter
in classorg.eclipse.ui.part.WorkbenchPart
-
partActivated
public void partActivated(org.eclipse.ui.IWorkbenchPart part) - Specified by:
partActivated
in interfaceorg.eclipse.ui.IPartListener
-
partBroughtToTop
public void partBroughtToTop(org.eclipse.ui.IWorkbenchPart part) - Specified by:
partBroughtToTop
in interfaceorg.eclipse.ui.IPartListener
-
partClosed
public void partClosed(org.eclipse.ui.IWorkbenchPart part) - Specified by:
partClosed
in interfaceorg.eclipse.ui.IPartListener
-
partDeactivated
public void partDeactivated(org.eclipse.ui.IWorkbenchPart part) - Specified by:
partDeactivated
in interfaceorg.eclipse.ui.IPartListener
-
partOpened
public void partOpened(org.eclipse.ui.IWorkbenchPart part) - Specified by:
partOpened
in interfaceorg.eclipse.ui.IPartListener
-