Package org.eclipse.jdt.internal.debug.eval.ast.instructions

Examples of org.eclipse.jdt.internal.debug.eval.ast.instructions.InstructionSequence


      unit = parseCompilationUnit(
          mapper.getSource(receivingType, javaProject,
              frame.isStatic()).toCharArray(),
          mapper.getCompilationUnitName(), javaProject);
    } catch (CoreException e) {
      InstructionSequence expression = new InstructionSequence(snippet);
      expression.addError(e.getStatus().getMessage());
      return expression;
    }

    return createExpressionFromAST(snippet, mapper, unit);
  }
View Full Code Here


            JDIDebugPlugin.ERROR,
            EvaluationEngineMessages.ASTEvaluationEngine_1, null);
        throw new CoreException(status);
      }
    } catch (CoreException e) {
      InstructionSequence expression = new InstructionSequence(snippet);
      expression.addError(e.getStatus().getMessage());
      return expression;
    }

    return createExpressionFromAST(snippet, mapper, unit);
  }
View Full Code Here

            (IJavaArrayType) thisContext.getJavaType());
      }
      return getCompiledExpression(snippet,
          (IJavaReferenceType) thisContext.getJavaType());
    } catch (DebugException e) {
      InstructionSequence expression = new InstructionSequence(snippet);
      expression.addError(e.getStatus().getMessage());
      return expression;
    }

  }
View Full Code Here

    try {
      unit = parseCompilationUnit(
          mapper.getSource(type, javaProject, false).toCharArray(),
          mapper.getCompilationUnitName(), javaProject);
    } catch (CoreException e) {
      InstructionSequence expression = new InstructionSequence(snippet);
      expression.addError(e.getStatus().getMessage());
      return expression;
    }
    return createExpressionFromAST(snippet, mapper, unit);
  }
View Full Code Here

      EvaluationSourceGenerator mapper, CompilationUnit unit) {
    IProblem[] problems = unit.getProblems();
    if (problems.length != 0) {
      boolean snippetError = false;
      boolean runMethodError = false;
      InstructionSequence errorSequence = new InstructionSequence(snippet);
      int codeSnippetStart = mapper.getSnippetStart();
      int codeSnippetEnd = codeSnippetStart
          + mapper.getSnippet().length();
      int runMethodStart = mapper.getRunMethodStart();
      int runMethodEnd = runMethodStart + mapper.getRunMethodLength();
      for (IProblem problem : problems) {
        int errorOffset = problem.getSourceStart();
        int problemId = problem.getID();
        if (problemId == IProblem.IsClassPathCorrect) {
          errorSequence.addError(problem.getMessage());
          snippetError = true;
        }
        if (problemId == IProblem.VoidMethodReturnsValue
            || problemId == IProblem.NotVisibleMethod
            || problemId == IProblem.NotVisibleConstructor
            || problemId == IProblem.NotVisibleField
            || problemId == IProblem.NotVisibleType) {
          continue;
        }
        if (problem.isError()) {
          if (codeSnippetStart <= errorOffset
              && errorOffset <= codeSnippetEnd) {
            errorSequence.addError(problem.getMessage());
            snippetError = true;
          } else if (runMethodStart <= errorOffset
              && errorOffset <= runMethodEnd) {
            runMethodError = true;
          }
        }
      }
      if (snippetError || runMethodError) {
        if (runMethodError) {
          errorSequence
              .addError(EvaluationEngineMessages.ASTEvaluationEngine_Evaluations_must_contain_either_an_expression_or_a_block_of_well_formed_statements_1);
        }
        return errorSequence;
      }
    }
View Full Code Here

  /**
   * Create a new AST instruction compiler
   */
  public ASTInstructionCompiler(int startPosition, String snippet) {
    fStartPosition = startPosition;
    fInstructions = new InstructionSequence(snippet);
    fStack = new Stack<Instruction>();
    fCompleteInstructions = new ArrayList<CompleteInstruction>();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.debug.eval.ast.instructions.InstructionSequence

Copyright © 2018 www.massapicom. 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.