Using the Java Editor

To use the Stylus Studio Java editor, open a Java file in Stylus Studio.

To specify arguments that Stylus Studio uses to run the active Java class, select Java > Class Properties from the Stylus Studio menu bar. Stylus Studio displays the Class Properties dialog box. Enter the arguments required to run your code. (You must have a Java file open in Stylus Studio for Java to appear in the menu bar.)

The same debugging capabilities that are available when you are debugging XSLT stylesheets are available when you are debugging stand-alone Java applications.

When you use the Java editor, the Sense:X auto-completion feature is available. The Java editor browses your import directives to gather information about the packages you are using and provides auto-completion when using methods or data members defined in imported classes. The auto-completion mechanism also provides you with tips about the signature of the class method and its required arguments. The same applies to the classes that you are editing. Also, the CLASSPATH is used to help you auto-complete import directives. Type Ctrl+Space if you want Stylus Studio to auto-complete keywords and class names that are defined in java.lang.package.

The Stylus Studio Java editor also does background error checking. As you type Java code, Stylus Studio displays red lines that indicate syntax errors. Move the cursor over the red line to display a pop-up error message.

When you use the Java editor, you can configure the character encoding that Stylus Studio uses to save and load files. To do this, ensure that a Java file is the active file. Then select Edit > Change Encoding from the Stylus Studio menu bar.

Context-sensitive help for your Java classes is available in the Java editor. The directory that contains the javadoc-generated documentation must be in the Stylus Studio class path (in the Stylus Studio menu bar select Tools > Options > Java Virtual Machine) or in your CLASSPATH environment variable. You can then press F1 when your cursor is on a class name in the Java editor. Stylus Studio opens the related javadoc-generated documentation.

 
Free Stylus Studio XML Training:
W3C Member