@@ -23,6 +23,7 @@ import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration; | |||
import org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor; | |||
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory; | |||
import org.aspectj.ajdt.internal.core.builder.AjState; | |||
import org.aspectj.asm.internal.CharOperation; | |||
import org.aspectj.bridge.IMessage; | |||
import org.aspectj.bridge.IMessageHandler; | |||
import org.aspectj.bridge.IProgressListener; | |||
@@ -36,7 +37,6 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; | |||
import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; | |||
import org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit; | |||
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation; | |||
import org.aspectj.util.CharOperation; | |||
import org.aspectj.weaver.bcel.BcelWeaver; | |||
import org.aspectj.weaver.bcel.BcelWorld; | |||
import org.aspectj.weaver.patterns.CflowPointcut; | |||
@@ -443,7 +443,7 @@ public class AjPipeliningCompilerAdapter extends AbstractCompilerAdapter { | |||
/** Return true if we've decided to drop back to a full build (too much has changed) */ | |||
private boolean weaveQueuedEntries() throws IOException { | |||
if (debugPipeline)System.err.println(">.weaveQueuedEntries()"); | |||
if (debugPipeline) System.err.println(">.weaveQueuedEntries()"); | |||
for (Iterator iter = resultsPendingWeave.iterator(); iter.hasNext();) { | |||
InterimCompilationResult iresult = (InterimCompilationResult) iter.next(); | |||
for (int i = 0; i < iresult.unwovenClassFiles().length; i++) { |
@@ -998,27 +998,6 @@ public class AjState { | |||
recordFQNsResultingFromCompilationUnit(sourceFile,result); | |||
} | |||
/** | |||
* Currently unused, if we ditch classesFromName, we might need this.... (in noteResult) | |||
* @param file | |||
* @return | |||
*/ | |||
private UnwovenClassFile maybeGetExistingClassFileFor(UnwovenClassFile classFile) { | |||
File existing = new File(classFile.getFilename()); | |||
if (!existing.exists()) { | |||
return null; | |||
} | |||
else { | |||
try { | |||
return new UnwovenClassFile(classFile.getFilename(),FileUtil.readAsByteArray(existing)); | |||
} | |||
catch (IOException ex) { | |||
throw new IllegalStateException("Unable to read contents of '" + classFile.getFilename() + "' " + | |||
"from last compile cycle"); | |||
} | |||
} | |||
} | |||
/** | |||
* @param sourceFile | |||
* @param unwovenClassFiles |
@@ -35,6 +35,7 @@ import org.aspectj.asm.AsmManager; | |||
import org.aspectj.asm.IHierarchy; | |||
import org.aspectj.asm.IProgramElement; | |||
import org.aspectj.asm.IRelationship; | |||
import org.aspectj.asm.internal.CharOperation; | |||
import org.aspectj.asm.internal.ProgramElement; | |||
import org.aspectj.bridge.ISourceLocation; | |||
import org.aspectj.bridge.SourceLocation; | |||
@@ -58,7 +59,6 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope; | |||
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope; | |||
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodScope; | |||
import org.aspectj.org.eclipse.jdt.internal.compiler.util.Util; | |||
import org.aspectj.util.CharOperation; | |||
import org.aspectj.util.LangUtil; | |||
import org.aspectj.weaver.BCException; | |||
import org.aspectj.weaver.Member; | |||
@@ -285,12 +285,12 @@ public class AsmHierarchyBuilder extends ASTVisitor { | |||
public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope) { | |||
String name = new String(memberTypeDeclaration.name); | |||
// OPTIMIZE dont call kind 3 times | |||
IProgramElement.Kind kind = IProgramElement.Kind.CLASS; | |||
int typeDeclarationKind = TypeDeclaration.kind(memberTypeDeclaration.modifiers); | |||
if (memberTypeDeclaration instanceof AspectDeclaration) kind = IProgramElement.Kind.ASPECT; | |||
else if (TypeDeclaration.kind(memberTypeDeclaration.modifiers) == TypeDeclaration.INTERFACE_DECL) kind = IProgramElement.Kind.INTERFACE; | |||
else if (TypeDeclaration.kind(memberTypeDeclaration.modifiers) == TypeDeclaration.ENUM_DECL) kind = IProgramElement.Kind.ENUM; | |||
else if (TypeDeclaration.kind(memberTypeDeclaration.modifiers) == TypeDeclaration.ANNOTATION_TYPE_DECL) kind = IProgramElement.Kind.ANNOTATION; | |||
else if (typeDeclarationKind == TypeDeclaration.INTERFACE_DECL) kind = IProgramElement.Kind.INTERFACE; | |||
else if (typeDeclarationKind == TypeDeclaration.ENUM_DECL) kind = IProgramElement.Kind.ENUM; | |||
else if (typeDeclarationKind == TypeDeclaration.ANNOTATION_TYPE_DECL) kind = IProgramElement.Kind.ANNOTATION; | |||
//@AJ support | |||
if (memberTypeDeclaration.annotations != null) { |