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
 Mixing symbols of different projects
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

v_v
Senior Member

Russia
29 Posts

Posted - Oct 29 2010 :  03:41:15 AM  Show Profile  Reply with Quote
Hello, there is an example when symbols (classes) from one project somehow appears in another project of the same solution.
Test solution consist of two projects: one is win32 console app (CPPProject) and another one is dll with "Common Language Runtime Support (/clr)" option enabled (CLIStub).


There are two files of the same name, namespace of the same name and two different classes, but with the same name again:

There is a header in win32 console application (Test.h):



There is a header in C++/CLI project:


And finally VAX misunderstanding who is Mr. CTestClass in C++ console application:


There are no connections between this two projects ("clean" just created projects, only with /clr option enabled in one of them). But the situation is quite real.
I have a solution with server-project (C++) and ".NetThunk" project (C++/CLI-library) to help connect DotNet-applications to the server. There are several name-conflicts because ".NetThunk" only translates internal server structures and methods of the same name.

I can send you test project if needed (don't know how to attach it here).

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 29 2010 :  1:09:39 PM  Show Profile  Reply with Quote
Can you please send in this test project?

http://www.wholetomato.com/support/contact.asp

Please include the URL of this topic in the description field so we can match it up.
Thanks.
Go to Top of Page

v_v
Senior Member

Russia
29 Posts

Posted - Oct 29 2010 :  4:36:06 PM  Show Profile  Reply with Quote
Done.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 01 2010 :  2:22:16 PM  Show Profile  Reply with Quote
I got the test project, thank you for sending it in.

I've opened your test project using Visual Studio 2008 SP1 and Visual Assist 1833 and test.PrintMessage() was recognized for me.
Which version of Visual Assist are you using? (VA Options -> About)
Can you please try upgrading to the latest version of Visual Assist if you are using an older version just to see if this helps?
http://www.wholetomato.com/downloads/default.asp

If you are using the latest version of Visual Assist, can you please try rebuilding your symbol databases?
VA Options -> Performance -> Rebuild symbol databases

If none of the above has helped, can you please send us your VA & VS settings?
VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

so I can import them here to see if I can reproduce the problem using your settings. Modifying some settings, especially registry settings can cause problems, however it is unlikely, but worth a try.

Edited by - accord on Nov 01 2010 2:24:15 PM
Go to Top of Page

v_v
Senior Member

Russia
29 Posts

Posted - Nov 02 2010 :  01:38:20 AM  Show Profile  Reply with Quote
I'm using 1833 build.
I wonder, but right now it works almost Ok (no error is shown).
Except this one: Ctrl-Space after "test." in C++ project shows suggestions from both classes of both projects: "void PrintMessage()" and "String^ GetMessage()".
Computer was rebooted due to some windows updates installation. I've also tried to rebuild symbols, but the situation is the same - suggestions are from two projects. But in "real" project I'm working for in C++ project suggestions are only from C# project (I've rebuilt it's symbols too). So the problem exists =(
Can you reproduce the problem described?
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 02 2010 :  03:10:33 AM  Show Profile  Reply with Quote
At least one of the problems seems to be gone.

About the "mixing" problem: VA is designed to parse, and to know about all of the files in your solution. (Yes, these are words from feline in the other topic ) That means VA knows about all symbols in all files, so you get member listboxes and all other features of VA even when the file is not included. Also, it allows VA to find the correct file for features like "Add include" refactoring.

However, if you don't like mixing, you can turn on

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

as a workaround.
Hope this helps.
Go to Top of Page

v_v
Senior Member

Russia
29 Posts

Posted - Nov 02 2010 :  03:31:38 AM  Show Profile  Reply with Quote
I'm not sure that the problem is gone. Just I still can't create simple but stable example to reproduce it. Unfortunately I can't send you real sophisticated solution with one more dozen of issues =(
Thought now also I can't imagine work without VAX =)
Back to the example above. One more issue which may help you find symbols mixing (I'm sure that it exists):

There is a c# source file. Suggestion in #include statement points to C++ header file (there are two files of the same name in a solution), but there is no suggestion for C# header. It's Ok with a suggestion in a C++ main.cpp file. But may be you can find opposite situation.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 03 2010 :  3:52:24 PM  Show Profile  Reply with Quote
Visual Assist lists all files that are in your solution, this is how the include listbox works.

Mixing symbols symbols does exits, indeed, as I tried to explain in my previous post. Visual Assist parses all files in your solution, whether included to any file or not. This causes members to be listed from more classes if they have the same name. My offered workaround should reduce the clutter.

However, this should not cause symbols to be unrecognized. The case, where your member was underlined is definitely a bug. Let me know if you can reproduce it somehow.
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