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
 Feature Requests
 Suggest member functions that are #included in a c
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

eddieparker
Senior Member

39 Posts

Posted - Nov 20 2009 :  6:51:45 PM  Show Profile  Reply with Quote
Hello!

Pardon me if this is in the wrong place, but I'd love if Visual Assist could do the following:

Test.h:
#ifndef TEST_H
#define TEST_H

class Test
{
public:
	void InClassHeaderFunc();
	#include "Test.inc"
};

#endif


Test.inc:

void Foo();
void Bar();



main.cpp:

#include "Test.h"

int main(void)
{
	Test t;

        t. // Have Visual Assist suggest Foo(), Bar() and InClassHeaderFunc(). Currently it only suggests InClassHeaderFunc()
	return 0;
}



As stated in main.cpp, Visual Assist only suggests InClassHeaderFunc, when ideally I'd like it to suggest Foo() and Bar() as well.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 21 2009 :  08:53:33 AM  Show Profile  Reply with Quote
I am seeing the same thing here. Thank you for the very clear description:

case=9117
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Nov 21 2009 :  9:52:31 PM  Show Profile  Reply with Quote
Is there a place I can subscribe to this case number, to see when it makes it into a release?

(We have middleware that currently does the above heavily, and I'd love to upgrade if-and-or-when said functionality becomes available).
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 23 2009 :  03:50:32 AM  Show Profile  Reply with Quote
We will update this forum thread when this case will be fixed, so if you subscribe to this topic you will get an email notification when someone makes a post. Use "Subscribe to this topic" link to do this.

Read more on cases here:

http://docs.wholetomato.com?W318
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Mar 23 2010 :  4:12:28 PM  Show Profile  Reply with Quote
Hello:

Apologies for asking, but is there any progress on this bug?

I notice in the release notes [1] for build 1810 there's a reference to a number 9117, but I believe that's not the case number as it links to a different topic.

Anyhow, I'd appreciate knowing how this is coming as it's how the majority of our codebase is structured.

Cheers,

-e-

[1] http://www.wholetomato.com/support/history.asp
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Mar 23 2010 :  10:32:40 PM  Show Profile  Reply with Quote
We would like your feedback on the next build (1816+). A reg entry will enable a change to the parser that will help here. We'll update this topic when it is available.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 12 2010 :  12:03:00 PM  Show Profile  Reply with Quote
Build 1819 has a change to our parser to better support these types of constructs, however it is disabled by default.

To try out this new functionality, press the Rebuild button on the Advanced | Performance page of the VA Options dialog, then exit Visual Studio.

Use regedit to create a new string value named "AllowHashIncludeMembers" at
"HKCU\\Software\\Whole Tomato\\Visual Assist X"
and set the value to "Yes".

Please let us know how this works out for you.
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Apr 12 2010 :  2:28:08 PM  Show Profile  Reply with Quote
Thanks sean.

I've installed it, and I'm testing it in my work code base.

It seems like it works somewhat - although I have to forcibly reparse (VAssistX->Tools->Reparse) the header that has the class {} declaration in order for it to pick up the #include changes. Then suggestions appear at least. It would be nice if changes automatically got picked up.

I haven't tested it in a trimmed down test project - I'll play around with it in my work code base for a while first and report back in detail; particularly in case it unearths other changes.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Apr 12 2010 :  2:52:41 PM  Show Profile  Reply with Quote
You might need to rebuild VA's symbol database for this change to take full effect, since it sounds like this will effect VA's parser.

VA Options -> Performance -> Rebuild symbol databases

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

eddieparker
Senior Member

39 Posts

Posted - Apr 13 2010 :  2:01:26 PM  Show Profile  Reply with Quote
Rebuilding the symbol databases hasn't seemed to help anything.

And weirdly enough, if I try to build a demo project, it works much as before.


This is how I've set up my new project:

File->New Project
- Empty Project

Add New Item
- Header file (.h)
- Named "Test.h"
- Contents:

class TestClass
{
public:
void DefinedInHeader();
#include "Test.inc"
}

Add New Item
- Header file (.h)
- Named "Test.inc"
- Contents:

void Foo();
void Bar();
void Baz();

Add New Item
- C++ File (.cpp)
- Named "Test.cpp"
- Contents:

#include "Test.h"

int main(void)
{
return 0;
}

void TestClass::


Result:

The moment I do the second colon on the void TestClass:: line in main.cpp, it autocompletes and offers me 'Bar' and 'Baz' as suggestions, but doesn't show InClassHeaderFunc nor Foo.

Then if I force the parser to run (VisualAssistX->Tools-Reparse Current File) while in Test.h, all my suggestions disappear except for InClassHeaderFunc.

There also seems to be some inconsistency between what is offered in suggestions if I have a variable of type TestClass, versus if I'm trying to build method definitions for TesetClass. i.e., Bar, Baz, and InClassHeaderFunc are offered for member function variable suggestions, but only InClassHeaderFunc is offered when trying to build out the method definition.

I've uploaded the sample project I'm using here [1]. Hopefully you get similar results to what I'm seeing.

Thanks.

[1] http://rapidshare.com/files/375484599/VisualAssistTest3.zip.html
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 13 2010 :  11:09:08 PM  Show Profile  Reply with Quote
Thanks for the test project. We'll take a look at it. In the meantime, is VA active in your .inc files? Have you mapped .inc to C++ (as described at http://docs.wholetomato.com?W328 )?
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Apr 13 2010 :  11:13:28 PM  Show Profile  Reply with Quote
Hello Sean:

Good catch - I hadn't in fact done that. However, renaming Test.inc to TestInc.h and patching up the solution to include that file gives similar results.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 14 2010 :  4:51:15 PM  Show Profile  Reply with Quote
OK, I'm seeing two problems. (I'm working with the project that has the .inc file and I haven't added .inc to my extensions list.)

1. VA doesn't parse the first line of the .inc file.
2. Updates to the .inc file don't propagate (reparsing the .h updates VA)

But I'm not able to repro the loss of suggestions after running Reparse in Test.h.
And I'm not seeing a difference in the members lists for TestClass:: or the t instance in main.

When I change the .inc to .inl, I get the same results.

Edited by - sean on Apr 14 2010 5:02:22 PM
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Apr 14 2010 :  5:00:17 PM  Show Profile  Reply with Quote
Sean:

I had seen similar behaviour to what you mention. However since having rebuilt the symbol database, I can't see anything from #includes. (note that I haven't added .inc files to my extension list either).

