Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Lots of problems when using code generation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bearhart
Junior Member

USA
15 Posts

Posted - Aug 05 2006 :  9:11:08 PM  Show Profile  Reply with Quote
I am working on a system that uses code generation extensively. I only recently started using VAX (and I love it!) but have been disappointed with some bugs and limitations when using code generation. I know this is a bit off of the beaten path but it doesn't seem like it would take much to fix it.

1) Even with "Watch for externally modified files and reparse when necessary" set VAX regularly fails to re-parse newly generated header files. I don't believe it is a load issue because I've tried stopping working to allow the idle processes to work, with no luck.

2) My system uses a C++-ish header file language with the extension ".cmh". The cmh file is used to generate the assocated "h" file as well as modify the cpp file (a-la MFC wizard). Ideally, you don't ever need to see the "h" file so it would be great if Alt-O toggled between the "cmh" file and the "cpp" file.

Ben Earhart
Lead Client Programmer
Bioware Austin

Edited by - bearhart on Aug 05 2006 11:41:08 PM

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Aug 06 2006 :  4:20:47 PM  Show Profile  Reply with Quote
point 1, it is possible VA does not know about these new headers. are these new files that are being added to the project? or are existing files being changed radically?

if they are new files, are they actually listed in solution explorer?
if so do they show up in OFIW?
if VA does not know about these header files, since they are not part of the project, that would explain what you are seeing.


point 2, this has been discussed before, but the normal request is to cycle through 3 files with different extensions. for now this is unlikely to happen, since it would require adding options to control how this would work.

on a more positive note you may want to look at the alt-o macro here:

http://www.codeproject.com/macro/VSHelper.asp

you should be able to change this to do what you want quite easily, and then simply bind this macro to a keyboard shortcut, alt-o if you prefer.

zen is the art of being at one with the two'ness
Go to Top of Page

bearhart
Junior Member

USA
15 Posts

Posted - Aug 06 2006 :  10:02:46 PM  Show Profile  Reply with Quote
Thanks feline!

In response to (1) yes, the files are listed in the solution explorer. They may (or may not) be radically altered - it is proportional to how much the corresponding cmh file is altered. In general, the changes are incremental. In any case, it is all very straightforward: Foo.cmh always generates Foo.h and(possibly) modifies Foo.cpp

I've experimented with loading and unloading the generated header file (or having it pre-loaded and authorizing the re-load in VS). Loading the file after code generation seems to help the most but I have not been able to get any reliable behavior.

What is OFIW?

In response to (2) I'll check it out.


Ben Earhart
Lead Client Programmer
Bioware Austin
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 06 2006 :  10:44:24 PM  Show Profile  Reply with Quote
OFIW = Open Files In Workspace

http://www.wholetomato.com/products/features/fiw.html?more=yes

The Glossary has a great deal of information :)
http://www.wholetomato.com/support/glossary.html

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

bearhart
Junior Member

USA
15 Posts

Posted - Aug 07 2006 :  8:46:40 PM  Show Profile  Reply with Quote
So I guess the answer would be yes then - the files are in OFIW.

Any ideas? Any tests I should run?

Ben Earhart
Lead Client Programmer
Bioware Austin
Go to Top of Page

bearhart
Junior Member

USA
15 Posts

Posted - Aug 08 2006 :  5:36:20 PM  Show Profile  Reply with Quote
On my dual-core machine I seem to get much better results if I have the newly generated file OIW. Could part of the problem be that it is just too low priority to work reliably on a single-core machine?

The post by feline suggested that the files only need to be OFIW or in the solution. If the file is open in the solution and is modified externally it seems that VAX should re-parse it under any circumstances - no option necessary. In any case, the feature doesn't seem to work unless it's in OFIW.

What is the behavior of the option to watch for externally modified files exactly?

Ben Earhart
Lead Client Programmer
Bioware Austin
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Aug 08 2006 :  7:33:03 PM  Show Profile  Reply with Quote
What IDE are you using? If VC++ 6.0, you may have to save the workspace before VA X will see external changes to files in the project.

If you change a "cmh" header, at what point does the "h" header get saved or regenerated? When you save the cmh? When you build?
Go to Top of Page

bearhart
Junior Member

USA
15 Posts

Posted - Aug 08 2006 :  9:46:19 PM  Show Profile  Reply with Quote
I'm using VC8.

The most common case I'm referring to is when I change the "cmh" header and then manually compile it which re-writes the "h" header. Usually at this point, I start making corresponding changes in the cpp file and I don't see the VAX updates.

These quick iterations represent the bulk of my work, punctuated by occasional full build and test. To be honest I have no idea how it behaves when a regular build is started because it's rare that I would change a "cmh" and then try to build immediately.

Ben Earhart
Lead Client Programmer
Bioware Austin
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 09 2006 :  2:27:34 PM  Show Profile  Reply with Quote
Which VA build are you using (see the About page of the VA options dlg)? External modification handling changed recently - so if you aren't using build 1530 or 1531, first upgrade to see if the problem is resolved.
Go to Top of Page

bearhart
Junior Member

USA
15 Posts

Posted - Aug 10 2006 :  12:05:55 PM  Show Profile  Reply with Quote
I just upgraded to 1446 (as per my other thread "flickering symbol completion".

I'll check out 1530, 1531.

Thanks!

Ben Earhart
Lead Client Programmer
Bioware Austin
Go to Top of Page

bearhart
Junior Member

USA
15 Posts

Posted - Aug 10 2006 :  12:13:06 PM  Show Profile  Reply with Quote
Just a curiousity, is 1531 relatively stable? All of the bug reports for 1531 made me a bit nervous.

Ben Earhart
Lead Client Programmer
Bioware Austin
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 10 2006 :  1:07:13 PM  Show Profile  Reply with Quote
Most of the bug reports for 1531 have been aimed toward the new refactoring features. I've been using the 15xx builds since they were first given out in a private beta. I have found it to be very stable.

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000