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


>>So is projecttype attribute required?  The help says it's optional. I'll
fix that too if you confirm.

Yes. It is mandatory now with integration of TE in new project model. We fixed that in the latest document, which will be committed by Andrew some time this week.

>>Where do you get the list of valid project types? The help said there's a
dropdown list but there's not.
We initially planned to populate the list with available project types. But since the CDT project model allows to define custom projecttypes and it's not possible to add them to the list every time with the creation of a new projecttype, we decided to provide it as a string type element. The updated documentation has been corrected to reflect this.


>>Where do you get the list of valid project types?
New project model ISV document ("What's new in CDT Build system 4.0"), section 2.2 "what are the general project type entries?" provides information about a default set of projecttypes. Any custom defined projecttypes, the provider must document them somewhere and make it available to the templates creators, so that they can associate the project templates with them.

>>(more questions probably coming shortly.)
Please send them and together we will make template engine documentation up to date.

PS: Thanks for your patch on package names correction in template engine documents. These also will be committed along with other changes by Andrew soon.

Regards,
-Bala




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

17/09/2007 14:21

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

To
"CDT General developers list." <cdt-dev@xxxxxxxxxxx>
cc
Subject
Re: [cdt-dev] Trouble getting template engine to work





>projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
> Make sure you always provide a valid CDT projecttype id with which the
template will be associated.

So is projecttype attribute required?  The help says it's optional. I'll
fix that too if you confirm.
Where do you get the list of valid project types? The help said there's a
dropdown list but there's not.
I'm happy with just a pointer to what the valid values are.

>Please give it a try and let me know if that change doesn't solve the
problem.
Yes, That worked! I see my template in the new project wizard first page
under "Executable."
(more questions probably coming shortly.)
Thanks so much. I hope to help get this help documentation updated to be
(more) accurate, with your help.

...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


                                                                         
            bala.torati@symbi                                            
            an.com                                                        
            Sent by:                                                   To
            cdt-dev-bounces@e         "CDT General developers list."      
            clipse.org                <cdt-dev@xxxxxxxxxxx>              
                                                                       cc
                                                                         
            09/17/2007 07:43                                      Subject
            AM                        Re: [cdt-dev] Trouble getting      
                                      template engine to work            
                                                                         
            Please respond to                                            
              "CDT General                                                
            developers list."                                            
            <cdt-dev@eclipse.                                            
                  org>                                                    
                                                                         
                                                                         





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                                      
                                                                       To
                                                 cdt-dev@xxxxxxxxxxx      
17/09/2007 05:47                                                       cc
                                                                         
                                                                  Subject
          Please respond to                      [cdt-dev] Trouble        
   "CDT General developers list."                getting template engine  
        <cdt-dev@xxxxxxxxxxx>                    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.
**********************************************************************
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev




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


Back to the top