Class XtextThreeSideTextMergeViewer

    • Constructor Detail

      • XtextThreeSideTextMergeViewer

        public XtextThreeSideTextMergeViewer​(org.eclipse.swt.widgets.Composite parent,
                                             org.eclipse.compare.CompareConfiguration compareConfiguration,
                                             org.eclipse.ui.services.IServiceLocator serviceLocator,
                                             com.google.inject.Provider<org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration> sourceViewerConfigurationProvider,
                                             org.eclipse.xtext.ui.compare.StreamContentDocumentProvider documentProvider)
        Creates a xtext source merge viewer under the given parent control.
        Parameters:
        parent - the parent control, can not be null
        compareConfiguration - the compare configuration, can not be null
        serviceLocator - the service locator, can not be null
        sourceViewerConfigurationProvider - the SourceViewerConfiguration provider, can not be null
        documentProvider - the document provider, can not be null
    • Method Detail

      • updateContent

        protected void updateContent​(Object left,
                                     Object right,
                                     Object mergeResult,
                                     String absentObjectMessage)
        Description copied from class: ThreeSideTextMergeViewer
        Initializes the text viewers of the three content areas with the given input objects.
        Overrides:
        updateContent in class ThreeSideTextMergeViewer
        Parameters:
        left - the input for the left side area, can not be null
        right - the input for the left side area, can not be null
        mergeResult - the input for the merge result side area, can not be null
        absentObjectMessage - the absent object message, can not be null
      • configureTextViewer

        protected void configureTextViewer​(org.eclipse.jface.text.TextViewer textViewer)
        Description copied from class: ThreeSideTextMergeViewer
        Configures the passed text viewer. This method is called after the three text viewers have been created for the content areas.
        Overrides:
        configureTextViewer in class ThreeSideTextMergeViewer
        Parameters:
        textViewer - the text viewer to configure, can not be null
      • setEditable

        protected void setEditable​(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                   boolean state)
        Description copied from class: ThreeSideTextMergeViewer
        Sets the editable state of the given source viewer.
        Overrides:
        setEditable in class ThreeSideTextMergeViewer
        Parameters:
        sourceViewer - the given source viewer, can not be null
        state - the state to set
      • createSourceViewer

        protected org.eclipse.jface.text.source.SourceViewer createSourceViewer​(org.eclipse.swt.widgets.Composite parent)
        Description copied from class: ThreeSideTextMergeViewer
        Creates a new source viewer. This method is called when creating and initializing the content areas of the merge viewer.
        Overrides:
        createSourceViewer in class ThreeSideTextMergeViewer
        Parameters:
        parent - the parent of the viewer's control, can not be null
        Returns:
        the newly created source viewer, never null