|Access an IComilationUnit corresponding to an IField [message #1782349]
||Thu, 22 February 2018 09:41
| Piet Willers
Registered: February 2018
i develop a plugin to generate a new class from the class, the plugin has been called from.
This part works totally fine. But I also need to generate a new class for the nested types in my class. For example I have a class called "xyz" and I declare a variable of that type in my class "abc". In this example, I would call the plugin from class "abc" and I need to programmatically detect the class "xyz" and call the plugin for that class as well.
The plugin is called with a parameter of type ICompilationUnit.
And there comes the problem i haven't been able to solve yet:
How do I access the ICompilationUnit of a type that is linked in my existing ICompilationUnit.
The furthest i have been was getting the IFile of my nested type, but i wasn't able to get the ICompilationUnit from there neither.
Thanks for your help!
Powered by FUDForum
. Page generated in 0.01979 seconds