Compiling[edit]
The editor cannot compile the source code by itself but supports starting a compilation of the source code on the server.
Start Compilation[edit]
The compilation can be started via the menu entry in the main menu
Main Menu ⇒ Source ⇒ Compile
or with the keyboard shortcut (key binding)
CTRL + SHIFT + C
From the Remote Explorer the compilation can also be started via the context menu (right-click) of a source member.
The currently open source member in the active editor or the selected source member in the Remote Explorer will be compiled whereas the source member in the active editor takes precedence over the selection in the Remote Explorer.
Compile Commands[edit]
The compile command used for compilation for an individual file can be set via the context menu of the source member in the Remote Explorer.
Set Compile Command
The IBM i command used for compilation can be set in the preferences.
Main Menu ⇒ Window ⇒ MiW Preferences ⇒ Compile ⇒ Commands
Compile Options[edit]
The parameter/options for the compile command can be set globally and for each member separately.
A static text can be passed as compile options but the editor also supports placeholders/variables. These placeholders have the following syntax:
${placeholder}
The compile option OPTION(*EVENTF)
is needed for retrieving the compile result from the server.
Connection Properties[edit]
Values that were defined in the properties.
- object_library (The object library)
Example:
SRCFILE(*LIBL/${fileName}) SRCMBR(${name}) PGM(${object_library}/${name}) OPTION(*EVENTF)
Member Description Properties[edit]
Properties from the member description can be used as placeholders in the compile options.
- changeDate
- creationDate
- lastUsedDate
- fileName
- library (member library)
- name
- textDescription
- daysUsed
- restoreDate
- saveDate
- attribute
Example:
SRCFILE(*LIBL/${fileName}) SRCMBR(${name}) PGM(${name}) OPTION(*EVENTF)
For stream files there are some additional placeholders:
- streamfile — name of the stream file (including the suffix of the file)
- basename — name of the stream file without the suffix
- ifspath — absolute path of the stream file
Java System Properties[edit]
Java system properties can also be used as placeholders. For adding Java system properties to MiWorkplace the miworkplace.ini
file needs to be edited. See Eclipse Start Parameters, section VM Args.
Environment Variables[edit]
Environment variables can also be used as placeholders.
Display Compile Command[edit]
The command with the resolved compile options and parameter can be viewed via the context menu of a source member in the Remote Explorer.
Display Compile Command
Compile Result[edit]
The result of a compilation will be automatically fetched from the server and displayed in the Compile Result view.
The result of a compilation is cached so that the results of the different source members can be viewed without losing any other compile results.
The Compile Result view supports going to the line in the editor by double-clicking the line in the result table.