Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » The proper way to navigate through project configurations/tools in 2.1
The proper way to navigate through project configurations/tools in 2.1 [message #146603] Tue, 07 June 2005 22:24
Tony Allowatt is currently offline Tony AllowattFriend
Messages: 2
Registered: July 2009
Junior Member
I've been working on a plugin that creates a new Managed C++ project
wizard (subclasses NewManagedCCProjectWizard) and performs some
additional tasks in performFinish() such as adding extra include
directories to the project settings.

The way I did this in CDT 2.0 was:

* Get an ITarget[] from ManagedBuildManager.getTargets(project)
* For each ITarget,
* Get an IConfiguration[] from the ITarget
* For each IConfiguration,
* Get the C++ compiler ITool with
IConfiguration.getToolById("cdt.managedbuild.tool.gnu.cpp.compiler ")
* Get the IOptions with ITool.getOptionById and set it

Now I'm trying to port this over to the new 2.1 model, and I've run
into a couple problems. I'm not even sure if I'm doing this the
recommended way, because I haven't seen any documentation or other
newsgroup posts in the archive that might point me in the right
direction. What I do now is:

* Get an IManagedBuildInfo from ManagedBuildManager.getBuildInfo(project)
* Get an IManagedProject from IManagedBuildInfo.getManagedProject()
* Get an IConfiguration[] from the IManagedProject
* For each IConfiguration,
* Try to get the ITool for the compiler with IConfiguation.getTool("...")

Here's the problem -- the id of the tool I want is no longer
"cdt.managedbuild.tool.gnu.cpp.compiler". It has platform-specific
qualifiers attached, so on my Mac, I see that the corresponding tool is
now
" cdt.managedbuild.tool.gnu.cpp.compiler.macosx.exe.debug.4470 84333 ". My
call to .getTool() now returns null.

What's the recommended way of accessing that tool now? Should I just
iterate through all the ITools in a configuration and grab the one that
starts with "cdt.managedbuild.tool.gnu.cpp.compiler", or is there an
API that I can use that will automatically resolve the correct tool
despite the platform I'm on?

If anyone can point me to some documentation out there that I may have
missed, I'd greatly appreciate it. The Managed Build System
Extensibility document only seems to cover this from a declarative
standpoint, not from the actual API calls to deal with existing
projects.

Thanks,

--
Tony Allowatt
aallowat AT vt DOT edu
Previous Topic:Please help: makefile for Cygwin
Next Topic:Binary Problem with a simple C++ code.
Goto Forum:
  


Current Time: Wed Jan 15 15:09:26 GMT 2025

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

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

Back to the top