Testing the Code Generator
After packaging and deploying the plug-in in the eclipse plug-ins folder, the code can be triggered using the context menu.
You have implemented the code for the code generator plug-in project (refer to Implementing the Code).
Proceed as follows
- In the Package Explorer, select the plug-in project (
HelloWorldGeneratorin the example).
- From the context menu, choose Run As > Eclipse Application.
A new Eclipse instance is started.
- Switch to the Vorto perspective.
- Create a new Vorto Project.
- Create a function block or an information model or download an existing model from vorto repository (e.g.,
XDK) and select it.
If necessary, you must do some settings for the new Eclipse environment (refer to Setting Required Preferences).
- From the context menu, choose Generate Code > HelloWorldGenerator.
A new project with name
- Open the file
sample.txt, it shows “Hello world from information model XDK !”.
This code generator is provided for you to understand code generator easier. There are already some predefined code generators included in our code base, please see the list here.