Class AbstractStructuredMergeViewer

    • Constructor Detail

      • AbstractStructuredMergeViewer

        public AbstractStructuredMergeViewer​(org.eclipse.swt.widgets.Composite parent,
                                             IMergeViewer.MergeViewerSide side,
                                             IEMFCompareConfiguration compareConfiguration)
        Default constructor.
        Parameters:
        parent - the parent widget.
        side - the side of the viewer.
        compareConfiguration - the compare configuration object used by this viewer.
    • Method Detail

      • createControl

        protected abstract org.eclipse.swt.widgets.Control createControl​(org.eclipse.swt.widgets.Composite parent)
        Creates the primary control associated with this viewer.
        Parameters:
        parent - the parent widget of this viewer.
        Returns:
        the created primary control associated with this viewer.
      • getStructuredViewer

        protected abstract org.eclipse.jface.viewers.StructuredViewer getStructuredViewer()
        Returns the wrapped StructuredViewer.
        Returns:
        the wrapped StructuredViewer.
      • getControl

        public org.eclipse.swt.widgets.Control getControl()
        Returns the primary control associated with this viewer.
        Specified by:
        getControl in interface IMergeViewer
        Specified by:
        getControl in class org.eclipse.jface.viewers.Viewer
        Returns:
        the SWT control which displays this viewer's content
        See Also:
        Viewer.getControl()
      • getDiff

        protected Diff getDiff()
        Returns the diff associated with the one IMergeViewerItem in the viewer's selection.
        Returns:
        the diff associated with the one IMergeViewerItem in the viewer's selection.
      • createAction

        protected org.eclipse.jface.action.IAction createAction​(MergeMode mode,
                                                                Diff diff)
        Creates the action for merging the given diff via the specified mode. By default this returns null.
        Parameters:
        mode - the merge mode.
        diff - the diff to be merged.
        Returns:
        a new action for merging the given diff via the specified mode.
      • handleDispose

        protected void handleDispose​(org.eclipse.swt.events.DisposeEvent event)
        Description copied from class: AbstractMergeViewer
        Overrides:
        handleDispose in class AbstractMergeViewer
        See Also:
        ContentViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)
      • hookDispose

        protected abstract void hookDispose()
      • getSelection

        public org.eclipse.jface.viewers.ISelection getSelection()
        Specified by:
        getSelection in interface org.eclipse.jface.viewers.ISelectionProvider
        Specified by:
        getSelection in class org.eclipse.jface.viewers.Viewer
        See Also:
        ISelectionProvider.getSelection()
      • setSelection

        public void setSelection​(org.eclipse.jface.viewers.ISelection selection,
                                 boolean reveal)
        Sets a new selection for this viewer and optionally makes it visible.

        Subclasses must implement this method.

        Specified by:
        setSelection in interface IMergeViewer
        Specified by:
        setSelection in class org.eclipse.jface.viewers.Viewer
        Parameters:
        selection - the new selection
        reveal - true if the selection is to be made visible, and false otherwise
        See Also:
        Viewer.setSelection(org.eclipse.jface.viewers.ISelection, boolean)
      • setContentProvider

        public void setContentProvider​(org.eclipse.jface.viewers.IContentProvider contentProvider)
        Overrides:
        setContentProvider in class org.eclipse.jface.viewers.ContentViewer
      • setLabelProvider

        public void setLabelProvider​(org.eclipse.jface.viewers.IBaseLabelProvider labelProvider)
        Overrides:
        setLabelProvider in class org.eclipse.jface.viewers.ContentViewer