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 141458 - New TopComponent Wizard Should Ask Whether Singleton Desired
Summary: New TopComponent Wizard Should Ask Whether Singleton Desired
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-24 02:37 UTC by tomwheeler
Modified: 2013-02-14 13:17 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 tomwheeler 2008-07-24 02:37:16 UTC
The New TopComponent wizard present in NB since 5.0 creates only singleton TopComponents.  This is fine for many cases,
but there are times when creating multiple instances of a TopComponent is desirable.  

While it is not difficult for an experienced platform developer to edit the code to support this, I have found (through
the mailing lists and interactions with several developers who are learning the platform) that new users find inherent
support only for singleton TCs confusing.  They feel that since the IDE generates only singleton code, then only
singleton code is correct.  Even if they know how to change it for themselves, they are loathe to do so because they
think it might cause other problems.

It would be nice (and likely simple) to provide a checkbox in the wizard to ask whether a singleton component is
desired.  Depending on the selection, the wizard would generate singelton TC code or non-singleton code.
Comment 1 Jesse Glick 2008-07-24 16:32:47 UTC
Possible. There is not that much to generate for a non-singleton TC; clearly you have to have a class extending
TopComponent, but there is not a lot else that the template could clearly fill in for you. You will need to have some
criterion for when to create or open the TC (a Window menu action will not make sense in this case). You need to decide
whether it should be clonable, and implement that if desired. You need to specify how persistence should work. Etc.