Class ViewerAwareIssueModificationContext

  • All Implemented Interfaces:
    org.eclipse.xtext.ui.editor.model.edit.IModificationContext
    Direct Known Subclasses:
    EmbeddedIssueModificationContext

    public class ViewerAwareIssueModificationContext
    extends org.eclipse.xtext.ui.editor.model.edit.IssueModificationContext
    Extension of IssueModificationContext that stores invoking text viewer for further usage.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.model.edit.IssueModificationContext

        org.eclipse.xtext.ui.editor.model.edit.IssueModificationContext.Factory
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.jface.text.ITextViewer extractTextViewer​(org.eclipse.ui.IEditorPart editor)
      Extract text viewer from editor.
      org.eclipse.jface.text.ITextViewer getTextViewer()
      Get text viewer, associated with this modification context.
      org.eclipse.xtext.ui.editor.model.IXtextDocument getXtextDocument​(org.eclipse.emf.common.util.URI uri)  
      protected void setTextViewer​(org.eclipse.jface.text.ITextViewer viewer)
      Set text viewer, associated with this modification context.
      • Methods inherited from class org.eclipse.xtext.ui.editor.model.edit.IssueModificationContext

        getIssue, getXtextDocument, setIssue
    • Constructor Detail

      • ViewerAwareIssueModificationContext

        public ViewerAwareIssueModificationContext()
    • Method Detail

      • getXtextDocument

        public org.eclipse.xtext.ui.editor.model.IXtextDocument getXtextDocument​(org.eclipse.emf.common.util.URI uri)
        Specified by:
        getXtextDocument in interface org.eclipse.xtext.ui.editor.model.edit.IModificationContext
        Overrides:
        getXtextDocument in class org.eclipse.xtext.ui.editor.model.edit.IssueModificationContext
      • getTextViewer

        public org.eclipse.jface.text.ITextViewer getTextViewer()
        Get text viewer, associated with this modification context. Can return null.
        Returns:
        viewer, associated with this modification context. or null, if there isn't one.
      • setTextViewer

        protected void setTextViewer​(org.eclipse.jface.text.ITextViewer viewer)
        Set text viewer, associated with this modification context.
        Parameters:
        viewer - viewer to set.
      • extractTextViewer

        protected org.eclipse.jface.text.ITextViewer extractTextViewer​(org.eclipse.ui.IEditorPart editor)
        Extract text viewer from editor. Can return null
        Parameters:
        editor - the editor part, cannot be null
        Returns:
        text viewer, can be null