T O P I C R E V I E W |
noone |
Posted - Jan 25 2006 : 06:28:56 AM Hi,
I am evaluating software and first thing I tested was feature I miss in VS: "Goto implementation"
"Goto implementation" does not work when cpp file has using statement.
Our namespace hierarchy is complex (and long). (This is simple test to reproduce behaviour) //namespace.h #pragma once using namespace System;
namespace VisualAssist1 { namespace Test1 { public __gc class Class1; } } // VisualAssist1.h #include "namespace.h"
public __gc class VisualAssist1::Test1::Class1 { public: int f1(int i); }; //VisualAssist1.cpp #include "stdafx.h" #include "VisualAssist1.h"
using VisualAssist1::Test1::Class1;
int Class1::f1(int i) { return 0; }
If I position cursor in header file "f1" function and pres Alt+G, or select menu VAssistX->Goto Implementation, nothing happens. It works from .cpp file to .h file.
If I change .cpp file and remove using "VisualAssist1::Test1::Class1;" and add namespace name in front of method, "Goto implementation works" (modified) //VisualAssist1.cpp #include "stdafx.h" #include "VisualAssist1.h"
int VisualAssist1::Test1::Class1::f1(int i) { return 0; }
Goto implementation does not work in Visual studio too.
Workaround is to remove using statement but it gives long names for functions. If I break line into two parts I get it working but I have to change all our source files. //If using removed it works int VisualAssist1::Test1:://split line Class1::f1(int i) { return 0; }
I uses latest version of demo software (downloaded today) and Visual Studio 2003
|
5 L A T E S T R E P L I E S (Newest First) |
sean |
Posted - Dec 19 2006 : 9:27:08 PM case=971 is fixed in build 1543 |
feline |
Posted - Jan 26 2006 : 4:40:03 PM a combination of alt-g to get you to the header, and then alt-o and alt-m to find the function is not an ideal work around, but it is worth considering if you find the IDE's goto overly slow, or it ever fails. |
noone |
Posted - Jan 26 2006 : 02:44:10 AM >look up a function that you are calling?
This also does not work. VAssist::Test1::Class1* c1 = new VAssist::Test1::Class1(); int i = 0; c1->f1(i, &i);
If I move cursor between "f" and "1" (c1->f1), and press Alt+G it jumps to declaration (.h file). If I select menu command VAssistX->Goto Implementation, nothing happens. It works from .cpp file to .h but not vice versa. Workarround is to use VS (right click function and select: Go To Definition, Go To Declaration. Both works)
Alt+O is very useful feature I discovered at begining. I did not know about Alt-M. It is very handy.
|
feline |
Posted - Jan 25 2006 : 5:37:21 PM you may also find the post by o2a in this thread
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=4309
to be useful. |
feline |
Posted - Jan 25 2006 : 5:34:20 PM i am seeing the same thing. thank you for the clear example. to help me picture the extent of the problem is this only happening when you want to swap between a header and a cpp file? or are other alt-g movements also failing? e.g. to look up a function that you are calling?
are you aware of alt-o to swap between a header and a cpp file? you can also use alt-m once in a file to get a drop down list of the functions in that file. type once this list is shown to filter it down to just the item you want.
i have been able to produce the same bug with an even simpler example, which should help.
case=971 |