Class AssignmentStateFilter
- java.lang.Object
-
- org.eclipse.jface.viewers.ViewerFilter
-
- net.ssehub.easy.producer.ui.productline_editor.configuration.AbstractConfigurationFilter
-
- net.ssehub.easy.producer.ui.productline_editor.configuration.AssignmentStateFilter
-
class AssignmentStateFilter extends AbstractConfigurationFilter
Filters variables which are in a specific state.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private AssignmentStatestate
-
Constructor Summary
Constructors Constructor Description AssignmentStateFilter(AssignmentState state)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckVariable(GUIVariable variable)Determines whether a given variable should be shown inside the editor or not.-
Methods inherited from class net.ssehub.easy.producer.ui.productline_editor.configuration.AbstractConfigurationFilter
checkVariableRecursivley, select
-
-
-
-
Field Detail
-
state
private AssignmentState state
-
-
Constructor Detail
-
AssignmentStateFilter
AssignmentStateFilter(AssignmentState state)
Sole constructor for this class.- Parameters:
state- Specifies which variables should be visible and which variables should be hidden:AssignmentState.UNDEFINED- Shows only variables (and their parents) which are not configured.AssignmentState.ASSIGNED- Shows only variables (and their parents) which are configured and not frozen. This also included default and derived values.AssignmentState.DERIVED- Shows only variables (and their parents) which are configured by the reasoner.AssignmentState.FROZEN- Shows only variables (and their parents) which are frozen.
-
-
Method Detail
-
checkVariable
protected boolean checkVariable(GUIVariable variable)
Description copied from class:AbstractConfigurationFilterDetermines whether a given variable should be shown inside the editor or not. Parents of variables which shall be shown should not be filtered. TheAbstractConfigurationFilterensures that.
This method must also ensure that nested elements of a shown variable are also displayed. Therefore, this method should also be written in a recursive manner to check nested elements of displayed variables. This should be done in the following way:
if(checkVariable(variable)) {
for(GUIVariable nestedVariable : variable.getNestedVars()) {
checkVariable(nestedVariable);
}
}- Specified by:
checkVariablein classAbstractConfigurationFilter- Parameters:
variable- The variable which should be tested whether it should be displayed inside the editor- Returns:
- true if the variable should be displayed, false otherwise.
-
-