Hi,
can someone tell me how to create my own project and class template in carbide.c++?
till now, I can only change the template, but I can't add a new one.
thx
Hi,
can someone tell me how to create my own project and class template in carbide.c++?
till now, I can only change the template, but I can't add a new one.
thx
Yes, you can add your own. If you look in plugins\com.nokia.cdt.templates_1.0.1\templates\com\nokia\cdt\templates you will find all of the standard class and project template folders. Add your folders there. You will also need to modify the plugin.xml file in plugins\com.nokia.cdt.templates_1.0.1 so it acknowledges your new templates.
Keep in mind, though, that we don't expect people to change the templates and if you ever update your version of Carbide it's quite likely that your custom templates will be overwritten.
Regards,
Matt P.
Hi mpinsonneault,
thx for you reply.
I've tried to modify the file, but I still can't add new template.
Here's what I did:
- in
\com.nokia.cdt.templates_1.0.0\
templates\
com\
nokia\
cdt\
templates\
classtemplates,
I copied the folder CClass to the same place and rename it to CClass2. The CClass is one of the existing class template.
- in C:\Program Files\Carbide\plugins\com.nokia.cdt.templates_1.0.0, I modified the plugin.xml by adding these lines:
<template
location="templates/com/nokia/cdt/templates/classtemplates/CClass2/template.xml"
wizardId="com.symbian.cdt.project.ui.SymbianClassWizard"/>
- I've restarted my carbide.c++, go to the class wizard and nothing happens.
Is there something wrong? If you have tried to add template and succeeded, would you care to write the steps?
thx
Apparently it is not as easy as I thought it was.
The standard way to add templates is to create your own plugin using the Eclipse tools for Java development. I'll see if I can put some instructions together, but it's a non-trivial process.
Regards,
Matt P.
Have you modified /CClass2/template.xml?
You need to do some modifications, such as replacing the ID, description, etc.
If it still doesn't work, try to remove Eclipse's cache files. Remove the following folders from your Carbide installation folder:
\configuration\org.eclipse.core.runtime
\configuration\org.eclipse.osgi
But, please backup the folders first, just in case something happens.
Antony
Hi, thx for the replies
It works
you should delete the cache files. thx to you antonypr.
I think carbide should has built-in feature to create custom template. I hope this will be added in the next carbide version. some of the reasons are:
- you have to modify the hello world project everytime you want to create new project, since there's no blank project template with just the application framework
- the provided template is (IMHO) overcommented, maybe it's good for the first time, since maybe you want to learn, but it will become annoying and the code become hard to read
- what if I use the same application flow for every application that I develop? I want every of my application that I develop always starts with a splash screen showing company logo, then a splash screen showing application logo, then checking for database or other file etc. Do I have to add them every time I create a new application? It will be waste time, so I want to create my own project template that generate the basic application framework plus my own standard features of the application.
- the current class templates are not enough to create a rapid devlopment in symbian. for example, if I want to create a container, I have to modify the basic class template and it's wasting time.
best regards,
Ronald Stevanus
Hi,
If anybody is interested, there is a small tutorial http://symbiantricks.info/tricks/cre...mplate_wizard/
Sergey