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.

Bug 65869 - Project Template wizard - should always use same icon as original project
Summary: Project Template wizard - should always use same icon as original project
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-04 15:41 UTC by Geertjan Wielenga
Modified: 2011-10-26 14:24 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geertjan Wielenga 2005-10-04 15:41:21 UTC
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.
Comment 1 Jesse Glick 2005-10-04 16:50:09 UTC
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.
Comment 2 Geertjan Wielenga 2005-10-04 17:13:34 UTC
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.
Comment 3 Jesse Glick 2005-10-04 17:19:49 UTC
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.
Comment 4 Geertjan Wielenga 2005-10-04 17:37:02 UTC
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?
Comment 5 Jesse Glick 2005-10-04 17:55:31 UTC
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".
Comment 6 Geertjan Wielenga 2005-10-04 18:02:07 UTC
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).
Comment 7 Geertjan Wielenga 2005-10-04 18:55:16 UTC
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."
Comment 8 Jesse Glick 2005-10-04 23:03:53 UTC
"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.
Comment 9 Geertjan Wielenga 2008-03-18 15:59:41 UTC
This one seems obsolete and I don't understand what I was asking anymore. Closing as WONTFIX.
Comment 10 Jesse Glick 2008-03-18 16:14:00 UTC
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.
Comment 11 Jesse Glick 2011-10-25 19:47:53 UTC
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.
Comment 12 Jesse Glick 2011-10-25 19:55:18 UTC
core-main #79d3b551456c
Comment 13 Quality Engineering 2011-10-26 14:24:07 UTC
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