I recently ran into a problem with the Autotools plugin and CDT 5.0.0.
We have a class that inherits from AbstractCPropertyTab that adds an
Autotools configure settings page as part of the C/C++ Build Settings.
It has a canBeVisible method that calls a static method which checks if
the project has an Autotools builder.
The code for that test used the IProject to get the ManagedBuildInfo
which it then used to get the default configuration. The
ManagedBuildInfo.getDefaultConfiguration() method uses the internal
managedMakeProject to get its configurations. Well, for some reason,
the Apply button ends up removing the configuration from the
ManagedMakeProject.
If a change is made and the Apply button is pressed, everything works
fine. However, if the Ok button gets pressed after that, the
canBeVisible() method gets called again for the sendOk and we are out of
luck because there is no longer a default configuration. I have since
rewritten the code so that it now looks at the ProjectType id of the
ManagedProject and that fixes this particular problem, but I do not
understand why the configuration is being removed.
The following is the stack trace after hitting the apply button. The
configuration is removed which is why it is removed from the
ManagedProject. I don't understand why the performSave kicks this off
since it can be just for an Apply. Some further alterations might need
to be performed on the configuration and there is also this dangling
ManagedProject still in the ManagedBuildInfo that has no configuration.