• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » Code Composer Studio » Code Composer Forum » Type coloring in CCSv5 editor
Share
Code Composer Studio
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Common Questions
  • Code Composer Studio Forum Usage Guidelines

  • Resources
  • Code Composer Studio (CCStudio) Product Folder
  • Troubleshooting CCS
  • CCS Wiki
  • Download CCS
  • Order CCS
  • Tools Insider Blog
  • Bug Tracking
  • Forums

    Type coloring in CCSv5 editor

    This question is answered
    Jim Taylor
    Posted by Jim Taylor
    on May 02 2012 09:10 AM
    Intellectual430 points

    Has anyone else noticed that "bool" is colored in .h files and not colored in .c files?  Is there any plan in the works to fix that?

    While we're at it, can the editor options be extended so user-defined types can be colored?  Not necessarily the same color as built-in types, but not the same as ordinary text, either.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Katie Enderle
      Posted by Katie Enderle
      on May 02 2012 09:18 AM
      Genius12705 points

      Hi Jim,

      I'm moving this to the CCS forum so they can see your feature suggestion.

      Regards,

      Katie

      Please click the Verify Answer button on this post if it answers your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on May 02 2012 10:08 AM
      Verified Answer
      Verified by Jim Taylor
      Guru58995 points

      Jim, 

      The use of bool in a C file is considered a macro reference by the highlighter.  Coloring of macro references is not enabled by default but you can turn it on.  If you go to Window -> Preferences.  Type coloring in the top left filter box.  Syntax Coloring under Editor should now be selected and you will see the options on the right.

      Regards,

      John

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Taylor
      Posted by Jim Taylor
      on May 02 2012 14:55 PM
      Intellectual430 points

      John,

      Thanx!

      Now that I've done as you said, it looks as it should. 

      That still doesn't explain why bool is bold and maroon in the header file and black and plain in the code file the defaults are active.

      JimT

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Taylor
      Posted by Jim Taylor
      on May 02 2012 15:18 PM
      Intellectual430 points

      Curiouser and curiouser!

      I turned on coloring for macro references to get bool to look as it should, and it worked as described.  However, I didn't like all the other macros showing up in color, so I switched back to black.  When I looked at my code again, behold!  Not only was the coloring in the .c file gone, as I expected, but the coloring in the .h file had disappeared also.

      Is a puzzlement!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on May 02 2012 15:49 PM
      Guru58995 points

      In playing with the header file it seems to treat bool as a built-in type there.  I just created a blank one and put bool in it and it shows it in bold purple.  I changed built in types to not be bold and it changed it.  Not sure why it is a built-in type for headers.

      I can't replicate what you are seeing though with it disappearing from the headers.  Did you change it back to black or uncheck the box to enable highlighting for that class of element?  For me I uncheck the box and the coloring goes away for the C file but stays for the H file.

      John

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Taylor
      Posted by Jim Taylor
      on May 02 2012 17:02 PM
      Intellectual430 points

      John,

      You're right.  I hadn't unchecked it.  Now it works as it did originally.

      JimT

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jim Taylor
      Posted by Jim Taylor
      on May 03 2012 09:13 AM
      Intellectual430 points

      John,

      Just for fun I went back and looked at a couple of old projects in CCS v4.  In v4 bool, true, and false are always red, either in code or headers.  In v5 they are always red in headers, always black in code.

      JimT

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use