## About File Types

See Also

Many file types are recognized by default by the IDE. For example, JSP files, Java source files, and HTML files are recognized as such and the IDE provides functionality specific to the file type. For example—for JSP and HTML files, the IDE provides special syntax highlighting that is different from the syntax highlighting provided for Java source files. In addition, the menu items provided for JSP files are different from those provided for HTML files. For example, you can compile a JSP file but not an HTML file.

Recognition of a file type is generally made possible via its extension. All JSP files have a `.jsp` extension, while all Java source files have a `.java` extension. On the basis of this distinction, the IDE provides distinct functionality for these file types. You can use the New File Type wizard to let the IDE recognize additional file types, i.e., file types that are not recognized by the IDE by default. For example, if you have a file type with the file extension `.xyz`, you can let the IDE recognize all files with this extension and then provide functionality specifically for this file type.

But you can also let the IDE distinguish between XML files. Whether an XML file has an `.xml` extension, you can let the IDE provide different functionality for `abc.xml` than for `def.xml`, based on the namespace defined for the XML file in question. Since the namespace of each distinguishable XML file is distinct, the namespace is used to distinsguish the file types in this case.

When you use the New File Type wizard, the IDE creates the following files for you:

File | Purpose
--- | ---
`xxxDataLoader.java` | A class that extends
`xxxDataBeanInfo.java` | Display information, such as the related icon.
| `xxxDataNode.java` | A class that extends
`xxxDataObject.java` | A class that extends
`resolver.xml` | Declarative resolution of MIME-type.

For an example of creating a module that recognizes a new file type, see the

For an example of how to create a module that extends a new file type by providing syntax highlighting, see the

See Also
  About NetBeans Platform and Module Development
  About the NetBeans Platform

Legal Notices