Examples of sourceStart()


Examples of org.eclipse.dltk.ast.statements.Statement.sourceStart()

  private static Statement getBlock(IfStatement ifStatement, ASTNode node) {
    Statement falseStatement = ifStatement.getFalseStatement();
    Statement trueStatement = ifStatement.getTrueStatement();
    if (trueStatement != null
        && trueStatement.sourceStart() <= node.sourceStart()
        && trueStatement.sourceEnd() >= node.sourceEnd()) {
      return trueStatement;
    } else if (falseStatement != null
        && falseStatement.sourceStart() <= node.sourceStart()
        && falseStatement.sourceEnd() >= node.sourceEnd()) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.ASTNode.sourceStart()

      InvocationSite site = (InvocationSite) location;
      start = site.sourceStart();
      end = site.sourceEnd();
    } else if (location instanceof ASTNode) {
      ASTNode node = (ASTNode) location;
      start = node.sourceStart();
      end = node.sourceEnd();
    }
  }
  this.handle(
    IProblem.IsClassPathCorrect,
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.ASTNode.sourceStart()

  if (severity == ProblemSeverities.Ignore) return;
  int start = type.sourceStart();
  int end = type.sourceEnd();
  if (currentMethod.declaringClass == type) {
    ASTNode location = ((MethodDeclaration) currentMethod.sourceMethod()).returnType;
    start = location.sourceStart();
    end = location.sourceEnd();
  }
  this.handle(
      IProblem.UnsafeReturnTypeOverride,
      new String[] {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.ASTNode.sourceStart()

    private int proximityRating(ASTNode left, ASTNode right) {
        int result = 0;
        ASTNode nodeOne = left;
        ASTNode nodeTwo = right;
        // swap code, if nodeOne is not before nodeTwo
        if ((nodeTwo.sourceStart() - nodeOne.sourceStart()) < 0) {
            ASTNode tmpNode = nodeOne;
            nodeOne = nodeTwo;
            nodeTwo = tmpNode;
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.sourceStart()

    String[] arguments = new String[] {new String(decl.name)};
    this.handle(
      IProblem.EnumConstantCannotDefineAbstractMethod,
      arguments,
      arguments,
      decl.sourceStart(),
      decl.sourceEnd());
  } else {
    String[] arguments = new String[] {new String(type.sourceName())};
    this.handle(
      IProblem.AbstractMethodsInConcreteClass,
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.sourceStart()

      new String[] {
              new String(abstractMethod.selector),
              typesAsString(abstractMethod, true),
              new String(decl.name),
      },
      decl.sourceStart(),
      decl.sourceEnd());
  } else {
    this.handle(
      // Must implement the inherited abstract method %1
      // 8.4.3 - Every non-abstract subclass of an abstract type, A, must provide a concrete implementation of all of A's methods.
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.MessageSend.sourceStart()

      String message) {
    MessageSend messageSend = site.messageSend;
    Scope scope = site.scope;
    CompilationResult compResult = scope.compilationUnitScope().referenceContext().compilationResult();
    int startLine = ProblemHandler.searchLineNumber(
        compResult.lineSeparatorPositions, messageSend.sourceStart());
    DefaultProblem problem = new DefaultProblem(compResult.fileName, message,
        IProblem.Unclassified, null, ProblemSeverities.Error,
        messageSend.sourceStart, messageSend.sourceEnd, startLine);
    compResult.record(problem, scope.referenceContext());
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.sourceStart()

   * @param methodDeclarations Array of all missing abstract methods
   */
  public void generateMissingAbstractMethods(MethodDeclaration[] methodDeclarations, CompilationResult compilationResult) {
    if (methodDeclarations != null) {
      TypeDeclaration currentDeclaration = this.referenceBinding.scope.referenceContext;
      int typeDeclarationSourceStart = currentDeclaration.sourceStart();
      int typeDeclarationSourceEnd = currentDeclaration.sourceEnd();
      for (int i = 0, max = methodDeclarations.length; i < max; i++) {
        MethodDeclaration methodDeclaration = methodDeclarations[i];
        MethodBinding methodBinding = methodDeclaration.binding;
         String readableName = new String(methodBinding.readableName());
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.InvocationSite.sourceStart()

  String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)};
  int start = 0, end = 0;
  if (location != null) {
    if (location instanceof InvocationSite) {
      InvocationSite site = (InvocationSite) location;
      start = site.sourceStart();
      end = site.sourceEnd();
    } else if (location instanceof ASTNode) {
      ASTNode node = (ASTNode) location;
      start = node.sourceStart();
      end = node.sourceEnd();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.LocalTypeBinding.sourceStart()

}
public void acceptLocalField(FieldBinding fieldBinding) {
  IJavaElement res;
  if(fieldBinding.declaringClass instanceof ParameterizedTypeBinding) {
    LocalTypeBinding localTypeBinding = (LocalTypeBinding)((ParameterizedTypeBinding)fieldBinding.declaringClass).genericType();
    res = findLocalElement(localTypeBinding.sourceStart());
  } else {
    SourceTypeBinding typeBinding = (SourceTypeBinding)fieldBinding.declaringClass;
    res = findLocalElement(typeBinding.sourceStart());
  }
  if (res != null && res.getElementType() == IJavaElement.TYPE) {
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.