import org.aspectj.ajdt.internal.compiler.ast.InterTypeFieldDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.InterTypeMethodDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
+import org.aspectj.org.eclipse.jdt.core.compiler.CategorizedProblem;
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;
import org.aspectj.org.eclipse.jdt.core.compiler.InvalidInputException;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.StringLiteralConcatenation;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Wildcard;
-import org.aspectj.org.eclipse.jdt.internal.compiler.env.IConstants;
+import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IGenericType;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope;
-import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilerModifiers;
+import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Scanner;
import org.aspectj.org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
int problemLength = unit.compilationResult.problemCount;
if (problemLength != 0) {
- IProblem[] resizedProblems = null;
- final IProblem[] problems = unit.compilationResult.getProblems();
+ CategorizedProblem[] resizedProblems = null;
+ final CategorizedProblem[] problems = unit.compilationResult.getProblems();
final int realProblemLength=problems.length;
if (realProblemLength == problemLength) {
resizedProblems = problems;
} else {
- System.arraycopy(problems, 0, (resizedProblems = new IProblem[realProblemLength]), 0, realProblemLength);
+ System.arraycopy(problems, 0, (resizedProblems = new CategorizedProblem[realProblemLength]), 0, realProblemLength);
}
ASTSyntaxErrorPropagator syntaxErrorPropagator = new ASTSyntaxErrorPropagator(resizedProblems);
compilationUnit.accept(syntaxErrorPropagator);
}
public ASTNode convert(org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) {
- switch (typeDeclaration.kind()) {
- case IGenericType.ENUM_DECL :
+ switch (org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.kind(typeDeclaration.modifiers)) {
+ case org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.ENUM_DECL :
if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
return null;
} else {
return convertToEnumDeclaration(typeDeclaration);
}
- case IGenericType.ANNOTATION_TYPE_DECL :
+ case org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.ANNOTATION_TYPE_DECL :
if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
return null;
} else {
if (typeDeclaration.modifiersSourceStart != -1) {
setModifiers(typeDecl, typeDeclaration);
}
- typeDecl.setInterface(typeDeclaration.kind() == IGenericType.INTERFACE_DECL);
+ typeDecl.setInterface(org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.kind(typeDeclaration.modifiers) == org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.INTERFACE_DECL);
final SimpleName typeName = new SimpleName(this.ast);
typeName.internalSetIdentifier(new String(typeDeclaration.name));
typeName.setSourceRange(typeDeclaration.sourceStart, typeDeclaration.sourceEnd - typeDeclaration.sourceStart + 1);
protected void setModifiers(EnumConstantDeclaration enumConstantDeclaration, org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- enumConstantDeclaration.internalSetModifiers(fieldDeclaration.modifiers & CompilerModifiers.AccJustFlag);
+ enumConstantDeclaration.internalSetModifiers(fieldDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag);
if (fieldDeclaration.annotations != null) {
enumConstantDeclaration.setFlags(enumConstantDeclaration.getFlags() | ASTNode.MALFORMED);
}
protected void setModifiers(FieldDeclaration fieldDeclaration, org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDecl) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- fieldDeclaration.internalSetModifiers(fieldDecl.modifiers & CompilerModifiers.AccJustFlag);
+ fieldDeclaration.internalSetModifiers(fieldDecl.modifiers & ExtraCompilerModifiers.AccJustFlag);
if (fieldDecl.annotations != null) {
fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED);
}
// ajh02: method added
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- fieldDeclaration.internalSetModifiers(fieldDecl.declaredModifiers & CompilerModifiers.AccJustFlag);
+ fieldDeclaration.internalSetModifiers(fieldDecl.declaredModifiers & ExtraCompilerModifiers.AccJustFlag);
if (fieldDecl.annotations != null) {
fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED);
}
protected void setModifiers(Initializer initializer, org.aspectj.org.eclipse.jdt.internal.compiler.ast.Initializer oldInitializer) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL:
- initializer.internalSetModifiers(oldInitializer.modifiers & CompilerModifiers.AccJustFlag);
+ initializer.internalSetModifiers(oldInitializer.modifiers & ExtraCompilerModifiers.AccJustFlag);
if (oldInitializer.annotations != null) {
initializer.setFlags(initializer.getFlags() | ASTNode.MALFORMED);
}
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
if (methodDeclaration instanceof InterTypeDeclaration) {
- methodDecl.internalSetModifiers(((InterTypeDeclaration)methodDeclaration).declaredModifiers & CompilerModifiers.AccJustFlag);
+ methodDecl.internalSetModifiers(((InterTypeDeclaration)methodDeclaration).declaredModifiers & ExtraCompilerModifiers.AccJustFlag);
} else {
- methodDecl.internalSetModifiers(methodDeclaration.modifiers & CompilerModifiers.AccJustFlag);
+ methodDecl.internalSetModifiers(methodDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag);
}
if (methodDeclaration.annotations != null) {
methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED);
// ajh02: method added
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- pointcutDecl.internalSetModifiers(pointcutDeclaration.modifiers & CompilerModifiers.AccJustFlag);
+ pointcutDecl.internalSetModifiers(pointcutDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag);
if (pointcutDeclaration.annotations != null) {
pointcutDecl.setFlags(pointcutDecl.getFlags() | ASTNode.MALFORMED);
}
protected void setModifiers(SingleVariableDeclaration variableDecl, Argument argument) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- variableDecl.internalSetModifiers(argument.modifiers & CompilerModifiers.AccJustFlag);
+ variableDecl.internalSetModifiers(argument.modifiers & ExtraCompilerModifiers.AccJustFlag);
if (argument.annotations != null) {
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED);
}
protected void setModifiers(SingleVariableDeclaration variableDecl, LocalDeclaration localDeclaration) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- variableDecl.internalSetModifiers(localDeclaration.modifiers & CompilerModifiers.AccJustFlag);
+ variableDecl.internalSetModifiers(localDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag);
if (localDeclaration.annotations != null) {
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED);
}
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
int modifiers = typeDeclaration.modifiers;
- modifiers &= ~IConstants.AccInterface; // remove AccInterface flags
- modifiers &= CompilerModifiers.AccJustFlag;
+ modifiers &= ~ClassFileConstants.AccInterface; // remove AccInterface flags
+ modifiers &= ExtraCompilerModifiers.AccJustFlag;
typeDecl.internalSetModifiers(modifiers);
if (typeDeclaration.annotations != null) {
typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED);
protected void setModifiers(VariableDeclarationExpression variableDeclarationExpression, LocalDeclaration localDeclaration) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag;
- modifiers &= ~CompilerModifiers.AccBlankFinal;
+ int modifiers = localDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag;
+ modifiers &= ~ExtraCompilerModifiers.AccBlankFinal;
variableDeclarationExpression.internalSetModifiers(modifiers);
if (localDeclaration.annotations != null) {
variableDeclarationExpression.setFlags(variableDeclarationExpression.getFlags() | ASTNode.MALFORMED);
protected void setModifiers(VariableDeclarationStatement variableDeclarationStatement, LocalDeclaration localDeclaration) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
- int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag;
- modifiers &= ~CompilerModifiers.AccBlankFinal;
+ int modifiers = localDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag;
+ modifiers &= ~ExtraCompilerModifiers.AccBlankFinal;
variableDeclarationStatement.internalSetModifiers(modifiers);
if (localDeclaration.annotations != null) {
variableDeclarationStatement.setFlags(variableDeclarationStatement.getFlags() | ASTNode.MALFORMED);