Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Access an IComilationUnit corresponding to an IField(Ways to access an ICompilationUnit of my nested Type)
Access an IComilationUnit corresponding to an IField [message #1782349] Thu, 22 February 2018 09:41
Piet Willers is currently offline Piet WillersFriend
Messages: 1
Registered: February 2018
Junior Member
Hey there,

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!
Regards,
Piet
Previous Topic:Two same context info entries
Next Topic:Beginner's introduction to React.js JavaScript
Goto Forum:
  


Current Time: Fri Nov 16 03:29:31 GMT 2018

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

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

Back to the top