Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Programmatically retrieving the discovered include directories of the active profile
Programmatically retrieving the discovered include directories of the active profile [message #1706066] Fri, 21 August 2015 15:18
An De is currently offline An DeFriend
Messages: 1
Registered: August 2015
Junior Member
Hopefully this is the right place to ask.

I would like to build a code checker, and I would need to know where the directories for the default includes are, basically taking them from the discovered information. It's proving much harder than I thought. The only solution I found is something like this:

IConfiguration configuration = ManagedBuildManager.getBuildInfo( file ).getDefaultConfiguration();
PathInfo projectPathInfo = CfgDiscoveredPathManager.getInstance().getDiscoveredInfo( file.getProject(), new CfgInfoContext( configuration ) );
IPath[] defaultIncludeDirs = projectPathInfo.getIncludePaths();


The problem is that the list of include directories is empty. My guess is that I have to use the constructor CfgInfoContext that takes an InfoContext, but I don't know how to find or build an InfoContext. It seems a fairly obscure task. Besides, I don't know if my approach is good in the first place.

Can someone give me some more information? Thanks
Previous Topic:g++/gcc not found in PATH. Eclipse. Windows
Next Topic:IAR plugins
Goto Forum:
  


Current Time: Thu Apr 25 07:46:27 GMT 2024

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

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

Back to the top