Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] callback on CDT project creation

Hi Experts,

I need to do some post-processing when a C/C++ project is being created via the CDT new project wizard. Basically, I want to set the default values of certain tool-chain/tool options after the project has been created, so that the values show up when the properties dialog is opened. These default values are dependent on an external settings file and so cannot be set via org.eclipse.cdt.managedbuilder.core.buildDefinitions extension point.
I noticed that the project creation is being triggered either with the click of:
    - 'Advance Settings' button on the CDT build configurations wizard page OR 
    - with the 'finish' button of the wizard. 
And, both end up calling 'getProject(..)' method of CDTCommonProjectWizard class, but I couldn't find a hook in the call-flow where I could attach my code.

I also looked at the org.eclipse.cdt.managedbuilder.ui.newWizardPages extension point, that allows hooking up a 'Runnable', but that has 2 problems for my situation:
  - it will also pop up an extra wizard page that I don't need
  - it will only run, when the 'finish' button is clicked and not on the click of 'advance settings' button

Could you please suggest any alternatives/pointers that I can explore?

Thanks and Regards,
Ashutosh



Back to the top