Bug 181393 - DefaultASTVisitor doesn't override all methods
Summary: DefaultASTVisitor doesn't override all methods
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 182338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-06 06:53 EDT by Jerome Lanneluc CLA
Modified: 2007-04-27 10:12 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (18.96 KB, patch)
2007-04-13 11:21 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2007-04-06 06:53:58 EDT
I20070403

DefaultASTVisitor doesn't override all methods (e.g. it doesn't override visit(MarkerAnnotation). As a consequence, visitNode(ASTNode) and endVisitNode(ASTNode) are not called for all nodes in the AST.
Comment 1 Jerome Lanneluc CLA 2007-04-13 11:21:28 EDT
Created attachment 63764 [details]
Proposed fix

Override all methods but visit(Modifier) and endVisit(Modifier) as we don't want to associate a comment with a modifier (ASTRewritingMethodDeclTest#testMethodReturnTypeChange2AST3() would fail).
Comment 2 Jerome Lanneluc CLA 2007-04-13 11:40:42 EDT
*** Bug 182338 has been marked as a duplicate of this bug. ***
Comment 3 Jerome Lanneluc CLA 2007-04-13 12:35:50 EDT
Fix released for 3.3M7 in HEAD.
Comment 4 Eric Jodet CLA 2007-04-27 06:29:48 EDT
Verified for 3.3 M7 using build I20070427-0010