Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 case sensitive includes

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
daThomas Posted - Dec 16 2009 : 05:02:11 AM
Hi,

when writing software in Windows, you often get compiler errors under unix due to wrong case in the include files.
FAT and NFTS are case-insensitive and accept any style of writing include files.

What about checking the files and correct them? The file could be searched on disk to get the correct filename and corrected afterwards perhaps. This would be a nice enhancement that would save much time.

regards,
Thomas
10   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Jul 18 2016 : 10:44:37 PM
case=29858 is implemented in build 2107.
feline Posted - Mar 31 2010 : 11:23:00 AM
We are considering adding this feature to VA one day, it is covered by:

case=29858

but it is not currently a high priority. One of our main focus's right now is on VS2010 support.
Arnt Posted - Mar 30 2010 : 05:06:45 AM
Thanks for the pointer, I made my own macro to sort.
(However, I think it would be nice if VA include the option. Just add an extra 'Sort Selected Lines (case insensitive)' in the long list of commands you already have.)
feline Posted - Mar 29 2010 : 6:14:31 PM
Case sensitive sorting comes up occasionally, as you have found, but not that often. It is one of many feature requests we have and are considering.

For now it should be possible to write an IDE macro to sort a selected block of text. This macro for manipulating a block of text should help to point you in the right direction:

http://support.wholetomato.com?W445
Arnt Posted - Mar 25 2010 : 06:53:49 AM
(This was also suggested in the beta form: http://forum.wholetomato.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=3048 )

I'm wondering, does anybody actually want case sensitive sorting for anything?
Arnt Posted - Mar 25 2010 : 06:49:18 AM
Yes, especially for sorting lists of headers, case insensitive sort as an option, or better even as an extra command, so you can even have both buttons on the toolbar (or keyboard shortcuts) would be wonderful.
feline Posted - Dec 17 2009 : 2:55:06 PM
It turns out there is already a feature request for making sort lines case insensitive:

case=29858

daThomas finding all of the #include lines with the "wrong" case gets us into static code analysis, and is going to have problems. For example what happens when the same header file exists but with a different case on Windows and unix machines? Currently we don't have any plans to get deeper into this sort of code analysis.

Personally I would be tempted to just run a find, grep across all of the .cpp and .h files, sort and unique the #include lines, and then try to diff this against a sorted list of all solution header files on the unix machine.

A little rough and ready, but it should produce usable results quite quickly from a unix command line, since you would know which #include statements were wrong, so you could just grep for them.
accord Posted - Dec 17 2009 : 1:09:22 PM
What if I put in a feature request for sort feature to be case insensitive? I know you mentioned this to illustrate how many include statements are affected rather than just asking for an another "workaround", an evasive answer. But to be honest I think that a feature like this would be strange since our main platform is windows where it is not a problem. My first idea is to create a new refactoring but still you would need to do it on every include or at least on every file. I would write an easy tool for it since this task does not require symbol information or any other fancy detail.
daThomas Posted - Dec 17 2009 : 03:01:33 AM
Right. I know the new feature but we have tons of code in lots of different modules. Here and there, a module is patched or released in a new version and it would be cool to run such a tool as check before release.
We are using our own build system and have therefore sometimes problems with the suggestions for new includes as they seem to be not found/known by VA.

What i currently do is using the (little enhanced) sorting feature to sort and group the includes. As sorting is case sensitive, this is not so easy and thats why some of us switched to lower case before sorting ... :)
accord Posted - Dec 16 2009 : 5:54:58 PM
Are you aware of "Add include" refactoring? As far as I know it adds case sensitively the headers, so you may avoid these type of problems using this tool. Or accepting suggestions while typing the file name in the include statement also corrects the case. Certainly, these won't help with already added include statements.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000