extension_start Fields Code Completion
Introduction
On this page, we will cover the following:
- Showing the code completion for the
fields
parameter inextension_start.
- Adding a new credential field and showing the update code completion menu.
It is assumed the CodeCompletionDemo
Extension has already been pushed to the Controller.
1 - Showing the code completion for the fields
parameter in extension_start
The CodeCompletionDemo
Extension already has a few fields which are ready to be used:
As can be seen in the figure above, typing fields[
presents a list of available field names that is filtered down further as additional characters are typed.
Cycling through the fields reveals additional information such as Field Label, Field Type, Hint, Dependent Fields
etc.
2 - Adding a new credential field and showing the updated code completion menu
The code completion logic is responsive to changes in template.json.
To show this, first add a new credential field on the Controller side as shown below:
Using UIP: Pull
, update the local template.json.
Assuming template.json
is up-to-date, typing fields[
will now show the new sample_credential
field:
Additionally, as shown above, the specific component parts (e.g. keyLocation, passphrase, password, user
) of a credential field can be accessed by typing a second [
following fields["sample_credential"]