Package org.aspectj.bridge

Examples of org.aspectj.bridge.ISourceLocation


      // -- remove duplicates before adding (XXX use them instead?)
      if (addToNode != null && addToNode.getChildren() != null) {
        for (ListIterator itt = addToNode.getChildren().listIterator(); itt.hasNext();) {
          IProgramElement child = (IProgramElement) itt.next();
          ISourceLocation childLoc = child.getSourceLocation();
          if (null == childLoc) {
            // XXX ok, packages have null source locations
            // signal others?
          } else if (childLoc.getSourceFile().equals(file)) {
            itt.remove();
          }
        }
      }
      // -- add and traverse
View Full Code Here


  private void checkWeaveAccess(UnresolvedType typeX, ASTNode location) {
    World world = inAspect.factory.getWorld();
    Lint.Kind check = world.getLint().typeNotExposedToWeaver;
    if (check.isEnabled()) {
      if (!world.resolve(typeX).isExposedToWeaver()) {
        ISourceLocation loc = null;
        if (location != null) {
          loc = new EclipseSourceLocation(inAspect.compilationResult, location.sourceStart, location.sourceEnd);
        }
        check.signal(typeX.getName() + " (needed for privileged access)", loc);
      }
View Full Code Here

   *
   * @param world
   * @param progressListener
   */
  public static IMessage makeMessage(ICompilationUnit unit, IProblem problem, World world, IProgressListener progressListener) {
    ISourceLocation sourceLocation = makeSourceLocation(unit, problem, progressListener);
    IProblem[] seeAlso = problem.seeAlso();
    // If the user has turned off classfile line number gen, then we may not be able to tell them
    // about all secondary locations (pr209372)
    int validPlaces = 0;
    for (int ii = 0; ii < seeAlso.length; ii++) {
View Full Code Here

    }
    return msg;
  }

  public static IMessage makeErrorMessage(ICompilationUnit unit, String text, Exception ex) {
    ISourceLocation loc = new SourceLocation(new File(new String(unit.getFileName())), 0, 0, 0, "");
    IMessage msg = new Message(text, IMessage.ERROR, ex, loc);
    return msg;
  }
View Full Code Here

    IMessage msg = new Message(text, IMessage.ERROR, ex, loc);
    return msg;
  }

  public static IMessage makeErrorMessage(String srcFile, String text, Exception ex) {
    ISourceLocation loc = new SourceLocation(new File(srcFile), 0, 0, 0, "");
    IMessage msg = new Message(text, IMessage.ERROR, ex, loc);
    return msg;
  }
View Full Code Here

  private Expression fixReceiver(Expression expression, BlockScope scope) {
    if (depthCounter!=0) return expression; // Don't mess with super calls down in nested local type declarations (pr90143)
    if (expression instanceof SuperReference) {
      SuperReference superRef = (SuperReference) expression;
      if (superType == null) {
        ISourceLocation location =
          new EclipseSourceLocation(scope.problemReporter().referenceContext.compilationResult(),
                    expression.sourceStart, expression.sourceEnd);
       
        world.showMessage(IMessage.ERROR, "multiple supertypes for this interface", location, null);
        dec.ignoreFurtherInvestigation = true;
View Full Code Here

   */
  private void raiseNoFieldInitializersWarning() {
    if (suppressingNoExplicitConstructorCall())
      return;
    EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(scope);
    ISourceLocation location = new EclipseSourceLocation(scope.problemReporter().referenceContext.compilationResult(),
        sourceStart(), sourceEnd());
    world.getWorld().getLint().noExplicitConstructorCall.signal(null, location);
  }
View Full Code Here

          }
          pc = pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.Before, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

          }
          pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.After, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

        }
        pc.resolve(binding);
      }
      setIgnoreUnboundBindingNames(pc, bindings);

      ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
          struct.bMethod.getDeclarationOffset());
      struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.AfterReturning, pc, extraArgument, sl.getOffset(),
          sl.getOffset() + 1,// FIXME AVASM
          struct.context));
      return true;
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.ISourceLocation

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.