Class StatusTextEditor

All Implemented Interfaces:
IAdaptable, IExecutableExtension, IEditorPart, INavigationLocationProvider, IPersistable, IPersistableEditor, IReusableEditor, ISaveablePart, ISaveablesSource, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation, ITextEditor, ITextEditorExtension, ITextEditorExtension2, ITextEditorExtension3, ITextEditorExtension4, ITextEditorExtension5, ITextEditorExtension6
Direct Known Subclasses:

public class StatusTextEditor extends AbstractTextEditor
Capable of handling input elements that have an associated status with them.
  • Constructor Details

    • StatusTextEditor

      public StatusTextEditor()
  • Method Details

    • createPartControl

      public void createPartControl(Composite parent)
      Description copied from class: AbstractTextEditor
      The AbstractTextEditor implementation of this IWorkbenchPart method creates the vertical ruler and source viewer.

      Subclasses may extend this method. Besides extending this method, the behavior of createPartControl may be customized by calling, extending or replacing the following methods:
      Subclasses may supply customized implementations for some members using the following methods before createPartControl is invoked:

      Subclasses may replace the following methods called from within createPartControl:
      Subclasses may extend the following methods called from within createPartControl:
      Specified by:
      createPartControl in interface IWorkbenchPart
      createPartControl in class AbstractTextEditor
      parent - the parent composite
    • 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.
      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
      setFocus in class AbstractTextEditor
    • validateEditorInputState

      public boolean validateEditorInputState()
      Description copied from interface: ITextEditorExtension2
      Validates the state of the given editor input. The predominate intent of this method is to take any action probably necessary to ensure that the input can persistently be changed.
      Specified by:
      validateEditorInputState in interface ITextEditorExtension2
      validateEditorInputState in class AbstractTextEditor
      true if the input was validated, false otherwise
    • isErrorStatus

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

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

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

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

      protected String getStatusMessage(IStatus status)
      Returns a message for the given status.
      status - the status whose message is returned
      a message for the given status
    • updateStatusField

      protected void updateStatusField(String category)
      Description copied from class: AbstractTextEditor
      Updates the status fields for the given category.
      updateStatusField in class AbstractTextEditor
      category - the category
    • 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.

      doSetInput in class AbstractTextEditor
      input - the input to be set
      CoreException - if input cannot be connected to the document provider
    • doRevertToSaved

      public void doRevertToSaved()
      Description copied from class: AbstractTextEditor
      The AbstractTextEditor implementation of this ITextEditor method may be extended by subclasses.
      Specified by:
      doRevertToSaved in interface ITextEditor
      doRevertToSaved in class AbstractTextEditor
    • sanityCheckState

      protected void sanityCheckState(IEditorInput input)
      Description copied from class: AbstractTextEditor
      Checks the state of the given editor input.
      sanityCheckState in class AbstractTextEditor
      input - the editor input whose state is to be checked
    • handleEditorInputChanged

      protected void handleEditorInputChanged()
      Description copied from class: AbstractTextEditor
      Handles an external change of the editor's input element. Subclasses may extend.
      handleEditorInputChanged in class AbstractTextEditor
    • 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.

      handleElementContentReplaced in class AbstractTextEditor