Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Getting translation unit from a CDT Project
Getting translation unit from a CDT Project [message #1769693] Wed, 02 August 2017 13:23 Go to next message
Eclipse UserFriend
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 04:10] by Moderator

Re: Getting translation unit from a CDT Project [message #1769791 is a reply to message #1769693] Thu, 03 August 2017 08:12 Go to previous messageGo to next message
Eclipse UserFriend
I have a better place to ask questions like this, the cdt-dev mailing list:

Quote:
questions regarding CDT guts and extending CDT should be asked on
cdt-dev mailing list, it is intention on this list


https://dev.eclipse.org/mhonarc/lists/cdt-dev/msg32224.html

Sign-up here https://dev.eclipse.org/mailman/listinfo/cdt-dev
Re: Getting translation unit from a CDT Project [message #1769800 is a reply to message #1769791] Thu, 03 August 2017 09:40 Go to previous message
Eclipse UserFriend
Thanks
Previous Topic:Plugin is showing up blank
Next Topic:Adding external static library to C project
Goto Forum:
  


Current Time: Sun Mar 16 10:02:35 EDT 2025

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

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

Back to the top