Author Topic: "color inactive code regions" is inefficacy  (Read 12568 times)

koji

  • Community Member
  • Posts: 23
  • Hero Points: 0
"color inactive code regions" is inefficacy
« on: September 10, 2009, 09:34:33 AM »
when I cancel the "case-sensitive" option, the option "color inactive code regions" is inefficacy. The code block between the  "#if 0...#endif" still are uncolored.

what is the relationship of this two options?
« Last Edit: September 16, 2009, 02:13:40 AM by koji »

koji

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: "color inactive code regions" is inefficacy
« Reply #1 on: September 16, 2009, 02:14:01 AM »
Help!

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: "color inactive code regions" is inefficacy
« Reply #2 on: September 16, 2009, 06:39:36 AM »
What OS?
What version of SE?  (I think 14?)
What language?
What file extension?
I think you mean the "Case-insensitive" checkbox in the Identifiers box of the Tokens tab of the {Some Language} > Color Coding node in Tools|Options, is that right?
I think you mean the "Color inactive code regions (C/C++ Preprocessing, eg. #if 0)" checkbox at the bottom of the Language tab of the {Some Language} > Color Coding node in Tools|Options, is that right?

I think you're saying that when "Color inactive code regions" is checked, and "Case-sensitive" is checked, then #if0..#endif are colored.
But that when "Color inactive code regions" is checked, and "Case-sensitive" is NOT checked, then #if0..#endif are NOT colored.
Is that an accurate understanding of what you're seeing?

koji

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: "color inactive code regions" is inefficacy
« Reply #3 on: September 16, 2009, 07:15:40 AM »
What OS?
What version of SE?  (I think 14?)
What language?
What file extension?
I think you mean the "Case-insensitive" checkbox in the Identifiers box of the Tokens tab of the {Some Language} > Color Coding node in Tools|Options, is that right?
I think you mean the "Color inactive code regions (C/C++ Preprocessing, eg. #if 0)" checkbox at the bottom of the Language tab of the {Some Language} > Color Coding node in Tools|Options, is that right?

I think you're saying that when "Color inactive code regions" is checked, and "Case-sensitive" is checked, then #if0..#endif are colored.
But that when "Color inactive code regions" is checked, and "Case-sensitive" is NOT checked, then #if0..#endif are NOT colored.
Is that an accurate understanding of what you're seeing?
sorry! I am a newer to SE and didn't considered enough.

some information :
OS:WinXP
version:V14.02.2
language:C/C++
file extension:  *.c

And what you said is what I want to express! really thank you!
I hope someone can help me! Thanks!

« Last Edit: September 16, 2009, 09:22:42 AM by koji »

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: "color inactive code regions" is inefficacy
« Reply #4 on: September 16, 2009, 11:40:16 PM »
I just checked this on my machine (XP with SE 14.02.2) and it has the same problem.

Also, I notice that "color inactive code regions" works for #if 0 blocks, but does not work on #ifdef blocks.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: "color inactive code regions" is inefficacy
« Reply #5 on: September 17, 2009, 06:27:25 AM »
I see the same thing.

Out of curiousity, why would you uncheck "Case-sensitive" for C/C++?  The languages are by definition case sensitive, so I'm slightly surprised that the option even exists for C/C++.

koji

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: "color inactive code regions" is inefficacy
« Reply #6 on: September 17, 2009, 06:52:38 AM »
I see the same thing.

Out of curiousity, why would you uncheck "Case-sensitive" for C/C++?  The languages are by definition case sensitive, so I'm slightly surprised that the option even exists for C/C++.

When writing program, it is convenience for prompt box showing the symbols if uncheck "Case-sensitive" only.

If uncheck "Case-sensitive" for C/C++, I also find that ,if there is a sysmbol "lcd" in the program,it will connect to "LCD". But SourceInsight donot have this problem. "Case-UNsensitive" only for writing program.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: "color inactive code regions" is inefficacy
« Reply #7 on: September 17, 2009, 06:47:30 PM »
I wouldn't tinker with setting case-sensitive to false in a language like C++ where it is case-sensitive.  You do not want "While" to be colored as a keyword, making your code look correct when it is in fact not correct.

Instead, go to Document > C/C++ Options... > Context Tagging(R) and turn off the option to use strict case-sensitivity rules for list-members, go to definition, and completion (three separate checkboxes).

I will file a feature request to add a case-insensitivity option to Auto-complete.

koji

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: "color inactive code regions" is inefficacy
« Reply #8 on: September 18, 2009, 02:17:38 AM »
I wouldn't tinker with setting case-sensitive to false in a language like C++ where it is case-sensitive.  You do not want "While" to be colored as a keyword, making your code look correct when it is in fact not correct.

Instead, go to Document > C/C++ Options... > Context Tagging(R) and turn off the option to use strict case-sensitivity rules for list-members, go to definition, and completion (three separate checkboxes).

I will file a feature request to add a case-insensitivity option to Auto-complete.

Thanks your idear.
But maybe your method can solve this problem when writting program, the context of the preview window will still be case-INsensitivity if donnot check the "Case-insensitive" checkbox in the Identifiers box of the Tokens tab of the  Color Coding.