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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs the filter with the appropriate predicate. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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.booleanisActive()Whether the filter is enabled, i.e. will be taken into account in computations and displayed in the UI.booleanisEnabled(IComparisonScope scope, Comparison comparison) Returns the activation condition based on the scope and comparison objects.voidsetActive(boolean active) Set the activation of the filter.voidsetDefaultSelected(boolean active) Set the initial activation state that the filter should have.voidsetDescription(String description) Set the description for this filter.voidSet 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:
getPredicateWhenSelectedin 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:
getPredicateWhenUnselectedin 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:
getLabelin 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:
setLabelin 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:
getDescriptionin interfaceIDifferenceFilter- Returns:
- Description or
null
-
setDescription
Set the description for this filter. This will be displayed in the EMF Compare UI.- Specified by:
setDescriptionin 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:
defaultSelectedin 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:
isActivein 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:
setDefaultSelectedin 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:IDeactivableDiffFilterSet the activation of the filter.- Specified by:
setActivein 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:
isEnabledin 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:
-