Registration of various objects, files and hints into layer is pretty central to the way NetBeans based applications handle communication between modules. This page summarizes the list of such extension points defined by modules with API.
Context menu actions are read from the layer folder
Loaders/text/x-ant+xml/Actions.
"Projects/org-netbeans-modules-java-j2seproject/Customizer" folder's content is used to construct the project's customizer.
It's content is expected to be ProjectCustomizer.CompositeCategoryProvider instances.
The lookup passed to the panels contains an instance of Project and org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties
Please note that the latter is not part of any public APIs and you need implementation dependency to make use of it.
"Projects/org-netbeans-modules-java-j2seproject/Nodes" folder's content is used to construct the project's child nodes.
It's content is expected to be NodeFactory instances.
"Projects/org-netbeans-modules-java-j2seproject/Lookup" folder's content is used to construct the project's additional lookup.
It's content is expected to be LookupProvider instances. J2SE project provides LookupMergers
for Sources, PrivilegedTemplates and RecommendedTemplates. Implementations added by 3rd parties
will be merged into a single instance in the project's lookup.
Actions for the Projects tab root context menu are taken from
the layer folder ProjectsTabActions. Foreign modules ought
to place entries below sep-below-main-actions.instance.
Several project related actions are registered in the Actions folder in the layer.
Product branding is intended to use those actions to build main menu, toolbars and shortcuts.
New (or import) project wizards can be registered in a special folder
Templates/Projects/.
Providers of generic project actions can register Action and JSeparator
instances in a special folder Projects/Actions/. So if any module wishes
to extend, hide or reorder some of them it can just register its actions there. Example:
<folder name="Projects" >
<folder name="Actions" >
<file name="org-mymodule-MyAction.instance" >
<attr name="instanceCreate" stringvalue="org.mymodule.MyAction" />
</file>
</folder>
</folder>
File templates can be registered with various attributes, some specific to
the project system.
Under Templates/Licenses folder should be registered various license headers
that can be imported by templates using scripting. The recommended format of filename is
license-[licensename].txt e.g. license-cddl.txt.
There's a private XML file for user settings for each palette model.
Task List framework defines the following folders in XML layer:
/TaskList/Scanners - register your instances of task scanners here
/TaskList/ScanningScopes - here you can add additional scanning scopes
/TaskList/Groups - here you can define additional task groups, for example:
<folder name="TaskList">
<folder name="Groups">
<file name="mygroup.instance">
<attr name="instanceCreate" methodvalue="org.netbeans.spi.tasklist.Task.createGroup"/>
<attr name="localizingBundle" stringvalue="org.mymodule.resources.Bundle"/>
<attr name="groupName" stringvalue="my-unique-group-name"/>
<attr name="diplayNameKey" stringvalue="LBL_my_group"/>
<attr name="descriptionKey" stringvalue="HINT_my_group"/>
<attr name="iconKey" stringvalue="ICON_my_group"/>
</file>
</folder>
</folder>
Tasks are organized into groups according
to their importance (error/warning/todo etc). The task group is specified when the Task is created.
Each group is identified by its unique name. The Task List framework provides the following groups:
Additional task groups can be specified in xml layers, see above.
"nb-tasklist-error" - for error-type tasks
"nb-tasklist-warning" - for warning-type tasks
Loaders/folder/any/Actions
so if any module wishes
to extend, hide or reorder some of them it can just register its actions there.
Loaders/text/xml/Actions
Loaders/content/unknown/Actions
Loaders/application/x-nbsettings/Actions
Loaders/folder/any/Actions
so if any module wishes
to extend, hide or reorder some of them it can just register its actions there.
Loaders/text/xml/Actions
Loaders/content/unknown/Actions
Loaders/application/x-nbsettings/Actions
Loaders/mime/type/Factories.
To get your API listed here, use
<api type='export' group='layer' ... /> in
your module arch.xml document.