Class AbstractContentAssistVisitor.VisitParentVisitor
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
-
- org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor.VisitParentVisitor
-
- All Implemented Interfaces:
ExpressionVisitor
- Enclosing class:
- AbstractContentAssistVisitor
protected static final class AbstractContentAssistVisitor.VisitParentVisitor extends AnonymousExpressionVisitor
This visitor is meant to adjust the corrections stack when traversing anExpression
in order to increase the list of valid proposals.For instance, if the query is "
SELECT e FROM Employee e WHERE IN
" and the cursor is at the end of the query, thenIN
would be parsed withInExpression
. However, due to howAbstractContentAssistVisitor
works, the identifierINDEX
is not added as a valid proposal. This visitor adds that functionality.
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractContentAssistVisitor
visitor
Enclosing visitor instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
VisitParentVisitor(AbstractContentAssistVisitor visitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
visit(Expression expression)
Blindly visit the givenExpression
.void
visit(InExpression expression)
Visits theInExpression
expression.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Field Detail
-
visitor
protected final AbstractContentAssistVisitor visitor
Enclosing visitor instance.
-
-
Constructor Detail
-
VisitParentVisitor
protected VisitParentVisitor(AbstractContentAssistVisitor visitor)
-
-
Method Detail
-
visit
protected void visit(Expression expression)
Blindly visit the givenExpression
.- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(InExpression expression)
Visits theInExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
-