Community
Participate
Working Groups
Build Identifier: I20090611-1540 I had the problem that I needed to get a new org.eclipse.jdt.core.dom.Type ast node that corresponds to a given org.eclipse.jdt.core.dom.ITypeBinding. Currently you have to code all of that stuff yourself. So it would be nice to have a helper method that aleady allows to get the corresponding Type ast node. I'll attach the code I am currently using later on via "Add an Attachment". Reproducible: Always
Created attachment 183304 [details] This is the code I currently use to deal with the mentioned problem
Satyam, please follow up. Thanks!
I think we should think of what helper methods we could provide as API. For DOM/AST usage, users need to do the same thing over and over again. It would be good if we could come up with a list of utility methods that could be reused by all users of DOM API. Markus, would you have any suggestions ?
In general, the mapping from ITypeBinding to a Type node can only be done correctly when imports are taken into account. For this, there's already API, e.g.: org.eclipse.jdt.core.dom.rewrite.ImportRewrite#addImport(ITypeBinding, AST)