Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Trouble getting template engine to work


Hi Beth,

I should agree that some of the information about template engine in the ISV docs is out of date. I discussed about this with Andrew a little while ago, but because of other project commitments I couldn't find time to do it myself. Thanks for the patch. Andrew will commit an updated version of ISV docs some time this week.

Coming to your template, it seems that you are using an invalid projecttype in your templates extension. The following projecttype is no longer supported in the new project model.

projectType="org.eclipse.cdt.build.projectType.exe">

If you are looking to create an 'Executable' project, change it to use:
           projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">

or your custom defined projecttype which must come from 'buildDefinitions' extention. Make sure you always provide a valid CDT projecttype id with which the template will be associated.

Please give it a try and let me know if that change doesn't solve the problem.


What did I omit?  Are any templateAssociations required like in
org.eclipse.cdt.managedbuilder.gnu.ui ?

This is required only if you want to limit your template project available with few toolchains. If this is not defined for your template, then by default the template will be valid for all available and applicable  toolchains.


Hopefully I can reuse most of my MBSCustomPage.  It adds values to e.g.
include path and changes the build command.

Yes. That should work fine.


Regards,
-Bala



Beth Tibbitts <tibbitts@xxxxxxxxxx>
Sent by: cdt-dev-bounces@xxxxxxxxxxx

17/09/2007 05:47

Please respond to
"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

To
cdt-dev@xxxxxxxxxxx
cc
Subject
[cdt-dev] Trouble getting template engine to work






I want to make some simple projects to show up in the new project list,
similar to the "Hello World" C project.

I've read thru the help for the template engine in the ISV docs.
It's misleading because it appears that some of the packages and names of
things changed after it was committed.
I think I finally got these names right, and created a patch in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=203553

Can someone confirm that my changes are correct?  They at least let me
create the extension that looks basically right.

I used a template that was a copy of the HelloWorldCAnsiProject that is in
the org.eclipse.cdt.managedbuilder.gnu.ui plug-in, just gives it a
different name.
When I run, however, I don't see any changes to the new project wizard page
of projects.
Here is my extension information:
  <extension
        point="org.eclipse.cdt.core.templates":>
     <template
           filterPattern=" "
           id=
"org.eclipse.ptp.pldt.projects.HelloMPIWorldCProject"      // this is
<projectID>.HelloMPIWorldCProject
           location="templates/HelloMPIWorldCproject/template.xml"
           projectType="org.eclipse.cdt.build.projectType.exe">
     </template>
  </extension>.

The template.xml is a copy of  HelloWorldCAnsiProject's  template.xml
except for the initial tag, which is as follows.
I believe the only changed value of importance is the
id="HelloMPIWorldCProject" which matches the id in the extension above.
<template type="ProjTempl" version="1.0" supplier="Eclipse.org"
revision="1.0" author="Beth Tibbitts (IBM Research)"
           copyright="blah blah "
           id="HelloMPIWorldCProject"
label="%HelloWorld.CAnsitemplate.label"
description="%HelloWorld.CAnsitemplate.description"
            help="help.html">
The rest of that directory from org.eclipse.cdt.managedbuilder.gnu.ui's
HelloWorldCAnsiProject  directory is reproduced too.

How are the IDs supposed to match up? I thought the template ID should
probably mach the template.xml's id attribute but the example for
HelloWorldCAnsiProject doesn't.

What did I omit?  Are any templateAssociations required like in
org.eclipse.cdt.managedbuilder.gnu.ui ?

Eventually I want to add an extra wizard page when the user selects this
template.
I already have the wizard page which is an extension of MBSCustomPage.
They both extend IWizardPage.
I assume that would get referenced from the
pagesAfterTemplateSelectionProvider.
Hopefully I can reuse most of my MBSCustomPage.  It adds values to e.g.
include path and changes the build command.

Help! Any help in getting started would be appreciated.

...Beth

Beth Tibbitts  (859) 243-4981  (TL 545-4981)
High Productivity Tools / Parallel Tools  http://eclipse.org/ptp
IBM T.J.Watson Research Center
Mailing Address:  IBM Corp., 455 Park Place, Lexington, KY 40511

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Taking our world with us...
Make sure you visit the Symbian Smartphone Show, 16-17 October 2007, Excel, London
smartphoneshow.com

**********************************************************************
Symbian Software Ltd is a company registered in England and Wales with registered number 4190020 and registered office at 2-6 Boundary Row, Southwark, London, SE1 8HP, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify postmaster@xxxxxxxxxxx and delete the message and any attachments accompanying it immediately. Neither Symbian nor any of its Affiliates accepts liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy.
**********************************************************************


Back to the top