BS2000 ASSEMBH Source Editor

BS2IDE provides a BS2000 ASSEMBH Source Editor performing ASSEMBH 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 > ASSEMBH Source Editor, tab Syntax Coloring.

In tab General you configure the builtin columns settings. If the first statement in an ASSEMBH source file is an ICTL statement the column settings will be taken from there.
Additionally you can change following options:

In tab Problems you specify whether problems already encountered by syntax highlighting should be marked.

In tab Formatter you can configure the Assembler content formatter, which will modify the code accordingly to specified options. It can be accessed by using menu Edit > Format or use Ctrl + Shift + F shortcut (default value).

An ASSEMBH specific outline is available and displayed in the command link Outline view.

It is possible to add line numbers to Assembler files (they will be added after 72nd column).
To add line numbering functionality, just follow the steps:

To refresh line numbers just choose "Refresh line numbering" option from the right click menu.
The following comment line will be added to the Assembler file (to the last line), to indicate that line numbering functionality is enabled:
"* BS2000IDE Autogenerated - please do not edit!".

Macro highlighting & Mark word occurrence

To see highlighting on a structure block begins with @BEGIN, @IF, @CASE, @CAS2, @WHILE, @CYCLE and @ENTR use double click on one of these macros. Then every line with connected macro will be highlighted. Mark word occurrence can be triggered in the same way as macro highlighting. It marks one word in other places in the document.

You can change color for highlighting and style of highlighting, right click on gutter (left column in editor), choosing "preferences...".

After choosing "preferences..." you will show options for text editor. Expand "Text editor" and choose Annotations. There is "BS2000 Macro Annotation" and "BS2000 Mark Word Occurrence Annotation". Click on one of these and you can change options for highlighting. There is a shortcut: command link Window > Preferences > General > Editors > Text Editors > Annotations
You can disable highlighting macros, go to Annotations view (screenshot below) and uncheck all options for BS2000 Macro Annotation. In the same way you can disable Mark Occurrence. Or you can go to command link Window > Preferences > BS2000 Remote IDE > ASSEMBH Source Editor and unselect checkboxes for macro highlighting and mark occurrences.

Code completions

You can use code completions in ASSEMBLER editor. When you use shortcut CTRL + SPACE you will see all proposals from 3 groups: source, listing and statement. Group of proposals from source contains names which are in outline view, listing contains the names of labels, macros, DSECT, CSECT and entries from listing file in proposal's tooltip and group of statements are available statements, for example @ENTR or @IF, they are shown only in second column. 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 statements proposals with fourth click. Proposals are showing in loop, so in fifth try you will see all available completions. ASSEMBLER editor doesn't check that the label/entry 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 entry/macro calls/labels which are used in 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 ASSEMBLER editor. The symbols for code completion proposals are the same as in the outline.
Labels are not set in outline, we use label symbol from SPL editor.

Jumping to declaration of label

You can jump to declaration of label, if the label is declareted in the same file. You can do that by holding the CTRL key in BS2000 Assembler Editor and clicking mouse button on the selected name. If the name doesn't change to 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

Also is possible to show line in which label was written without jumping. You can put the cursor on the name and you will see the line in which label was written in a tooltip. The tooltip is shown below.

Outline View

In BS2000 ASSEMBH 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. Additionally in BS2000 ASSEMBH Source File Editor's outline is possible to turn on an option "Link with Editor". Then in outline will be marked an @ENTR in which outline cursor is. In macro calls section in outline user can see parameter MF if was used in the macro call. The option "Link with Editor" can be disabled in outline's menu. This menu was presented below.

Menu in Assembler Editor's outline

Code folding/unfolding

In BS2000 ASSEMBH Source File Editor is possible to fold sections which start from macro @ENTR and end with @END macro, @IF, @THEN, @ELSE ... @BEND statements 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 Assembh editor

BS2000 ASSEMBH Source File 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.

Collapse & expand from context menu

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 ASSEMBH Source File Editor's preference: command link Window > Preferences > BS2000 Remote IDE > Assembh 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 don't turn on an option "Save code folding option". On default this option is turn off.
Warning: It may cause long opening when file is big.