Options Dialog and SPI
Official
Overview of Options Dialog and SPI module
Options Dialog module contains implementation of Options Dialog and simple SPI. This SPI allows installation of custom options panels / categories to Options Dialog. This module contains implementation of Miscellaneous Panel ans Miscellaneous Panel SPI too. OptionsDialogSPI
What is New (see all changes)?
-
Dec 3 '13 API to handle selection of subcategory from a composite OptionspanelController
Added API to handle selection of subcategory. It is meant to be called from
a composite
OptionspanelController
and delegates toOptionspanelController.setCurrentSubcategory
. - Mar 15 '13 Should Import Require Restart? Should an import of settings require a restart? Some applications need that, some don't. There is a branding API to control such behavior now.
- Feb 26 '13 API to control whether the options window should be modal or not when opened Added API to control whether the options window should be modal or not when opened.
- Oct 18 '12 API to handle successfull search in some panel in options window Added API to handle successful search in some panel in options window. By default no action is performed. Each implementor should make special actions, for example to choose a specific sub-panel, if this is required.
-
Oct 2 '12 Annotation to register keywords for some panel in the Options dialog
Introduced an annotation inside
OptionsPanelController
to register keywords for some panel in the Options dialog declaratively.
Use Cases
Register top level Options Panel
Client can install new panel to Options Dialog - see JavaDoc for OptionsCategory class.
Register panel to Advanced Options Panel
Client can install new panel to Advanced Options Panel - see JavaDoc for AdvancedOption class.
Exported Interfaces
This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...Group of java interfaces
Interface Name | In/Out | Stability | Specified in What Document? |
---|---|---|---|
OptionsDialogSPI | Exported | Official | .../spi/options/OptionsCategory.html |
Group of property interfaces
Interface Name | In/Out | Stability | Specified in What Document? |
---|
Group of layer interfaces
Interface Name | In/Out | Stability | Specified in What Document? |
---|---|---|---|
OptionsDialogSPILayers | Exported | Under Development | .../spi/options/OptionsCategory.html Use OptionsDialog folder for registration of custom top level options panels. Register your implementation of OptionsCategory there (*.instance file). Standard file systems sorting mechanism is used. |
AdvancedPanelSPILayers | Exported | Under Development | .../netbeans/spi/options/AdvancedOption.html Use OptionsDialog/Advanced folder for registration of custom panels to Miscellaneous Panel. Register your implementation of AdvancedCategory there (*.instance file). Standard file systems sorting mechanism is used. |
OptionsExportLayers | Exported | Under Development |
Use OptionsExport/<MyCategory> folder for registration of items for export/import
of options. Registration in layers looks as follows
<folder name="OptionsExport"> <!-- category --> <folder name="MyCategory"> <!-- category display name --> <attr name="displayName" bundlevalue="org.netbeans.modules.mymodule.options.Bundle#Category_Display_Name"/> <!-- item --> <file name="MyItem1"> <attr name="displayName" bundlevalue="org.netbeans.modules.mymodule.options.Bundle#Item1_Display_Name"/> <!-- include regex pattern rooted to userdir --> <attr name="include" stringvalue="config/Preferences/org/netbeans/modules/mymodule/.*|config/mymodule/.*"/> <!-- exclude regex pattern rooted to userdir --> <attr name="exclude" stringvalue="config/mymodule/obsolete/.*"/> </file> <!-- item --> <file name="MyItem2"> <attr name="displayName" bundlevalue="org.netbeans.modules.mymodule.options.Bundle#Item2_Display_Name"/> <!-- include pattern with properties constrain --> <attr name="include" stringvalue="config/mymodule[.]properties#key[1-9].*|keyA.*#|config/mymodule[.]xml"/> <!-- exclude pattern with properties constrain --> <attr name="exclude" stringvalue="config/obsolete[.]properties#key5"/> </file> </folder> </folder>Include/exclude patterns may contain either a regular expression defining files relatively to userdir (see MyItem1) or a compound pattern defining files and property keys (see MyItem2). A compound pattern consists of file regex pattern followed by hash delimiter (#) then property key regex pattern followed by another hash delimiter. Hash delimiter can be ommited at the end of compound pattern. For example, a compound pattern can have the following structure filePattern1#keyPattern1#|filePattern2|filePattern3#keyPattern3 .
|
Group of branding interfaces
Interface Name | In/Out | Stability | Specified in What Document? |
---|---|---|---|
org.netbeans.modules.options.export.OPT_RestartAfterImport | Exported | Under Development |
By default importing settings (as described by OptionsExport
API does not require restart. Some systems may however support complex
modifications to the installation structure. Then they should brand the
OPT_RestartAfterImport to true . NetBeans IDE
does require restart after settings import.
|
Implementation Details
Where are the sources for the module?
The sources for the module are in the Apache Git repositories or in the GitHub repositories
What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?
Nothing.
Read more about the implementation in the answers to architecture questions.