CJ Blocks Editor
The image below shows Block editor user interface.
The code is written by dragging blocks and data (variables, type references, seed instances, etc) from their respective panels onto the working area. First block that is shown after block creation is function signature, which can contain multiple parameters and return type. It's possible to use primitive and composite types created in App Builder or void for return type. Function signature block can not be deleted and serves as a container for all the blocks constituting function body which should be placed inside of function signature block. Blocks that are not connected to function signature are stored when function workspace is saved but are not compiled and are not participating in reference integrity checks.
Open menu marked with three dots near view name to see block usage, history, generated code or delete block.
To connect blocks into unit of business logic use drag and drop using items from left panel split into sections:
||Expressions, collection editing, entity persist and other.
||String resource related.
||If/else blocks and logical expressions.
||Creating queries for stored entities.
||While and for each blocks.
||Notifications and comment block.
||Blocks to create custom code and use custom types.
Blocks can be disabled using right button menu on block. This prevents generating code from it, like just keeping the block not connected on editing area.
Some blocks contain "wheel" button, which opens options for it. Like adding else section to if, adding placeholder variables in custom code, etc.
Ctrl + key
To open source of function call block right click on it and then select "Go to definition" or simply select it and press ''F3'.
For handy work with variables you have several options:
- Show variable - locates variable in a tree
- Get variable - create get an expression for the variable
- Set variable - create set an expression for the variable