User forums > Using Code::Blocks

Code incorrectly showing as comment block instead of code


I loaded debuggersettingsdlg.cpp and scrolled down a small amount where line 35 (DebuggerSettingsDlg::DebuggerSettingsDlg(wxWindow* parent) function is showing and it looks like lines 37 through  74 are comments due to the "//(*" on line 37, BUT only lines 37 and 74 should be shown as comments. There are a number of other files using the

The code for the "//(*" and "//*)" was add in the following change when I used github's blame functionality:
    git-svn-id:[email protected]

I searched the wiki and Code::Blocks manual 2.0.1 and only found a reference to "//(*" on the following page and after reading it it looks like the code should not be shown as a comment block as it was generated by wxSmith, which uses the "//(*" and "//*)" for the start and end of the generated code.

I cannot see where I can set the options.highlightWxSmith in the LexCPP.cxx to false. I do not have time to chase this issue at the moment to see if it is a bug or if I have miss configured something.

A such is this a bug or if you open the debuggersettingsdlg.cpp does it displays lines 37 through 74 correctly? If it's a bug I will raise a ticket.

Miguel Gimenez:
The highlighting of the block indicates that the block should not be edited.

You can change highlighting using Settings -> Editor -> Syntax highlighting -> wxSmith generated code

Miguel, Thanks very much for the post. It helped allot.

Do you think the wiki page should include a note or text that "You can change highlighting using Settings -> Editor -> Syntax highlighting -> wxSmith generated code", so that in the future other devs don't fall into the same hole as I did?

Miguel Gimenez:
The page does not mentoin highlighting at all, so IMHO if you want to say that you should first say something like "The whole block is hilghlighted differently to remark it must not be modified. You can change...".


[0] Message Index

Go to full version