This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I added an icon for the template and it was correctly shown in the New Project wizard after the module was installed. But when I selected the template, the changed icon was not shown in the Projects window.
The icon of a project in the Projects window is controlled by the project type, not whatever wizard (if any) happened to create the files on disk.
Well, it's a bit confusing that the items in the New Project wizard are actually TYPES, but they are used as TEMPLATES. Because, anyting you add via the Project Template wizard is only going to be a TEMPLATE, but that distinction isn't clear from the New Project wizard itself. It's logical to expect the icon that you set in the Project Template wizard to appear in the Projects window, since that's the behavior of all the other templates (but for them its only true because they're also project types). I'm not offering or asking for any solution here -- just pointing out a point of confusion that others might encounter too.
I don't agree with your last statement, at least the way you worded it. The New Project wizard as it stands covers 3-4 project types and I think dozens of templates, and that is the same as what you add from apisupport. There is no such thing as "the" template for a type. The general UI rule we use for the NB IDE is to always use the same icon for the template as the type will use, but this is impossible to enforce mechanically. (E.g. a template could produce either of two types when instantiated, depending on some radio button.) Furthermore, there is no rule other than a UI convention that all projects of the same type use the same icon; the project type is separately asked for an icon for each project it loads. Figure out how to document it, I guess.
OK, but is there any icon in the New Project wizard that is not also displayed in the Projects window when the template with which it is associated is created?
Not that I know of. As I said: "the general UI rule we use for the NB IDE is to always use the same icon for the template as the type will use".
Oh, sorry. Now I get it. This means that in the tutorials (Project Template tutorial and Project Sample tutorial, both of which, of course, use the same wizard, but are slightly different scenarios) I should tell users that NetBeans UI rules suggest that, for example, a project template based on the 'Web Application project template' should use the same icon as the Web Application project template. While I understand this UI rule, now, I think that the Project Template wizard should not allow the user to specify their own icon. Because currently users are going to be disappointed to discover that their selected icon only shows up in the New Project wizard (and even there it breaks a general UI rule).
I hope I'm not still confused about all of this without realizing it. This is the intro to the Project Template Module tutorial (http://platform.netbeans.org/tutorials/nbm-projecttemplates.html). I'm taking for granted that a plug-in module developer, at least within the context of this tutorial, doesn't need to know the difference between a 'type' and a 'template' (if I'm wrong please say so): "This tutorial demonstrates how to create a module that makes a new project template available to the IDE's New Project wizard. The IDE provides several project templates—for example, the Web Application, the Java Project with Existing Sources, the EJB Module, and the Enterprise Application. Each project template provides a basic source structure and several files with sample code. For example, the Web Application project template provides a source structure that conforms to the Java BluePrints or a source structure that conforms to the Jakarta recommendations. In addition, it provides a default index.jsp file, a web.xml deployment descriptor, and a deployment descriptor for the server selected in the Web Application template's wizard."
"I think that the Project Template wizard should not allow the user to specify their own icon" - so, forcibly copy it from the original project that the template was based on? Could try.
This one seems obsolete and I don't understand what I was asking anymore. Closing as WONTFIX.
I don't think this is obsolete. It requests that the wizard for a new project template should automatically pick up its icon from the actual icon of the project the template is derived from.
Will fix at least for the @TR case (bug #202993), especially since iconBase is mandatory for @TR. Probably will not bother for the pre-@TR case.
core-main #79d3b551456c
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/79d3b551456c User: Jesse Glick <jglick@netbeans.org> Log: #65869: Project Template wizard - should always use same icon as original project