I'm not sure if the rebuilding has anything to do with it - but it's the only thing I've changed between then and now.

Regardless, having seen the first two issues you mention, I am seeing that in our work codebase.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 14 2010 :  5:39:03 PM  Show Profile  Reply with Quote
What is the state of your "Get content from default intellisense" checkbox (VA Options | Advanced | Listboxes)?
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Apr 14 2010 :  5:50:08 PM  Show Profile  Reply with Quote
It's not checked.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 14 2010 :  5:51:36 PM  Show Profile  Reply with Quote
Mine's the same...
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Apr 14 2010 :  6:42:40 PM  Show Profile  Reply with Quote
Hey Sean:

Thanks for bearing with me through this.

I've taken a video that illustrates the issue I'm seeing and goes through my Visual Assist Settings [1]. Let me know if I can be of further assistance, or if you have a test project for me that I should be trying.

Cheers,

-e-

[1] http://rapidshare.com/files/375955541/VisualAssistTest.zip.html
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 14 2010 :  9:23:43 PM  Show Profile  Reply with Quote
Thanks for the video.

Your list for TestClass:: has two entries for InClassHeaderFunc - that's odd (I don't have the one with the parens in my list). We've covered the missing Foo.

In the test solution, does renaming the two places where you have TestClass to TestClass5 have any effect on the listbox contents for TestClass5:: ?

Hmm - just noticed an important difference between the listbox for t and for TestClass. The items in the members list for the t instance all have tomatos indicating that the items are from VA. But the items in the list for TestClass:: don't have tomatos. Do you get a different list at TestClass:: if you press escape and then press ctrl+space?
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 14 2010 :  9:32:15 PM  Show Profile  Reply with Quote
Found it. I normally have feacp.dll renamed. I can repro when I put it back in place. Our list is displayed first, then they come up - there must be something special about ::.

Escape, Ctrl+space works (brings up the same list as the t instance).
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Apr 14 2010 :  9:54:55 PM  Show Profile  Reply with Quote
Great. Just curious - do you still want me to test any of your recommendations, or do you have enough information?
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 14 2010 :  9:56:35 PM  Show Profile  Reply with Quote
No more work on your side - the :: listbox is a conflict with default intellisense.
Go to Top of Page

eddieparker
Senior Member

39 Posts

Posted - Apr 15 2010 :  2:58:49 PM  Show Profile  Reply with Quote
Awesome, thanks Sean.

Please keep me apprised if there's a new build for me to test, or steps for me to get this working. It would greatly improve our workflow.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 15 2010 :  3:07:13 PM  Show Profile  Reply with Quote
Sure. In the meantime, ctrl+space will give you the list that you see for the t instance, when pressed after ::.

Edited by - sean on Apr 15 2010 3:07:56 PM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 23 2010 :  12:47:53 AM  Show Profile  Reply with Quote
Build 1822 has fixes for the :: problem as well as the parsing of the first line of files that are included within other scopes.
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