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.
    • getDeviceTooltip

      public static String getDeviceTooltip(String device)
      Gets the tooltip text of a device match string. A device term is answered from what the client reports (its device, user agent, viewport and pointers), and the project's environment in iiziGo has no client, so the term is described and never evaluated: an evaluation would say "Does not match" for every user agent term and "Matches" for the small viewport terms, whatever the device.
      Parameters:
      device - The device match string.
      Returns:
      The tooltip text, never null.
    • 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.