Layer files (layer.xml) are small XML files provided by modules, which define a virtual filesystem. The layer file defines folders and files that will be merged into the system filesystem that makes up the runtime configuration information that the NetBeans Platform and its derivatives (such as the IDE) use.
Layer files help to make it possible for modules to be dynamically installed. The components of the IDE whose content is composed from folders in the system filesystem listen for changes in folders and files in a filesystem. If a module is added at runtime, the system filesystem fires changes; the user interface notices that the contents of the folder has changed and updates the user interface to reflect the changes.
New modules created using a module project template do not have an XML layer, but you can add one with the New XML Layer wizard in the New File dialog. You can then expand the node for it under Important Files in your module project to see and modify its contents. The way it is declared is simple:
OpenIDE-Module-Layer: com/foo/mymodule/resources/layer.xml
Just as the New XML Layer wizard creates an empty layer.xml file, so some module file templates may add entries, creating a new layer if necessary. Other templates just add Java annotations and so do not need an XML layer.
You can use the System Filesystem Browser to tweak the layer.xml file, or you can do so manually using code completion in the Source Editor.