Class EditorSelectorExpression


  • public class EditorSelectorExpression
    extends SelectorExpression
    Selector Expression used in the Designer.
    Author:
    Christopher Mindus
    • Constructor Detail

      • EditorSelectorExpression

        public EditorSelectorExpression​(java.lang.String expression)
        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 Detail

      • getToken

        public SelectorExpression.TokenData getToken​(int offset)
        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

        public java.lang.Object getTooltipObject​(int offset,
                                                 DesignerProp any)
        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

        public org.eclipse.swt.custom.StyleRange[] getStyleRanges​(EditorSelector selector)
        Builds style ranges for the StyledText control.