From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Krasilnikov, Oleg
Sent: Wednesday, December 12, 2007
3:39 PM
To: CDT General developers list.
Subject: RE: [cdt-dev] Change CDT
Project Configuration programmatically
Marko,
In brief, procedure looks like follows:
IProject project = ...; // I hope you have
it
ICProjectDescription prjd = ...; // I hope
you have it
ICConfigurationDescription cfgd = ...; //
I hope you have it
// change your fields
IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgd);
IBuilder bldr = cfg.getEditableBuilder();
String command = ...; // command without
parameters
String arguments = ...; // in
Property page, user's line is split to cmd and args.
boolean cleanState = ...;
bldr.setCommand(command);
bldr.setArguments(arguments);
bldr.setCleanBuildEnable(cleanState);
// to save your changes, you need do this
(normally called when <OK>/<Apply> pressed) :
CoreModel.getDefault().setProjectDescription(project, prjd);
You can find some samples of config
setting in CDT Property pages UI.
They are located in 2 places:
org.eclipse.cdt.managedbuilder.ui.properties
(for MBS-specific settings)
org.eclipse.cdt.ui.newui (for CDT core
settings).
All classes representing Property pages
context have "*Tab" name (ex.: ErrorParsTab.java)
In your case, changing build command
is performed in
org.eclipse.cdt.managedbuilder.ui.properties/BuilderSettingsTab.java,
and clean build enabling is made
on neighbour tab:
org.eclipse.cdt.managedbuilder.ui.properties/BuildBehaviourTab.java,
-----------------------------------
With best regards, Oleg Krasilnikov
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Tomljenovic Marko (G2/PJ-PMT2)
Sent: Wednesday, December 12, 2007
4:40 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Change CDT
Project Configuration programmatically
Hello
guys,
I
am trying to configure a Standard Make CDT (4.0.2) project programmatically. I
have managed to create a new configuration but now I am stuck on setting the
different settings (e.g. build command, enable clean build, ...)
I
am really searching for quite a while and I cannot find the solution!
Pls
hlp
Greetings
Marko T.
--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: 125252, Moscow, Russian Federation,
Chapayevsky Per, 14.
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.