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
 Intellisense problem:
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AndreasS
Junior Member

Germany
11 Posts

Posted - Oct 21 2010 :  07:09:42 AM  Show Profile  Reply with Quote
Hi,

it is posible to tell the parser of visual assist not to parse same part of my code for example by enclose the code in a preprocecor define?

We are using VS2008, C++ nativ.
For one of our classes we have to change the declaration of the class for an other compiler(other than VS C++ compiler).

In MyVector.h we define a class

// MyVector.h
template< typename Item >
class Vector : public std::vector< Item >
{
public:
Vector();
Item GetTop();
};


and in one other header file we declare

// SomeClass.h
#ifdef USING_MY_COMPILER
template< class ITEM > class Vector {};

namespace std
{
template< class ITEM > class vector {};
};
#endif

class SomeClass
{
...
void funktion_A(Vector<int>& rgInts);
....
};



In a third file I want to use my class Vector
but if I wirte the . after my variable name no members are listed.

#include "MyVector.h"
// no include of "SomeClass.h"

void f()
{
Vector<int> rgVector;
rgVector. -> no intellisense by visual assist, but by VS.
}

This happend if the visual assist database knows the second defintion of Vector.

Thanks in advance.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 21 2010 :  1:46:17 PM  Show Profile  Reply with Quote
Skipping by enclosing is not possible. However, I can list the possible solutions for this problem:

1. You can turn on the following option as a workaround:
VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

2. if this file would have a different extension, you could add it to the "extensions to ignore" list:

VA Options -> File handling -> Extensions -> Extensions to ignore

3. If you don't have too much duplice class like this, you can add them into VA's stdafx.h:

http://docs.wholetomato.com?W302

This file is parsed first and not seen by the compiler. Hopefully this will keep these symbols in the database.

4. If VA parses a class twice, it lists the members of both classes and it should not cause a problem. Something may confuse VA's parser in the second instance of the class. If you can provide us a simplified snippet where we can reproduce the problem, we will look into this.

Edited by - accord on Oct 21 2010 1:49:36 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 21 2010 :  5:24:07 PM  Show Profile  Reply with Quote
There is one other possibility, if you add the following code to the header file:

#define VA_SKIP_START
#define VA_SKIP_END

VA_SKIP_START
// problem code
VA_SKIP_END

and add the following to VA's StdAfx.h

#define VA_SKIP_START /*
#define VA_SKIP_END */


This might work, so long as the code you are blocking out does not contain any /* */ comment blocks.

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

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 22 2010 :  12:34:46 AM  Show Profile  Reply with Quote
Feline: very nice.

So skipping by enclosing IS possible
Go to Top of Page

AndreasS
Junior Member

Germany
11 Posts

Posted - Oct 22 2010 :  11:34:49 AM  Show Profile  Reply with Quote
Thanks

but if I add somethings to VA's StdAfx.h
than it's overriden by the next update, is't it?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 22 2010 :  2:43:09 PM  Show Profile  Reply with Quote
Using VA's StdAfx.h file to skip code is tricky, but I have seen it work occasionally.

AndreasS the instructions in the FAQ explain editing a user specific copy of VA's StdAfx.h. This user specific version of the file is not replaced or updated when you install a new build of VA. So it is wise to "diff" it once every few months just to make sure there are no useful updates to the default StdAfx.h file that you would be useful to merge into your file.

zen is the art of being at one with the two'ness
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