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
 "Goto" should use argument list to disambiguate
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

scottbilas
Ketchup Master

72 Posts

Posted - Apr 28 2010 :  7:54:43 PM  Show Profile  Reply with Quote
Given the following code:


class Foo : IFoo
{
	void Func(string a) {}
	void Func(int b) {}

	void Test()
	{
		Func
	}
}


Putting the caret in Func in Test() and hitting Alt-G brings up a listbox for both versions of Func(). This is great. Visual Studio does the same thing if I do F12 (though through the much less convenient Find Symbol Results pane).

However, if I change that 'Func' to 'Func("hi")' and again do Alt-G on the call to Func, I still get the disambiguation listbox.

I would expect that, like Visual Studio does with F12, because there is no ambiguity in what function is being called, then it would go right to the string version of Func. This would save a lot of time with heavily overloaded functions, having to pick through the list to find the right version that I'm calling, especially when the IDE already knows which one it is.

This is VS2010 with VAX #1822.

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 29 2010 :  2:50:48 PM  Show Profile  Reply with Quote
This is something we are hoping to do one day, but in general it is a hard problem for VA to solve. It is not always obvious what types are being passed, or which overload this maps to.

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

scottbilas
Ketchup Master

72 Posts

Posted - Apr 29 2010 :  5:18:29 PM  Show Profile  Reply with Quote
Ok, so it sounds like for C# at least it's better to use the built-in Edit.GoToDefinition feature. I'll remap Alt-G to that instead.
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