## About XML Layer Files

See Also

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.

If you create your module using a module project template, you already have an XML layer in your module, and you can 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:

- In your jar, provide the layer file, for example, com/foo/mymodule/resources/layer.xml
- In your module's manifest, include the following line somewhere in the top section:

  `OpenIDE-Module-Layer: com/foo/mymodule/resources/layer.xml`

Just as the module project template provides a `layer.xml` file, so the module file templates provide the layer files's entries. For example, when you use a file template to create a new action or to have the IDE recognize a new file type, the IDE automatically registers the new items in the layer file.

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.

See Also
  About the NetBeans Platform
  About the NetBeans APIs
  About NetBeans Platform and Module Development
  About the System Filesystem
  Working with Modules
  Module Tasks: Quick Reference

Legal Notices