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/QuickStart

< Texo
Revision as of 12:25, 7 March 2010 by Mtaal.springsite.com (Talk | contribs) (Next Steps)

Quick Start

The quick start let you generate code in a few minutes:

  • Download & install Texo through the update manager
  • Create a java project (plugin or normal)
  • Take an ecore or xsd file, or use this file here, place this file somewhere in the java project
  • Right click on the ecore or xsd file and do 'Texo > Generate Code'. This will create a new folder (src-gen) in the project with the generated code.
  • Add this new folder as source folder to the project. You will probably get compile errors as not all dependencies are set. To get rid of these add the following plugins to the dependency:
    • org.eclipse.emf.ecore
    • org.eclipse.emf.texo

If you have a normal java project then you need to set these dependencies as jar files. The org.eclipse.emf.ecore.jar and org.eclipse.emf.texo.jar files can be found in the eclipse installation in the plugins folder.

Next Steps

As a next step you can try the following:

  • make it more complex by using more complex models or generate for multiple models at the same time.
  • add the Texo nature to the project (right-click on the project and do 'Configure > Add/Remove Texo Nature') and set the target folder and templates folder.
  • try generating data for your model
  • do XML/XMI serialization (with the generated test data). Note that for XML/XMI serialization you sometimes have to implement the String conversion methods in the generated ModelFactory class (see the UnsupportedOperationExceptions which are possibly generated there now).
  • change the implementation of some methods (change the javadoc tag @generated to @generatedNOT) and see that when you re-generate that the manual changes remain.
  • try overriding templates.

Back to the top