Package org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions

# Class AbstractMergeContainedAction

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.actions.BaseSelectionListenerAction
org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions.MergeAction
org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions.AbstractMergeContainedAction

All Implemented Interfaces:
  `org.eclipse.jface.action.IAction`, `org.eclipse.jface.viewers.ISelectionChangedListener`

Direct Known Subclasses:
  `MergeContainedAction`, `MergeContainedConflictingAction`, `MergeContainedNonConflictingAction`

public abstract class AbstractMergeContainedAction extends MergeAction
Abstract `MergeAction` for merging all diffs contained in the selection.

Since:
  4.5

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Predicate<TreeNode>`
`isFiltered`
The predicate to determine whether a tree node is filtered.

### Fields inherited from class org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions.MergeAction

`editingDomain, mergerRegistry`

### Fields inherited from interface org.eclipse.jface.action.IAction

`AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT`

## Constructor Summary

Constructors
Constructor
Description
`AbstractMergeContainedAction(IEMFCompareConfiguration compareConfiguration, IMerger.Registry mergerRegistry, MergeMode mode, org.eclipse.compare.INavigatable navigatable)`
`AbstractMergeContainedAction(IEMFCompareConfiguration compareConfiguration, IMerger.Registry mergerRegistry, MergeMode mode, org.eclipse.compare.INavigatable navigatable, org.eclipse.jface.viewers.IStructuredSelection selection)`

## Method Summary

Modifier and Type
Method
Description
`protected abstract Predicate<Diff>`
`getDiffPredicate()`
Return a predicate that filters the {`selected differences` to just those differences this action will actually operate upon.
`protected List<Diff>`
`getSelectedDifferences(org.eclipse.jface.viewers.IStructuredSelection selection)`
`protected boolean`
`updateSelection(org.eclipse.jface.viewers.IStructuredSelection selection)`

### Methods inherited from class org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.actions.MergeAction

`clearCache, contextualizeTooltip, createMergeRunnable, execute, executeCompareCopyCommand, getDiffRelationshipComputer, getSelectedDifferences, getSelectedDifferences, getSelectedMode, getStatePredicate, initToolTipAndImage, isLeftEditable, isLeftToRight, isMirrored, isRightEditable, run, setAdapterFactory, setEditingDomain`

### Methods inherited from class org.eclipse.ui.actions.BaseSelectionListenerAction

`getStructuredSelection, runWithEvent, selectionChanged, selectionChanged`

### Methods inherited from class org.eclipse.jface.action.Action

`convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText`

### Methods inherited from class org.eclipse.jface.action.AbstractAction

`addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener`

### Methods inherited from class org.eclipse.core.commands.common.EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### isFiltered

protected Predicate<TreeNode> isFiltered
The predicate to determine whether a tree node is filtered.

## Constructor Details

### AbstractMergeContainedAction

public AbstractMergeContainedAction(IEMFCompareConfiguration compareConfiguration, IMerger.Registry mergerRegistry, MergeMode mode, org.eclipse.compare.INavigatable navigatable)

### AbstractMergeContainedAction

public AbstractMergeContainedAction(IEMFCompareConfiguration compareConfiguration, IMerger.Registry mergerRegistry, MergeMode mode, org.eclipse.compare.INavigatable navigatable, org.eclipse.jface.viewers.IStructuredSelection selection)

## Method Details

### getDiffPredicate

protected abstract Predicate<Diff> getDiffPredicate()
Return a predicate that filters the {`selected differences` to just those differences this action will actually operate upon.

Returns:
  a predicate that filters the {`selected differences`.

### updateSelection

protected boolean updateSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
Description copied from class: `MergeAction`

Overrides:
  `updateSelection` in class `MergeAction`
See Also:
  - `BaseSelectionListenerAction.updateSelection(org.eclipse.jface.viewers.IStructuredSelection)`

### getSelectedDifferences

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

Overrides:
  `getSelectedDifferences` in class `MergeAction`