Contents

Generating Source Code

To generate the source code for the component defined, use the generate command as follows:

  • Windows
    1. Browse to %TEMPLATE_ENGINE% 
    2. Run templates-console.bat; a command prompt opens in directory pointed to %TEMPLATE_ENGINE%.
    3. Run the following command specifying the destination directory:

      Usage


      Figure 1: Run templates-console.bat

      Icon

      Run generate.bat without any arguments to see the help.

  • Linux
    1. Browse to %TEMPLATE_ENGINE% in Linux console

    2. Run the following command specifying the destination directory:

      Usage

      usage

      Icon

      run [-language <name>] [-setting <name>] -dest <directory>

      • -dest <directory> target directory where source files are Generated (same directory given while launching wizard)
      • -language <name>language (c, cpp, csharp, java, jca) in which source files are generated (default is java)
      • -setting <name> name of setting directory in etc folder
      Icon
      • Run generate.sh without any arguments to see the help
        • Executing generate.sh command generates the sources under src directory specified in the directory specified against –dest argument. It also creates necessary files to build and deploy the components. Below are the common files that are created irrespective of language:
          • build.properties
          • build.xml
          • common.xml
Icon

Refer the Characteristics and Design Choices section for an overview of Synchronous and Asynchronous components. This section enables decision making of the best suited design.

Code for Asynchronous (EDBC) Component

To generate code for asynchronous component, use generate command. Though, by default, it assumes that the code is generated for the asynchronous component, to specify particularly  that the code generated should be for asynchronous component, use –language option with value java

Example

The generated component code has the structure as shown in figure below; it shows the description/purpose of each file generated.


Figure 2: Structure of asynchronous component

Code for Synchronous (BC) Component

To generate code for synchronous component, use generate command specifying the language using –language option followed by the value representing the language as shown in the below example.

Example

The generated component code has the structure as shown in figure below.


Figure 3: Structure of synchronous component

Code for C Component

To generate code for C component, use generate command specifying the language using -language option followed by the value representing the language, that is, 'c'.

Example


Figure below shows the structure of the code generated for an asynchronous component defined in C.


Figure 4: Structure of C component

Code for C++ component

To generate code for C++ component, use generate command specifying the language using -language option followed by the value representing the language, that is, 'cpp'.

Example

Figure below shows the structure of the code generated for an asynchronous component defined in C++.


Figure 5: Structure of C++ component

Code for C# Component

To generate code for C# component, use generate command specifying the language using -language option followed by the value representing the language, that is, 'csharp'.

Example


Figure 6: Structure of C# component

Adaptavist ThemeBuilder EngineAtlassian Confluence