Community
Participate
Working Groups
I have a number of project types which collect together a number of configurations. The project type configurations use mixed toolchains so I can create projects that build both natively and for an embedded target. However when I create a standard templated project, using the basic exe, library, ... template, the configurations created on the project are the superset of all applicable configurations (matching build artifact type) taken from all projectTypes. This is very weird, as I would have thought that configurations under project types shouldn't be included. This happens as a result of: ManagedBuildManager.getExtensionConfigurations(IToolChain, String, String) line: 4141 MBSWizardHandler.addTc(IToolChain) line: 524 ManagedBuildWizard.createItems(boolean, IWizard) line: 61 CDTMainWizardPage.updateData(Tree, Composite, Button, IWizardItemsListListener, IWizard) line: 291 CDTMainWizardPage.createControl(Composite) line: 93 Note that there's an equivalent method for discovering configurations from a project type. This method returns all configurations matching a specific property type (in this case: artefact type). Obviously my configurations under the project type are registered for producing artifacts.
Created attachment 187546 [details] patch 1 Patch for the issue. Like the ManagedBuildWizard, we ignore the configurations under named ProjectTypes when creating a project from an 'MBSWizardHandler.ARTIFACT' type template. These configurations will be present when creating project type typed projects.
I think the important thing here is not to break existing functionality, nor assumptions that other integrators may make. I believe the patch is safe in this regard. If you could cross-check Andrew.
*** cdt cvs genie on behalf of jblackburn *** Bug 335338 - Configurations from projectTypes are included in ManagedBuildManager#getExtensionConfigurations [*] CDTConfigWizardPage.java 1.21 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java?root=Tools_Project&r1=1.20&r2=1.21 [*] CfgHolder.java 1.13 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CfgHolder.java?root=Tools_Project&r1=1.12&r2=1.13
I am unsure about assumptions other integrators make but I checked our own. We have customized wizards and project types and they still work. We use empty artifact though (unmanaged projects) but our buildDefinitions is pretty detailed.
(In reply to comment #4) > I am unsure about assumptions other integrators make but I checked our own. We > have customized wizards and project types and they still work. We use empty > artifact though (unmanaged projects) but our buildDefinitions is pretty > detailed. Yes, that's right. The empty projectType name is treated as 'magic' and new-style i.e. they're added automatically to the relevant artifact type templated projects. Without this change, every configuration from every other named project type is also added automatically by the wizard. The result is way too many configurations in the default wizards for people using custom project types.
(In reply to comment #2) > I think the important thing here is not to break existing functionality, nor > assumptions that other integrators may make. I believe the patch is safe in this > regard. If you could cross-check Andrew. 8 months later, I finally stumbled upon a regression caused by this change, see bug 356864.
(In reply to comment #6) > 8 months later, I finally stumbled upon a regression caused by this change, see > bug 356864. I confirm that reverting CDTConfigWizardPage.java from e7395 to previous 7220a fixes the problem I experienced with the GNU ARM Plug-in, reported as bug 356111. Liviu