Examples of EclipseScope


Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

        }
      }
      bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd);
    }

    EclipseScope scope = new EclipseScope(bindings, dec.scope);

    pointcut = pointcut.resolve(scope);
    return true;
  }
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

      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));
      }
    } catch (ParserException pEx) {
      typeDecl.scope.problemReporter().parseError(pcLoc[0] + pEx.getLocation().getStart(),
          pcLoc[0] + pEx.getLocation().getEnd(), -1, perClause.toCharArray(), perClause,
          new String[] { pEx.getMessage() });
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

      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));
      EclipseFactory factory = EclipseFactory.fromScopeLookupEnvironment(methodDeclaration.scope);
      // now create a ResolvedPointcutDefinition,make an attribute out of
      // it, and add it to the method
      UnresolvedType[] paramTypes = new UnresolvedType[bindings.length];
      for (int i = 0; i < paramTypes.length; i++)
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

      // arg.sourceEnd, "unknown");
      // }
      swap(onType, methodDeclaration, pcDecl);
      if (pc != null) {
        // has an expression
        EclipseScope eScope = new EclipseScope(bindings, methodDeclaration.scope);
        char[] packageName = null;
        if (typeDecl.binding != null && typeDecl.binding.getPackage() != null) {
          packageName = typeDecl.binding.getPackage().readableName();
        }
        eScope.setLimitedImports(packageName);
        pc.resolve(eScope);
        HasIfPCDVisitor ifFinder = new HasIfPCDVisitor();
        pc.traverse(ifFinder, null);
        containsIfPcd = ifFinder.containsIfPcd;
      }
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

  public Declare build(ClassScope classScope) {
    if (declareDecl == null) {
      return null;
    }

    EclipseScope scope = new EclipseScope(new FormalBinding[0], classScope);

    declareDecl.resolve(scope);
    return declareDecl;
  }
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

    }
    resolvePerClause(); // XXX might be too soon for some error checking
  }

  private PerClause resolvePerClause() {
    EclipseScope iscope = new EclipseScope(new FormalBinding[0], scope);
    perClause.resolve(iscope);
    return perClause;
  }
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

            String name = new String(arg.name);
            UnresolvedType type = world.fromBinding(parameters[i]);
            bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd, "unknown");
        }
       
        EclipseScope scope = new EclipseScope(bindings, dec.scope);

        pointcut = pointcut.resolve(scope);
        return true;
  }
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

    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));
      }
    } catch(ParserException pEx) {
      typeDecl.scope.problemReporter().parseError(
          pcLoc[0] + pEx.getLocation().getStart(),
          pcLoc[0] + pEx.getLocation().getEnd() ,
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

    if (pointcutExpression == null) pointcutExpression = getStringLiteralFor("value",adviceAnn,pcLocation);
    try {
      ISourceContext context = new EclipseSourceContext(unit.compilationResult,pcLocation[0]);
      Pointcut pc = new PatternParser(pointcutExpression,context).parsePointcut();
      FormalBinding[] bindings = buildFormalAdviceBindingsFrom(methodDeclaration);
      pc.resolve(new EclipseScope(bindings,methodDeclaration.scope));
      EclipseFactory factory = EclipseFactory.fromScopeLookupEnvironment(methodDeclaration.scope);
      // now create a ResolvedPointcutDefinition,make an attribute out of it, and add it to the method
      UnresolvedType[] paramTypes = new UnresolvedType[bindings.length];
      for (int i = 0; i < paramTypes.length; i++) paramTypes[i] = bindings[i].getType();
      ResolvedPointcutDefinition resPcutDef =
View Full Code Here

Examples of org.aspectj.ajdt.internal.compiler.lookup.EclipseScope

//              bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd, "unknown");
//          }
      swap(onType,methodDeclaration,pcDecl);
      if (pc != null) {
                // has an expression
                pc.resolve(new EclipseScope(bindings,methodDeclaration.scope));
                HasIfPCDVisitor ifFinder = new HasIfPCDVisitor();
                pc.traverse(ifFinder, null);
                containsIfPcd = ifFinder.containsIfPcd;
            }
        } catch(ParserException pEx) {
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.