diff options
author | jhugunin <jhugunin> | 2003-01-03 19:17:41 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-01-03 19:17:41 +0000 |
commit | ef5c2cbf024c8f221ec4f76b12fa16c478e8e5f2 (patch) | |
tree | 72730e1fbc6672d940a6317493660cd396ba2d08 | |
parent | 779e5e30c4e0adc33b7f7f757d91b54ee5c21c12 (diff) | |
download | aspectj-ef5c2cbf024c8f221ec4f76b12fa16c478e8e5f2.tar.gz aspectj-ef5c2cbf024c8f221ec4f76b12fa16c478e8e5f2.zip |
making inter-type decls work with incremental mode
(partially there)
3 files changed, 17 insertions, 9 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java index a52d3cad1..cf9740180 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java @@ -561,7 +561,7 @@ public class AspectDeclaration extends MemberTypeDeclaration { private PerClause.Kind lookupPerClauseKind(ReferenceBinding binding) { - if (binding instanceof SourceTypeBinding) { + if (binding instanceof SourceTypeBinding && !(binding instanceof BinaryTypeBinding)) { SourceTypeBinding sourceSc = (SourceTypeBinding)binding; if (sourceSc.scope.referenceContext instanceof AspectDeclaration) { PerClause perClause = ((AspectDeclaration)sourceSc.scope.referenceContext).perClause; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseObjectType.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseObjectType.java index 6939d8580..4167cecaa 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseObjectType.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseObjectType.java @@ -43,6 +43,7 @@ public class EclipseObjectType extends ResolvedTypeX.Name { public boolean isAspect() { + if (binding instanceof BinaryTypeBinding) return false; if (!(binding instanceof SourceTypeBinding)) return false; //XXX assume SourceBinding throughout return ((SourceTypeBinding)binding).scope.referenceContext instanceof AspectDeclaration; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeScope.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeScope.java index 05bddbd58..2a70e641e 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeScope.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeScope.java @@ -17,16 +17,19 @@ import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.eclipse.jdt.internal.compiler.lookup.*; public class InterTypeScope extends ClassScope { + ReferenceBinding onType; - public InterTypeScope(Scope parent, TypeBinding onType) { + public InterTypeScope(Scope parent, ReferenceBinding onType) { super(parent, null); - if (onType instanceof SourceTypeBinding) { - referenceContext = new TypeDeclaration(null); - referenceContext.binding = ((SourceTypeBinding)onType); - } else { - throw new RuntimeException("unimplemented"); - } - //System.out.println("encolsingSource: " + this.enclosingSourceType()); + referenceContext = new TypeDeclaration(null); + referenceContext.binding = makeSourceTypeBinding(onType); + this.onType = onType; + } + + private SourceTypeBinding makeSourceTypeBinding(ReferenceBinding onType) { + if (onType instanceof SourceTypeBinding) return (SourceTypeBinding)onType; + else throw new RuntimeException("can't handle: " + onType); + //return new FakeSourceTypeBinding(onType); } public FieldBinding findField( @@ -42,6 +45,10 @@ public class InterTypeScope extends ClassScope { return parent.enclosingSourceType(); } + public ReferenceBinding effectiveThisType() { + return onType; + } + public int addDepth() { return 0; } |