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
 VA forward definitions in namespaces problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xxluda
Senior Member

29 Posts

Posted - Nov 19 2012 :  05:40:26 AM  Show Profile  Reply with Quote
Hello there,

few days back I updated my VA to the latest version (10.7.1918) but now I'm getting weird behavior when I'm trying to access Ui namespaces where GUI class of dialog is defined.

I tried to reproduce this issue and found following:



Altought testing namespace TT has forward definition for CDialogModelSaveAs and int nNumb, only nNumb is displayed.

When I replaced Ui::CDialogModelSaveAs * with class Ui_CDialogModelSaveAs, everything in VA works correctly.

It seems that latest version of VA has some problems when parsing namespaces with forward definitions inside.

Also this short snippet defined in cpp code shows incorrect values:


namespace TestNamespace
{
	class CTest;
	class CDialogModelSaveAs2;
	int nNumb;
}

TestNamespace::






I'm not sure if this problem is caused by Qt or it's a global VA problem. Is there any quick solution for this?


Thanks for reply
Ludek

Ludek Vodicka
Skipper Chief developer www.skipper18.com

xxluda
Senior Member

29 Posts

Posted - Nov 19 2012 :  07:45:46 AM  Show Profile  Reply with Quote
After some next investigations it seems that the problem isn't in Qt, but in combination Namespace+forward declaration.

