BS2000 SDF Procedure Editor

BS2IDE provides a BS2000 SDF Procedure Editor. This editor features: This editor is found in the context menu Open With > Other... under Internal editors. The editor preferences can be found in command link Window > Preferences > BS2000 Remote IDE > SDF Procedure Editor.

More information regarding SDF Commands Preference page (syntax files) can be found here.

In tab General you can change following options:

Under Syntax Coloring tab you can find the syntax highlighting configuration.

The SDF Procedure Editor supports predefined or self defined SDF templates. They are configured in command link Window > Preferences > BS2000 Remote IDE > SDF Procedure Editor > Templates:

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.

Inserting SDF commands from BS2000 syntax file

Beside that it is possible to directly insert a SDF command from a BS2000 syntax file at the cursor position in a file opened with the SDF procedure editor. For that in the SDF procedure editor click Insert SDF Command in the context menu or use Ctrl + Alt + W. In the Wizard page the list of SDF commands is shown of active Syntax File. Selecting a command with operands and operand values is similar to creating a SDF Command template. When pressing the Finish button the command shown in the Command Preview is inserted in the source at cursor position.

Code completions

You can use code completions in SDF editor. When you use shortcut CTRL + SPACE you will see all proposals which exists in file. SDF editor doesn't check that the label/variable 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 labels and variables' names which are used in file. Variable name is a name after DECLARE statement, it can be the name of constant, variable, element, parameter or structure (name is after BEGIN-STRUCT command).

SDF Editor also supports now more complex Operands and values proposals, as well as their abbreviations, based on active syntax file.
When proposal menu is opened at operand level, you can see the list of matching operands and their description (if available). Additionally in the brackets you can see the "parent element" in command structure, like the operand or the command itself:

If you hover mouse over the element, you will see the element full name (without abbreviations) and the "path" to element in command structure:

Code folding/unfolding

In BS2000 SDF Procedure Editor is possible to fold parameters declaration block, structures and blocks. 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 SDF editor
BS2000 SDF Procedure 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 BS2000 SDF Procedure Editor's preference page: command link Window > Preferences > BS2000 Remote IDE > SDF 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 or you didn't turn on an option "Save code folding option". On default this option is turn off.

Outline View

In BS2000 SDF Procedure Editor supports the Otline view. It can be opened by choosing command link Windows > Show View > Outline view. Choosing an element from the tree in outline the user can jump to the place in editor, where the element is.

You can also select Operands or their values in Outline view to highlight them inside editor (and in opposite direction):

It is possible to disable linking between Outline and SDF Editor by toggling "Link with Editor" button:

Mark word occurrences

In BS2000 SDF Procedure 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 > SDF Procedure Editor.

Please note that due to the complexity of SDF syntax, proposals given by SDF Editor might not be accurate or some some abbreviations working in editor might not be valid by SDF command parser.
Warning: It may cause long opening when file is big.