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

> We have implemented the process type should include <plugin_id>.
> <processRunner_name> to avoid conflicts between processes of same
> name come from different plugins as template developer may not have
> control over the processRunner class names come from different plugins.

The standard Java way of dealing with this is by making sure the package
names are unique.  I.e., classes coming from org.eclipse.cdt.* won't
conflict with com.symbian.*, etc.  We do the same thing with ID's too.  I
don't think it's a problem, and this is just cluttering up the usage model.

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

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



                                                                           
             bala.torati@symbi                                             
             an.com                                                        
             Sent by:                                                   To 
             cdt-dev-bounces@e         dmsubs@xxxxxxxxxxxxx, "CDT General  
             clipse.org                developers list."                   
                                       <cdt-dev@xxxxxxxxxxx>               
                                                                        cc 
             28/09/2007 11:55                                              
             AM                                                    Subject 
                                       Re: [cdt-dev] Adding a new          
                                       processRunner to the template       
             Please respond to         engine                              
               "CDT General                                                
             developers list."                                             
             <cdt-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           





>>It's not obvious though...

We have implemented the process type should include
<plugin_id>.<processRunner_name> to avoid conflicts between processes of
same name come from different plugins as template developer may not have
control over the processRunner class names come from different plugins.
This means obviously no two processes within the same plugin can have the
same name.

CDT plugin developer's guide says:
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.

We will update it to make it more generic as detailed above.


Regards,
-Bala



                                                                           
 subs                                                                      
 <derekowenmorris@xxxxxxxxxxxxxx                                           
 >                                                                      To 
 Sent by:                                   "CDT General developers list." 
 cdt-dev-bounces@xxxxxxxxxxx                <cdt-dev@xxxxxxxxxxx>          
                                                                        cc 
                                                                           
 28/09/2007 14:59                                                  Subject 
                                            Re: [cdt-dev] Adding a new     
                                            processRunner to the template  
        Please respond to                   engine                         
   dmsubs@xxxxxxxxxxxxx; Please                                            
            respond to                                                     
  "CDT General developers list."                                           
      <cdt-dev@xxxxxxxxxxx>                                                
                                                                           
                                                                           
                                                                           
                                                                           





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
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top