Setting highlighting styles for Jython scripts

You can change how the Jython scripts are displayed in the Jython editor.

This is a screen capture of the Jython Editor.

Notice the highlighting colors in the above Jython editor. Different kinds of elements in the Jython scripts are rendered in unique colors. Examples of elements that are rendered in different colors are keywords for Jython scripting syntax, wsadmin objects and methods, string literals, and comments.

To change the default highlighting styles for the Jython scripts, follow these steps:

  1. Select from the toolbar Windows > Preferences > Jython Editor. The Jython Editor preference page opens.
  2. Under the Editor Colors section, you can click a color button and select the color that you want the text of the element to display. In addition, you can select a bold check box, if you want to set the text of the element in boldface. The following table lists the type of elements you can set highlighting styles, and additional description about each of the elements.
    Type of elements Description
    Keyword Keyword elements are Jython script syntax. Examples of keyword elements are: print, def, class, if, for, and more.
    wsadmin wsadmin elements are WebSphere® Administrative (wsadmin) objects and methods. Examples of wsadmin elements are: AdminConfig.attributes(), AdminControl, AdminApp.list(), AdminTask, and more.
    Strings String elements are any text enclosed in matching single quotation marks (') or double quotation marks ( " ).
    Comments Comment elements starts with a number sign (#) that is not part of a string literal, and ends at the end of the physical line.
    Default Default elements are any text other than keywords for Jython scripting syntax, wsadmin objects or methods, string literals, or comments. For example, variables and constants are default elements.
    Bold Set the text of the element in boldface. A bold check box is available for keywords, wsadmin, strings, comments and default elements. Certain keywords always remain in boldface. These are Jython syntax that begins a block statements, such as if, for and while statements.
  3. Click Apply to save your changes.
  4. (Optional) Click the Restore Defaults button, to set the highlighting styles back to their default values.
Related tasks
Editing Jython script files

Feedback