At the beginning of a line of Jython script, the spaces and tabs
proceeding a non-blank character determines the indentation level of a line.
The indentation level is used to determine the grouping of statements and
block boundaries. The Jython language uses eight whitespaces per tab character.
In the Jython editor, the indentation level defaults to multiple
of eight whitespaces. If you try to change the general text editor's Display
tab width setting () to another value other
than 8, the Jython editor ignores this change; however, the change in this
setting is available for all other text editors. This restriction on the Jython
editor to set eight whitespaces per tab character is to avoid runtime problems
as the Jython interpreter always interprets tab characters to eight whitespaces.
To add and remove indentation in the Jython editor:
- Open a Jython script file in the Jython editor:
- In Navigator view, expand the Jython project that contains the
Jython script file you want to add or remove the indentations.
- Right-click the Jython script file.
- In the pop-up menu, select .
- To shift lines of code to the right; in other words, add an indentation
level:
- Select the lines you want to shift right.
- Right-click on the Jython editor and select Shift
Right.
- To shift lines of code to the left; in other words, remove an indentation
level:
- Select the lines you want to shift left.
- Right-click the Jython editor and select Shift Left.