Class ExecutionPerspective
- java.lang.Object
-
- org.apache.hop.ui.hopgui.perspective.execution.ExecutionPerspective
-
- All Implemented Interfaces:
IActionContextHandlersProvider,IHopPerspective,TabClosable
@HopPerspectivePlugin(id="150-HopExecutionPerspective", name="i18n::ExecutionPerspective.Name", description="i18n::ExecutionPerspective.Description", image="ui/images/location.svg") @GuiPlugin public class ExecutionPerspective extends Object implements IHopPerspective, TabClosable
-
-
Field Summary
Fields Modifier and Type Field Description static StringGUI_PLUGIN_TOOLBAR_PARENT_IDstatic StringKEY_HELPstatic Class<?>PKGstatic StringTOOLBAR_ITEM_DELETEstatic StringTOOLBAR_ITEM_DUPLICATEstatic StringTOOLBAR_ITEM_EDITstatic StringTOOLBAR_ITEM_REFRESH
-
Constructor Summary
Constructors Constructor Description ExecutionPerspective()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Switch to this perspective (shown).voidaddViewer(IExecutionViewer viewer)voidcloseTab(org.eclipse.swt.custom.CTabFolderEvent event, org.eclipse.swt.custom.CTabItem tabItem)Close the tab on the perspectivevoidcreateExecutionViewer(String locationName, Execution execution, ExecutionState executionState)voidcreateLastExecutionView(String locationName, ExecutionType executionType, String name)Simply search the tree items to look for the first matching pipeline executionprotected voidcreateTabFolder(org.eclipse.swt.widgets.Composite parent)protected voidcreateTree(org.eclipse.swt.widgets.Composite parent)voiddelete()IExecutionViewerfindViewer(String logChannelId, String name)Find a metadata editorIHopFileTypeHandlergetActiveFileTypeHandler()Get the active file type handler capable of saving, executing, printing, ...IExecutionViewergetActiveViewer()List<IGuiContextHandler>getContextHandlers()org.eclipse.swt.widgets.ControlgetControl()StringgetId()static ExecutionPerspectivegetInstance()List<TabItemHandler>getItems()Get the list of tabs handled by and currently open in the perspectiveMap<String,ExecutionInfoLocation>getLocationMap()Gets locationMapprotected MetadataManager<IHopMetadata>getMetadataManager(String objectKey)List<ISearchable>getSearchables()protected org.eclipse.swt.widgets.ShellgetShell()List<IHopFileType>getSupportedHopFileTypes()Get a list of supported file types for this perspectiveorg.eclipse.swt.custom.CTabFoldergetTabFolder()Get the tabFolder of the perspectivebooleanhasNavigationNextFile()booleanhasNavigationPreviousFile()voidinitialize(HopGui hopGui, org.eclipse.swt.widgets.Composite parent)Initialize this perspectivebooleanisActive()See if this perspective is active (shown)voidnavigateToNextFile()Navigate the file usage history to the next filevoidnavigateToPreviousFile()Navigate the file usage history to the previous filevoidonNewViewer()protected voidonTabClose(org.eclipse.swt.custom.CTabFolderEvent event)voidperspectiveActivated()Notify this perspective that it has been activated.voidrefresh()booleanremove(IHopFileTypeHandler typeHandler)Remove this file type handler from the perspectivevoidsetActiveFileTypeHandler(IHopFileTypeHandler fileTypeHandler)Set the focus on the given file type handler.voidsetActiveViewer(IExecutionViewer viewer)voidupdateGui()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hop.ui.hopgui.perspective.TabClosable
getOtherTabs, getTabsToLeft, getTabsToRight
-
-
-
-
Field Detail
-
PKG
public static final Class<?> PKG
-
GUI_PLUGIN_TOOLBAR_PARENT_ID
public static final String GUI_PLUGIN_TOOLBAR_PARENT_ID
- See Also:
- Constant Field Values
-
TOOLBAR_ITEM_EDIT
public static final String TOOLBAR_ITEM_EDIT
- See Also:
- Constant Field Values
-
TOOLBAR_ITEM_DUPLICATE
public static final String TOOLBAR_ITEM_DUPLICATE
- See Also:
- Constant Field Values
-
TOOLBAR_ITEM_DELETE
public static final String TOOLBAR_ITEM_DELETE
- See Also:
- Constant Field Values
-
TOOLBAR_ITEM_REFRESH
public static final String TOOLBAR_ITEM_REFRESH
- See Also:
- Constant Field Values
-
KEY_HELP
public static final String KEY_HELP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static ExecutionPerspective getInstance()
-
getId
public String getId()
- Specified by:
getIdin interfaceIHopPerspective
-
activate
@GuiKeyboardShortcut(control=true, shift=true, key=105) @GuiOsxKeyboardShortcut(command=true, shift=true, key=105) public void activate()
Description copied from interface:IHopPerspectiveSwitch to this perspective (shown).- Specified by:
activatein interfaceIHopPerspective
-
perspectiveActivated
public void perspectiveActivated()
Description copied from interface:IHopPerspectiveNotify this perspective that it has been activated.- Specified by:
perspectiveActivatedin interfaceIHopPerspective
-
isActive
public boolean isActive()
Description copied from interface:IHopPerspectiveSee if this perspective is active (shown)- Specified by:
isActivein interfaceIHopPerspective- Returns:
- True if the perspective is currently shown
-
getSupportedHopFileTypes
public List<IHopFileType> getSupportedHopFileTypes()
Description copied from interface:IHopPerspectiveGet a list of supported file types for this perspective- Specified by:
getSupportedHopFileTypesin interfaceIHopPerspective- Returns:
- The list of supported file types
-
initialize
public void initialize(HopGui hopGui, org.eclipse.swt.widgets.Composite parent)
Description copied from interface:IHopPerspectiveInitialize this perspective- Specified by:
initializein interfaceIHopPerspective- Parameters:
hopGui- The parent Hop GUI
-
getMetadataManager
protected MetadataManager<IHopMetadata> getMetadataManager(String objectKey) throws HopException
- Throws:
HopException
-
createTree
protected void createTree(org.eclipse.swt.widgets.Composite parent)
-
createTabFolder
protected void createTabFolder(org.eclipse.swt.widgets.Composite parent)
-
addViewer
public void addViewer(IExecutionViewer viewer)
-
findViewer
public IExecutionViewer findViewer(String logChannelId, String name)
Find a metadata editor- Parameters:
logChannelId- the ID of the execution (log channel)name- the name of the workflow or pipeline which is executing- Returns:
- the metadata editor or null if not found
-
setActiveViewer
public void setActiveViewer(IExecutionViewer viewer)
-
getActiveViewer
public IExecutionViewer getActiveViewer()
-
getActiveFileTypeHandler
public IHopFileTypeHandler getActiveFileTypeHandler()
Description copied from interface:IHopPerspectiveGet the active file type handler capable of saving, executing, printing, ... a file- Specified by:
getActiveFileTypeHandlerin interfaceIHopPerspective- Returns:
- The active file type handler
-
setActiveFileTypeHandler
public void setActiveFileTypeHandler(IHopFileTypeHandler fileTypeHandler)
Description copied from interface:IHopPerspectiveSet the focus on the given file type handler.- Specified by:
setActiveFileTypeHandlerin interfaceIHopPerspective
-
onTabClose
protected void onTabClose(org.eclipse.swt.custom.CTabFolderEvent event)
-
onNewViewer
public void onNewViewer()
-
createExecutionViewer
public void createExecutionViewer(String locationName, Execution execution, ExecutionState executionState) throws Exception
- Throws:
Exception
-
createLastExecutionView
public void createLastExecutionView(String locationName, ExecutionType executionType, String name) throws Exception
Simply search the tree items to look for the first matching pipeline execution- Parameters:
locationName- the exec info location to useexecutionType- The type of execution to look forname- The name of the pipeline- Throws:
Exception
-
updateGui
public void updateGui()
-
refresh
@GuiToolbarElement(root="ExecutionPerspective-Toolbar", id="ExecutionPerspective-Toolbar-10100-Refresh", toolTip="i18n::ExecutionPerspective.ToolbarElement.Refresh.Tooltip", image="ui/images/refresh.svg") @GuiKeyboardShortcut(key=16777230) @GuiOsxKeyboardShortcut(key=16777230) public void refresh()
-
remove
public boolean remove(IHopFileTypeHandler typeHandler)
Description copied from interface:IHopPerspectiveRemove this file type handler from the perspective- Specified by:
removein interfaceIHopPerspective- Parameters:
typeHandler- The file type handler to remove- Returns:
-
delete
@GuiToolbarElement(root="ExecutionPerspective-Toolbar", id="ExecutionPerspective-Toolbar-10040-Delete", toolTip="i18n::ExecutionPerspective.ToolbarElement.Delete.Tooltip", image="ui/images/delete.svg", separator=true) @GuiKeyboardShortcut(key=127) @GuiOsxKeyboardShortcut(key=127) public void delete()
-
getItems
public List<TabItemHandler> getItems()
Description copied from interface:IHopPerspectiveGet the list of tabs handled by and currently open in the perspective- Specified by:
getItemsin interfaceIHopPerspective- Returns:
- The list of tab items
-
navigateToPreviousFile
public void navigateToPreviousFile()
Description copied from interface:IHopPerspectiveNavigate the file usage history to the previous file- Specified by:
navigateToPreviousFilein interfaceIHopPerspective
-
navigateToNextFile
public void navigateToNextFile()
Description copied from interface:IHopPerspectiveNavigate the file usage history to the next file- Specified by:
navigateToNextFilein interfaceIHopPerspective
-
hasNavigationPreviousFile
public boolean hasNavigationPreviousFile()
- Specified by:
hasNavigationPreviousFilein interfaceIHopPerspective
-
hasNavigationNextFile
public boolean hasNavigationNextFile()
- Specified by:
hasNavigationNextFilein interfaceIHopPerspective
-
getControl
public org.eclipse.swt.widgets.Control getControl()
- Specified by:
getControlin interfaceIHopPerspective- Returns:
- The control of this perspective
-
getShell
protected org.eclipse.swt.widgets.Shell getShell()
-
getContextHandlers
public List<IGuiContextHandler> getContextHandlers()
- Specified by:
getContextHandlersin interfaceIActionContextHandlersProvider
-
getSearchables
public List<ISearchable> getSearchables()
- Specified by:
getSearchablesin interfaceIHopPerspective- Returns:
- A list of searchable items
-
getLocationMap
public Map<String,ExecutionInfoLocation> getLocationMap()
Gets locationMap- Returns:
- value of locationMap
-
closeTab
public void closeTab(org.eclipse.swt.custom.CTabFolderEvent event, org.eclipse.swt.custom.CTabItem tabItem)Description copied from interface:TabClosableClose the tab on the perspective- Specified by:
closeTabin interfaceTabClosable
-
getTabFolder
public org.eclipse.swt.custom.CTabFolder getTabFolder()
Description copied from interface:TabClosableGet the tabFolder of the perspective- Specified by:
getTabFolderin interfaceTabClosable
-
-