Class DisplayNameProvider
java.lang.Object
net.ssehub.easy.varModel.confModel.DisplayNameProvider
A provider for display names (e.g., in case that not variable names shall be displayed). This is a QualiMaster
addition.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether IMVL null values shall be visible in the configuration editor.abstract booleanReturns whether IMVL null values shall be visible in the configuration editor.getDisplayName(IDecisionVariable variable) Returns the display name of a variable.getDisplayName(ConstraintSyntaxTree constraint, Configuration configuration) Returns the display name of a constraint, e.g., for a value of a reference.abstract StringgetDisplayName(AbstractVariable variable) Returns the display name of a variable.abstract StringgetDisplayName(EnumLiteral literal) Returns the display name of an enumeration literal.protected StringgetDisplayNameForIndexAccess(OCLFeatureCall call, Configuration configuration) Returns the display name for an index access constraint expression.static DisplayNameProviderReturns the current display name provider.getNullName(IDecisionVariable variable) Returns the name to be used for an IVML null value, possibly dependent on the givenvariable.abstract StringgetNullName(AbstractVariable variable) Returns the name to be used for an IVML null value, possibly dependent on the givenvariable.abstract StringgetParentNames(AbstractVariable variable) Returns the display names of the parents.static voidsetInstance(DisplayNameProvider provider) Changes the display name provider.
-
Field Details
-
nameProvider
-
-
Constructor Details
-
DisplayNameProvider
public DisplayNameProvider()
-
-
Method Details
-
setInstance
Changes the display name provider.- Parameters:
provider- the new name provider (considered only if not null)
-
getInstance
Returns the current display name provider.- Returns:
- the current display name provider
-
getDisplayName
Returns the display name of a variable.- Parameters:
variable- the variable to return the name for- Returns:
- the display name (must not be null)
-
getDisplayName
Returns the display name of a variable.- Parameters:
variable- the variable to return the name for- Returns:
- the display name (must not be null)
-
getDisplayName
Returns the display name of a constraint, e.g., for a value of a reference.- Parameters:
constraint- the constraint to return the name forconfiguration- the containing configuration in order to avoid unnecessary qualifications or to resolve expressions for better readability- Returns:
- the display name (must not be null)
-
getDisplayNameForIndexAccess
Returns the display name for an index access constraint expression. This method is intended for overriding as the returned display name is rather generic.- Parameters:
call- the call representing the index accessconfiguration- the containing configuration- Returns:
- the display name
-
getParentNames
Returns the display names of the parents.- Parameters:
variable- the variable to return the name for- Returns:
- the display name (must not be null)
-
getDisplayName
Returns the display name of an enumeration literal.- Parameters:
literal- the name of an enumeration literal- Returns:
- the display name (must not be null)
-
getNullName
Returns the name to be used for an IVML null value, possibly dependent on the givenvariable.- Parameters:
variable- the variable, i.e., including its type (may be null to query for a generic name)- Returns:
- the name for the IVML null value (must not be null)
-
getNullName
Returns the name to be used for an IVML null value, possibly dependent on the givenvariable. Shall be consistent withgetNullName(AbstractVariable).- Parameters:
variable- the variable, i.e., including its type (may be null to query for a generic name)- Returns:
- the name for the IVML null value (must not be null)
-
enableNullValueInConfiguration
Returns whether IMVL null values shall be visible in the configuration editor. The result shall be consistent withenableNullValueInConfiguration(AbstractVariable).- Parameters:
variable- the variable to check for (may be null for a generic query)- Returns:
trueif null values shall be available for configuration,falseelse
-
enableNullValueInConfiguration
Returns whether IMVL null values shall be visible in the configuration editor.- Parameters:
variable- the variable to check for (may be null for a generic query)- Returns:
trueif null values shall be available for configuration,falseelse
-