Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Strange context determination in nav toolbar 1819

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
jrynd Posted - Apr 19 2010 : 11:07:01 AM
I'm in Visual C++ 6.0 (yeah yeah, I know) and using VAx 10.6.1819.0

Obviously there is no Java or .NET here. Yet my sample code:

typedef struct _FP
  {
  unsigned short int rows;
  unsigned short int cols;
  double array[FP_arraysize];
  } FP;


void f(void)
{
FP retval;
#define notevalue retval.array[0]
#define notedelta retval.array[1]
#define notevega retval.array[2]
#define notedv01 retval.array[3]
#define optvalue retval.array[4]
#define optdelta retval.array[5]
#define optvega retval.array[6]
#define optdv01 retval.array[7]
notevalue=0;
}


when I click on one of these variable names, the navigator toolbar suggests "class Array : public System::Array{...}" as the context instead of showing the #define or the declaration of retval.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 21 2010 : 4:02:34 PM
Some code can confuse our parser, especially code making heavy use of macros. Our parser does not have the luxury of fully compiling the code before trying trying to understand it. We are working to improve this over time, but it is not an easy problem.
jrynd Posted - Apr 21 2010 : 10:54:05 AM
I can understand why you can't have a separate namespace for everything, but shouldn't members of a struct/class be thought of as distinct from classnames?
accord Posted - Apr 19 2010 : 2:31:07 PM
This is because there is a helper code for the class "array" for C++/CLI codes in VA's stdafx.h. If you comment out the following lines in this file, it will solve this problem for you:

// namespace cli
// {
// 	template<typename T>
// 		class array : public System::Array
// 	{
// 		T operator[]();
// 	};
// 	
// 	template<typename T>
// 		class interior_ptr
// 	{
// 		T* operator*();
// 	};
// 	
// 	template<typename T>
// 		class pin_ptr
// 	{
// 		T* operator*();
// 	};
// 	
// 	template<typename T>
// 		class safe_cast
// 	{
// 	};
// }


You will find instruction on how can you edit this file, here:
http://docs.wholetomato.com?W302

I know, I know, this is a workaround. This is because VA handles symbols globally, it is aware of all parsed symbols, so this way features like "Add Include" refactoring are possible (you don't need to include a file for VA in order to recognize it)

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