Class AbstractContentAssistVisitor.AppendableExpressionVisitor

  • All Implemented Interfaces:
    ExpressionVisitor
    Direct Known Subclasses:
    EclipseLinkContentAssistVisitor.AppendableExpressionVisitor
    Enclosing class:
    AbstractContentAssistVisitor

    protected static class AbstractContentAssistVisitor.AppendableExpressionVisitor
    extends AbstractContentAssistVisitor.AbstractAppendableExpressionVisitor
    This visitor scans the visited Expression and determines if a JPQL identifier can be added ("appended") when the position of the cursor is at the end of the expression.

    For instance:

    • In "SELECT e, AVG(e.age) F|", F is parsed as a result variable but can also be seen as the first letter for FROM;
    • In "SELECT e FROM Employee e WHERE e.name |", the compound identifiers can be added, eg: 'IS NOT NULL', or '=', etc
    • In "SELECT e FROM Employee e WHERE e.name NOT B|", only the composite identifier "BETWEEN" and "NOT BETWEEN" can be added because the NOT expression does not have a valid expression: "B" is not a valid expression.
    • In "SELECT e FROM Employee e FROM e.age|", the arithmetic and comparison identifiers are allowed, but the logical and compound identifiers.