Class AbstractDifferenceFilter
java.lang.Object
org.eclipse.emf.compare.rcp.ui.structuremergeviewer.filters.AbstractDifferenceFilter
- All Implemented Interfaces:
IDeactivableDiffFilter
,IDifferenceFilter
- Direct Known Subclasses:
CascadingDifferencesFilter
,TechnicalitiesFilter
An abstract filter implementation.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.emf.compare.rcp.ui.structuremergeviewer.filters.IDifferenceFilter
IDifferenceFilter.Registry
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs the filter with the appropriate predicate. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the initial activation state that the filter should have.A human-readable description for this filter.getLabel()
A human-readable label for this filter.abstract com.google.common.base.Predicate<? super EObject>
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>
Returns the predicate that will filter out objects in the structural differences view when this filter will be unselected.boolean
isActive()
Whether the filter is enabled, i.e. will be taken into account in computations and displayed in the UI.boolean
isEnabled
(IComparisonScope scope, Comparison comparison) Returns the activation condition based on the scope and comparison objects.void
setActive
(boolean active) Set the activation of the filter.void
setDefaultSelected
(boolean active) Set the initial activation state that the filter should have.void
setDescription
(String description) Set the description for this filter.void
Set the label for this filter.
-
Field Details
-
label
A human-readable label for this filter. This will be displayed in the EMF Compare UI. -
description
-
activeByDefault
protected boolean activeByDefaultThe initial activation state of the filter.
-
-
Constructor Details
-
AbstractDifferenceFilter
public AbstractDifferenceFilter()Constructs the filter with the appropriate predicate.
-
-
Method Details
-
getPredicateWhenSelected
Returns the predicate that will filter out objects in the structural differences view when this filter will be selected.- Specified by:
getPredicateWhenSelected
in interfaceIDifferenceFilter
- Returns:
- the predicate that will filter out objects in the structural differences view when this filter will be selected.
- See Also:
-
getPredicateWhenUnselected
Returns the predicate that will filter out objects in the structural differences view when this filter will be unselected.- Specified by:
getPredicateWhenUnselected
in interfaceIDifferenceFilter
- Returns:
- the predicate that will filter out objects in the structural differences view when this filter will be unselected.
- See Also:
-
getLabel
A human-readable label for this filter. This will be displayed in the EMF Compare UI.- Specified by:
getLabel
in interfaceIDifferenceFilter
- Returns:
- The label for this filter.
- See Also:
-
setLabel
Set the label for this filter. This will be displayed in the EMF Compare UI.- Specified by:
setLabel
in interfaceIDifferenceFilter
- Parameters:
label
- A human-readable label for this filter.- See Also:
-
getDescription
A human-readable description for this filter. This will be displayed in the EMF Compare UI.- Specified by:
getDescription
in interfaceIDifferenceFilter
- Returns:
- Description or
null
-
setDescription
Set the description for this filter. This will be displayed in the EMF Compare UI.- Specified by:
setDescription
in interfaceIDifferenceFilter
- Parameters:
description
- A human-readable description for this filter.
-
defaultSelected
public boolean defaultSelected()Returns the initial activation state that the filter should have.- Specified by:
defaultSelected
in interfaceIDifferenceFilter
- Returns:
- The initial activation state that the filter should have.
- See Also:
-
isActive
public boolean isActive()Whether the filter is enabled, i.e. will be taken into account in computations and displayed in the UI.- Specified by:
isActive
in interfaceIDeactivableDiffFilter
- Returns:
- The enablement of the filter.
- Since:
- 4.3
- See Also:
-
setDefaultSelected
public void setDefaultSelected(boolean active) Set the initial activation state that the filter should have.- Specified by:
setDefaultSelected
in interfaceIDifferenceFilter
- Parameters:
active
- The initial activation state that the filter should have (true if the filter should be active by default).- See Also:
-
setActive
public void setActive(boolean active) Description copied from interface:IDeactivableDiffFilter
Set the activation of the filter.- Specified by:
setActive
in interfaceIDeactivableDiffFilter
- Parameters:
active
- Whether the filter should be active- Since:
- 4.3
-
isEnabled
Returns the activation condition based on the scope and comparison objects.- Specified by:
isEnabled
in interfaceIDifferenceFilter
- 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.
- See Also:
-