Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Parse files with certain extensions

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
maxim2000 Posted - Mar 11 2009 : 04:19:45 AM
Hello!

It would be nice if VA recognize and parse files with certain extensions.
For example, .rc and .rc2 files have some macros and includes.
The feature may be implemented in File Handling tab.
Alternatively, VA might parse all the opened files. Then user can ignore some extensions on the File Handling tab.

Thank you,
Max
7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 16 2009 : 2:04:45 PM
There is quite a bit of difference between "can contain C constructs" and "should be parsed as C code".

For now simply editing the registry on your machine is a good solution.
maxim2000 Posted - Mar 16 2009 : 1:17:09 PM
The code you noticed is resource script specific statements. Yes, there is no sense to parse them. But as you could see following by the link above, a resource script file can contain some C-constructions:
* Comments.
* Predefined macros.
* Preprocessor directives.
* Preprocessor operators, which are used with the #define directive.
* Pragma directives

First of all, I was trying to make alt-g workable. There are some custom macros and #include's in my .rc's. AFAIK, MFC also includes .rc2 in its .rc. This is a regular extension and I added it to ExtHeader together with .rc. It works fine too.

Modification of ExtHeader is easy and low-cost workaround for my problem. So, if VA's setup modifies the key (adds .rc and .rc2), it may improve VA quality.

May be VA somehow parses .rc files implicitly, but there is no navigation bar when I open them, and alt-g doesn't work.
feline Posted - Mar 16 2009 : 11:05:15 AM
Looking in my main test solution I happen to have a .rc file. Opening the file I am noticing the lines:

LANGUAGE 9, 1
#pragma code_page(1252)
1           ICON         "app.ico"


and

1 TEXTINCLUDE  
BEGIN
    "resource.h\\0"
    "\\0"
END


This is not valid C++ code, so adding .rc to the default list of C++ file extensions does not make much sense.

What are you trying to achieve?

VA does do some parsing of .rc files, so it is aware of some of the symbols that the .rc files define.
maxim2000 Posted - Mar 12 2009 : 12:33:04 PM
Yes, the method works fine. Thank you.
It was enough to add .rc to VA's registry value ExtHeader, because .rc is built in extension.

Every VS project that contains resources (dialogs, icons, strings etc.) has .rc file. For example, all GUI applications use resources and have .rc files (one per project). So, it would be useful to support .rc by default.
feline Posted - Mar 12 2009 : 10:16:22 AM
Have you tried adding .rc to the list of C++ extensions that VA supports, as described in the FAQ entry:

http://docs.wholetomato.com?W328

? Personally I do not work with or use .rc files, so I don't know much about them.
maxim2000 Posted - Mar 12 2009 : 04:46:43 AM
Actually, I want VA to correctly parse resource scrips. But no efforts are required to support this language.

You can find information about resource files here
http://msdn.microsoft.com/en-us/library/aa380599(VS.85).aspx

If I rename .rc file to .c I see exactly that I want. But probably you are right that this question should be considered as "new language support", and adding new extensions to parse is a wrong way.
feline Posted - Mar 11 2009 : 4:08:12 PM
It depends on exactly what you are asking for. If you simply want VA to parse C++ with a custom file extension then you can already do it, as explained here:

http://docs.wholetomato.com?W328

However if you want VA to correctly parse some other file type then this is a very different thing. Firstly VA would have to actually understand the content / language of the file. Just adding the extension to a list is no use if the language is not supported.

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