How does NetBeans recognize files?
A lot of applications show some UI that displays folders of files; also a lot of NetBeans UI is created by showing virtual files in the configuration filesystem. The basic mechanism is this: Some folder is shown in the UI; files of known types have their own icons, menu items and behavior. The way NetBeans detects files is this: The “files” being shown are FileObjects – wrappers around java.io.File, or in the case of configuration files, typically wrappers around data stored in some other way, such as inside XML files in modules. What you’re actually seeing is Nodes, which are the things that provide actions, localized names, etc. to files or other things. In between Nodes and FileObjects are DataObject s. A DataObject is like a FileObject, except that it knows what kind of file is being shown, and there are usually different types of DataObject (provided by different modules which implement support for file types – for example, the Image module makes it possible to recognize and open