Registering a Custom File System

This section assumes you have already implemented the custom file system interfaces, compiled, and created a .jar file ( myFileSystem.jar, for example.). You cannot complete the registration process unless the custom file system has been created.

This section covers the following topics:

The Custom File Systems Page

You use the Custom File Systems page of the Options dialog box to register a custom file system.

Figure 513. Options Dialog Box for Custom File Systems

How to Display

To display the Custom File Systems page:
1. In the Stylus Studio menu bar, select Tools > Options.

The Options dialog box appears.

2. If necessary, expand Application Settings and click Custom File Systems.

The Custom File Systems page appears.

Fields

The Custom File Systems page of the Options dialog box has the following fields which you need to specify values for in order to register your custom file system.

Name

When you click the New button ( ) to create a new custom file system, Stylus Studio displays an entry field for the name.

Figure 514. Naming a New Custom File System

You should replace the default name ( FileSystem1, for example) with the name you want to associate with the custom file system. The name you enter is displayed in Stylus Studio Open, Save, and Save As dialog boxes.

Classpath

You use the Classpath field to specify the required classpath for the custom file system.

Class name

You use the Class name field to specify the name of the custom file system class created using the Stylus Studio custom file system Java API. If you use the Browse button, Stylus Studio filters the files displayed in the Java Class Browser dialog box to show only those classes that implement the CustomFileSystem.jar interfaces.

Icon bitmap

You use the Icon bitmap field to specify the icon to associate with the custom file system. This icon appears in the Open, Save, and Save As dialog boxes. If the Icon bitmap field is left empty, Stylus Studio uses a default icon ( ).

How to Register a Custom File System

To register a custom file system:
1. Display the Custom File Systems page of the Options dialog box. See How to Display if you need help with this step.
2. Click the New button and enter a name for the custom file system. Remember that this value appears in the Open, Save, and Save As dialog boxes along with the icon you select.
3. Specify the classpath and class name.
4. Optionally, specify the icon you want to use to represent the custom file system.
5. Click OK.
 
Free Stylus Studio XML Training: