Processes Extension point

Identifier:
org.eclipse.cdt.core.templateProcessTypes

Since:
CDT 4.0

Description:
This extension point is to be extended to define new processes to be used in template descriptors by template writers.

Configuration Markup:

<!ELEMENT extension (processType+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED>

One or more elements of processType should be added as children to this element.



<!ELEMENT processType ((simple | simpleArray | complex | complexArray)*)>

<!ATTLIST processType

name          CDATA #REQUIRED

processRunner CDATA #REQUIRED>

This element defines a single process. A process is analogous to a procedure with a set of parameters. In similar terms, one can say that this element defines the prototype of this process procedure. One needs to specify all the parameters expected by this process. In the eventual template xml, one needs to specify arguments for the process matching the types and order of these parameters.



<!ELEMENT simple EMPTY>

<!ATTLIST simple

name     CDATA #REQUIRED

external (true | false)

nullable (true | false) >

A simple string parameter. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a simple argument alongwith the corresponding value attribute.



<!ELEMENT simpleArray EMPTY>

<!ATTLIST simpleArray

name CDATA #REQUIRED>

A simple string array parameter. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a simple-array argument alongwith the corresponding element children, one child per array element with the corresponding value attribute.



<!ELEMENT complex ((simple | simpleArray | complex | complexArray))+>

<!ATTLIST complex

name CDATA #REQUIRED>

A complex parameter that groups together any number of simple, simpleArray, complex, complexArray parameters. This is equivalent of an object parameter. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a simple argument alongwith the corresponding children, each child matching the type of the corresponding child of this element.



<!ELEMENT complexArray (baseType)>

<!ATTLIST complexArray

name CDATA #REQUIRED>

A complex array parameter. Each element of this parameter is of the same base complex type as specified by the baseType child of this element. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a complex-array argument alongwith the corresponding element children, one child per array element with the corresponding complex type arguments (based on baseType definition).



<!ELEMENT baseType ((simple | simpleArray | complex | complexArray))+>

This is not a direct parameter of a process. This simply acts as a complex grouping of parameters to be used as the base type of complexArray parameters.



Examples:
The following is an example of the extension point usage:


   <extension
         id="processExample"
         name="Process Example"
         point="org.eclipse.cdt.core.templateengine.processTypes">
        <processType
            name="NewManagedProject"
            processRunner="org.eclipse.cdt.core.templateengine.process.processes.NewManagedProject">
         <simple name="name"/>
         <simple
               external="true"
               name="projectType"/>
         <simple
               external="true"
               name="location"
               nullable="true"/>
         <simple name="targetType"/>
        </processType>
        <processType
            name="SetMBSBooleanOptionValue"
            processRunner="org.eclipse.cdt.core.templateengine.process.processes.SetMBSBooleanOptionValue">
         <simple name="projectName"/>
         <complexArray name="resourcePaths">
            <baseType>
               <simple name="id"/>
               <simple name="value"/>
               <simple name="path"/>
            </baseType>
         </complexArray>
        </processType>
        <processType
            name="AddFile"
            processRunner="org.eclipse.cdt.core.templateengine.process.processes.AddFile">
         <simple name="projectName"/>
         <complex name="file">
            <simple name="source"/>
            <simple name="target"/>
            <simple name="replaceable"/>
         </complex>
        </processType>
        <processType
            name="AppendToMBSStringListOptionValues"
            processRunner="org.eclipse.cdt.core.templateengine.process.processes.AppendToMBSStringListOptionValues">
         <simple name="projectName"/>
         <complexArray name="resourcePaths">
            <baseType>
               <simple name="id"/>
               <simpleArray name="values"/>
               <simple name="path"/>
            </baseType>
         </complexArray>
        </processType>
    </extension>
For more details on how to define your own templates, please check examples provided under org.eclipse.cdt.gnu.templates

Supplied Implementation:
An implementation of this extension point is supplied in org.eclipse.cdt.core.templateengine


Copyright (c) 2007 Symbian Software Limited and others. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/ SPDX-License-Identifier: EPL-2.0 Contributors: Bala Torati (Symbian) - Initial API and implementation