Getting translation unit from a CDT Project [message #1769693] |
Wed, 02 August 2017 17:23 |
Hamiz Ahmed Messages: 2 Registered: August 2017 |
Junior Member |
|
|
Hi,
Can someone tell me how to get ITranslationUnit from an ICproject?
The project contain multiple C files and is indexed. However, I am just unable to get the translation unit for the files in the project.
Here is the code I am using
IPath filePath = new Path("\\Test Project 10\\src\\Arrays.c");
ICElement element = icdtProject.findElement(filePath);
ITranslationUnit unit = (ITranslationUnit)element;
This throws exception in line 2. However, Arrays.c is one of the file in the project. I will be extremely thankful if someone helps in this case.
[Updated on: Thu, 03 August 2017 08:10] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02281 seconds