Package org.eclipse.emf.compare.rcp.ui.structuremergeviewer.filters

# Interface IDifferenceFilter

All Known Subinterfaces:
  `IDeactivableDiffFilter`

All Known Implementing Classes:
  `AbstractDifferenceFilter`, `CascadingDifferencesFilter`, `TechnicalitiesFilter`

public interface IDifferenceFilter
Instances of this class will be used by EMF Compare in order to provide difference filter facilities to the structural differences view.

Since:
  4.0

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static interface`
`IDifferenceFilter.Registry`
A registry of `IDifferenceFilter`.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`defaultSelected()`
Returns the initial activation state that the filter should have.
`String`
`getDescription()`
A human-readable description for this filter.
`String`
`getLabel()`
A human-readable label for this filter.
`com.google.common.base.Predicate<? super EObject>`
`getPredicateWhenSelected()`
Returns the predicate that will filter out objects in the structural differences view when this filter will be selected.
`com.google.common.base.Predicate<? super EObject>`
`getPredicateWhenUnselected()`
Returns the predicate that will filter out objects in the structural differences view when this filter will be unselected.
`boolean`
`isEnabled(IComparisonScope scope, Comparison comparison)`
Returns the activation condition based on the scope and comparison objects.
`void`
`setDefaultSelected(boolean defaultSelected)`
Set the initial activation state that the filter should have.
`void`
`setDescription(String description)`
Set the description for this filter.
`void`
`setLabel(String label)`
Set the label for this filter.

## Method Details

### getPredicateWhenSelected

com.google.common.base.Predicate<? super EObject> getPredicateWhenSelected()
Returns the predicate that will filter out objects in the structural differences view when this filter will be selected.

Returns:
  the predicate that will filter out objects in the structural differences view when this filter will be selected.

### getPredicateWhenUnselected

com.google.common.base.Predicate<? super EObject> getPredicateWhenUnselected()
Returns the predicate that will filter out objects in the structural differences view when this filter will be unselected.

Returns:
  the predicate that will filter out objects in the structural differences view when this filter will be unselected.

### getLabel

String getLabel()
A human-readable label for this filter. This will be displayed in the EMF Compare UI.

Returns:
  The label for this filter.

### setLabel

void setLabel(String label)
Set the label for this filter. This will be displayed in the EMF Compare UI.

Parameters:
  `label` - A human-readable label for this filter.

### getDescription

String getDescription()
A human-readable description for this filter. This will be displayed in the EMF Compare UI.

Returns:
  Description or `null`

### setDescription

void setDescription(String description)
Set the description for this filter. This will be displayed in the EMF Compare UI.

Parameters:
  `description` - A human-readable description for this filter.

### defaultSelected

boolean defaultSelected()
Returns the initial activation state that the filter should have.

Returns:
  The initial activation state that the filter should have.

### setDefaultSelected

void setDefaultSelected(boolean defaultSelected)
Set the initial activation state that the filter should have.

Parameters:
  `defaultSelected` - The initial activation state that the filter should have (true if the filter should be active by default).

### isEnabled

boolean isEnabled(IComparisonScope scope, Comparison comparison)
Returns the activation condition based on the scope and comparison objects.

Parameters:
  `scope` - The scope on which the filter will be applied.
  `comparison` - The comparison which is to be displayed in the structural view.
Returns:
  The activation condition based on the scope and comparison objects.