×

Discussion Board

Results 1 to 8 of 8

Thread: Source style

  1. #1
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Question Source style

    I could not find any preference where in Carbide.c ++ source style is set. I do not want the default style, for example:

    Code:
    enum TNotifierCommandIds
        {
        ENotifierCmdAppTest = 1
        };
    I do want braces not to be indented as other indented text, here is:

    Code:
    enum TNotifierCommandIds
    {
        ENotifierCmdAppTest = 1
    };
    Is it possible to get that behaviour?

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2004
    Location
    Austin, TX
    Posts
    399

    Re: Source style

    Check out the Preferences > C/C++ > Editor > Templates.
    Then make sure that Use code formatter is enabled.
    You should be able to get what you want by editing the existing templates or creating new ones.

    Cheers,
    Tim

  3. #3
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: Source style

    No, this is not what I want. When you choose New Project from the menu Carbide.c ++ creates skeleton for this project. And in that skeleton braces are indented anyway.

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    8

    Re: Source style

    Quote Originally Posted by timm-ah
    Check out the Preferences > C/C++ > Editor > Templates.
    Then make sure that Use code formatter is enabled.
    You should be able to get what you want by editing the existing templates or creating new ones.
    I enabled 'Use code formatter', but Format (Ctrl+Shift+F) does not do anything. Preferences -> C/C++ -> Code formatter has only (NONE) as formatters.

    Is code formatting possible somehow?

    Mikko

  5. #5
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: Source style

    c0deab1e, if you want to tweak the templates, you can find them under
    C:\Program Files\Carbide\plugins\com.nokia.cdt.templates_1.0.0\templates\com\nokia\cdt\templates\projecttemplates, check out the .cpp files and edit to suite your taste.

  6. #6
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: Source style

    Great! Thank you, mitts!

  7. #7
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: Source style

    Mikko,

    You can download formatters for CDT, see for instance: http://softwitch.net/blog/index.php/...atter-for-cdt/ or do a search on your favourite search engine.

  8. #8
    Registered User
    Join Date
    Feb 2005
    Posts
    8

    Re: Source style

    Quote Originally Posted by mitts
    You can download formatters for CDT, see for instance: http://softwitch.net/blog/index.php/...atter-for-cdt/ or do a search on your favourite search engine.
    Thanks!

    Now I notice that my question was partly due to a misunderstanding: being a novice Eclipse user I did not realize that CDT (or Carbide.c++) does not offer an formatter like the one in Java perspective.

    Mikko

Similar Threads

  1. problem viewing variable values when debugging
    By jas203 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2006-03-25, 22:37
  2. Link Errors Help me
    By TrungThanhMtad in forum Symbian C++
    Replies: 2
    Last Post: 2005-10-15, 05:13
  3. Errors starting NMSS 1.5 Emulator Host
    By eyalhollinger in forum General Messaging
    Replies: 0
    Last Post: 2005-08-17, 12:43
  4. Series 60 SDK Appwizard on windows xp
    By moonjoor in forum Symbian Tools & SDKs
    Replies: 15
    Last Post: 2003-12-24, 10:22
  5. J2ME 2.0 will not run stand alone.
    By demirateser in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-10-08, 08:26

Posting Permissions

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