Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Texo/Integrate code generation in a build

Introduction

Texo code generation can be integrated quite easily within your build process. Texo needs Eclipse and a workspace to generate code because Texo uses Eclipse for code formatting and import resolving. This wiki page discusses how Texo can be run headless directly or using ant.

Environment

Eclipse

Texo needs Eclipse and a workspace to generate code. The Eclipse version needs the Texo plugins to be installed. To setup Eclipse choose one of the version from the Eclipse downloads page, for example the 'Eclipse IDE for Java Developers' can be used (it is the smallest). Choose the version which can run on the platform on which your build is being run.

Then next install the Texo plugins within the downloaded Eclipse version. This can be done through the update manager using update site or by downloading the plugins directly from this site and placing the plugins in the dropins directory.

Now you have an Eclipse ready to be used. Place the Eclipse version somewhere on your build server and keep track of the directory where it is placed. You can alternatively also zip/tar.gz it and unzip it during the build or other solutions. As long as during the build this Eclipse installation is available by your build script.

Texo also needs a workspace.


Texo code can be generated within the IDE by a developer either manually or automatically when a model file changes.


Texo code can be generated directly by right-clicking on one or more xsd or ecore files and selecting 'Texo > Generate Code'.


Org.eclipse.emf.texo.generate.code.png

Back to the top