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 70880 - Wizard for options panel impl
Summary: Wizard for options panel impl
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-31 19:51 UTC by Jesse Glick
Modified: 2006-02-01 19:33 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 Jesse Glick 2005-12-31 19:51:10 UTC
Should be a wiz for adding an Options panel to an NBM project. Could be either a
standard panel or an advanced panel. Should of course register the new panel in
the layer in the selected position.

Could use
contrib/importcruncher/src/org/netbeans/modules/importcruncher/Option.java as a
simple starting point. Template should probably assume
java.util.prefs.Preferences as the storage.
Comment 1 Martin Krauskopf 2006-01-26 22:18:40 UTC
Radek IIRC you were talking about this one today. ;)
Comment 2 rmatous 2006-01-27 07:31:32 UTC
Yes, I'm ready with generation and now I have to write the UI part. But at this
moment I don't plan to generate neither SystemOption nor Prefernces based way of
storing (just empty panel).
Comment 3 Jesse Glick 2006-01-27 19:33:34 UTC
You might for example write

public void applyChanges() {
    // TODO store modified settings
    // Example:
    // Preferences.userNodeForPackage(THISCLASS.class).put(...);
}
Comment 4 rmatous 2006-01-30 10:38:01 UTC
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel.java,v
 <--  OptionsPanel.java
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel.form,v
 <--  OptionsPanel.form
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/Bundle.properties,v
 <--  Bundle.properties
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/template_mypluginOptionsCategory,v
 <--  template_mypluginOptionsCategory
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/NewOptionsIterator.java,v
 <--  NewOptionsIterator.java
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/template_mypluginAdvancedOption,v
 <--  template_mypluginAdvancedOption
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/template_mypluginOptionsPanelController,v
 <--  template_mypluginOptionsPanelController
initial revision: 1.1


/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel0.java,v
 <--  OptionsPanel0.java
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/template_myplugin_formPanel,v
 <--  template_myplugin_formPanel
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/OptionsPanel0.form,v
 <--  OptionsPanel0.form
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/options/template_mypluginPanel,v
 <--  template_mypluginPanel
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/resources/newOptions.html,v
 <--  newOptions.html
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/resources/newOptions.gif,v
 <--  newOptions.gif
initial revision: 1.1

/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/resources/layer.xml,v
 <--  layer.xml
new revision: 1.39; previous revision: 1.38
Comment 5 Jesse Glick 2006-02-01 19:13:33 UTC
Re. positioning:

1. For main panels, the current wizard does not let you place the panel.
Probably it should, but not a high priority I think. Complicated by the fact
that the Options SPI does not specify that panel instance files get a display
name from SFS.locBundle, so you cannot easily get the display names of existing
panels to insert between.

2. For misc. panels, the SPI does not support ordering. Since this is probably
the more common case, I would not bother with ordering at all.
Comment 6 Jesse Glick 2006-02-01 19:33:09 UTC
I added a UI spec for this wizard.