vscode-transforminator extension for Visual Studio CodeThe extension offers integration with the Transforminator java tool that generates output based on Freemarker or Xslt templates. The tool and this extension are specificaly developed for use in an opentunnel environment, but may also be used to debug your templates for other environments. The generator is an external java tool that needs to be available on your system.
You may download Transforminator latest release here. And full documentation for the tool can be found in this README and here. Freemarker and xslt syntax supportThis extension also adds specific Opentunnel snippets to the freemarker and xslt langauage and the tooling to test your template output on your local system. For full freemarker language support you also need to Install Xslt languge support is also available in visual studio code. Extension SettingsAfter installing the extension from the marketplace and downloading the Transforminator java tool, you need to do some settings. First the extension needs to know where to find the tool so it can be run. It is good practice to place the tool in a seperate directory like tools. The tool uses a java runtime environment (jre). That needs to be installed as well. Normaly the extension detects you jre/jdk installation so you do not need to change the java setting. UsageFirst add a directory to your workspace and open your ftl file. Then press Set you keybinding for the So now we can run the extension. Press When no config is pressent the extension creates a default transforminator.yaml (depending on your config) in the .vscode directory. In this config you find the minimum that is needed run the tool; name of the configs, the outputfile and the inputfile. Edit this file to customize and add your configs. The transforminator.yaml file can hanlde all Transforminator tool run uptions and are named like so: When you run the command and the files in the config are missing it aks if they should be created. You may then change them for further use. You may use transforminator.addConfig command to add a new config to the yaml-config. You can do this in the yaml file as well.
Press Then the command asks for a name, inputfilename, outputfilename. And when the new config is succesfully added a information message is shown from where you can open the yaml-config to make you changes. |