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
 Intellisence bugs with stl containers b1738
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cbranch
Senior Member

USA
30 Posts

Posted - Nov 02 2009 :  5:55:39 PM  Show Profile  Reply with Quote
Using Visual Studio 2008 (VC9) w/ build 1738

I'm having serious problems with intellisense and typedef stl containers.
This is pseudo code which may or may not display the problem, but it shows the common usage in my code base.


#include <vector>
class Foo
{
public:
struct Type1{ float a; };
struct Type2{ int b; };

typedef std::vector<Type1> Type1List;
typedef std::vector<Type2> Type2List;

Type1List myList1;
Type2List myList2;
};
...

void Foo::inSomefunction()
{
   myList1[0]-> 'May list Type2 members'
   myList2[0]-> 'May list Type1 members'
}



Basically it seems like VAX is completely confused over the type. I've seen this will array access, function access etc. I've tried rebuilding my database and it usually works for a little bit and then things get confused. I've also seen increased likely hood of VAX erroneously using -> rather than . for container classes mostly vector. I've also seen problems with std::map iterators where first and second members are identified correctly. I've seen these problems in the last couple of releases of VAX. I do not recall having these problems with much older versions of VAX with Visual Studio.Net 2003 (VC++ 7.1). However I'm not developing the same code base on both compilers so I can't compare and contrast.

If any users has seen these problems and knows of a particular version of VAX which works better please share it.

Please look into VAX's handling of templated types especially the std containers.

Thank you.

Colin Branch

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 04 2009 :  6:54:16 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=35153

For now, you can turn on

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

as a workaround if you did not turn off default intellisense for example by renaming feacp.dll.

Edited by - accord on Nov 04 2009 7:00:00 PM
Go to Top of Page

cbranch
Senior Member

USA
30 Posts

Posted - Nov 05 2009 :  10:13:48 AM  Show Profile  Reply with Quote
I'll try the work around. I've noticed that MS default Intellisense has gotten better. I still really prefer VAX as I've been using the product for years and have pushed many of my coworkers to use it. Our company probably has 10 or more licenses (making it the most popular optional tool). I hate to see what appears to be bug regression. This bug appeared fixed in much older versions. While features like regex and the snippets are nice, fast accurate intellisense is the 'Must Have' feature that keeps us buying. Understandably C++ can do some really bad things but it seems possible (based on my experience with VAX) to have the vast majority of code be parsed, especially STL, Boost, and probably the upcoming TR1. Now I know that it's impossible for WholeTomato to support all libraries out there, however these are widely used, and probably would make a good barometer on the state of the parser. Plus those are the main template libraries out there that also use some rather nasty macros for cross platform support.

Thanks for all the work put into VAX so far and we look forward to using each new version.

Colin Branch
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Nov 06 2009 :  1:37:50 PM  Show Profile  Reply with Quote
Do you have any idea which version of VA this used to work correctly in? We try to avoid regressions, and these are high priority bug fixes when they happen.

As you say, C++ is a hard language to support, but we do our best

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

cbranch
Senior Member

USA
30 Posts

Posted - Nov 09 2009 :  10:12:19 AM  Show Profile  Reply with Quote
No I'm sorry I can't identify a version that this bug was not there. Mostly this is a anecdotal observation. The only older version that I can test was VAX b 1724 with Visual Studio .Net 2003 (VC71). It seemed to handle some of this stuff better (it was able to properly resolve the reference types) but it still had the problem with the iterators.


struct Test
{
   struct A { int a; };
   struct B { int b; };

   typedef std::vector<A> AVec;
   typedef std::vector<B> BVec;

   AVec a;
   BVec b;

   void test()
   {
      Test test;
      test.a->begin()->a;
      test.b->begin()->a // BUG HERE as it should be 'b'.
   }
}


As the code I'm currently working on contains many typedef stl containers intellisense issues constantly constantly occured such that I couldn't trust that the variables being suggested would compile.

Using the default MS intellisense content, intellisense quickly breaks down (aka is unable to provide completion) which is annoying but at least I know it isn't suggesting invalid options.

Colin Branch
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 11 2009 :  3:16:41 PM  Show Profile  Reply with Quote
I tested your snippet with 1649 and 1561 when I was writing the bug report and it failed with both versions.

Edited by - accord on Nov 11 2009 3:25:34 PM
Go to Top of Page

aarlet
Starting Member

USA
1 Posts

Posted - Nov 17 2009 :  9:57:38 PM  Show Profile  Reply with Quote
quote:
Originally posted by accord

For now, you can turn on

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

as a workaround


I tried this and it does populate the list boxes with the correct members however, the resulting code is underlined as incorrect. And of course, you're using Intellisense instead of VA, so I've just switched back and will manually enter my members for the time being.

Is there any way I can find resolution of this other than monitoring this thread?

Best regards,

Aaron Arlet
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 18 2009 :  04:16:32 AM  Show Profile  Reply with Quote
quote:
And of course, you're using Intellisense instead of VA, so I've just switched back and will manually enter my members for the time being.

We are using default intellisense for the content of listboxes, so it is actually a VA listbox with all its features. This is only used for the listbox content, so this is why you see the underline, and it is considered only a workaround. If you prefer to turn off this option, you can still press ctrl+space because if you do this VA will use def. intellisense when it cannot populate the listbox on its own.

quote:
Is there any way I can find resolution of this other than monitoring this thread?

You can "subscribe to this topic" by clicking on the link in the top of the page, on the right.

Edited by - accord on Nov 18 2009 1:50:37 PM
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 12 2011 :  12:46:59 AM  Show Profile  Reply with Quote
case=35153 is fixed in build 1848

Whole Tomato Software, Inc.
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