Class MergeAction

  • All Implemented Interfaces:
    org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelectionChangedListener
    Direct Known Subclasses:
    AbstractMergeContainedAction, MergeAllNonConflictingAction

    public class MergeAction
    extends org.eclipse.ui.actions.BaseSelectionListenerAction
    Abstract Action that manages a merge of a difference in case of both sides of the comparison are editable.
    Since:
    3.0
    • Constructor Detail

      • MergeAction

        public MergeAction​(IEMFCompareConfiguration compareConfiguration,
                           IMerger.Registry mergerRegistry,
                           MergeMode mode,
                           org.eclipse.compare.INavigatable navigatable)
        Constructor.
        Parameters:
        configuration - The compare configuration object.
    • Method Detail

      • initToolTipAndImage

        protected void initToolTipAndImage​(MergeMode mode)
      • contextualizeTooltip

        protected void contextualizeTooltip()
        This method is used to created contextual tooltips.
      • run

        public void run()
        Specified by:
        run in interface org.eclipse.jface.action.IAction
        Overrides:
        run in class org.eclipse.jface.action.Action
        See Also:
        Action.run()
      • updateSelection

        protected boolean updateSelection​(org.eclipse.jface.viewers.IStructuredSelection selection)
        Overrides:
        updateSelection in class org.eclipse.ui.actions.BaseSelectionListenerAction
        See Also:
        BaseSelectionListenerAction.updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
      • clearCache

        protected void clearCache()
        Overrides:
        clearCache in class org.eclipse.ui.actions.BaseSelectionListenerAction
        See Also:
        BaseSelectionListenerAction.clearCache()
      • getSelectedDifferences

        protected List<Diff> getSelectedDifferences​(org.eclipse.jface.viewers.IStructuredSelection selection)
      • getStatePredicate

        protected Predicate<Diff> getStatePredicate()
      • getSelectedDifferences

        protected List<Diff> getSelectedDifferences​(Stream<Diff> diffs)
      • setEditingDomain

        public final void setEditingDomain​(ICompareEditingDomain editingDomain)
        Parameters:
        newValue -
      • setAdapterFactory

        public final void setAdapterFactory​(AdapterFactory adapterFactory)
        Set the adapter factory used by this action.
        Parameters:
        adapterFactory - adapter factory
      • isLeftToRight

        protected final boolean isLeftToRight()
        Returns:
        the leftToRight
      • getSelectedDifferences

        protected List<Diff> getSelectedDifferences()
        Returns the cached selected differences.
        Returns:
        The cached selected differences.
      • getSelectedMode

        protected MergeMode getSelectedMode()
      • isLeftEditable

        protected boolean isLeftEditable()
      • isRightEditable

        protected boolean isRightEditable()
      • isMirrored

        protected boolean isMirrored()