From d96259e1bc0f3244076f8d21ca3641d96a453722 Mon Sep 17 00:00:00 2001 From: Andrew Ferguson Date: Fri, 22 Feb 2008 17:34:43 +0000 Subject: [PATCH] 201087: apply contributions from James Blackburn --- .../schema/templateProcessTypes.exsd | 2 +- .../Howtodeveloptemplates.html | 100 +++++-- .../exampletemplate.html | 251 +++++++++++++++++- 3 files changed, 327 insertions(+), 26 deletions(-) diff --git a/core/org.eclipse.cdt.core/schema/templateProcessTypes.exsd b/core/org.eclipse.cdt.core/schema/templateProcessTypes.exsd index 6dcd8a8b554..7914b5a3eba 100644 --- a/core/org.eclipse.cdt.core/schema/templateProcessTypes.exsd +++ b/core/org.eclipse.cdt.core/schema/templateProcessTypes.exsd @@ -62,7 +62,7 @@ - A class that extends org.eclipse.cdt.templateengine.process.ProcessRunner abstract class and implements all its abstract methods. This is the code that actually processes. + A class that extends org.eclipse.cdt.core.templateengine.process.ProcessRunner abstract class and implements all its abstract methods. This is the code that actually processes. diff --git a/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html b/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html index 44692ba8d34..1efadb18ea6 100644 --- a/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html +++ b/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html @@ -60,7 +60,7 @@ pages based on whether the template needs user input or not. This document details the schema for writing project templates. The schema file TemplateDescriptorSchema.xsd, which defines the structure for the project templates, is part of -org.eclipse.cdt.templateengine plug-in. +org.eclipse.cdt.core plug-in.

The structure or schema for a project template is as follows: @@ -369,7 +369,7 @@ The process element within the root element of a project template defines the processes to be followed to create a project, based on the inputs taken. Here is the syntax for this element:

-

<process type="org.eclipse.cdt.templateengine.<process type>">
    <simple name="name" value=""/>

    <complex name="name">
        ...
    </complex>

    <simple-array name="values">
        ...
    </simple-array>

    <complex-array name="name">
        ...
    </complex-array>

</process>

+

<process type="org.eclipse.cdt.{core|managedbuilder.core}.<process type>">
    <simple name="name" value=""/>

    <complex name="name">
        ...
    </complex>

    <simple-array name="values">
        ...
    </simple-array>

    <complex-array name="name">
        ...
    </complex-array>

</process>

A process element defines a single process. A process is like a procedure with a set of parameters. In similar terms, the @@ -380,7 +380,7 @@ arguments for the process matching their types and in the order specified.

You can specify the process type using the type attribute. For example, to add files to a project you can use -org.eclipse.cdt.templateengine.AddFiles as the process type. +org.eclipse.cdt.core.AddFiles as the process type.

A process element may include the following child elements: @@ -448,7 +448,7 @@ for the copy process.

The Template Engine plug-in provides a set of process types using the -extension-point org.eclipse.cdt.templateengine.processType. Using +extension-point org.eclipse.cdt.core.templateProcessTypes. Using these process types you can describe a process in your template. For example, you can describe the copy process by providing the source and destination folder names. @@ -456,7 +456,7 @@ folder names.

The following is a list of process types provided by the Template Engine:

