Class AbstractMergeViewer

  • All Implemented Interfaces:
    IMergeViewer, org.eclipse.jface.viewers.IInputProvider, org.eclipse.jface.viewers.IInputSelectionProvider, org.eclipse.jface.viewers.ISelectionProvider
    Direct Known Subclasses:
    AbstractStructuredMergeViewer

    public abstract class AbstractMergeViewer
    extends org.eclipse.jface.viewers.ContentViewer
    implements IMergeViewer
    An abstract implementation of IMergeViewer.
    Since:
    4.0
    • Constructor Detail

      • AbstractMergeViewer

        public AbstractMergeViewer​(IMergeViewer.MergeViewerSide side,
                                   IEMFCompareConfiguration compareConfiguration)
        Default constructor.
        Parameters:
        side - the side of the viewer.
        compareConfiguration - the compare configuration object used by this viewer.
    • Method Detail

      • getEffectiveSide

        protected IMergeViewer.MergeViewerSide getEffectiveSide()
        Returns the effective side taking into account CompareConfiguration#isMirrored() to switch left and right.
        Parameters:
        side -
        Returns:
        the effective side with respect to mirroring.
      • getCompareConfiguration

        protected IEMFCompareConfiguration getCompareConfiguration()
        Returns the compare configuration object used by this viewer.
        Returns:
        the compare configuration object used by this viewer.
      • handleDispose

        protected void handleDispose​(org.eclipse.swt.events.DisposeEvent event)
        Overrides:
        handleDispose in class org.eclipse.jface.viewers.ContentViewer
        See Also:
        ContentViewer.handleDispose(org.eclipse.swt.events.DisposeEvent)
      • handleDifferenceGroupProviderChange

        public void handleDifferenceGroupProviderChange​(IDifferenceGroupProviderChange event)
        Handle the change of difference group provider in the UI.
        Parameters:
        event - an IDifferenceGroupProviderChange that stores the new selected difference group provider.
      • getDifferenceGroupProvider

        public IDifferenceGroupProvider getDifferenceGroupProvider()
        Returns the difference group provider selected in the UI.
        Returns:
        the difference group provider selected in the UI.
      • handleDifferenceFilterChange

        public void handleDifferenceFilterChange​(IDifferenceFilterChange event)
        Handle the change of filters in the UI.
        Parameters:
        event - an IDifferenceFilterChange that stores the new state of filters.
      • getDifferenceFilter

        protected final com.google.common.base.Predicate<? super EObject> getDifferenceFilter()
        Returns an aggregated predicate corresponding to the selected predicates of selected filters and unselected predicates of unselected filters in the UI.
        Returns:
        an aggregated predicate corresponding to the selected predicates of selected filters and unselected predicates of unselected filters in the UI.