BS2000 SPL Source Editor

BS2IDE provides a BS2000 SPL Source Editor performing SPL syntax highlighting. This editor is found in the context menu Open With > Other... under Internal editors. The syntax highlighting is configured in command link Window > Preferences > BS2000 Remote IDE > SPL Source Editor, tab Syntax Coloring.

In tab General you configure the builtin columns settings.
Additionally you can change following options:

In tab Problems you specify whether problems already encountered by syntax highlighting should be marked.
An SPL specific outline is available and displayed in the command link Outline view.

Creating a template for SPL Source File Editor

At the command link Window > Preferences > BS2000 Remote IDE > SPL Procedure Editor > Spl Templates page you start a wizard for edition of SPL command templates (snippets). The table shows the currently defined templates. When selecting a template you can edit or remove it by pressing the Edit or Remove button. For adding new templates you press the New... button to define a user specified template. For templates defined externally you press the Import button to specify an XML file containing a template definition. When you use shortcut CTRL + SPACE in SPL Editor you will see a proposal of statements to insert.

Code completions

You can use code completions in SPL editor. When you use shortcut CTRL + SPACE, you will see all proposals from 3 groups: source, listing and code templates. Group of proposals from source contains names which are in outline view, listing contains the names of labels, procedures and variables from listing file in proposal's tooltip and group of SPL templates contains defined templates. When you first time use CTRL + SPACE then all available suggestions will be shown. You can see only source's completion proposals with second CTRL + SPACE clicking, listing's completion proposals with third click and templates with fourth click. Proposals are showing in loop, so in fifth try you will see all available completions. SPL editor doesn't check that the variable/procedure name is correct in context which you are trying to set it. For example when you will use code completion at the beginning of file, you see all variables/procedures/labels which are available to use in the file.

If you see no completion proposals for listings, make sure your project was build successfully and listings' files were properly parse

Code completions in SPL editor. The symbols for code completion proposals are the same as in the outline.

Jumping to declaration of variable/procedure

You can jump to declaration of variable or procedure, if the variable (or procedure) is declareted in the same file. You can do that by holding the CTRL key in BS2000 Spl Source File Editor and clicking mouse button on the selected name. If the name doesn't change into Hyperlink as below, then there is not declareted label in this file.

You can modify the shortcut in command link Window > Preferences > General > Text Editors > Hyperlinking preference page by changing Modifier Keys for Jump in local scope

Warning: You cannot jump to elements after dot, for example in line 2617 you cannot make a jump from MACRO_INFORMACTION but you can jump to ACT_INPUT_STRUC declaration.

Outline View

In BS2000 SPL Source File Editor we support outline view. The user can open outline by choosing windows -> show views -> outline. Choosing an element from the tree in outline the user can jump to the place in editor, where the element is.

Outline in SPL editor

From outline in SPL editor

Code folding/unfolding

In BS2000 SPL Source File Editor is possible to fold procedures, DO ... END statement and comments. At the first line of block which can be fold appears minus sign. When you click this minus, block will fold, minus will change in plus and only first line is visible.

Code folding in SPL editor

SPL editor


After clicking plus sign, block of code unfold. You can fold all blocks in file using Ctrl + Shift + Numpad_Divide or choose option "Collapse Al" after right click on gutter (left column in editor). It is shown on the screenshot below.

If you want to unfold all blocks you can choose "Expand all" option or use Ctrl + Numpad_Multiply shortcut.

Save code folding state

You can turn on option "Save code folding state" in preference for BS2000 SPL Source File Editor: command link Window > Preferences > BS2000 Remote IDE > Spl Editor Preferences . This option cause saving code folding state on two action: saving file and closing editor. When you open the file, last code folded statements will fold during file opening. It wouldn't work if you edited file outside eclipse workspace. On default this option is turn off.
Warning: It may cause long opening when file is big.

Mark word occurrences

In BS2000 SPL Source File Editor we support 'Mark word occurrences' feature. When double-clicking a word, all occurrences of this word are searched and then highlighted.

The disable/enable option is located in the preferences Window > Preferences > BS2000 Remote IDE > SPL Procedure Editor.