public abstract class AbstractDifferenceFilter extends Object implements IDeactivableDiffFilter
IDifferenceFilter.Registry
Modifier and Type | Field and Description |
---|---|
protected boolean |
activeByDefault
The initial activation state of the filter.
|
protected String |
description
|
protected String |
label
A human-readable label for this filter.
|
Constructor and Description |
---|
AbstractDifferenceFilter()
Constructs the filter with the appropriate predicate.
|
Modifier and Type | Method and 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.
|
abstract 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 |
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 |
setLabel(String label)
Set the label for this filter.
|
protected String label
protected String description
protected boolean activeByDefault
public AbstractDifferenceFilter()
public abstract com.google.common.base.Predicate<? super EObject> getPredicateWhenSelected()
getPredicateWhenSelected
in interface IDifferenceFilter
IDifferenceFilter.getPredicateWhenSelected()
public com.google.common.base.Predicate<? super EObject> getPredicateWhenUnselected()
getPredicateWhenUnselected
in interface IDifferenceFilter
IDifferenceFilter.getPredicateWhenUnselected()
public String getLabel()
getLabel
in interface IDifferenceFilter
IDifferenceFilter.getLabel()
public void setLabel(String label)
setLabel
in interface IDifferenceFilter
label
- A human-readable label for this filter.IDifferenceFilter.setLabel(java.lang.String)
public String getDescription()
getDescription
in interface IDifferenceFilter
null
public void setDescription(String description)
setDescription
in interface IDifferenceFilter
description
- A human-readable description for this filter.public boolean defaultSelected()
defaultSelected
in interface IDifferenceFilter
IDifferenceFilter.defaultSelected()
public boolean isActive()
isActive
in interface IDeactivableDiffFilter
IDeactivableDiffFilter.isActive()
public void setDefaultSelected(boolean active)
setDefaultSelected
in interface IDifferenceFilter
active
- The initial activation state that the filter should have (true if the filter should be
active by default).IDifferenceFilter.setDefaultSelected(boolean)
public void setActive(boolean active)
IDeactivableDiffFilter
setActive
in interface IDeactivableDiffFilter
active
- Whether the filter should be activepublic boolean isEnabled(IComparisonScope scope, Comparison comparison)
isEnabled
in interface IDifferenceFilter
scope
- The scope on which the filter will be applied.comparison
- The comparison which is to be displayed in the structural view.IDifferenceFilter.isEnabled(org.eclipse.emf.compare.scope.IComparisonScope,
org.eclipse.emf.compare.Comparison)
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.