|
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 |
|
| 672 |
// We would have got all the necessary local types by now and hence there is no further need |
| 673 |
// to parse the method bodies. Parser.getMethodBodies, which is called latter in this function, |
| 674 |
// will not parse the method statements if ASTNode.HasAllMethodBodies is set. |
| 675 |
if (containsLocalType) parsedUnit.bits |= ASTNode.HasAllMethodBodies; |
| 676 |
} else { |
676 |
} else { |
| 677 |
// create parsed unit from file |
677 |
// create parsed unit from file |
| 678 |
IFile file = (IFile) cu.getResource(); |
678 |
IFile file = (IFile) cu.getResource(); |