Additions to the Java Editor

Scout uses the standard Java Editor of the Eclipse IDE. To ease the development, the Scout SDK provides additional features for the Java Editor.

To create new Scout components that are represented by inner classes in the Scout framework, the Scout tooling extends the Java content assist of the Eclipse Java editor. The offered proposals are context specific. Depending on the current cursor position in the Java editor, possible Scout components are added to the proposal list.

In a class representing a group box in a form, the Scout content assist adds proposals for various form fields. In a table class the content assist adds proposals to add table columns or context menus. Those proposals trigger the creation of inner classes for form fields, table columns or codes. The Eclipse content assist can be started by typing Ctrl+Space.

Create new Form Fields

To add additional form fields to a form the current edit position needs to be inside of a Scout group box. Typing Ctrl+Space then provides access to the most frequently used Scout widgets as shown in Figure 1.

java proposals groupbox2
Figure 1. Proposals to create new form fields in a GroupBox

When a template is selected, it is possible to customize it by navigating between the different Edit-Groups with the Tab Key (this works exactly like other templates in the Eclipse Editor). With this mechanism you can quickly define the class name, the parent class and other properties. To exit the Edit-Mode just press Enter.

Create new Table Columns

For adding new columns in a table set the current edit position inside a Scout table. The Scout table itself may be located inside of a TableField as shown in Figure 2 or can also be located inside of a Scout TablePage.

java proposals table2
Figure 2. Proposals to create new columns in a Table

Next to adding columns the content assist shown in Figure 2 can also be used to add key stroke actions and menus to tables.

Create new Codes

Adding new Codes to an existing CodeType is supported by the content assist as shown in Figure 3.

java proposals code
Figure 3. Proposals to create new codes in a CodeType

NLS-Entry support

When the the current edit position is inside the String parameter of the TEXTS.get() code, the content assist (opened with Ctrl + Space) provides support for the NLS entries as shown in Figure 4.

java proposals texts
Figure 4. Proposals corresponding to NLS Support.

Selecting one of proposal entries (like "DateOfBirth" in the example) shows the available translations on the right hand side. To select a specific proposal entry you may double click on the entry or hit the Enter key. To create a new text entry select New text…​ at the end of the proposal list.

Selecting "New text…​" then opens the NLS Entry Wizard.


Go back to the Scout Tooling.

Do you want to improve this document? Have a look at the sources on GitHub.