Author Topic: More on color  (Read 3986 times)

SeeCwriter

  • Senior Community Member
  • Posts: 146
  • Hero Points: 1
More on color
« on: April 09, 2009, 04:36:12 PM »
Another SE14 color issue. Why would some files in  the same project have a different color scheme than other files? All files have the same extension, and are C source code. I have symbol color scheme set to none.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: More on color
« Reply #1 on: April 09, 2009, 05:36:09 PM »
Screen shots would probably help.

But my first guess would be that the editor is using the "embedded language" set of colors, and that the color scheme that is currently selected only specified non-embedded colors, and is thus picking up embedded colors from some previously-selected color scheme.

I recall recent posts about a bug where the embedded language detection had an issue where it could get slightly confused and use the wrong set of colors.  I believe that was fixed in 14.0.0.7, though.  What version are you using?

SeeCwriter

  • Senior Community Member
  • Posts: 146
  • Hero Points: 1
Re: More on color
« Reply #2 on: April 09, 2009, 06:52:36 PM »
I'm using 14.0.0.7.  Looking at this some more, I see that SE is actually treating comments differently depending, it seems, on where the comment is located and the form of the comment. (I'd put in a screen shot, but I don't have time to figure out how to do that. Cut & paste doesn't do it.)

A Comment block outside a procedure in a /*.... */  block are one color.  Comments using /* ... */ inside a procedure are another color.  And Comments using // are yet another color no matter whether they are in a procedure or not.  Unless, of course, the comments are in a header file. Then I get even more color combinations.  Oiy vey!

How about a single color for comments regardless of where they are. Is that possible among the miriad of color options?


SeeCwriter

  • Senior Community Member
  • Posts: 146
  • Hero Points: 1
Re: More on color
« Reply #3 on: April 09, 2009, 06:57:49 PM »
I'll also add that, no matter what the colors are in my files, the colors do not match the code sample on the color options window. In that window, it shows all the comments as the same color, no matter where they are located.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: More on color
« Reply #4 on: April 09, 2009, 07:08:48 PM »
SlickEdit 2009 introduced the capability to have different comment colors for line comments, block comments, and doc comments. SlickEdit 2008 only offered a single color.

If you prefer a single color, select Tools > Options > Appearance > Colors, locate the comments group and set the colors for the corresponding comment types to the same values.

The two sets of block comments being colored differently is odd. I suspect one is being interpretted as a doc comment. It doesn't begin with /** does it?

To configure which comments are recognized as which types, select Tools > Options > Languages > your language > Color coding. Then select the Comments tab. You'll see a table with comment begin and end patterns. The items marked as "LineComment" are colored with the "Line Comment" color. The items marked as "MultiLine" are colored with the "Block Comment" color, if there is no check in the "Used for API documentation" checkbox, or colored with the "Documentation Comment" color if there is a check in the "Used for API documentation" checkbox.

In C/C++, the defaults are:
  • //   - Line Comment
  • /*  - Block Comment
  • /** - Documentation Comment
  • /*! - Documetation Comment