[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-core-dev] Missing <buildCommand> section
|
Thanks for the reply Alain. I am new to Eclipse and CDT, and I'm having
trouble finding the right level of documentation for me. I'm mostly just
reading the source code at this point.
I am successfully calling createCProject() now, so I feel much better
about this. But I noticed that if I run the Wizard and manually create my
project, then on the Project->Properties page, I can view and modify the
buildArguments, like the path to nmake.exe and the targets in my existing
Makefile. However, when I create the project programatically by calling
createCProject(), then the panel for setting the buildArguments is not
present in Project->Properties.
I see in the .project file that an entire <buildCommand> section is
missing when I create the project programmatically. So I know that I
am missing a step in the creation process.
I think that the step I'm missing is to invoke the createBuildInfo()
method on my newly-created project. But I can't find the right level of
documentation to guide me, so I'm uncertain. Here is some code that I
wrote that I thought should have enabled me to add to the project
settings:
// get defaults
IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(
MakeCorePlugin.getDefault().getPluginPreferences(),
MakeBuilder.BUILDER_ID, false);
// add the <buildCommand> section to the .project file
MakeProjectNature.addToBuildSpec(newProject, MakeBuilder.BUILDER_ID, null);
IMakeBuilderInfo projectInfo = MakeCorePlugin.createBuildInfo(
newProject, MakeBuilder.BUILDER_ID);
With calls like these...
projectInfo.setStopOnError(...);
projectInfo.setFullBuildEnable(...);
...I expect to be able to choose the values that will be stored in the
.project file. I would either copy the default value from info, or I
would supply my own desired value.
Unfortunately, I'm getting a CoreException on the second call to
createBuildInfo(), and I don't yet understand why.
Any pointers would be greatly appreciated.
Regards,
David Spakes
On Wed, 1 Mar 2005, David Spakes wrote:
> I have been assigned the task of programatically launching Eclipse (with
> the CDT plugin active) and automatically creating a standard C project
> that points to an existing directory containing a Makefile and C files.
>
> To accomplish the above, my current plan is to write a new plugin that
> performs the same steps as a CDT Wizard, except the specifics for a
> project will not be prompted from the user, but instead will be supplied
> by a configuration file.
>
> I am using the following:
>
> eclipse-SDK-3.0.1-win32.zip
> (Eclipse Platform Version: 3.0.1 Build id: 200409161125)
> org.eclipse.cdt.sdk-2.1.0-win32.x86.zip
-------------------------------------------------------------
David Spakes email: spakes@xxxxxxxx
SNMP Research voice: +1 865 573 1434
3001 Kimberlin Heights Road fax: +1 865 573 9197
Knoxville, TN 37920-9716 USA http://www.snmp.com
-------------------------------------------------------------
SNMPv3 is now...
the Full Internet Management Framework
(RFC 3410-3418)
Are your management tools secure, open, flexible, and scalable?
Rely on the proven experts when taking your next step