Shifting lines of Jython script to left or right

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 (Windows > Preferences > General > Editors > Text Editors) 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:
  1. Open a Jython script file in the Jython editor:
    1. In Navigator view, expand the Jython project that contains the Jython script file you want to add or remove the indentations.
    2. Right-click the Jython script file.
    3. In the pop-up menu, select Open With > Jython Editor.
  2. To shift lines of code to the right; in other words, add an indentation level:
    1. Select the lines you want to shift right.
    2. Right-click on the Jython editor and select Shift Right.
  3. To shift lines of code to the left; in other words, remove an indentation level:
    1. Select the lines you want to shift left.
    2. Right-click the Jython editor and select Shift Left.
Related tasks
Editing Jython script files

Feedback