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.
There are currently a number of problems with how examples are handled in NetBeans. These include: 1. There are too many places where examples might be stored. They might be in the userdir, on the web, in the file-creation templates, and so on. This leads to confusion. 2. Storing examples in the userdir causes problems. Whenever a userdir is wiped and refreshed, the examples are always recreated, whether or not the user wants them. Furthermore, having an automatically-mounted examples directory often tempts users to put code there, which is then lost when the userdir is destroyed. 3. Modules have no easy way to extend examples. Some of the example storage methods (particularly, putting them on the web) do not allow modules to easily extend the set of examples. 4. It is hard to handle examples of varying complexity. Examples might range in complexity from a single file or code snippet to multiple files, mounted jars, etc. Whatever solution we come up with has to handle all of these cases. 5. Users have no control over which examples are displayed, nor do they have any convenient way to browse the entire set of examples. The userdir examples are always there, and aside from directory names there is no hint as to what each example is about. The solution to these problems has to be worked out in a UI spec. However, to get things going, the following solution is proposed. Examples should be kept on the user's local disk (or in a place of her choosing). Each example should be in its own subdirectory, and should contain an html page describing that example. The user should be able to access a single page that is constructed from the example set that is currently on the disk. This page should let the user click on an example in order to load it into the IDE. The user should be able to update the examples on disk from the web, e.g., by downloading more example directories from the portal.
Dirk, this sounds pretty good to me. One tiny nit: the page describing the example should probably be plain text since the default (double-click) action for HTML files is to open them up in the source editor.
Is also nice if the examples are repeatable. So it would be good if the user doesn't have to modify the example "source"; that way they can create the same example multiple times (e.g., modify example, not like what they did, throw that away, and create it again).