Bug 27690 - SourceElementParser doesn't parse local declarations even if it is requested
Summary: SourceElementParser doesn't parse local declarations even if it is requested
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-04 14:12 EST by Olivier Thomann CLA
Modified: 2002-12-18 04:26 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2002-12-04 14:12:55 EST
Using 1203, I need to set needReferenceInfo to true to get the local
declarations. If needReferenceInfo is false, then even if I create a
SourceElementParser with reportLocalDeclarations set to true, I don't get them.
The bug seems to come from the parseCompilationUnit methods on SourceElementParser.
It parses the method bodies only if needReferenceInfo is true instead of
checking if localDeclarationVisitor is not null.
Comment 1 Philipe Mulet CLA 2002-12-05 08:51:06 EST
Pls fix
Comment 2 Olivier Thomann CLA 2002-12-05 09:12:26 EST
In fact it has to check both. The right test is:
localDeclarationVisitor != null || needReferenceInfo.
Because you might want to get the reference without the local declaration or
visa versa.
Comment 3 Olivier Thomann CLA 2002-12-05 12:17:53 EST
Fixed and released in 2.1 stream.
Comment 4 David Audel CLA 2002-12-18 04:26:16 EST
Verified.