Class EditorSelectorExpression

java.lang.Object
com.iizix.prop.SelectorExpression
com.iizigo.selector.prop.EditorSelectorExpression

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

    • EditorSelectorExpression

      public EditorSelectorExpression(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 Details

    • 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 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 StyleRange[] getStyleRanges(EditorSelector selector)
      Builds style ranges for the StyledText control.