| Summary: | NPE in New Project Wizard when MBS turned off | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Doug Schaefer <cdtdoug> |
| Component: | cdt-build | Assignee: | Doug Schaefer <cdtdoug> |
| Status: | RESOLVED INVALID | QA Contact: | Andrew Gvozdev <angvoz.dev> |
| Severity: | normal | ||
| Priority: | P3 | CC: | jamesblackburn+eclipse |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Doug Schaefer
I'll investigate. This is important to my strategy of supporting external managed build systems. We should be able to do that without MBS involvement. (In reply to comment #0) > I was curious to see what happened when I turned off the managedbuilder > plug-ins. The result is an NPE in CDTMainWizardPage in the switchTo method. Both > the wizard handler and entry descriptor are null. > I'm not sure what the right answer is supposed to be. I was expecting to at > least see the Makefile project type to be available with the unknown toolchain. Currently MBS is used to create Makefile project which is basically a MBS project with 1 default configuration. If we are talking about turning MBS off that would be unavailable but perhaps you expect old Make project wizards? Those that were commented out in cdt.make.ui plugin.xml and then removed in revision 1.83. If I enable those I am getting exception dialog trying to create a project but it does create the project on disk which can be imported and there is all that old 3.2 UI which is actually working AFAICS. Thinking about it a bit more, perhaps the right answer is a choice of creating plain C/C++ project having only C/C++ nature and no MBS or Make nature. Many users use CDT for code navigation only without building. Another thought is to use Capabilities to be able to turn off MBS or the whole Build. Well, the root cause of the NPE seems to be the fact that there are no templates defined without MBS. In fact the Empty templates are defined in the MBS.gnu.ui plug-in. So there are a couple of issues there. First, the fact we need the Empty templates to begin with. Second, why are the in the gnu.ui plug-in. The Makefile project type and any associated templates need to be in the make.* plug-ins. My next step is to figure out why they are not. Actually I take that back. The Empty project templates are special. I can't find their declaration. Need to dig deeper. Well, that's odd. You get a totally different set of CNewWizard's when you have MBS turned on. I bet this TemplateCNewWizard has never been run, at least not in a long time. Ah, I get it, now. There are three CNewWizards. One for MBS which adds Exec and the Libs. One for Std which adds Makefile, and then the Templates one which adds in the templates to those. Bizarre, but it works as intended. So the NPE was caused because Std and MBS wizards and all the templates are in the MBS plug-ins. Without them, there are no project types or templates so there's nothing to show, thus NPE. I'm OK with that. I want to muck with all that anyway. Marking this invalid. |