Class TerminalComposite

    • Field Detail

      • MEMENTO_STATE

        public static final java.lang.String MEMENTO_STATE
        Memento variable, cursor position and insert mode: "terminalComposite.state".
        See Also:
        Constant Field Values
      • actionNewScreen

        public PartAction actionNewScreen
        Actions.
      • actionTermCapture

        public PartAction actionTermCapture
        Actions.
      • actionSelectAll

        public PartAction actionSelectAll
        Actions.
      • actionTermClear

        public PartAction actionTermClear
        Actions.
      • actionTermConnect

        public PartAction actionTermConnect
        Actions.
      • actionTermSuspend

        public PartAction actionTermSuspend
        Actions.
      • actionTermResume

        public PartAction actionTermResume
        Actions.
      • actionTermDisconnect

        public PartAction actionTermDisconnect
        Actions.
      • actionTermConfig

        public PartAction actionTermConfig
        Actions.
      • actionTermPref

        public PartAction actionTermPref
        Actions.
    • Constructor Detail

      • TerminalComposite

        public TerminalComposite​(org.eclipse.ui.IWorkbenchPart part,
                                 org.eclipse.swt.widgets.Composite parent)
        Constructor.
    • Method Detail

      • createComposite

        public static TerminalComposite createComposite​(org.eclipse.swt.widgets.Composite parent,
                                                        EditorTerminalProps props,
                                                        int charPixelSizeX,
                                                        int charPixelSizeY,
                                                        boolean doConnect,
                                                        boolean allowNonConnected,
                                                        boolean doAntiAlias)
                                                 throws java.io.IOException
        Creates a composite for use with tooltips or previews.
        Throws:
        java.io.IOException
      • resizePreview

        public void resizePreview​(int charPixelSizeX,
                                  int charPixelSizeY)
        Resizes a terminal composite for preview.
      • createActions

        public void createActions​(IPartExtensionIZ extension)
        Creates the actions such as Copy/Paste/Select All, etc.
        Parameters:
        extension - The iizi part.
      • getActions

        public java.lang.Object[] getActions()
        Gets the contribution menu items as an Object [] where null is menu separator, the rest are IAction instances.
      • getCanvas

        public org.eclipse.swt.widgets.Canvas getCanvas()
        Gets the Canvas used for the terminal, used e.g. for context menus.
      • getTerminal

        public Terminal getTerminal()
        Gets the terminal.
        Returns:
        The terminal instance or null if not yet created.
      • getHostSession

        public HostSession getHostSession()
        Gets the host session.
        Returns:
        The host session or null for none.
      • setFocus

        public boolean setFocus()
        Sets focus to the table.
        Overrides:
        setFocus in class org.eclipse.swt.widgets.Composite
      • triggerUpdateStates

        public void triggerUpdateStates()
        Triggers updates of the states of the actions.
      • onRemoteState

        public void onRemoteState​(int state)
        Updates the states in a discrete way for the remote terminal.
      • isCutEnabled

        public boolean isCutEnabled()
        Check for Cut enabled.
      • isCopyEnabled

        public boolean isCopyEnabled()
        Check for Cut enabled.
      • isPasteEnabled

        public boolean isPasteEnabled()
        Check for Cut enabled.
      • isClearEnabled

        public boolean isClearEnabled()
        Check for Clear enabled.
      • isSelectAllEnabled

        public boolean isSelectAllEnabled()
        Check for Select All enabled.
      • isPrintEnabled

        public boolean isPrintEnabled()
        Check for Print enabled.
      • isConnectEnabled

        public boolean isConnectEnabled()
        Check for Connect enabled.
      • isSuspendEnabled

        public boolean isSuspendEnabled()
        Check for Suspend enabled.
      • isResumeEnabled

        public boolean isResumeEnabled()
        Check for Resume enabled.
      • isDisconnectEnabled

        public boolean isDisconnectEnabled()
        Check for Disconnect enabled.
      • isCaptureEnabled

        public boolean isCaptureEnabled()
        Check for Capture enabled.
      • isNewScreenEnabled

        public boolean isNewScreenEnabled()
        Checks if new screen is enabled.
      • isConfigEnabled

        public boolean isConfigEnabled()
        Check for Capture enabled.
      • performCut

        public void performCut()
        Performs Cut.
      • performCopy

        public void performCopy()
        Performs Copy.
      • performPaste

        public void performPaste()
        Performs Paste.
      • performClear

        public void performClear()
        Performs Clear.
      • performSelectAll

        public void performSelectAll()
        Performs Select All.
      • performPrint

        public void performPrint()
        Performs Print.
      • performConnect

        public void performConnect()
        Connect action.
      • performSuspend

        public void performSuspend()
        Suspend action.
      • performResume

        public void performResume()
        Resume action.
      • performDisconnect

        public void performDisconnect()
        Disconnect action.
      • performCapture

        public void performCapture()
        Capture action.
      • performNewScreen

        public void performNewScreen()
        Performs new screen.
      • performConfig

        public void performConfig()
        Config action.
      • performPref

        public void performPref()
        Performs Terminal Preferences.
      • onHostDataStreamProcessing

        public void onHostDataStreamProcessing​(HostSessionPeer peer,
                                               boolean isEntering,
                                               int updates)
        Repaint listener.
        Specified by:
        onHostDataStreamProcessing in interface HostSessionListener
        Parameters:
        peer - The peer.
        isEntering - The state of processing (true=before, false=after).
        updates - What has been updated on screen (bit flag: 0x01=characters, 0x02=fields).
      • onPopup

        public boolean onPopup​(int x,
                               int y)
        Handles display of the pop-up window.
        Specified by:
        onPopup in interface ITerminalListener
        Parameters:
        x - The mouse position in X relative the terminal container.
        y - The mouse position in Y relative the terminal container.
        Returns:
        true if handled (i.e. menu is displayed).
      • onActivateMenu

        public boolean onActivateMenu​(boolean isPopup)
        Handles display of the pop-up window or activation of the menu bar, called from the TerminalWindow.
        Specified by:
        onActivateMenu in interface ITerminalListener
        Parameters:
        isPopup - Flag indicating it's a pop-up that should be activated, as opposed to the menu bar.
        Returns:
        true if handled (i.e. menu is displayed).
      • onMarkChange

        public void onMarkChange()
        Called when the mark changes, called from the TerminalWindow.
        Specified by:
        onMarkChange in interface ITerminalListener
      • onKeyboardReset

        public void onKeyboardReset()
        Called from the Status Bar to Reset the host.
      • onInsertModeToggle

        public void onInsertModeToggle()
        Called from the Status Bar to toggle Insert mode.
      • setException

        public void setException​(java.lang.Throwable exception)
        Sets an Exception in the status bar.
      • saveState

        public void saveState​(org.eclipse.ui.IMemento memento)
        Saves the state: the cursor position and insert mode.
      • restoreState

        public void restoreState​(org.eclipse.ui.IMemento memento)
        Restores the terminal composite state: the cursor position and insert mode.