Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1727: Alt-G and pure virtual functions

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
drac Posted - Jun 17 2009 : 12:06:50 PM
Hi,

Consider the following code:

class Figure
{
public:
	virtual double Ar|ea() = 0;
};

class Square : public Figure
{
public:
	virtual double Ar|ea();
};

double Square::Area()
|{
	return 0.0;
}

class Circle : public Figure
{
public:
	virtual double Ar|ea();
};

double Circle::Area()
|{
	return 0.0;
}

If the cursor is over Figure::Area and I issue Alt-G nothing
happens. For Square::Area and Circle::Area issuing Alt-G works.

If I issue F12 over Figure::Area Visual Studio 2008 asks me which
Area I would like to visit.

This issue is very important when working with Interfaces in C++.

Cheers!
6   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jan 31 2010 : 1:13:41 PM
case=3346 is implemented in build 1810
accord Posted - Jun 22 2009 : 4:35:24 PM
We are considering implementing a feature which will allow Find References to search base classes as well as derived classes:

case=3346

Yes, Visual Studio's keyboard configuration window can be annoying, especially when you try to find something in the little window. I use a workaround to avoid confusion: I alway use filtering. For example when I want to configure the keys for Visual Assist refactorings (which is very useful) I just type:

vassistx.refactor

into the "show commands containig" editbox, and I get a list of the available refactorings:

VAssistX.RefactorAddInclude
VAssistX.RefactorAddMember
VAssistX.RefactorAddSimilarMember
VAssistX.RefactorChangeSignature
etc.

Or if you type vassist.findref, you get VAssist.FindReferences.

After that, you can export/import your keyboard commands and other preferences:

Tools -> Import and Export settings...
drac Posted - Jun 18 2009 : 3:46:02 PM
I think this thread belongs to "Suggestions and Ideas".

I would like Visual Assist to make a special case for pure virtual functions - which implement the notion of "interfaces" in c++.

If the pure virtual function has a body, put that definition with all the implementations of that pure virtual function.

Also it would be nice to do also the reverse, from Circle::Area definition to goto Figure::Area declaration. Useful when a class implements many interfaces and you need to find out which interface declares a function.

Regarding VAssistX.FindReferences I can say that I hate the keyboard configuration dialog in Visual Studio! You cannot resize it and you can see only five items from that list of commands.

I wish that Visual Assist would have dialog "Keyboard mapping" where you can configure only Visual Assist's functionality and a method to save this information in a simple xml,ini,json file for simple backup and restore.
feline Posted - Jun 18 2009 : 1:17:17 PM
I am not sure what to make of this. Firstly it is possible to give a pure abstract function a body. It may not be common, but it does compile, and it can be a very useful feature.

More generally though, you are basically saying "if there is nowhere to go for Alt-G then do a Find References instead". Currently Alt-G doing nothing tells you something useful. Do we want to "confuse" the distinction between Alt-G and Find References?

If / when there is a form of Find References to only find function declarations / implementations then it makes more sense to call this.

Are you aware you can simply bind a keyboard shortcut to the command VAssistX.FindReferences via the IDE keyboard shortcuts settings?
drac Posted - Jun 18 2009 : 08:12:23 AM
I think that Visual Assist should detect that Figure::Area is a pure virtual function when I hit Alt-G and do a find references command for me, I will not mind waiting (watching a progress bar) and then present the list of derived methods, if any.

Navigating by Alt-G is something different than find references, which requires mouse usage (or alt-x, d) and then navigating through a different window - toggling between source code and VA Find References Results is done via Alt-F6 instead of just Alt-Left.

I can live with Find References but having case where Alt-G doesn't work creates the illusion that Visual Assist is not working.
accord Posted - Jun 17 2009 : 5:15:49 PM
If you run find references on Figure::Area you will get the function in the derived classes. It will list also function calls, not only function declarations/definitions, but we are considering implementing a feature to be able to filter out function callings:

case=2867

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