×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    May 2005
    Location
    Indonesia
    Posts
    198

    Create your own Project and Class Template in Carbide.c++

    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

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2004
    Location
    Austin, TX USA
    Posts
    271

    Re: Create your own Project and Class Template in Carbide.c++

    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.

  3. #3
    Registered User
    Join Date
    May 2005
    Location
    Indonesia
    Posts
    198

    Re: Create your own Project and Class Template in Carbide.c++

    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

  4. #4
    Nokia Developer Expert
    Join Date
    Oct 2004
    Location
    Austin, TX USA
    Posts
    271

    Re: Create your own Project and Class Template in Carbide.c++

    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.

  5. #5
    Super Contributor
    Join Date
    May 2003
    Location
    Vancouver, Canada
    Posts
    985

    Re: Create your own Project and Class Template in Carbide.c++

    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

  6. #6
    Registered User
    Join Date
    May 2005
    Location
    Indonesia
    Posts
    198

    Thumbs up Re: Create your own Project and Class Template in Carbide.c++

    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

  7. #7
    Registered User
    Join Date
    Dec 2007
    Location
    Kharkiv, Ukraine
    Posts
    21

    Re: Create your own Project and Class Template in Carbide.c++

    Hi,

    If anybody is interested, there is a small tutorial http://symbiantricks.info/tricks/cre...mplate_wizard/

    Sergey

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Create your own Project and Class Template in Carbide.c++

    Quote Originally Posted by sergey.payu View Post
    Hi,

    If anybody is interested, there is a small tutorial http://symbiantricks.info/tricks/cre...mplate_wizard/

    Sergey
    Nice article payu . thanks for sharing with us.

Similar Threads

  1. [newbie here] Link error
    By xitpu in forum Symbian
    Replies: 3
    Last Post: 2007-01-24, 16:53
  2. 21 errors in j2me , help in soving them
    By abhishek_1211 in forum General Messaging
    Replies: 0
    Last Post: 2006-04-01, 09:04
  3. Can't create class in NDS 2.2
    By jeffreykhow in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2004-09-02, 20:06
  4. add new class to the project
    By smallfish_ntu in forum Symbian
    Replies: 1
    Last Post: 2003-02-10, 02:30
  5. How to add a class to a exmaple project?
    By wu_genqing in forum Symbian
    Replies: 1
    Last Post: 2002-09-10, 09:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •