Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » IJavaModel, AST and Bindings
IJavaModel, AST and Bindings [message #259449] Wed, 08 April 2009 10:03
Eclipse UserFriend
Hi,

I need to walk around Java code.

I use IJavaModel now, it is mostly simple and fast, except that I have
to handle signatures and resolve them to Types all the time and it is
painful
(e.g. IMetod.getReturnType -> check kind of type -> Signature.toString
then IType.resolveType -> javaproject.findType).

Now I see I would need AST sometimes (e.g. to check method body, look
for a function type). So I wonder how to handle it.

How can I get AST for given IJavaElement ?
Can ICompilationUnit.reconcile be used for that?
Can I get e.g. TypeBinding for given IType ?

Maybe I should always use ASTParser ?

Maybe I don't have to use IJavaModel for reading Java structure, as I
have Bindings know? No need for resolving types, but Bindings are
expensive. Can I get bindings directly without creating AST ?

Regards,
Chris
Previous Topic:Classpath variable extension -- can the icon be changed?
Next Topic:Can I have all my workspaces use the same preferences?
Goto Forum:
  


Current Time: Thu Apr 24 02:12:30 EDT 2025

Powered by FUDForum. Page generated in 0.02965 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top