This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I need to create a Tree for an arbitrary type given as a string using fully-qualified names and use this tree to generate Java code in such a way that imports are handled. If I understand correctly the current way to handle imports is to use TreeMaker.QualIdent(). This method gets an Element, but there is no simple way to get an Element for any type. There is TreeUtilities.parseType(), but it returns a TypeMirror. I recall we agreed to introduce a TreeMaker.Tree(String typeName) method which would do just this. Such a solution would have the disadvantage that the client can't choose not to have imports handled, but that's not my case and I would be happy with such a solution.
Overtake.