Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Intellisense problem:

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
AndreasS Posted - Oct 21 2010 : 07:09:42 AM
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.
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 22 2010 : 2:43:09 PM
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.
AndreasS Posted - Oct 22 2010 : 11:34:49 AM
Thanks

but if I add somethings to VA's StdAfx.h
than it's overriden by the next update, is't it?
accord Posted - Oct 22 2010 : 12:34:46 AM
Feline: very nice.

So skipping by enclosing IS possible
feline Posted - Oct 21 2010 : 5:24:07 PM
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.
accord Posted - Oct 21 2010 : 1:46:17 PM
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.

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