-
    +
  • -NewManagedProject: It defines all the parameters +org.eclipse.cdt.managedbuilder.core.NewManagedProject: It defines all the parameters required for a new managed project and provides the fully qualified name of the class, which processes these parameters.

    @@ -533,7 +533,7 @@ configurations for the managed project. It is of type simple.
  • -Copy: It defines all the parameters required to copy +org.eclipse.cdt.core.Copy: It defines all the parameters required to copy files and provides the fully qualified name of the class, which processes these parameters.

    @@ -571,14 +571,14 @@ location.
  • -Append: It defines all the parameters required to append +org.eclipse.cdt.core.Append: It defines all the parameters required to append files to a project and provides the fully qualified name of the class, which processes these parameters. For more information about the parameters, refer to the Copy process type described above.

  • -AddFile: It defines all the parameters required to add a +org.eclipse.cdt.core.AddFile: It defines all the parameters required to add a file to the project and provides the fully qualified name of the class, which processes these parameters.

    @@ -603,7 +603,7 @@ process type described above.
  • -AddFiles: It defines all the parameters required to add +org.eclipse.cdt.core.AddFiles: It defines all the parameters required to add files to a project and provides the fully qualified name of the class, which processes these parameters.

    @@ -628,7 +628,7 @@ process type described above.
  • -CreateSourceFolder: It defines all the parameters +org.eclipse.cdt.core.CreateSourceFolder: It defines all the parameters required to create a folder for the source files in a project and provides the fully qualified name of the class, which processes these parameters.

    @@ -652,7 +652,7 @@ created. It is of simple type.
  • -AddLink: It defines all the parameters required to +org.eclipse.cdt.core.AddLink: It defines all the parameters required to create a linked file and provides the fully qualified name of the class, which processes these parameters.

    @@ -682,7 +682,7 @@ file should be created. It is of simple type.
  • -CreateIncludeFolder: It defines all the parameters +org.eclipse.cdt.managedbuilder.core.CreateIncludeFolder: It defines all the parameters required to create a folder for the header files in a project and provides the fully qualified name of the class, which processes these parameters. For information about the parameters, refer to the CreateSourceFolder @@ -690,7 +690,48 @@ process type described above.

  • -SetMBSStringOptionValue: It defines all the parameters +org.eclipse.cdt.managedbuilder.core.ExcludeResources: It defines all the parameters +required to exclude resources from a CDT project and provides the +fully qualified name of the class, which processes these parameters. +

    +

    +Here is a list of parameters defined by this process type: +

    +
      +
    • +

      +projectName: Use this parameter to specify the name +of the project for which resources will be excluded. It is of simple +type. +

      +
    • +

      +configIdPattern: Use this parameter to specify a regular expression of +java.util.regex.Pattern syntax for matching against project configuration ids. +The resources that match any of the regular expressions given in the filePatterns argument +will be excluded from all matching project configurations. It is of simple type. +

      +
    • +

      +filePatterns: Use this parameter to specify a simple-array of +java.util.regex.Pattern for matching against project resources to be excluded. The paths that +will be matched against are workspace relative (include the project folder) and use forward slash as the file separator. +That this argument is an array is purely to allow logically separate patterns to be given separately rather than as one big string. +If any of the regular expressions matches then the resource in question will be excluded for the matching configuration(s). +The resources that match any of the regular expressions given in the filePatterns argument +will be excluded for all matching project configurations. It is of simple-array type. +

    • +

      +invertedConfigMatching: If this is set to "true" then the set of configurations for which resources +matching any of the specified file patterns will be inverted. This enables you to specify which configurations the +files should not be excluded for without having to know what other configurations may exist. It is of simple type. +

      +
    • +
    +

    +
  • +

    +org.eclipse.cdt.managedbuilder.core.SetMBSStringOptionValue: It defines all the parameters required to create a string option value and provides the fully qualified name of the class, which processes these parameters.

    @@ -733,7 +774,7 @@ the resource. It is of simple type.
  • -SetMBSStringListOptionValues: It defines all the +org.eclipse.cdt.managedbuilder.core.SetMBSStringListOptionValues: It defines all the parameters required to create a string list of option values and provides the fully qualified name of the class, which processes these parameters. The parameters required are similar to that of SetMBSStringOptionValue @@ -743,7 +784,7 @@ option values. For information about the parameters, refer to the

  • -SetMBSBooleanOptionValue: It defines all the parameters +org.eclipse.cdt.managedbuilder.core.SetMBSBooleanOptionValue: It defines all the parameters required to create a boolean option value and provides the fully qualified name of the class, which processes these parameters. The parameters required are similar to that of SetMBSStringOptionValue process type, only @@ -753,7 +794,7 @@ For information about the parameters, refer to the

  • -AppendMBSStringOptionValue: It defines all the +org.eclipse.cdt.managedbuilder.core.AppendToMBSStringOptionValue: It defines all the parameters required to append a string option value to an existing string option. It also provides the fully qualified name of the class, which processes these parameters. For information about the parameters, refer to the @@ -761,14 +802,21 @@ these parameters. For information about the parameters, refer to the

  • -AppendCreate: It defines all the parameters required to +org.eclipse.cdt.managedbuilder.core.AppendToMBSStringListOptionValues: It defines all the +parameters required to append a string list of option values to an existing string list of option value. +It also provides the fully qualified name of the class, which processes these parameters. For information +about the parameters, refer to the SetMBSStringListOptionValues process type described above. +

    +
  • +

    +org.eclipse.cdt.core.AppendCreate: It defines all the parameters required to append or create a file in a project. It also provides the fully qualified name of the class, which processes these parameters. For information about the parameters, refer to the AddFiles process type described above.

  • -CreateResourceIdentifier: It defines all the parameters +org.eclipse.cdt.core.CreateResourceIdentifier: It defines all the parameters required to append or create a resource identifier. It also provides the fully qualified name of the class, which processes these parameters.

    @@ -789,9 +837,19 @@ type.

  • +
  • +

    +org.eclipse.cdt.managedbuilder.core.GenerateMakefileWithBuildDescription: +

    +
      +
    • +

      projectName: Use this parameter to specify the name +of the project for which a makefile will be generated from the current project build info. It is of simple +type. +

    -

    +


    Once the project template has been written, register it with Eclipse to make it available for use. For more information on this, refer to How to register a template with Eclipse. diff --git a/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/exampletemplate.html b/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/exampletemplate.html index 0f916442609..dd644908d85 100644 --- a/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/exampletemplate.html +++ b/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/exampletemplate.html @@ -35,16 +35,259 @@ The following is an example template to create a simple Symbian OS EXE project:

    -

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <template type="ProjTempl" version="1.0" supplier="Symbian" revision="1.0" author="Bala Torati"
            id="EXE" label="Simple EXE" description="A skeletal Symbian OS EXE project. Creates a folder for sources and another for include."
             help="help.html">

        <property-group id="basics" label="Basic Settings" description="Basic properties of a project" type="PAGES-ONLY" help="help.html">
            
    <property id="uid2"
                label="UID 2"
                description="UID 2"
                default="0x00000000"
                type="input"
                pattern="0x[0-9a-fA-F]{8}"
                hidden="false"
                mandatory="true"
                persist="true"/>
            
    <property id="uid3"
                label="UID 3"
                description="UID 3"
                default="0x00000000"
                type="input"
                pattern="0x[0-9a-fA-F]{8}"
                hidden="false"
                mandatory="false"
                persist="true"/>

    <property id="vid"
                label="Vendor ID"
                description="Vendor ID"
                default="0x00000000"
                type="input"
                pattern="0x[0-9a-fA-F]{8}"
                hidden="false"
                mandatory="true"
                persist="true"/>

    <property id="author"
                label="Author"
                description="Name of the author"
                type="input"
                pattern=".*"
                default=""
                hidden="false"
                persist="true"/>

    <property id="copyright"
                label="Copyright notice"
                description="Your copyright notice"
                type="input"
                pattern=".*"
                default="Your copyright notice"
                hidden="false"
                persist="true"/>

    <property id="targetType"
                label="Target Type"
                description="Select the target type"
                type="select"
                hidden="false"
                mandatory="true"
                persist="true">
                <item label="APP" selected="true" name="app"/>
                <item label="LIB" selected="false" name="lib"/>
                <item label="DLL" selected="false" name="dll"/>
                <item label="EXE" selected="false" name="exe"/>
                <item label="EXEDLL" selected="false" name="exedll"/>
            </property>
        </property-group>

        <property-group id="directories" label="Project Directories" description="Generated files will be copied to the specified directories under the project root directory" type="PAGES-ONLY" help="help.html">
        <property id="incDir"
                    label="Include"
                    description="Directory for C++ header files"
                    type="input"
            default="inc"
                    pattern="[a-zA-Z0-9]+"
                    mandatory="true"
                    persist="true"/>

        <property id="sourceDir"
                    label="Source"
                    description="Directory for C++ source files"
                    type="input"
                    default="src"
                    pattern="[a-zA-Z0-9]+"
                    mandatory="true"
                    persist="true"/>
        </property-group>
        
        <process type="org.eclipse.cdt.templates.NewSymbianProject">
            <simple name="name" value="$(projectName)"/>
            <simple name="targetType" value="$(targetType)"/>
            <simple name="uid2" value="$(uid2)"/>
            <simple name="uid3" value="$(uid3)"/>
            <simple name="vid" value="$(vid)"/>
        </process>

        <process type="org.eclipse.cdt.core.templateengine.process.processes.CreateSourceFolder">
            <simple name="projectName" value="$(projectName)"/>
            <simple name="path" value="$(sourceDir)"/>
        </process>

        <process type="org.eclipse.cdt.managedbuilder.templateengine.processes.CreateIncludeFolder">
            <simple name="projectName" value="$(projectName)"/>
            <simple name="path" value="$(incDir)"/>
        </process>

        <process type="org.eclipse.cdt.core.templateengine.process.processes.AddFiles">
            <simple name="projectName" value="$(projectName)"/>
            <complex-array name="files">
                <element>
                    <simple name="source" value="inc/Basename.h"/>
                    <simple name="target" value="$(incDir)/$(baseName).h"/>
                    <simple name="replaceable" value="true"/>
                </element>
                <element>
                    <simple name="source" value="src/Basename.cpp"/>
                    <simple name="target" value="$(sourceDir)/$(baseName).cpp"/>
                    <simple name="replaceable" value="true"/>
                </element>
            </complex-array>
        </process>

        <process type="org.eclipse.cdt.managedbuilder.templateengine.processes.AppendToMBSStringListOptionValues">
            <simple -name="projectName" value= "$(projectName)"/>      
            <complex-array name="resourcePaths">
                <element>
                    <simple name="id" value=".*linker\.libraries\.libraries.*" />
                    <simple-array name="values">
                        <element value="euser.lib" />
                    </simple-array>
                    <simple name="path" value="" />
                </element>
            </complex-array>
        </process>
    </template>

    +

    <?xml version="1.0" encoding="ISO-8859-1"?>
    +<template type="ProjTempl" version="1.0" supplier="Symbian" revision="1.0" author="Bala Torati"
    +        id="EXE" label="Simple EXE" description="A skeletal Symbian OS EXE project. Creates a folder for sources and another for include."
    +         help="help.html">
    +
    +    <property-group id="basics" label="Basic Settings" description="Basic properties of a project" type="PAGES-ONLY" help="help.html">
    +        
    +<property id="uid2"
    +            label="UID 2"
    +            description="UID 2"
    +            default="0x00000000"
    +            type="input"
    +            pattern="0x[0-9a-fA-F]{8}"
    +            hidden="false"
    +            mandatory="true"
    +            persist="true"/>
    +        
    +<property id="uid3"
    +            label="UID 3"
    +            description="UID 3"
    +            default="0x00000000"
    +            type="input"
    +            pattern="0x[0-9a-fA-F]{8}"
    +            hidden="false"
    +            mandatory="false"
    +            persist="true"/>
    +
    +<property id="vid"
    +            label="Vendor ID"
    +            description="Vendor ID"
    +            default="0x00000000"
    +            type="input"
    +            pattern="0x[0-9a-fA-F]{8}"
    +            hidden="false"
    +            mandatory="true"
    +            persist="true"/>
    +
    +<property id="author"
    +            label="Author"
    +            description="Name of the author"
    +            type="input"
    +            pattern=".*"
    +            default=""
    +            hidden="false"
    +            persist="true"/>
    +
    +<property id="copyright"
    +            label="Copyright notice"
    +            description="Your copyright notice"
    +            type="input"
    +            pattern=".*"
    +            default="Your copyright notice"
    +            hidden="false"
    +            persist="true"/>
    +
    +<property id="targetType"
    +            label="Target Type"
    +            description="Select the target type"
    +            type="select"
    +            hidden="false"
    +            mandatory="true"
    +            persist="true">
    +            <item label="APP" selected="true" name="app"/>
    +            <item label="LIB" selected="false" name="lib"/>
    +            <item label="DLL" selected="false" name="dll"/>
    +            <item label="EXE" selected="false" name="exe"/>
    +            <item label="EXEDLL" selected="false" name="exedll"/>
    +        </property>
    +    </property-group>
    +
    +    <property-group id="directories" label="Project Directories" description="Generated files will be copied to the specified directories under the project root directory" type="PAGES-ONLY" help="help.html">
    +    <property id="incDir"
    +                label="Include"
    +                description="Directory for C++ header files"
    +                type="input"
    +        default="inc"
    +                pattern="[a-zA-Z0-9]+"
    +                mandatory="true"
    +                persist="true"/>
    +
    +    <property id="sourceDir"
    +                label="Source"
    +                description="Directory for C++ source files"
    +                type="input"
    +                default="src"
    +                pattern="[a-zA-Z0-9]+"
    +                mandatory="true"
    +                persist="true"/>
    +    </property-group>
    +    
    +    <process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
    +        <simple name="name" value="$(projectName)"/>
    +        <simple name="targetType" value="$(targetType)"/>
    +        <simple name="uid2" value="$(uid2)"/>
    +        <simple name="uid3" value="$(uid3)"/>
    +        <simple name="vid" value="$(vid)"/>
    +    </process>
    +
    +    <process type="org.eclipse.cdt.core.CreateSourceFolder">
    +        <simple name="projectName" value="$(projectName)"/>
    +        <simple name="path" value="$(sourceDir)"/>
    +    </process>
    +
    +    <process type="org.eclipse.cdt.managedbuilder.core.CreateIncludeFolder">
    +        <simple name="projectName" value="$(projectName)"/>
    +        <simple name="path" value="$(incDir)"/>
    +    </process>
    +
    +    <process type="org.eclipse.cdt.core.AddFiles">
    +        <simple name="projectName" value="$(projectName)"/>
    +        <complex-array name="files">
    +            <element>
    +                <simple name="source" value="inc/Basename.h"/>
    +                <simple name="target" value="$(incDir)/$(baseName).h"/>
    +                <simple name="replaceable" value="true"/>
    +            </element>
    +            <element>
    +                <simple name="source" value="src/Basename.cpp"/>
    +                <simple name="target" value="$(sourceDir)/$(baseName).cpp"/>
    +                <simple name="replaceable" value="true"/>
    +            </element>
    +        </complex-array>
    +    </process>
    +
    +    <process type="org.eclipse.cdt.managedbuilder.core.AppendToMBSStringListOptionValues">
    +        <simple +name="projectName" value= "$(projectName)"/>      
    +        <complex-array name="resourcePaths">
    +            <element>
    +                <simple name="id" value=".*linker\.libraries\.libraries.*" />
    +                <simple-array name="values">
    +                    <element value="euser.lib" />
    +                </simple-array>
    +                <simple name="path" value="" />
    +            </element>
    +        </complex-array>
    +    </process>
    +</template>

    The above given template copies the following source (.cpp) and header (.h) files in the src and inc folders respectively. These files uses a set of macros to get the values specified by the developer for file name, author name, copyright etc.

    -

    /*
    ============================================================================
     Name : $(baseName).cpp
     Author : $(author)
     Version :
     Copyright : $(copyright)
     Description : Exe source file
    ============================================================================
    */

    // Include Files

    #include "$(baseName).h"
    #include <e32base.h>
    #include <e32std.h>
    #include <e32cons.h> // Console


    // Constants

    _LIT(KTextConsoleTitle, "Console");
    _LIT(KTextFailed, " failed, leave code = %d");
    _LIT(KTextPressAnyKey, " [press any key]\n");


    // Global Variables

    LOCAL_D CConsoleBase* console; // write all messages to this


    // Local Functions

    LOCAL_C void MainL(const TDesC& aArgs)
        {
        //
        // add your program code here, example code below
        //
        console->Write(_L("Hello, world!\n"));
        console->Printf(_L("Command line args: \"%S\"\n"), &aArgs);
        }


    LOCAL_C void DoStartL()
        {
        // Create active scheduler (to run active objects)
        CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
        CleanupStack::PushL(scheduler);
        CActiveScheduler::Install(scheduler);

        // Call main function with command line
        TBuf<256> cmdLine;
        RProcess().CommandLine(cmdLine);
        MainL(cmdLine);

        // Delete active scheduler
        CleanupStack::PopAndDestroy(scheduler);
        }


    // Global Functions

    GLDEF_C TInt E32Main()
        {
        // Create cleanup stack
        __UHEAP_MARK;
        CTrapCleanup* cleanup = CTrapCleanup::New();

        // Create output console
        TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)));
        if (createError)
            return createError;

        // Run application code inside TRAP harness, wait keypress when terminated
        TRAPD(mainError, DoStartL());
        if (mainError)
            console->Printf(KTextFailed, mainError);
        console->Printf(KTextPressAnyKey);
        console->Getch();
        
        delete console;
        delete cleanup;
        __UHEAP_MARKEND;
        return KErrNone;
        }

    -

    /*
    ============================================================================
     Name : $(baseName).h
     Author : $(author)
     Version :
     Copyright : $(copyright)
     Description : Exe header file
    ============================================================================
    */

    #ifndef __$(baseName)_H__
    #define __$(baseName)_H__


    // Include Files

    #include <e32base.h>


    // Function Prototypes

    GLDEF_C TInt E32Main();


    #endif // __$(baseName)_H__

    +

    /*
    +============================================================================
    + Name : $(baseName).cpp
    + Author : $(author)
    + Version :
    + Copyright : $(copyright)
    + Description : Exe source file
    +============================================================================
    +*/
    +
    +// Include Files
    +
    +#include "$(baseName).h"
    +#include <e32base.h>
    +#include <e32std.h>
    +#include <e32cons.h> // Console
    +
    +
    +// Constants
    +
    +_LIT(KTextConsoleTitle, "Console");
    +_LIT(KTextFailed, " failed, leave code = %d");
    +_LIT(KTextPressAnyKey, " [press any key]\n");
    +
    +
    +// Global Variables
    +
    +LOCAL_D CConsoleBase* console; // write all messages to this
    +
    +
    +// Local Functions
    +
    +LOCAL_C void MainL(const TDesC& aArgs)
    +    {
    +    //
    +    // add your program code here, example code below
    +    //
    +    console->Write(_L("Hello, world!\n"));
    +    console->Printf(_L("Command line args: \"%S\"\n"), &aArgs);
    +    }
    +
    +
    +LOCAL_C void DoStartL()
    +    {
    +    // Create active scheduler (to run active objects)
    +    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    +    CleanupStack::PushL(scheduler);
    +    CActiveScheduler::Install(scheduler);
    +
    +    // Call main function with command line
    +    TBuf<256> cmdLine;
    +    RProcess().CommandLine(cmdLine);
    +    MainL(cmdLine);
    +
    +    // Delete active scheduler
    +    CleanupStack::PopAndDestroy(scheduler);
    +    }
    +
    +
    +// Global Functions
    +
    +GLDEF_C TInt E32Main()
    +    {
    +    // Create cleanup stack
    +    __UHEAP_MARK;
    +    CTrapCleanup* cleanup = CTrapCleanup::New();
    +
    +    // Create output console
    +    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)));
    +    if (createError)
    +        return createError;
    +
    +    // Run application code inside TRAP harness, wait keypress when terminated
    +    TRAPD(mainError, DoStartL());
    +    if (mainError)
    +        console->Printf(KTextFailed, mainError);
    +    console->Printf(KTextPressAnyKey);
    +    console->Getch();
    +    
    +    delete console;
    +    delete cleanup;
    +    __UHEAP_MARKEND;
    +    return KErrNone;
    +    }

    +

    /*
    +============================================================================
    + Name : $(baseName).h
    + Author : $(author)
    + Version :
    + Copyright : $(copyright)
    + Description : Exe header file
    +============================================================================
    +*/
    +
    +#ifndef __$(baseName)_H__
    +#define __$(baseName)_H__
    +
    +
    +// Include Files
    +
    +#include <e32base.h>
    +
    +
    +// Function Prototypes
    +
    +GLDEF_C TInt E32Main();
    +
    +
    +#endif // __$(baseName)_H__

    When the developer chooses the above template in the New Project wizard, the following wizard pages are generated: