Bug 330826 - ASTMatcher should return the difference between ASTs
Summary: ASTMatcher should return the difference between ASTs
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 11:42 EST by Raffi Khatchadourian CLA
Modified: 2010-11-22 11:57 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raffi Khatchadourian CLA 2010-11-22 11:42:25 EST
Build Identifier: 20100917-0705

Currently, the org.eclipse.jdt.core.dom.ASTMatcher discovers whether two AST nodes, including their subtrees, are the same. Thus, the match methods return booleans. However, it would be much more usual to return something other than booleans here, namely, information pertaining to the difference between the ASTs in the case that they differ. For example, the match methods could return something like an ASTDifferenceDescriptor, which would include information pertaining to the exact nodes and their positions in the tree that were different.

Reproducible: Always
Comment 1 Raffi Khatchadourian CLA 2010-11-22 11:54:20 EST
Even just returning the first node that was found to be different would be helpful.