Package com.iizigo.selector.prop
Class EditorSelectorExpression
java.lang.Object
com.iizix.prop.SelectorExpression
com.iizigo.selector.prop.EditorSelectorExpression
Selector Expression used in the Designer.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class com.iizix.prop.SelectorExpression
SelectorExpression.Reference, SelectorExpression.Token, SelectorExpression.TokenData
Field Summary
Fields inherited from class com.iizix.prop.SelectorExpression
EMPTY, expression, tokens
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.custom.StyleRange[]
getStyleRanges
(EditorSelector selector) Builds style ranges for the StyledText control.getToken
(int offset) Gets the tokens at specified offset.getTooltipObject
(int offset, DesignerProp any) Gets the tooltip Object for an offset.Methods inherited from class com.iizix.prop.SelectorExpression
eval, getClassRefactoredExpression, getError, getErrorPosition, getExpression, getReferences, getReferences, getSelectorRefactoredExpression, isSelected, isValidWordCharacter, main, parse
Constructor Details
EditorSelectorExpression
Creates the Expression String.There are four special sub expressions that are specified within brackets:
- { sel: "selectorReference" } used to get the result of another selector (circular references not allowed),
- { wc: environmentVariable: "Wild*Card?String" } matches an environment variable,
- { regexp: environmentVariable: "RegularExpressionWithinQuotes" } matches an environment variable in a Regular Expression,
- { java: "javaClassName" } executes a Java class implementing the interface
ISelectorExpression
.
- Parameters:
expression
- The expression.
Method Details
getToken
Gets the tokens at specified offset.- Parameters:
offset
- Offset in expression.- Returns:
- The token for Selector, Java, Wild card or Regular expression, or null if not found.
getTooltipObject
Gets the tooltip Object for an offset.- Parameters:
offset
- Offset in expression.any
- Any DesignerProp property in the project.- Returns:
- An Object to show in the tooltip (String, IType or GProp), null for none.
getStyleRanges
Builds style ranges for the StyledText control.