Beside the bug I described before (VA doesn't display classes in namespaces) there is also much more important problem. VA also doesn't display members/attributes of this class anywhere in the code.

L.


Ludek Vodicka
Skipper Chief developer www.skipper18.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 19 2012 :  11:43:42 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description. I think this is covered by:

case=2514

For now, can you please try turning on:

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

this is fixing the problem for me here.

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

xxluda
Senior Member

29 Posts

Posted - Nov 20 2012 :  12:49:47 AM  Show Profile  Reply with Quote
Thank you for reply.

Unfortunately the behavior is the same no matter if "Get content from default Intellisense" is turned on or off ;-(

I tried clear cache/temporary files and rebuild symbol database, but doesn't helped.

I also noticed that after I turned default Intellisense on/off, the listbox is displayed with some weird space:





Ludek Vodicka
Skipper Chief developer www.skipper18.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 20 2012 :  1:39:00 PM  Show Profile  Reply with Quote
Which IDE are you using?

If you restart the IDE does this odd space at the bottom of the listbox go away? I am not sure where that space is coming from, but its probably just an odd visual effect.

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

xxluda
Senior Member

29 Posts

Posted - Nov 21 2012 :  01:11:17 AM  Show Profile  Reply with Quote
I'm using Visual Studio 2010 version 10.0.40219.1 SP1Rel

The issue disappear after restarting IDE and I'm not sure how to reproduce it.

But the main problem with broken Intellisense persists.

Ludek Vodicka
Skipper Chief developer www.skipper18.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 21 2012 :  10:16:01 PM  Show Profile  Reply with Quote
I am not surprised the space at the end of the listbox disappeared, hopefully it will stay gone.

Can you please try adding this test code to a cpp file and see what results you get, if you follow the comment what do you get in the listboxes? The class names should be unique in your solution, so we should not have that to worry about:

class testFelineClassForwardDeclareListbox
{
    int nFelineClassForwardMember;
    class forwardFelineClassInClass;
};

namespace testFelineNamespaceForwardDeclareListbox
{
    int nFelineNamespaceForwardMember;
    class forwardFelineClassInNamespace;
}

class forwardFelineClassInClass {};
class forwardFelineClassInNamespace {};

void testFelineUsingForwardDeclaredClass()
{
	// make sure to turn On:
	// VA Options -> Advanced -> Listboxes -> Get content from default Intellisense
    // type "::" on the ends of these two lines
    testFelineClassForwardDeclareListbox;
    testFelineNamespaceForwardDeclareListbox;
}

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

xxluda
Senior Member

29 Posts

Posted - Nov 22 2012 :  03:15:44 AM  Show Profile  Reply with Quote
Hello Feline,

this is the test result (also the space again appear)





but when I tried the second definition, space disappear






and when I tried again the first definition, space was gone too






I also tried to close my whole project, open brand new Visual Studio and create single cpp file. I pasted your sample and tried intellisense. The results in listbox were the same and empty space was again displayed:



but when I tried to execute intellisense again, space was gone again.



Hope this can help you find the bug.

Ludek


Ludek Vodicka
Skipper Chief developer www.skipper18.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 24 2012 :  9:10:38 PM  Show Profile  Reply with Quote
Can you please try turning:

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

On, and trying this test again. The tomato icons in the listboxes show that these listbox items are coming from VA's parser, not from default intellisense.

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

xxluda
Senior Member

29 Posts

Posted - Nov 25 2012 :  02:51:28 AM  Show Profile  Reply with Quote
This checkbox was already checked on all previous screens. I'm not sure why this icon appears:









Ludek Vodicka
Skipper Chief developer www.skipper18.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 27 2012 :  6:32:19 PM  Show Profile  Reply with Quote
This is a little unexpected. I think this is happening because the IDE intellisense is unable to offer up any suggestions at this point, so VA is filling in, which is what VA is designed to do.

Since VS2010 default intellisense is working for me in this test case, I am wondering if there is something further up the file, or in your solution that is confusing the IDE's intellisense parser.

In order to try and work out what is going on here I have made a new default C++ console application in VS2010, and added the test code to the main cpp file. I have uploaded my test solution here for ease:

http://forum.wholetomato.com/colin/forumimages/topic_11029_forward_declare_namespace_test.zip

Can you please try downloading and opening this solution, or making your own default solution, and see what results you get then?

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

xxluda
Senior Member

29 Posts

Posted - Nov 28 2012 :  01:56:29 AM  Show Profile  Reply with Quote
Hello feline,

thank you for all your effort. Unfortunately your solution returns the same results:





Here is the link to pastebin page where I copied info from about screen: http://pastebin.com/UJHbv30E



I also tried to install my VA on one of our build server to test if this issue happens anywhere else but the results are still the same



This build server contains only clean VS2010 installation without Xoreax incredibuild and any other plugin. Here is info from about dialog: http://pastebin.com/p6mY9gaX

Ludek Vodicka
Skipper Chief developer www.skipper18.com

Edited by - xxluda on Nov 28 2012 01:57:17 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 28 2012 :  10:54:57 AM  Show Profile  Reply with Quote
Can you please check if the following options are false?

Tools -> Options... -> Text Editor -> C/C++ -> Advanced -> Disable IntelliSense
Tools -> Options... -> Text Editor -> C/C++ -> Advanced -> Disable Auto Updating

Go to Top of Page

xxluda
Senior Member

29 Posts

Posted - Nov 28 2012 :  11:11:26 AM  Show Profile  Reply with Quote
Thanks.

You're right. The whole intellisense database was disabled on my PC and also on clean build machine ;-(. Strange.



So now IDE correctly shows all class members/definitions:




Is required to have this option permanently turned on, or is it only workaround until this issue will be fixed?

Anyway thank you for all your assistance!

Ludek

Ludek Vodicka
Skipper Chief developer www.skipper18.com

Edited by - xxluda on Nov 28 2012 11:12:16 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 28 2012 :  4:20:32 PM  Show Profile  Reply with Quote
If you don't notice any new problems, it can even be a solution since it only give priority to Intellisense content (so if Intellisense wouldn't find anything, VA will step in) and you will still have all VA listbox enhancement features like Smart Suggestions. It's just a different parser with different feature set and scalability characteristics, so aside from extreme cases it is a perfectly good solution (especially if there wasn't a good reason for why intellisense had been disabled)
Go to Top of Page

xxluda
Senior Member

29 Posts

Posted - Nov 28 2012 :  5:35:24 PM  Show Profile  Reply with Quote
Thanks for reply.

After some consultations with my colleague I found the reason why our VS intellisense is turned off by default. The reason is performance isues when using large templates and boost libraries.

Right now I'm not observing any issues so for now I will use VS intellisense in combination with VA one until the fix for this issue will be released.

Regards
Ludek

Ludek Vodicka
Skipper Chief developer www.skipper18.com
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