Some solutions require functionality that is not yet implemented in ALang. In these cases, it is possible to use AlloyCommands, as these enables to call other Alloy plugins in ALang using parameters defined in the function.
How to configure
To call commands from other Alloy plugins, insert the below inside your ALang command in the function:
<AlloyCommands>
<Cmd case=”…” … />
</AlloyCommands>
The <Cmd case=”…” … />
refers to the command from another plugin. This could for example be a command from BaseExtensions like the following:
<AlloyCommands>
<Cmd case="BaseExtensions:change-style" style="$RED_style$"/> </AlloyCommands>
Every parameter in the AlloyCommands element which starts and ends with $
will look for the variable that must be present in the ALang module.
Furthermore, as seen in the example above, it is also possible to inject variables in the external AlloyCommands. To learn more about injected variables, have a look at this article.
Note that it is possible to call as many commands as needed in the
<AlloyCommands></AlloyCommands>
element.
Comments
0 comments
Article is closed for comments.