Package org.aspectj.ajdt.internal.core.builder

Examples of org.aspectj.ajdt.internal.core.builder.EclipseSourceContext


    this.factory = factory;
    this.binding = binding;
    this.declaration = declaration;
    this.unit = unit;

    setSourceContext(new EclipseSourceContext(declaration.compilationResult));
    resolvedTypeX.setStartPos(declaration.sourceStart);
    resolvedTypeX.setEndPos(declaration.sourceEnd);
  }
View Full Code Here


                  positionKnown = false;
                }
              }
            }
            if (positionKnown) { // pr229829
              member.setSourceContext(new EclipseSourceContext(unit.compilationResult, amd.binding.sourceStart()));
              member.setPosition(amd.binding.sourceStart(), amd.binding.sourceEnd());
            } else {
              member.setSourceContext(new EclipseSourceContext(unit.compilationResult, 0));
              member.setPosition(0, 0);
            }
          }
          declaredMethods.add(member);
        }
View Full Code Here

    if (md.binding == null) {
      return null; // there is another error that has caused this...
      // pr138143
    }

    EclipseSourceContext eSourceContext = new EclipseSourceContext(md.compilationResult);
    Pointcut pc = null;
    if (!md.isAbstract()) {
      String expression = getPointcutStringFromAnnotationStylePointcut(md);
      try {
        pc = new PatternParser(expression, eSourceContext).parsePointcut();
View Full Code Here

    return l;
  }
 
  protected void setMunger(ResolvedTypeMunger munger) {
    munger.getSignature().setPosition(sourceStart, sourceEnd);
    munger.getSignature().setSourceContext(new EclipseSourceContext(compilationResult));
    this.munger = munger;
  }
View Full Code Here

  public ASTNode createPseudoTokensFrom(ASTNode[] tokens, CompilationResult result) {
    PseudoToken[] psts = new PseudoToken[tokens.length];
    for (int i = 0; i < psts.length; i++) {
      psts[i] = (PseudoToken) tokens[i];
    }
    return new PseudoTokens(psts, new EclipseSourceContext(result));
  }
View Full Code Here

    resolvedPointcutDeclaration = new ResolvedPointcutDefinition(utDeclaringClass, declaredModifiers, declaredName,
        utParameters, getPointcut()); // ??? might want to
    // use null

    resolvedPointcutDeclaration.setPosition(sourceStart, sourceEnd);
    resolvedPointcutDeclaration.setSourceContext(new EclipseSourceContext(compilationResult));
    return resolvedPointcutDeclaration;
  }
View Full Code Here

    // AspectDeclaration aspectDecl = new
    // AspectDeclaration(typeDecl.compilationResult);

    try {
      if (perClause != null && !perClause.equals("")) {
        ISourceContext context = new EclipseSourceContext(unit.compilationResult, pcLoc[0]);
        Pointcut pc = new PatternParser(perClause, context).maybeParsePerClause();
        FormalBinding[] bindings = new FormalBinding[0];
        if (pc != null)
          pc.resolve(new EclipseScope(bindings, typeDecl.scope));
      }
View Full Code Here

    String pointcutExpression = getStringLiteralFor("pointcut", adviceAnn, pcLocation);
    if (pointcutExpression == null)
      pointcutExpression = getStringLiteralFor("value", adviceAnn, pcLocation);
    try {
      // +1 to give first char of pointcut string
      ISourceContext context = new EclipseSourceContext(unit.compilationResult, pcLocation[0] + 1);
      PatternParser pp = new PatternParser(pointcutExpression, context);
      Pointcut pc = pp.parsePointcut();
      pp.checkEof();
      FormalBinding[] bindings = buildFormalAdviceBindingsFrom(methodDeclaration);
      pc.resolve(new EclipseScope(bindings, methodDeclaration.scope));
View Full Code Here

    boolean noValueSupplied = true;
    boolean containsIfPcd = false;
    int[] pcLocation = new int[2];
    String pointcutExpression = getStringLiteralFor("value", ajAnnotations.pointcutAnnotation, pcLocation);
    try {
      ISourceContext context = new EclipseSourceContext(unit.compilationResult, pcLocation[0]);
      Pointcut pc = null;// abstract
      if (pointcutExpression == null || pointcutExpression.length() == 0) {
        noValueSupplied = true; // matches nothing pointcut
      } else {
        noValueSupplied = false;
View Full Code Here

  public ASTNode createPseudoTokensFrom(ASTNode[] tokens, CompilationResult result) {
    PseudoToken[] psts = new PseudoToken[tokens.length];
    for (int i = 0; i < psts.length; i++) {
      psts[i] = (PseudoToken)tokens[i];
    }
    return new PseudoTokens(psts,new EclipseSourceContext(result));
  }
View Full Code Here

TOP

Related Classes of org.aspectj.ajdt.internal.core.builder.EclipseSourceContext

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.