Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] How programatically add/set/change options to a managedbuild project?

Hi Fredrik,

You should use the ManagedBuildManager.setOption() or
IConfiguration/IResourceConfiguration.setOption() methods for setting
the option values. For more information on how the set option
functionality is implemented see the implementation of those methods.

Use the ManagedBuildManager.saveBuildInfo() method for the build info
serialization in order to avoid the loss of the modifications you made.

Regards,
Mikhail

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Fredrik Attebrant
Sent: Thursday, November 10, 2005 7:45 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] How programatically add/set/change options to a
managedbuild project?

Hi,

I'm working with a plugin that is updating the include paths for a 
managed C++ project when some configuration files (external to CDT)
changes.

So far, it has been possible to add include paths that appear in the 
project while Eclipse is running, and gets passed down to the compiler 
when building, but they are lost when I exit out of Eclipse.

One more funny thing, is that if I have multiple managed C++ projects in

my workspace, then the settings apply to all those projects.

This leads me to suspect that I'm changing something in the default 
configurations, which then is shared between all projects, eg. the 
include paths for the Debug configuration.

What steps are necessary to make sure that the options changes are 
applied only to the selected project?

For options, there is the method isExtensionElement(), but although I 
tried creating an option with IHoldsOptions.createOption() with 
isExtensionElement=false, I still can't get the option to be 
persistantly stored in .cdtbuild for my project.

Any examples on how to do this?

TIA!
--Fredrik

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top