Examples of QueryPosition


Examples of org.eclipse.persistence.jpa.internal.jpql.parser.QueryPosition

   * @return The list of valid proposals regrouped by categories
   */
  protected ContentAssistProposals buildContentAssistProposals(int position) {

    // Create a map of the positions within the parsed tree
    QueryPosition queryPosition = getJPQLExpression().buildPosition(
      queryContext.getQuery().getExpression(),
      position
    );

    // Visit the expression, which will collect the possible proposals
    ContentAssistVisitor visitor = contentAssistVisitor();

    try {
      visitor.prepare(queryPosition);
      queryPosition.getExpression().accept(visitor);
      return visitor.getProposals();
    }
    finally {
      visitor.dispose();
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.internal.jpql.parser.QueryPosition

   * @return The list of valid proposals regrouped by categories
   */
  protected ContentAssistProposals buildContentAssistProposals(int position) {

    // Create a map of the positions within the parsed tree
    QueryPosition queryPosition = getJPQLExpression().buildPosition(
      queryContext.getQuery().getExpression(),
      position
    );

    // Visit the expression, which will collect the possible proposals
    ContentAssistVisitor visitor = contentAssistVisitor();

    try {
      visitor.prepare(queryPosition);
      queryPosition.getExpression().accept(visitor);
      return visitor.getProposals();
    }
    finally {
      visitor.dispose();
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

     *
     * @param invalidExpression The {@link Expression} containing the invalid fragment
     */
    public void prepare(Expression invalidExpression) {

      QueryPosition oldQueryPosition = AbstractContentAssistVisitor.this.queryPosition;

      this.invalidExpression = invalidExpression;
      this.positionWithinInvalidExpression = oldQueryPosition.getPosition(invalidExpression);
      this.queryPosition = new QueryPosition(oldQueryPosition.getPosition(invalidExpression.getParent()));
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

  protected void visitEndingExpression(Expression expression) {

    // Keep track of the original QueryPosition, the new one will differ
    // to properly accommodate for the invalid portion of the query
    QueryPosition oldQueryPosition = queryPosition;

    //
    // Step 1
    //
    // Create a new QueryPosition for which the positions is set to be at the end
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

        lockedExpressions.add(expression);

        // Keep track of the original QueryPosition, the new one will differ
        // to properly accommodate for the invalid portion of the query
        QueryPosition oldQueryPosition = queryPosition;

        boolean[] spaces = { false };

        //
        // Step 1
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

     *
     * @param invalidExpression The {@link Expression} containing the invalid fragment
     */
    public void prepare(Expression invalidExpression) {

      QueryPosition oldQueryPosition = AbstractContentAssistVisitor.this.queryPosition;

      this.invalidExpression = invalidExpression;
      this.positionWithinInvalidExpression = oldQueryPosition.getPosition(invalidExpression);
      this.queryPosition = new QueryPosition(oldQueryPosition.getPosition(invalidExpression.getParent()));
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

  protected void visitEndingExpression(Expression expression) {

    // Keep track of the original QueryPosition, the new one will differ
    // to properly accommodate for the invalid portion of the query
    QueryPosition oldQueryPosition = queryPosition;

    //
    // Step 1
    //
    // Create a new QueryPosition for which the positions is set to be at the end
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

        lockedExpressions.add(expression);

        // Keep track of the original QueryPosition, the new one will differ
        // to properly accommodate for the invalid portion of the query
        QueryPosition oldQueryPosition = queryPosition;

        boolean[] spaces = { false };

        //
        // Step 1
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

   */
  public ContentAssistProposals buildContentAssistProposals(int position,
                                                            ContentAssistExtension helper) {

    // Create a map of the positions within the parsed tree
    QueryPosition queryPosition = getJPQLExpression().buildPosition(
      getQuery().getExpression(),
      position
    );

    // Visit the expression, which will collect the possible proposals
    AbstractContentAssistVisitor visitor = getContentAssistVisitor();

    try {
      visitor.prepare(queryPosition, helper);
      queryPosition.getExpression().accept(visitor);
      return visitor.getProposals();
    }
    finally {
      visitor.dispose();
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.QueryPosition

   */
  public ContentAssistProposals buildProposals(int position, ContentAssistExtension extension) {

    JPQLExpression jpqlExpression = getJPQLExpression();

    QueryPosition queryPosition = jpqlExpression.buildPosition(
      getQueryExpression(),
      position
    );

    prepare(queryPosition, extension);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.