Author Topic: Incorrect documentation comment highlighting after preprocessor directives  (Read 18096 times)

Offline FuzzyWuzzy

  • Single posting newcomer
  • *
  • Posts: 4
Documentation comments of the form /**comment*/ are colored as regular comments if they appear after a preprocessor directive (such as #define, #include, #ifdef, etc.) on the same line. Example:

#define MAX 99 /**Incorrectly colored as regular comment.*/
#include <iostream> /**Incorrectly colored as regular comment.*/
#define MIN 1 ///Correctly colored as documentation comment.
int x; /**Correctly colored as documentation comment.*/
int y; ///Correctly colored as documentation comment.

The same examples work correctly in SciTE 3.0.2-2.
This happens on Code::Blocks build Apr 7 2013, 02:36:35 - wx2.8.12 (Linux, unicode) - 64 bit, version: svn build rev 8948, SDK version: 1.17.0.

Already filed a bug report: https://developer.berlios.de/bugs/?func=detailbug&bug_id=18968&group_id=5358
« Last Edit: April 13, 2013, 01:41:20 am by FuzzyWuzzy »

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
(Very late reply, but) it sounds like our Scintilla component is out of date.
@MortenMacFly: do you have time to update it?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
@MortenMacFly: do you have time to update it?
Maybe today in the evening (I did an update recently already in my local copy) although I am unable to reproduce this particular issue with the SVN revision.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
[...] although I am unable to reproduce this particular issue with the SVN revision.
It should not work; in our current SVN, the style wxSCI_C_PREPROCESSORCOMMENT is unconditionally applied to any stream comments on the same line as a preprocessor directive.

Paste this into an editor:
Code
#define foo  /** not doc comment */
int bar = 0; /** is doc comment */

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
(Very late reply, but) it sounds like our Scintilla component is out of date.
@MortenMacFly: do you have time to update it?
Done by now.

BUT this is really a massive change as we moved from 3.2.x to 3.3.x. So hopefully it will work under Linux - I did NOT try.

...but this also brings major benefits as scintilla supports folding now natively and we should actually make use of it instead of doing our own fold magic.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Works (so far) under Linux.

Unfortunately, the original report:
The same examples work correctly in SciTE 3.0.2-2.
This happens on Code::Blocks build Apr 7 2013, 02:36:35 - wx2.8.12 (Linux, unicode) - 64 bit, version: svn build rev 8948, SDK version: 1.17.0.
does not seem to have translated into the resolution of this issue.  I have sent a fix to Scintilla, and could apply it pre-emptively to our repository, if we want.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
does not seem to have translated into the resolution of this issue.  I have sent a fix to Scintilla, and could apply it pre-emptively to our repository, if we want.
If you encapsulate it into our "C::B patch wrappers", go ahead.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
does not seem to have translated into the resolution of this issue.  I have sent a fix to Scintilla, and could apply it pre-emptively to our repository, if we want.
It is now it seems, at lats in HG.

So I'll do another update once scintilla 3.3.2 is released... stay tuned  - no need for you to wrap the stuff.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