Lines 447-457
Link Here
|
447 |
org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration constructorDeclaration = (org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration) methodDeclaration; |
447 |
org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration constructorDeclaration = (org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration) methodDeclaration; |
448 |
explicitConstructorCall = constructorDeclaration.constructorCall; |
448 |
explicitConstructorCall = constructorDeclaration.constructorCall; |
449 |
switch(this.ast.apiLevel) { |
449 |
switch(this.ast.apiLevel) { |
450 |
case AST.JLS2 : |
450 |
case AST.JLS2_INTERNAL : |
451 |
// set the return type to VOID |
451 |
// set the return type to VOID |
452 |
PrimitiveType returnType = this.ast.newPrimitiveType(PrimitiveType.VOID); |
452 |
PrimitiveType returnType = this.ast.newPrimitiveType(PrimitiveType.VOID); |
453 |
returnType.setSourceRange(methodDeclaration.sourceStart, 0); |
453 |
returnType.setSourceRange(methodDeclaration.sourceStart, 0); |
454 |
methodDecl.setReturnType(returnType); |
454 |
methodDecl.internalSetReturnType(returnType); |
455 |
break; |
455 |
break; |
456 |
case AST.JLS3 : |
456 |
case AST.JLS3 : |
457 |
methodDecl.setReturnType2(null); |
457 |
methodDecl.setReturnType2(null); |
Lines 537-543
Link Here
|
537 |
org.eclipse.jdt.internal.compiler.ast.TypeParameter[] typeParameters = methodDeclaration.typeParameters(); |
537 |
org.eclipse.jdt.internal.compiler.ast.TypeParameter[] typeParameters = methodDeclaration.typeParameters(); |
538 |
if (typeParameters != null) { |
538 |
if (typeParameters != null) { |
539 |
switch(this.ast.apiLevel) { |
539 |
switch(this.ast.apiLevel) { |
540 |
case AST.JLS2 : |
540 |
case AST.JLS2_INTERNAL : |
541 |
methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED); |
541 |
methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED); |
542 |
break; |
542 |
break; |
543 |
case AST.JLS3 : |
543 |
case AST.JLS3 : |
Lines 564-570
Link Here
|
564 |
} |
564 |
} |
565 |
if (expression.typeArguments != null) { |
565 |
if (expression.typeArguments != null) { |
566 |
switch(this.ast.apiLevel) { |
566 |
switch(this.ast.apiLevel) { |
567 |
case AST.JLS2 : |
567 |
case AST.JLS2_INTERNAL : |
568 |
classInstanceCreation.setFlags(classInstanceCreation.getFlags() | ASTNode.MALFORMED); |
568 |
classInstanceCreation.setFlags(classInstanceCreation.getFlags() | ASTNode.MALFORMED); |
569 |
break; |
569 |
break; |
570 |
case AST.JLS3 : |
570 |
case AST.JLS3 : |
Lines 574-581
Link Here
|
574 |
} |
574 |
} |
575 |
} |
575 |
} |
576 |
switch(this.ast.apiLevel) { |
576 |
switch(this.ast.apiLevel) { |
577 |
case AST.JLS2 : |
577 |
case AST.JLS2_INTERNAL : |
578 |
classInstanceCreation.setName(convert(expression.type)); |
578 |
classInstanceCreation.internalSetName(convert(expression.type)); |
579 |
break; |
579 |
break; |
580 |
case AST.JLS3 : |
580 |
case AST.JLS3 : |
581 |
classInstanceCreation.setType(convertType(expression.type)); |
581 |
classInstanceCreation.setType(convertType(expression.type)); |
Lines 628-634
Link Here
|
628 |
|
628 |
|
629 |
public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration annotationTypeMemberDeclaration) { |
629 |
public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration annotationTypeMemberDeclaration) { |
630 |
checkCanceled(); |
630 |
checkCanceled(); |
631 |
if (this.ast.apiLevel == AST.JLS2) { |
631 |
if (this.ast.apiLevel == AST.JLS2_INTERNAL) { |
632 |
return null; |
632 |
return null; |
633 |
} |
633 |
} |
634 |
AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration2 = this.ast.newAnnotationTypeMemberDeclaration(); |
634 |
AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration2 = this.ast.newAnnotationTypeMemberDeclaration(); |
Lines 695-701
Link Here
|
695 |
|
695 |
|
696 |
if (isVarArgs) { |
696 |
if (isVarArgs) { |
697 |
switch(this.ast.apiLevel) { |
697 |
switch(this.ast.apiLevel) { |
698 |
case AST.JLS2 : |
698 |
case AST.JLS2_INTERNAL : |
699 |
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); |
699 |
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); |
700 |
break; |
700 |
break; |
701 |
case AST.JLS3 : |
701 |
case AST.JLS3 : |
Lines 1366-1372
Link Here
|
1366 |
sourceStart = statement.typeArgumentsSourceStart; |
1366 |
sourceStart = statement.typeArgumentsSourceStart; |
1367 |
} |
1367 |
} |
1368 |
switch(this.ast.apiLevel) { |
1368 |
switch(this.ast.apiLevel) { |
1369 |
case AST.JLS2 : |
1369 |
case AST.JLS2_INTERNAL : |
1370 |
superConstructorInvocation.setFlags(superConstructorInvocation.getFlags() | ASTNode.MALFORMED); |
1370 |
superConstructorInvocation.setFlags(superConstructorInvocation.getFlags() | ASTNode.MALFORMED); |
1371 |
break; |
1371 |
break; |
1372 |
case AST.JLS3 : |
1372 |
case AST.JLS3 : |
Lines 1391-1397
Link Here
|
1391 |
sourceStart = statement.typeArgumentsSourceStart; |
1391 |
sourceStart = statement.typeArgumentsSourceStart; |
1392 |
} |
1392 |
} |
1393 |
switch(this.ast.apiLevel) { |
1393 |
switch(this.ast.apiLevel) { |
1394 |
case AST.JLS2 : |
1394 |
case AST.JLS2_INTERNAL : |
1395 |
constructorInvocation.setFlags(constructorInvocation.getFlags() | ASTNode.MALFORMED); |
1395 |
constructorInvocation.setFlags(constructorInvocation.getFlags() | ASTNode.MALFORMED); |
1396 |
break; |
1396 |
break; |
1397 |
case AST.JLS3 : |
1397 |
case AST.JLS3 : |
Lines 1604-1610
Link Here
|
1604 |
|
1604 |
|
1605 |
public Statement convert(ForeachStatement statement) { |
1605 |
public Statement convert(ForeachStatement statement) { |
1606 |
switch(this.ast.apiLevel) { |
1606 |
switch(this.ast.apiLevel) { |
1607 |
case AST.JLS2 : |
1607 |
case AST.JLS2_INTERNAL : |
1608 |
return createFakeEmptyStatement(statement); |
1608 |
return createFakeEmptyStatement(statement); |
1609 |
case AST.JLS3 : |
1609 |
case AST.JLS3 : |
1610 |
EnhancedForStatement enhancedForStatement = this.ast.newEnhancedForStatement(); |
1610 |
EnhancedForStatement enhancedForStatement = this.ast.newEnhancedForStatement(); |
Lines 1822-1828
Link Here
|
1822 |
final TypeReference[] typeArguments = expression.typeArguments; |
1822 |
final TypeReference[] typeArguments = expression.typeArguments; |
1823 |
if (typeArguments != null) { |
1823 |
if (typeArguments != null) { |
1824 |
switch(this.ast.apiLevel) { |
1824 |
switch(this.ast.apiLevel) { |
1825 |
case AST.JLS2 : |
1825 |
case AST.JLS2_INTERNAL : |
1826 |
superMethodInvocation.setFlags(superMethodInvocation.getFlags() | ASTNode.MALFORMED); |
1826 |
superMethodInvocation.setFlags(superMethodInvocation.getFlags() | ASTNode.MALFORMED); |
1827 |
break; |
1827 |
break; |
1828 |
case AST.JLS3 : |
1828 |
case AST.JLS3 : |
Lines 1879-1885
Link Here
|
1879 |
final TypeReference[] typeArguments = expression.typeArguments; |
1879 |
final TypeReference[] typeArguments = expression.typeArguments; |
1880 |
if (typeArguments != null) { |
1880 |
if (typeArguments != null) { |
1881 |
switch(this.ast.apiLevel) { |
1881 |
switch(this.ast.apiLevel) { |
1882 |
case AST.JLS2 : |
1882 |
case AST.JLS2_INTERNAL : |
1883 |
methodInvocation.setFlags(methodInvocation.getFlags() | ASTNode.MALFORMED); |
1883 |
methodInvocation.setFlags(methodInvocation.getFlags() | ASTNode.MALFORMED); |
1884 |
break; |
1884 |
break; |
1885 |
case AST.JLS3 : |
1885 |
case AST.JLS3 : |
Lines 2033-2040
Link Here
|
2033 |
classInstanceCreation.setExpression(convert(allocation.enclosingInstance)); |
2033 |
classInstanceCreation.setExpression(convert(allocation.enclosingInstance)); |
2034 |
} |
2034 |
} |
2035 |
switch(this.ast.apiLevel) { |
2035 |
switch(this.ast.apiLevel) { |
2036 |
case AST.JLS2 : |
2036 |
case AST.JLS2_INTERNAL : |
2037 |
classInstanceCreation.setName(convert(allocation.type)); |
2037 |
classInstanceCreation.internalSetName(convert(allocation.type)); |
2038 |
break; |
2038 |
break; |
2039 |
case AST.JLS3 : |
2039 |
case AST.JLS3 : |
2040 |
classInstanceCreation.setType(convertType(allocation.type)); |
2040 |
classInstanceCreation.setType(convertType(allocation.type)); |
Lines 2052-2058
Link Here
|
2052 |
} |
2052 |
} |
2053 |
if (allocation.typeArguments != null) { |
2053 |
if (allocation.typeArguments != null) { |
2054 |
switch(this.ast.apiLevel) { |
2054 |
switch(this.ast.apiLevel) { |
2055 |
case AST.JLS2 : |
2055 |
case AST.JLS2_INTERNAL : |
2056 |
classInstanceCreation.setFlags(classInstanceCreation.getFlags() | ASTNode.MALFORMED); |
2056 |
classInstanceCreation.setFlags(classInstanceCreation.getFlags() | ASTNode.MALFORMED); |
2057 |
break; |
2057 |
break; |
2058 |
case AST.JLS3 : |
2058 |
case AST.JLS3 : |
Lines 2216-2237
Link Here
|
2216 |
switch(result.getNodeType()) { |
2216 |
switch(result.getNodeType()) { |
2217 |
case ASTNode.ENUM_DECLARATION: |
2217 |
case ASTNode.ENUM_DECLARATION: |
2218 |
switch(this.ast.apiLevel) { |
2218 |
switch(this.ast.apiLevel) { |
2219 |
case AST.JLS2 : |
2219 |
case AST.JLS2_INTERNAL : |
2220 |
return createFakeEmptyStatement(statement); |
2220 |
return createFakeEmptyStatement(statement); |
2221 |
case AST.JLS3 : |
2221 |
case AST.JLS3 : |
2222 |
TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement((EnumDeclaration) result); |
2222 |
TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement((EnumDeclaration) result); |
2223 |
TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration(); |
2223 |
AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration(); |
2224 |
typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); |
2224 |
typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); |
2225 |
return typeDeclarationStatement; |
2225 |
return typeDeclarationStatement; |
2226 |
} |
2226 |
} |
2227 |
break; |
2227 |
break; |
2228 |
case ASTNode.ANNOTATION_TYPE_DECLARATION : |
2228 |
case ASTNode.ANNOTATION_TYPE_DECLARATION : |
2229 |
switch(this.ast.apiLevel) { |
2229 |
switch(this.ast.apiLevel) { |
2230 |
case AST.JLS2 : |
2230 |
case AST.JLS2_INTERNAL : |
2231 |
return createFakeEmptyStatement(statement); |
2231 |
return createFakeEmptyStatement(statement); |
2232 |
case AST.JLS3 : |
2232 |
case AST.JLS3 : |
2233 |
TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement((AnnotationTypeDeclaration) result); |
2233 |
TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement((AnnotationTypeDeclaration) result); |
2234 |
TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration(); |
2234 |
AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration(); |
2235 |
typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); |
2235 |
typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); |
2236 |
return typeDeclarationStatement; |
2236 |
return typeDeclarationStatement; |
2237 |
} |
2237 |
} |
Lines 2243-2250
Link Here
|
2243 |
} else { |
2243 |
} else { |
2244 |
TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement(typeDeclaration); |
2244 |
TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement(typeDeclaration); |
2245 |
switch(this.ast.apiLevel) { |
2245 |
switch(this.ast.apiLevel) { |
2246 |
case AST.JLS2 : |
2246 |
case AST.JLS2_INTERNAL : |
2247 |
TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration(); |
2247 |
TypeDeclaration typeDecl = typeDeclarationStatement.internalGetTypeDeclaration(); |
2248 |
typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); |
2248 |
typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); |
2249 |
break; |
2249 |
break; |
2250 |
case AST.JLS3 : |
2250 |
case AST.JLS3 : |
Lines 2373-2385
Link Here
|
2373 |
public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { |
2373 |
public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { |
2374 |
switch (typeDeclaration.kind()) { |
2374 |
switch (typeDeclaration.kind()) { |
2375 |
case IGenericType.ENUM_DECL : |
2375 |
case IGenericType.ENUM_DECL : |
2376 |
if (this.ast.apiLevel == AST.JLS2) { |
2376 |
if (this.ast.apiLevel == AST.JLS2_INTERNAL) { |
2377 |
return null; |
2377 |
return null; |
2378 |
} else { |
2378 |
} else { |
2379 |
return convertToEnumDeclaration(typeDeclaration); |
2379 |
return convertToEnumDeclaration(typeDeclaration); |
2380 |
} |
2380 |
} |
2381 |
case IGenericType.ANNOTATION_TYPE_DECL : |
2381 |
case IGenericType.ANNOTATION_TYPE_DECL : |
2382 |
if (this.ast.apiLevel == AST.JLS2) { |
2382 |
if (this.ast.apiLevel == AST.JLS2_INTERNAL) { |
2383 |
return null; |
2383 |
return null; |
2384 |
} else { |
2384 |
} else { |
2385 |
return convertToAnnotationDeclaration(typeDeclaration); |
2385 |
return convertToAnnotationDeclaration(typeDeclaration); |
Lines 2401-2408
Link Here
|
2401 |
// the type references level. |
2401 |
// the type references level. |
2402 |
if (typeDeclaration.superclass != null) { |
2402 |
if (typeDeclaration.superclass != null) { |
2403 |
switch(this.ast.apiLevel) { |
2403 |
switch(this.ast.apiLevel) { |
2404 |
case AST.JLS2 : |
2404 |
case AST.JLS2_INTERNAL : |
2405 |
typeDecl.setSuperclass(convert(typeDeclaration.superclass)); |
2405 |
typeDecl.internalSetSuperclass(convert(typeDeclaration.superclass)); |
2406 |
break; |
2406 |
break; |
2407 |
case AST.JLS3 : |
2407 |
case AST.JLS3 : |
2408 |
typeDecl.setSuperclassType(convertType(typeDeclaration.superclass)); |
2408 |
typeDecl.setSuperclassType(convertType(typeDeclaration.superclass)); |
Lines 2413-2421
Link Here
|
2413 |
org.eclipse.jdt.internal.compiler.ast.TypeReference[] superInterfaces = typeDeclaration.superInterfaces; |
2413 |
org.eclipse.jdt.internal.compiler.ast.TypeReference[] superInterfaces = typeDeclaration.superInterfaces; |
2414 |
if (superInterfaces != null) { |
2414 |
if (superInterfaces != null) { |
2415 |
switch(this.ast.apiLevel) { |
2415 |
switch(this.ast.apiLevel) { |
2416 |
case AST.JLS2 : |
2416 |
case AST.JLS2_INTERNAL : |
2417 |
for (int index = 0, length = superInterfaces.length; index < length; index++) { |
2417 |
for (int index = 0, length = superInterfaces.length; index < length; index++) { |
2418 |
typeDecl.superInterfaces().add(convert(superInterfaces[index])); |
2418 |
typeDecl.internalSuperInterfaces().add(convert(superInterfaces[index])); |
2419 |
} |
2419 |
} |
2420 |
break; |
2420 |
break; |
2421 |
case AST.JLS3 : |
2421 |
case AST.JLS3 : |
Lines 2427-2433
Link Here
|
2427 |
org.eclipse.jdt.internal.compiler.ast.TypeParameter[] typeParameters = typeDeclaration.typeParameters; |
2427 |
org.eclipse.jdt.internal.compiler.ast.TypeParameter[] typeParameters = typeDeclaration.typeParameters; |
2428 |
if (typeParameters != null) { |
2428 |
if (typeParameters != null) { |
2429 |
switch(this.ast.apiLevel) { |
2429 |
switch(this.ast.apiLevel) { |
2430 |
case AST.JLS2 : |
2430 |
case AST.JLS2_INTERNAL : |
2431 |
typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED); |
2431 |
typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED); |
2432 |
break; |
2432 |
break; |
2433 |
case AST.JLS3 : |
2433 |
case AST.JLS3 : |
Lines 2551-2557
Link Here
|
2551 |
int modifiers = importReference.modifiers; |
2551 |
int modifiers = importReference.modifiers; |
2552 |
if (modifiers != IConstants.AccDefault) { |
2552 |
if (modifiers != IConstants.AccDefault) { |
2553 |
switch(this.ast.apiLevel) { |
2553 |
switch(this.ast.apiLevel) { |
2554 |
case AST.JLS2 : |
2554 |
case AST.JLS2_INTERNAL : |
2555 |
importDeclaration.setFlags(importDeclaration.getFlags() | ASTNode.MALFORMED); |
2555 |
importDeclaration.setFlags(importDeclaration.getFlags() | ASTNode.MALFORMED); |
2556 |
break; |
2556 |
break; |
2557 |
case AST.JLS3 : |
2557 |
case AST.JLS3 : |
Lines 2588-2594
Link Here
|
2588 |
org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = importReference.annotations; |
2588 |
org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = importReference.annotations; |
2589 |
if (annotations != null) { |
2589 |
if (annotations != null) { |
2590 |
switch(this.ast.apiLevel) { |
2590 |
switch(this.ast.apiLevel) { |
2591 |
case AST.JLS2 : |
2591 |
case AST.JLS2_INTERNAL : |
2592 |
packageDeclaration.setFlags(packageDeclaration.getFlags() & ASTNode.MALFORMED); |
2592 |
packageDeclaration.setFlags(packageDeclaration.getFlags() & ASTNode.MALFORMED); |
2593 |
break; |
2593 |
break; |
2594 |
case AST.JLS3 : |
2594 |
case AST.JLS3 : |
Lines 2828-2834
Link Here
|
2828 |
} |
2828 |
} |
2829 |
simpleName.setSourceRange(sourceStart, end - sourceStart + 1); |
2829 |
simpleName.setSourceRange(sourceStart, end - sourceStart + 1); |
2830 |
switch(this.ast.apiLevel) { |
2830 |
switch(this.ast.apiLevel) { |
2831 |
case AST.JLS2 : |
2831 |
case AST.JLS2_INTERNAL : |
2832 |
type = this.ast.newSimpleType(simpleName); |
2832 |
type = this.ast.newSimpleType(simpleName); |
2833 |
type.setFlags(type.getFlags() | ASTNode.MALFORMED); |
2833 |
type.setFlags(type.getFlags() | ASTNode.MALFORMED); |
2834 |
type.setSourceRange(sourceStart, end - sourceStart + 1); |
2834 |
type.setSourceRange(sourceStart, end - sourceStart + 1); |
Lines 2889-2895
Link Here
|
2889 |
long[] positions = parameterizedQualifiedTypeReference.sourcePositions; |
2889 |
long[] positions = parameterizedQualifiedTypeReference.sourcePositions; |
2890 |
sourceStart = (int)(positions[0]>>>32); |
2890 |
sourceStart = (int)(positions[0]>>>32); |
2891 |
switch(this.ast.apiLevel) { |
2891 |
switch(this.ast.apiLevel) { |
2892 |
case AST.JLS2 : { |
2892 |
case AST.JLS2_INTERNAL : { |
2893 |
char[][] name = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).getTypeName(); |
2893 |
char[][] name = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).getTypeName(); |
2894 |
int nameLength = name.length; |
2894 |
int nameLength = name.length; |
2895 |
sourceStart = (int)(positions[0]>>>32); |
2895 |
sourceStart = (int)(positions[0]>>>32); |
Lines 3417-3423
Link Here
|
3417 |
if (expression instanceof JavadocArgumentExpression) { |
3417 |
if (expression instanceof JavadocArgumentExpression) { |
3418 |
JavadocArgumentExpression argExpr = (JavadocArgumentExpression) expression; |
3418 |
JavadocArgumentExpression argExpr = (JavadocArgumentExpression) expression; |
3419 |
org.eclipse.jdt.internal.compiler.ast.TypeReference typeRef = argExpr.argument.type; |
3419 |
org.eclipse.jdt.internal.compiler.ast.TypeReference typeRef = argExpr.argument.type; |
3420 |
if (this.ast.apiLevel != AST.JLS2) param.setVarargs(argExpr.argument.isVarArgs()); |
3420 |
if (this.ast.apiLevel >= AST.JLS3) param.setVarargs(argExpr.argument.isVarArgs()); |
3421 |
recordNodes(param.getType(), typeRef); |
3421 |
recordNodes(param.getType(), typeRef); |
3422 |
if (param.getType().isSimpleType()) { |
3422 |
if (param.getType().isSimpleType()) { |
3423 |
recordName(((SimpleType)param.getType()).getName(), typeRef); |
3423 |
recordName(((SimpleType)param.getType()).getName(), typeRef); |
Lines 4144-4151
Link Here
|
4144 |
*/ |
4144 |
*/ |
4145 |
protected void setModifiers(FieldDeclaration fieldDeclaration, org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDecl) { |
4145 |
protected void setModifiers(FieldDeclaration fieldDeclaration, org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDecl) { |
4146 |
switch(this.ast.apiLevel) { |
4146 |
switch(this.ast.apiLevel) { |
4147 |
case AST.JLS2 : |
4147 |
case AST.JLS2_INTERNAL : |
4148 |
fieldDeclaration.setModifiers(fieldDecl.modifiers & CompilerModifiers.AccJustFlag); |
4148 |
fieldDeclaration.internalSetModifiers(fieldDecl.modifiers & CompilerModifiers.AccJustFlag); |
4149 |
if (fieldDecl.annotations != null) { |
4149 |
if (fieldDecl.annotations != null) { |
4150 |
fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED); |
4150 |
fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED); |
4151 |
} |
4151 |
} |
Lines 4162-4169
Link Here
|
4162 |
*/ |
4162 |
*/ |
4163 |
protected void setModifiers(Initializer initializer, org.eclipse.jdt.internal.compiler.ast.Initializer oldInitializer) { |
4163 |
protected void setModifiers(Initializer initializer, org.eclipse.jdt.internal.compiler.ast.Initializer oldInitializer) { |
4164 |
switch(this.ast.apiLevel) { |
4164 |
switch(this.ast.apiLevel) { |
4165 |
case AST.JLS2: |
4165 |
case AST.JLS2_INTERNAL: |
4166 |
initializer.setModifiers(oldInitializer.modifiers & CompilerModifiers.AccJustFlag); |
4166 |
initializer.internalSetModifiers(oldInitializer.modifiers & CompilerModifiers.AccJustFlag); |
4167 |
if (oldInitializer.annotations != null) { |
4167 |
if (oldInitializer.annotations != null) { |
4168 |
initializer.setFlags(initializer.getFlags() | ASTNode.MALFORMED); |
4168 |
initializer.setFlags(initializer.getFlags() | ASTNode.MALFORMED); |
4169 |
} |
4169 |
} |
Lines 4179-4186
Link Here
|
4179 |
*/ |
4179 |
*/ |
4180 |
protected void setModifiers(MethodDeclaration methodDecl, AbstractMethodDeclaration methodDeclaration) { |
4180 |
protected void setModifiers(MethodDeclaration methodDecl, AbstractMethodDeclaration methodDeclaration) { |
4181 |
switch(this.ast.apiLevel) { |
4181 |
switch(this.ast.apiLevel) { |
4182 |
case AST.JLS2 : |
4182 |
case AST.JLS2_INTERNAL : |
4183 |
methodDecl.setModifiers(methodDeclaration.modifiers & CompilerModifiers.AccJustFlag); |
4183 |
methodDecl.internalSetModifiers(methodDeclaration.modifiers & CompilerModifiers.AccJustFlag); |
4184 |
if (methodDeclaration.annotations != null) { |
4184 |
if (methodDeclaration.annotations != null) { |
4185 |
methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED); |
4185 |
methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED); |
4186 |
} |
4186 |
} |
Lines 4197-4204
Link Here
|
4197 |
*/ |
4197 |
*/ |
4198 |
protected void setModifiers(SingleVariableDeclaration variableDecl, Argument argument) { |
4198 |
protected void setModifiers(SingleVariableDeclaration variableDecl, Argument argument) { |
4199 |
switch(this.ast.apiLevel) { |
4199 |
switch(this.ast.apiLevel) { |
4200 |
case AST.JLS2 : |
4200 |
case AST.JLS2_INTERNAL : |
4201 |
variableDecl.setModifiers(argument.modifiers & CompilerModifiers.AccJustFlag); |
4201 |
variableDecl.internalSetModifiers(argument.modifiers & CompilerModifiers.AccJustFlag); |
4202 |
if (argument.annotations != null) { |
4202 |
if (argument.annotations != null) { |
4203 |
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); |
4203 |
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); |
4204 |
} |
4204 |
} |
Lines 4265-4272
Link Here
|
4265 |
|
4265 |
|
4266 |
protected void setModifiers(SingleVariableDeclaration variableDecl, LocalDeclaration localDeclaration) { |
4266 |
protected void setModifiers(SingleVariableDeclaration variableDecl, LocalDeclaration localDeclaration) { |
4267 |
switch(this.ast.apiLevel) { |
4267 |
switch(this.ast.apiLevel) { |
4268 |
case AST.JLS2 : |
4268 |
case AST.JLS2_INTERNAL : |
4269 |
variableDecl.setModifiers(localDeclaration.modifiers & CompilerModifiers.AccJustFlag); |
4269 |
variableDecl.internalSetModifiers(localDeclaration.modifiers & CompilerModifiers.AccJustFlag); |
4270 |
if (localDeclaration.annotations != null) { |
4270 |
if (localDeclaration.annotations != null) { |
4271 |
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); |
4271 |
variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); |
4272 |
} |
4272 |
} |
Lines 4337-4347
Link Here
|
4337 |
*/ |
4337 |
*/ |
4338 |
protected void setModifiers(TypeDeclaration typeDecl, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { |
4338 |
protected void setModifiers(TypeDeclaration typeDecl, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { |
4339 |
switch(this.ast.apiLevel) { |
4339 |
switch(this.ast.apiLevel) { |
4340 |
case AST.JLS2 : |
4340 |
case AST.JLS2_INTERNAL : |
4341 |
int modifiers = typeDeclaration.modifiers; |
4341 |
int modifiers = typeDeclaration.modifiers; |
4342 |
modifiers &= ~IConstants.AccInterface; // remove AccInterface flags |
4342 |
modifiers &= ~IConstants.AccInterface; // remove AccInterface flags |
4343 |
modifiers &= CompilerModifiers.AccJustFlag; |
4343 |
modifiers &= CompilerModifiers.AccJustFlag; |
4344 |
typeDecl.setModifiers(modifiers); |
4344 |
typeDecl.internalSetModifiers(modifiers); |
4345 |
if (typeDeclaration.annotations != null) { |
4345 |
if (typeDeclaration.annotations != null) { |
4346 |
typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED); |
4346 |
typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED); |
4347 |
} |
4347 |
} |
Lines 4358-4367
Link Here
|
4358 |
*/ |
4358 |
*/ |
4359 |
protected void setModifiers(VariableDeclarationExpression variableDeclarationExpression, LocalDeclaration localDeclaration) { |
4359 |
protected void setModifiers(VariableDeclarationExpression variableDeclarationExpression, LocalDeclaration localDeclaration) { |
4360 |
switch(this.ast.apiLevel) { |
4360 |
switch(this.ast.apiLevel) { |
4361 |
case AST.JLS2 : |
4361 |
case AST.JLS2_INTERNAL : |
4362 |
int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag; |
4362 |
int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag; |
4363 |
modifiers &= ~CompilerModifiers.AccBlankFinal; |
4363 |
modifiers &= ~CompilerModifiers.AccBlankFinal; |
4364 |
variableDeclarationExpression.setModifiers(modifiers); |
4364 |
variableDeclarationExpression.internalSetModifiers(modifiers); |
4365 |
if (localDeclaration.annotations != null) { |
4365 |
if (localDeclaration.annotations != null) { |
4366 |
variableDeclarationExpression.setFlags(variableDeclarationExpression.getFlags() | ASTNode.MALFORMED); |
4366 |
variableDeclarationExpression.setFlags(variableDeclarationExpression.getFlags() | ASTNode.MALFORMED); |
4367 |
} |
4367 |
} |
Lines 4432-4441
Link Here
|
4432 |
*/ |
4432 |
*/ |
4433 |
protected void setModifiers(VariableDeclarationStatement variableDeclarationStatement, LocalDeclaration localDeclaration) { |
4433 |
protected void setModifiers(VariableDeclarationStatement variableDeclarationStatement, LocalDeclaration localDeclaration) { |
4434 |
switch(this.ast.apiLevel) { |
4434 |
switch(this.ast.apiLevel) { |
4435 |
case AST.JLS2 : |
4435 |
case AST.JLS2_INTERNAL : |
4436 |
int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag; |
4436 |
int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag; |
4437 |
modifiers &= ~CompilerModifiers.AccBlankFinal; |
4437 |
modifiers &= ~CompilerModifiers.AccBlankFinal; |
4438 |
variableDeclarationStatement.setModifiers(modifiers); |
4438 |
variableDeclarationStatement.internalSetModifiers(modifiers); |
4439 |
if (localDeclaration.annotations != null) { |
4439 |
if (localDeclaration.annotations != null) { |
4440 |
variableDeclarationStatement.setFlags(variableDeclarationStatement.getFlags() | ASTNode.MALFORMED); |
4440 |
variableDeclarationStatement.setFlags(variableDeclarationStatement.getFlags() | ASTNode.MALFORMED); |
4441 |
} |
4441 |
} |
Lines 4672-4679
Link Here
|
4672 |
elementType.setParent(null, null); |
4672 |
elementType.setParent(null, null); |
4673 |
this.ast.getBindingResolver().updateKey(type, elementType); |
4673 |
this.ast.getBindingResolver().updateKey(type, elementType); |
4674 |
switch(this.ast.apiLevel) { |
4674 |
switch(this.ast.apiLevel) { |
4675 |
case AST.JLS2 : |
4675 |
case AST.JLS2_INTERNAL : |
4676 |
methodDeclaration.setReturnType(elementType); |
4676 |
methodDeclaration.internalSetReturnType(elementType); |
4677 |
break; |
4677 |
break; |
4678 |
case AST.JLS3 : |
4678 |
case AST.JLS3 : |
4679 |
methodDeclaration.setReturnType2(elementType); |
4679 |
methodDeclaration.setReturnType2(elementType); |
Lines 4693-4700
Link Here
|
4693 |
subarrayType.setParent(null, null); |
4693 |
subarrayType.setParent(null, null); |
4694 |
updateInnerPositions(subarrayType, remainingDimensions); |
4694 |
updateInnerPositions(subarrayType, remainingDimensions); |
4695 |
switch(this.ast.apiLevel) { |
4695 |
switch(this.ast.apiLevel) { |
4696 |
case AST.JLS2 : |
4696 |
case AST.JLS2_INTERNAL : |
4697 |
methodDeclaration.setReturnType(subarrayType); |
4697 |
methodDeclaration.internalSetReturnType(subarrayType); |
4698 |
break; |
4698 |
break; |
4699 |
case AST.JLS3 : |
4699 |
case AST.JLS3 : |
4700 |
methodDeclaration.setReturnType2(subarrayType); |
4700 |
methodDeclaration.setReturnType2(subarrayType); |
Lines 4704-4711
Link Here
|
4704 |
} |
4704 |
} |
4705 |
} else { |
4705 |
} else { |
4706 |
switch(this.ast.apiLevel) { |
4706 |
switch(this.ast.apiLevel) { |
4707 |
case AST.JLS2 : |
4707 |
case AST.JLS2_INTERNAL : |
4708 |
methodDeclaration.setReturnType(type); |
4708 |
methodDeclaration.internalSetReturnType(type); |
4709 |
break; |
4709 |
break; |
4710 |
case AST.JLS3 : |
4710 |
case AST.JLS3 : |
4711 |
methodDeclaration.setReturnType2(type); |
4711 |
methodDeclaration.setReturnType2(type); |
Lines 4714-4721
Link Here
|
4714 |
} |
4714 |
} |
4715 |
} else { |
4715 |
} else { |
4716 |
switch(this.ast.apiLevel) { |
4716 |
switch(this.ast.apiLevel) { |
4717 |
case AST.JLS2 : |
4717 |
case AST.JLS2_INTERNAL : |
4718 |
methodDeclaration.setReturnType(type); |
4718 |
methodDeclaration.internalSetReturnType(type); |
4719 |
break; |
4719 |
break; |
4720 |
case AST.JLS3 : |
4720 |
case AST.JLS3 : |
4721 |
methodDeclaration.setReturnType2(type); |
4721 |
methodDeclaration.setReturnType2(type); |