You can run Ballerina main/service programs with only few clicks. You don't have to add or change any configurations.
You can debug Ballerina main/service programs with only few clicks as well.
This feature adds import declarations on the fly. All you need to do is selecting the package name from the lookup list and the package declaration will be added automatically.
When we copy and paste some Ballerina codes, this feature will automatically import unambiguous imports. Then we can manually import any packages with ambiguity using clicking on the package name and pressing Alt + Enter
keys.
Note: Please note that this feature is disabled by default since this might cause issues if the file contain grammar mistakes. You can enable it by selecting the Add unambiguous imports on the fly CheckBox in Settings -> Languages and Frameworks -> Ballerina -> Auto Imports.
You can view the required parameters of a functions, actions, etc by pressing Ctrl
+P
.
You can view the documentation of a functions, actions, etc by pressing Ctrl
+Q
.
Struct fields are suggested inside struct initializing braces and after the dot operator. Multi level struct field access is available.
Annotation field names will be suggested inside annotation attachments.
Array length property is now available. This is an array dimension aware suggestion.
You can find usage of variables, functions, structs, connectors, etc.
You can go to definition of variables, function invocations, etc by Ctrl
+Click
on the reference.
You can reformat the Ballerina codes by pressing Ctrl
+Alt
+L
.
Path/Query parameter validation is available to improve usability.
Package inspection is available to improve usability. This will suggest to add the package name if no package name is present. If an incorrect package name is present, it will suggest to change the package name. You can view these suggestions using Alt
+Enter
.
Three types of Ballerina file templates are available.
- Ballerina Main - Contains a sample main program
- Ballerina Service - Contains a sample service
- Empty File
Live templates contains boilerplate codes and lets the user to enter them easily. All available live templates can be viewed/changed at Settings -> Editor -> Live Templates -> Ballerina.
Hidden Templates
Hidden templates are associated with most of the keywords. Hidden templates can be invoked by pressing Ctrl
+Space
after typing the keyword. Hidden template will be inserted when you select the keyword from the lookup element list as well.
Spell checking is enabled for all identifiers. You can rename all of the definitions and references as well.