Преглед на файлове

updated rules that allow ITDs on generic types using type parameters

tags/V1_5_0M3
acolyer преди 19 години
родител
ревизия
6fe49e131d
променени са 3 файла, в които са добавени 19 реда и са изтрити 0 реда
  1. 19
    0
      org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java
  2. Двоични данни
      org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip
  3. Двоични данни
      org.eclipse.jdt.core/jdtcore-for-aspectj.jar

+ 19
- 0
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java Целия файл

@@ -24,6 +24,8 @@ import org.aspectj.ajdt.internal.core.builder.EclipseSourceContext;
import org.aspectj.weaver.*;
import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile;
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.*;
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
@@ -130,12 +132,29 @@ public abstract class InterTypeDeclaration extends AjMethodDeclaration {

protected void resolveOnType(ClassScope classScope) {
checkSpec();
if (onType instanceof ParameterizedSingleTypeReference) {
resolveTypeParametersForITDOnGenericType();
}

onTypeBinding = (ReferenceBinding)onType.getTypeBindingPublic(classScope);
if (!onTypeBinding.isValidBinding()) {
classScope.problemReporter().invalidType(onType, onTypeBinding);
ignoreFurtherInvestigation = true;
}
}

private void resolveTypeParametersForITDOnGenericType() {
// we have to resolve this to the base type, and in the process
// check that the number of type variables matches.
// Then we work out how the letters in the ITD map onto the letters in
// the type declaration and swap them.

// XXX will this mess up error reporting and independent compliation?
ParameterizedSingleTypeReference pref = (ParameterizedSingleTypeReference) onType;
long pos = (((long)pref.sourceStart) << 32) | pref.sourceEnd;
onType = new SingleTypeReference(pref.token,pos);
}
protected void checkSpec() {

Двоични данни
org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip Целия файл


Двоични данни
org.eclipse.jdt.core/jdtcore-for-aspectj.jar Целия файл


Loading…
Отказ
Запис