]> source.dussan.org Git - aspectj.git/commitdiff
AspectJ6: Picking up compiler interface changes
authoraclement <aclement>
Thu, 17 Jan 2008 00:00:03 +0000 (00:00 +0000)
committeraclement <aclement>
Thu, 17 Jan 2008 00:00:03 +0000 (00:00 +0000)
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjAST.java

index 39d3782e1d6ac5e05b736cf1d4ba9f936b3f5842..2b0bd0bfb9408bb108467ad47ea91f4050cc5a25 100644 (file)
@@ -13,6 +13,9 @@ package org.aspectj.org.eclipse.jdt.core.dom;
 import java.util.Map;
 
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.aspectj.org.eclipse.jdt.core.dom.AST;
+import org.aspectj.org.eclipse.jdt.core.dom.BindingResolver;
+import org.aspectj.org.eclipse.jdt.core.dom.DefaultBindingResolver;
 
 public class AjAST extends AST {
 
@@ -84,13 +87,19 @@ public class AjAST extends AST {
                AjAST ast = AjAST.newAjAST(level);
                int savedDefaultNodeFlag = ast.getDefaultNodeFlag();
                ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
-               BindingResolver resolver = isResolved ? new DefaultBindingResolver(compilationUnitDeclaration.scope, workingCopy.owner, new DefaultBindingResolver.BindingTables()) : new BindingResolver();
+               BindingResolver resolver = null;
+               if (isResolved) {
+                       resolver = new DefaultBindingResolver(compilationUnitDeclaration.scope, workingCopy.owner, new DefaultBindingResolver.BindingTables(), false);
+                       ast.setFlag(AST.RESOLVED_BINDINGS);
+               } else {
+                       resolver = new BindingResolver();
+               }
                ast.setBindingResolver(resolver);
                converter.setAST(ast);
        
                CompilationUnit unit = converter.convert(compilationUnitDeclaration, source);
                unit.setLineEndTable(compilationUnitDeclaration.compilationResult.lineSeparatorPositions);
-               unit.setJavaElement(workingCopy);
+               unit.setTypeRoot(workingCopy);
                ast.setDefaultNodeFlag(savedDefaultNodeFlag);
                return unit;
        }