View | Details | Raw Unified | Return to bug 190622 | Differences between
and this patch

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/ASTConverter.java (-5 / +7 lines)
Lines 3066-3072 Link Here
3066
			}
3066
			}
3067
			return wildcardType;
3067
			return wildcardType;
3068
		}
3068
		}
3069
		Type type = null;				
3069
		Type type = null;
3070
		int sourceStart = -1;
3070
		int sourceStart = -1;
3071
		int length = 0;
3071
		int length = 0;
3072
		int dimensions = typeReference.dimensions();
3072
		int dimensions = typeReference.dimensions();
Lines 3596-3602 Link Here
3596
		while(currentNode != null
3596
		while(currentNode != null
3597
			&&!(currentNode instanceof MethodDeclaration)
3597
			&&!(currentNode instanceof MethodDeclaration)
3598
			&& !(currentNode instanceof Initializer)
3598
			&& !(currentNode instanceof Initializer)
3599
			&& !(currentNode instanceof FieldDeclaration)) {
3599
			&& !(currentNode instanceof FieldDeclaration)
3600
			&& !(currentNode instanceof AbstractTypeDeclaration)) {
3600
			currentNode = currentNode.getParent();
3601
			currentNode = currentNode.getParent();
3601
		}
3602
		}
3602
		if (currentNode == null) {
3603
		if (currentNode == null) {
Lines 3622-3630 Link Here
3622
			while(!(currentNode instanceof AbstractTypeDeclaration)) {
3623
			while(!(currentNode instanceof AbstractTypeDeclaration)) {
3623
				currentNode = currentNode.getParent();
3624
				currentNode = currentNode.getParent();
3624
			}
3625
			}
3625
			if (currentNode instanceof TypeDeclaration
3626
			if (currentNode instanceof AbstractTypeDeclaration) {
3626
					|| currentNode instanceof EnumDeclaration
3627
					|| currentNode instanceof AnnotationTypeDeclaration) {
3628
				org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDecl = (org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) this.ast.getBindingResolver().getCorrespondingNode(currentNode);
3627
				org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDecl = (org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) this.ast.getBindingResolver().getCorrespondingNode(currentNode);
3629
				if ((fieldDeclaration.getModifiers() & Modifier.STATIC) != 0) {
3628
				if ((fieldDeclaration.getModifiers() & Modifier.STATIC) != 0) {
3630
					return typeDecl.staticInitializerScope;
3629
					return typeDecl.staticInitializerScope;
Lines 3632-3637 Link Here
3632
					return typeDecl.initializerScope;
3631
					return typeDecl.initializerScope;
3633
				}
3632
				}
3634
			}
3633
			}
3634
		} else if (currentNode instanceof AbstractTypeDeclaration) {
3635
			org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDecl = (org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) this.ast.getBindingResolver().getCorrespondingNode(currentNode);
3636
			return typeDecl.initializerScope;
3635
		}
3637
		}
3636
		AbstractMethodDeclaration abstractMethodDeclaration = (AbstractMethodDeclaration) this.ast.getBindingResolver().getCorrespondingNode(currentNode);
3638
		AbstractMethodDeclaration abstractMethodDeclaration = (AbstractMethodDeclaration) this.ast.getBindingResolver().getCorrespondingNode(currentNode);
3637
		return abstractMethodDeclaration.scope;
3639
		return abstractMethodDeclaration.scope;

Return to bug 190622