Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 301438 | Differences between
and this patch

Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java (-6 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 645-655 Link Here
645
				CompilationUnitDeclaration parsedUnit = null;
645
				CompilationUnitDeclaration parsedUnit = null;
646
				if (cu.isOpen()) {
646
				if (cu.isOpen()) {
647
					// create parsed unit from source element infos
647
					// create parsed unit from source element infos
648
					// As part of fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=254738
649
					// Since we have the handle to the ICompilationUnit, instead of the name pass the ICompilationUnit, which is required if we were 
650
					// to get through Parser.getMethodBodies(), which is invoked later in this method. Note that as part of this fix,
651
					// ASTNode.HasAllMethodBodies flag - which was being set earlier - has been removed. As a design feature, only the Parser 
652
					// is supposed to handle this particular bit.
653
					CompilationResult result = new CompilationResult((ICompilationUnit)cu, i, openablesLength, this.options.maxProblemsPerUnit);
648
					CompilationResult result = new CompilationResult((ICompilationUnit)cu, i, openablesLength, this.options.maxProblemsPerUnit);
654
					SourceTypeElementInfo[] typeInfos = null;
649
					SourceTypeElementInfo[] typeInfos = null;
655
					try {
650
					try {
Lines 673-678 Link Here
673
							flags,
668
							flags,
674
							this.lookupEnvironment.problemReporter,
669
							this.lookupEnvironment.problemReporter,
675
							result);
670
							result);
671
					 if (containsLocalType) 	 parsedUnit.bits |= ASTNode.HasAllMethodBodies;
676
				} else {
672
				} else {
677
					// create parsed unit from file
673
					// create parsed unit from file
678
					IFile file = (IFile) cu.getResource();
674
					IFile file = (IFile) cu.getResource();

Return to bug 301438