Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Extending CCProjectWizard: Can't change default build C/C++ settings

There are a couple of ways of doing this.

Statically with some UI for fie:
   -You can define a 'project template' for your wizard in XML. 
    This is distributed with your plugin and the template can change the project configuration as it's created based on UI settings.

You can do things like:
<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
<simple name="name" value="$(projectName)" /> 
<simple name="artifactExtension" value="exe" /> 
<simple name="isCProject" value="true" /> 
<process type="org.eclipse.cdt.core.CreateSourceFolder">
<simple name="projectName" value="$(projectName)"/>
<simple name="path" value="$(sourceDir)"/>

Where the variables come from generated UI.
There are a bunch of other hooks like:

They're defined in: org.eclipse.cdt.managedbuilder.core/plugin.xml
And possibly in the documentation:
(though the help server doesn't seem to be working atm.).

  You can register your own template proceseses to extend the built-in set:
   See the: org.eclipse.cdt.core.templateProcessTypes extension point
   Register your own UI page as part of you new project wizard template:
      See pagesAfterTemplateSelectionProvider element on the org.eclipse.cdt.core.templates extension point.

Using the above you can easily create a project with a set of files, and customize build options as part of the wizard - either using one of the built-in template processes or by providing your own for more specific functionality.


Back to the top