private void resolveAndSetPointcut(MethodDeclaration methodDeclaration, Annotation adviceAnn) {
int[] pcLocation = new int[2];
String pointcutExpression = getStringLiteralFor("pointcut",adviceAnn,pcLocation);
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