Class TextStatusContextViewer

    • Constructor Detail

      • TextStatusContextViewer

        public TextStatusContextViewer()
    • Method Detail

      • getSourceViewer

        protected SourceViewer getSourceViewer()
        Returns the internal source viewer.
        the internal source viewer or null if the source viewer hasn't been created yet
      • createSourceViewer

        protected abstract SourceViewer createSourceViewer​(Composite parent)
        Hook to create the source viewer used to present the textual context information.
        parent - the composite to be used as the source viewer's parent
        the source viewer to be used
      • updateTitle

        protected void updateTitle​(IAdaptable element)
        Updates the title image and text of the pane surrounding the source viewer. The image and text is determined by retrieving the IWorkbenchAdapter for the given element. If the element doen't provide a IWorkbenchAdapter or if the element is null the image is reset and a default label is shown.
        element - the element providing the image and label for the title. Can be null to reset the image and text
      • setInput

        protected void setInput​(IDocument document,
                                IRegion region)
        Sets the input of the source viewer to the given document and reveals the region determined by the given parameter region.
        document - the document to present
        region - the region to reveal.
      • getControl

        public Control getControl()
        Description copied from interface: IStatusContextViewer
        Returns the status context viewer's SWT control.
        Specified by:
        getControl in interface IStatusContextViewer
        the status context viewer's SWT control or null is the widget hierarchy hasn't been created yet