[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.jdt] Re: Correspondence between IJavaElement and ASTNode
|
- From: Markus Keller <markus_keller@xxxxxxxxxx>
- Date: Thu, 01 Sep 2005 11:34:38 +0200
- Newsgroups: eclipse.tools.jdt
- Organization: EclipseCorner
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511
David wrote:
[..]
I'd like to know if it is possible to obtain the corresponding ASTNode
from an IJavaElement ? For example, if I have an IMethod, can I obtain
the corresponding MethodDeclaration ?
[..]
The mapping from e.g. IMethod to a corresponding ASTNode is a bit more
involved. E.g. an IMethod can map to a MethodDeclaration or to an
AnnotationTypeMemberDeclaration.
There's no public API to do this mapping.
In JDT/UI, we use our internal classes NodeFinder and ASTNodeSearchUtil.
HTH,
Markus