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 151362 - New File Type Wizard Tutorial
Summary: New File Type Wizard Tutorial
Status: RESOLVED FIXED
Alias: None
Product: usersguide
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Geertjan Wielenga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-25 12:25 UTC by puce
Modified: 2009-04-10 20:40 UTC (History)
1 user (show)

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 puce 2008-10-25 12:25:18 UTC
It would be great to have a tutorial about creating a new file type wizard (NetBeans Platform Development). The skeleton
code can be generated by the Wizard-wizard, selecting "New File" for "Registration Type" in the second panel.
The tutorial should show, how to go on from there and how to actually create the new files.
Comment 1 Geertjan Wielenga 2008-11-13 10:22:30 UTC
This tutorial describes how to create new files programmatically:

http://platform.netbeans.org/tutorials/nbm-filetemplates.html

Note that you don't need the wizard classes for this. However, the module attached to the above includes some samples
that show how to do so anyway. This module also provides a sample that generates code from a file template, again
without needing you to use the wizard classes:

http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=14239
Comment 2 puce 2008-11-13 23:36:18 UTC
I know that you can use templates and don't need always to have a wizard to create new files, but I actually meant, that
it would be great to have a tutorial for the cases when you need such a wizard to create your files.
Sorry, if I didn't write it clearly. 
I hope that I didn't miss something in your posted links and that it is ok to reopen this issue.
Comment 3 Patrick Keegan 2008-11-19 16:03:10 UTC
reassigning for Geertjan to evaluate
Comment 4 Geertjan Wielenga 2008-11-19 21:30:11 UTC
If I turn this 5-part series into an official tutorial, would that be a full response to this issue?:

http://blogs.sun.com/geertjan/entry/how_wizards_work
Comment 5 puce 2008-11-20 09:59:13 UTC
Yes, I think that would be great. Especially if you could add the parts of your blog, which show 
- how to finish the wizard, when it is not called by a custom action (override instantiate()?)
- how to use custom templates from within a wizard
- using APIs to get a package chooser etc.
Comment 6 Geertjan Wielenga 2009-04-08 17:22:46 UTC
Here it is: http://platform.netbeans.org/tutorials/nbm-wizard.html
Comment 7 tomwheeler 2009-04-08 20:20:53 UTC
I read through the tutorial briefly now and it seemed very nice.  I plan to read it more thoroughly in the next few days.

I did notice something unusual at the bottom -- not sure if it's intentional or not, so I figured I'd point it out. 
Usually "branding" implies customization while "internationalized" or "localization" implies translation into another
language, although I understand they use the same underlying mechanism in NetBeans.

Towards the bottom of the page there's a section called "Branding the Wizard" but it's actually translating the button
labels to Dutch.  I'd have expected to see a minor modification within the same language in a section called "Branding
the Wizard"; for example, changing the "Next" button label to "Advance" or "Ahead" or something.
Comment 8 Geertjan Wielenga 2009-04-10 20:40:55 UTC
Thanks. Fixed that problem in the tutorial. Feel free to add more comments about it. Every time I give a training I'm
surprised at how widely used the Wizard APIs are & how broadly interested people are in them. This tutorial is therefore
of central importance to the NetBeans Platform, more so than 95% of the others, even.