Please see the help on the string editor dialog for common editing functionality. |
The box above the edit area show the available parameters for the Java code property as well
as the return type. If parameters or return type are classes (and not primitive types), they
will be shown as hyperlinks. Clicking on such a hyperlink opens the Javadoc in the external browser.
If you would not like the default browser to be opened, you can configure your own browser
in the preferences dialog.
To get more information on classes from the A number of packages can be used without using fully-qualified class names. Those packages are:
You can put a number of import statements as the first lines in the text area in order to avoid using fully qualified class names. |
Java code properties can be
|
The primary interface to interact with the installer or uninstaller is the context which is always among
the available parameters. The context provides information about the current installation and gives access to
variables, screens, actions and other elements of the installation or uninstallation. The parameter is of
type
Apart from the context, the action, screen or form component to which the Java code property belongs is among the available parameters. If you know the actual class, you can cast to it and modify the object as needed. |
The Java editor offers the following code assistance powered by the eclipse platform:
|
Screens, actions and form components are wired together with installer variables, please see the
help topic on screens and actions for more
information. Setting and getting installer variables is done through the context parameter with the
context.getVariable(String variableName) and
context.setVariable(String variableName, Object value) methods. The convenience method
context.getBooleanVariable(String variableName) makes it easier to check conditions.
Any object can be used as the value for a variable. To use installer variables in text properties
of actions, screens and form components, write them as ${installer:myVariableName} .
|
If the gutter icon in the top right corner of the dialog is green, your script is going to compile unless you have disabled error analysis in the Java editor settings. In some situations, you might want to try the actual compilation. Choosing Code->Test Compile from the menu will compile the script and display any errors in a separate dialog. Saving your script with the OK button will not test the syntactic correctness of the script. When your install4j project is compiled, the script will also be compiled and errors will be reported. |