Class StatusTextEditor

    • Constructor Detail

      • StatusTextEditor

        public StatusTextEditor()
    • Method Detail

      • updatePartControl

        public void updatePartControl​(IEditorInput input)
        Checks if the status of the given input is OK. If not the status control is shown rather than the default control.
        Parameters:
        input - the input whose status is checked
      • setFocus

        public void setFocus()
        Description copied from interface: IWorkbenchPart
        Asks this part to take focus within the workbench. Parts must assign focus to one of the controls contained in the part's parent composite.

        Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use IWorkbenchPage.activate(IWorkbenchPart) instead.

        Specified by:
        setFocus in interface IWorkbenchPart
        Overrides:
        setFocus in class AbstractTextEditor
      • isErrorStatus

        protected boolean isErrorStatus​(IStatus status)
        Returns whether the given status indicates an error. Subclasses may override.
        Parameters:
        status - the status to be checked
        Returns:
        true if the status indicates an error, false otherwise\
        Since:
        3.0
      • createStatusControl

        protected Control createStatusControl​(Composite parent,
                                              IStatus status)
        Creates the status control for the given status. May be overridden by subclasses.
        Parameters:
        parent - the parent control
        status - the status
        Returns:
        the new status control
      • getStatusHeader

        protected String getStatusHeader​(IStatus status)
        Returns a header for the given status
        Parameters:
        status - the status whose message is returned
        Returns:
        a header for the given status
      • getStatusBanner

        protected String getStatusBanner​(IStatus status)
        Returns a banner for the given status.
        Parameters:
        status - the status whose message is returned
        Returns:
        a banner for the given status
      • getStatusMessage

        protected String getStatusMessage​(IStatus status)
        Returns a message for the given status.
        Parameters:
        status - the status whose message is returned
        Returns:
        a message for the given status
      • doSetInput

        protected void doSetInput​(IEditorInput input)
                           throws CoreException
        Description copied from class: AbstractTextEditor
        Called directly from setInput and from within a workspace runnable from init, this method does the actual setting of the editor input. Closes the editor if input is null. Disconnects from any previous editor input and its document provider and connects to the new one.

        Subclasses may extend.

        Overrides:
        doSetInput in class AbstractTextEditor
        Parameters:
        input - the input to be set
        Throws:
        CoreException - if input cannot be connected to the document provider
      • handleElementContentReplaced

        protected void handleElementContentReplaced()
        Description copied from class: AbstractTextEditor
        Performs any additional action necessary to perform after the input document's content has been replaced.

        Clients may extended this method.

        Overrides:
        handleElementContentReplaced in class AbstractTextEditor