Editing Java and Boolean functions

Use the instructions here to edit Java and Boolean functions. Java compliance level must be 1.8 or better.

Note: The Mapping Editor and the Java Editor are two separate entities.

When you edit and save your code in the Java Editor and then from the Java Editor you switch back to the Mapping Editor, the Mapping Editor becomes cluttered because it detects that the Java code was edited. At this stage, it is not enough to only save the code in the Java Editor. You must also run save in the Mapping Editor to include your code changes with the mapping.

  1. Double-click a mapping to open it in the Mapper Editor.
  2. Double-click on the Java or Boolean function to edit the Java code. Alternatively, you can right-click on the function and select Edit Java Code.

    A new tab opens with a name format: <Function_name>.java

    This is the standard Eclipse Java editor.

  3. Write your Java code.

    Use the standard content assist and formatting features in the body of the method.

    Note: Do not specify any code outside of the named method.

    All of the surrounding code is generated each time you edit the Java function, so any changes here are lost. This includes all automatic imports that the Java editor can do. If a class is not imported by the default imports, you have to write the Java package name before the class name, for example, java.util.ArrayList.

  4. Save the Java code in the Java editor.

    Select File > Save or press CTRL-S.

    You cannot use all standard Java constructions due to security reasons. You can only use the most commonly used Java constructions. Prohibited Java constructions are not marked in the Java editor. When you generate or publish the mapping, you will get an error message if you have used prohibited Java constructions.