Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Adding a new processRunner to the template engine

I spent quite a while with Beth yesterday trying to figure out as well why
her template pages aren't getting called, and it boiled down to the same
issue, i.e. the template engine is using Java reflection directly and not
doing this the "Eclipse way".  This seems to keep classes from other
plugins from being resolved properly because the default classloader
doesn't know how to resolve plugins.

I agree with Derek.  IMO this behaviour should be changed to the standard
Eclipse behaviour.  The documentation in the extension schema is pretty
sparse too so the current behaviour is not really spelled out.

===========================

Chris Recoskie
Team Lead, IBM CDT Team
IBM Toronto
http://www.eclipse.org/cdt



                                                                           
             subs                                                          
             <derekowenmorris@                                             
             googlemail.com>                                            To 
             Sent by:                  "CDT General developers list."      
             cdt-dev-bounces@e         <cdt-dev@xxxxxxxxxxx>               
             clipse.org                                                 cc 
                                                                           
                                                                   Subject 
             28/09/2007 09:59          Re: [cdt-dev] Adding a new          
             AM                        processRunner to the template       
                                       engine                              
                                                                           
             Please respond to                                             
             dmsubs@consertum.                                             
                com; Please                                                
                respond to                                                 
               "CDT General                                                
             developers list."                                             
             <cdt-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           




Bala,

That works. It's not obvious though...

Thanks
--
Derek


bala.torati@xxxxxxxxxxx wrote:
>
> Hi Derek,
>
> use the full path of the process registration when used within the
> template. e.g. <plugin_id>.process_name.
>
>  >>and here is the template
>     <process type="TrialTemplate">
>
> Assume your plugin.xml that defines the extension has plugin_id:
> com.crt.utils.templates
> then you should change above in template.xml to:
>
> <process type="com.crt.utils.templates.TrialTemplate">
>
> Note that this is the plugin_id that the process is registered. In
> plugin.xml that defines the extension, we should provide the full path
> of actual processRunner class. i.e. <pacakage_name>.<processRunner_class>
>
> The package_name and plugin_id might not be same in all cases.
>
> Let me know if you still see problems.
>
> Regards,
> -Bala
>
>
>
> *subs <derekowenmorris@xxxxxxxxxxxxxx>*
> Sent by: cdt-dev-bounces@xxxxxxxxxxx
>
> 28/09/2007 02:03
> Please respond to
> dmsubs@xxxxxxxxxxxxx; Please respond to
> "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
>
>
>
> To
>            "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
> cc
>
> Subject
>            [cdt-dev] Adding a new processRunner to the template engine
>
>
>
>
>
>
>
>
> Hi,
>
> I am trying to extend the template engine by writing a plugin that
> contains my
> own processRunner that I can use in my templates to do some specialized
> processing.
>
> To experiment, I have just copied the AddFile processrunner out of the
> template
> engine and renamed it TrialTemplate.
>
> When I try to use it in my template, (at runtime) I get the following
error
> appearing in an ErrorDialog:
> Unknown process: TrialTemplate
> Unknown process: TrialTemplate
>   No Condition--> Process 1
> (org.eclipse.cdt.core.CreateSourceFolder)-->Success: Executed
> successfully with
> args: [projectName:xtrial, path:src]
>
> Here is my plugin.xml that defines the extension
>
>      <extension
>          point="org.eclipse.cdt.core.templateProcessTypes">
>       <processType
>             name="TrialTemplate"
>             processRunner="com.crt.utils.templates.TrialTemplate">
>          <simple name="projectName"/>
>          <complexArray name="files">
>             <baseType>
>                <simple name="source"/>
>                <simple name="target"/>
>                <simple name="replaceable"/>
>             </baseType>
>          </complexArray>
>       </processType>
>       </extension>
>
> and here is the template
>     <process type="TrialTemplate">
>         <simple name="projectName" value="$(projectName)" />
>         <complex-array name="files">
>             <element>
>                 <simple name="source" value="src/startup.c" />
>                 <simple name="target" value="$(sourceDir)/startup.c" />
>                 <simple name="replaceable" value="true" />
>             </element>
>             <element>
>                 <simple name="source" value="src/Main.c" />
>                 <simple name="target" value="$(sourceDir)/$(Module).c" />
>                 <simple name="replaceable" value="true" />
>             </element>
>         </complex-array>
>     </process>
>
> Any clues as to what I am missing?
>
> Thanks,
> --
> Derek
>
>
> --
> Derek
> _______________________________________________
> 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 <http://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




Back to the top