public abstract class IlrAbstractValueProvider extends java.lang.Object implements IlrValueProvider, IlrValueProviderExtension
IlrValueProvider,
and a flat predefined set of values.IlrValueProvider| Constructor and Description |
|---|
IlrAbstractValueProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes of the value provider after a visit.
|
java.lang.Object[] |
getChildren(java.lang.Object parent)
Returns the child elements of the given parent element.
|
abstract java.lang.String |
getDisplayText(java.lang.Object element,
java.util.Locale locale)
Returns the localized text that can be displayed in viewers.
|
java.lang.String |
getDocumentation(java.lang.Object element,
java.util.Locale locale)
By default returns
null. |
java.lang.Object |
getParent(java.lang.Object element)
Returns the parent for the given element.
|
abstract java.lang.String |
getText(java.lang.Object element,
java.util.Locale locale)
Returns the localized text that can inserted in rule text.
|
abstract java.lang.Object[] |
getValues()
Returns the elements at the root level.
|
boolean |
hasChildren(java.lang.Object element)
States whether the given element has children.
|
boolean |
isContextSensitive()
By default returns
true. |
boolean |
isExclusive()
Returns
true if the value provider accepts only the values
returned by getValues(), and does not accept any other value entered
in a value editor. |
void |
prepare(IlrSyntaxTree.Node node)
Prepares the value provider for a visit with the given branch of the Abstract Syntax Tree.
|
public abstract java.lang.Object[] getValues()
IlrValueProvidergetValues in interface IlrValueProviderpublic abstract java.lang.String getDisplayText(java.lang.Object element,
java.util.Locale locale)
IlrValueProvidergetDisplayText in interface IlrValueProviderelement - The element.locale - The locale.public abstract java.lang.String getText(java.lang.Object element,
java.util.Locale locale)
IlrValueProvidergetText in interface IlrValueProviderelement - The element.locale - The locale.public java.lang.Object[] getChildren(java.lang.Object parent)
getChildren in interface IlrValueProviderparent - The parent element.public java.lang.Object getParent(java.lang.Object element)
getParent in interface IlrValueProviderelement - The child element.public boolean hasChildren(java.lang.Object element)
hasChildren in interface IlrValueProviderelement - The element.false.public void prepare(IlrSyntaxTree.Node node)
prepare in interface IlrValueProvidernode - The parent node under which a value can be added.public void dispose()
dispose in interface IlrValueProviderpublic boolean isExclusive()
true if the value provider accepts only the values
returned by getValues(), and does not accept any other value entered
in a value editor.isExclusive in interface IlrValueProvidertrue.public java.lang.String getDocumentation(java.lang.Object element,
java.util.Locale locale)
null.getDocumentation in interface IlrValueProviderExtensionelement - The element on that the documentation is computedlocale - The localeIlrValueProviderExtension.getDocumentation(Object, Locale)public boolean isContextSensitive()
true.isContextSensitive in interface IlrValueProviderExtensiontrue if the value provider is sensible to the editing contextIlrValueProviderExtension.isContextSensitive()© Copyright IBM Corp. 1987, 2017