Author |
Topic |
|
jfrancis
Senior Member
39 Posts |
Posted - Apr 02 2004 : 05:39:11 AM
|
When I use the Go button or the SIW list for simple functions with prototypes in headers, I always end up in the header at the prototype. I'd rather end up in the definition of the function itself. Is this possible?
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Apr 02 2004 : 07:19:20 AM
|
as a work around, press alt_g in the header. for me this takes me to the definition. |
zen is the art of being at one with the two'ness |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Apr 02 2004 : 08:05:56 AM
|
Doesn't work here - what's your Alt-G mapped to?
|
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Apr 02 2004 : 08:47:12 AM
|
i am running VS .NET 2003 and VAX 1223 in keyboard mappings i have Alt+G (Text Editor) mapped to VAssistX.GotoImplementation |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 02 2004 : 10:13:24 AM
|
Your sources need to be part of your project in order for VA X to find the implementations in them. If not, add them to "Source files" in Tools|Options|Projects|VC++ Directories, assuming you have VS.NET. (Tweak for VC++ 6.0.) Press Rebuild on our Performance node and restart your IDE.
Alt+G is a default shortcut for VA X. It should work if mapped to GotoImplementation or if mapped to nothing.
http://www.wholetomato.com/products/features/shortcut.html?more=yes
Alt+G requires you be on a symbol. If VA X knows of more than one place to go, it opens a menu. Otherwise, it jumps. Successive Alt+G commands jump, jump, jump.
http://www.wholetomato.com/products/features/goto.html?more=yes
If you still have trouble, tell us what IDE and build of VA X you have. Describe the problem a bit more, and the circumstances in which it occurs and does not occur. |
Whole Tomato Software, Inc. |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Apr 02 2004 : 10:44:04 AM
|
quote: Originally posted by support
Your sources need to be part of your project in order for VA X to find the implementations in them. If not, add them to "Source files" in Tools|Options|Projects|VC++ Directories, assuming you have VS.NET. (Tweak for VC++ 6.0.) Press Rebuild on our Performance node and restart your IDE. occurs and does not occur.
The implementation isn't in the current PROJECT but it is in the current WORKSPACE. Couldn't VAX look thru all files in the workspace?
It's in a DLL built in another project.
|
|
|
jfrancis
Senior Member
39 Posts |
Posted - Sep 22 2004 : 11:57:00 AM
|
I'm getting increasingly frustrated by this. I've just proved that the Alt-G keystroke goes to the header file prototype instead of the implementation, even though the implementation is in the same project. On Alt-G, I get a little popup showing two locations I could go (for two overloads) but both are in header files, neither is the implementation. So I have to resort to using Visual Studio's goto definition, which takes ages as it seems to scan all the files for the project, but at least it takes me to the real implementation!!!
|
|
|
kevinsikes
Tomato Guru
USA
271 Posts |
Posted - Sep 22 2004 : 2:10:35 PM
|
Your last two posts do not deal with the same problem. One is the inability to find an implementation in the current Project (a bug), the other is the inability to find an implementation in the current Workspace (a feature request). The thread http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=2766 describes the former, which appears to be fixed in the latest beta. The latter is infinitely more tricky, however. I understand your plight -- you have a "main" project and one or more "supporting" DLLs in the same workspace. It would be nice to goto the implementation of imported function Foo() from a source line in your main project, locating the corresponding exported function in one of the DLLs. But what if one DLL exports Foo(), while another implements a function called Foo() but does not export it, and instead uses it internally to the DLL? VAX would not know which one to goto. I suppose in this instance VAX could pop up its listbox and allow you to choose the more correct implementation. However, the overhead of scanning through all projects in a workspace would have to be taken into account when considering the addition of this feature. |
Kevin Sikes Infotainment Platform Design Engineer Ford Motor Company |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Sep 22 2004 : 11:03:09 PM
|
jfrancis: We added you to the beta list for VA X 10.1. The next build, i.e. the one after 1260 due in a day, includes better algorithms that search for implementations. You might want to test the build.
Speaking of the VA X 10.1 beta, we expect to make the next build, or one thereafter, available to the public. Hence, there is little reason to ask us to get on the private list.
All this said, tell us where your header is, and where your implementation is. In the same directory? In sibling directories? Similarly named? |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Sep 27 2004 : 04:41:22 AM
|
Thanks. I'll give it another go when I install the beta. Will I get notified by email when it's available?
As far as files go, the .cpp file and .h files are in the same folder, but with different names.
|
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Sep 27 2004 : 11:10:02 AM
|
normally no emails are sent out. if you keep an eye on the forum a sticky thread is posted each time a new build is made available. |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Sep 27 2004 : 12:37:59 PM
|
quote: ... the .cpp file and .h files are in the same folder, but with different names.
Different names are supported in the 10.1 beta. |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Oct 01 2004 : 06:07:16 AM
|
I've just tried Alt-G on the 1270 build and has solved my problem. I no longer get taken to the prototype, but get a menu which contains the .cpp file definition.
Now, is there any way that Alt-G (Goto Implementation) could actually jump directly to the .cpp, as that's where the implementation is? That would be perfect, it's pretty good as is though. Thanks.
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Oct 01 2004 : 07:12:20 AM
|
Yes, I've argued for this before (thread 2398) and I still think it's the right thing, but the developers didn't agree. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 01 2004 : 08:07:53 AM
|
the standard answer from support is the cpp entry will always be the top item in the alt_g list, so you can simply press enter to accept this. it is good to know this, but it doesnt help much if you get a list with more than 2 entries. |
zen is the art of being at one with the two'ness |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Oct 01 2004 : 08:57:53 AM
|
Yes, it is certainly a lot better when you realise this.
There is actually one thing which would make it better for those of us who like to navigate using the mouse. I often have my right hand on the mouse, and use my left for pressing Alt-G. At the moment, the top entry is just slightly down-right of the mouse. This means that you can't just click the mouse to select the top entry -- you have to move slightly and then click. It would be nice if the top entry were actually under the mouse, then you could just Alt-G and click without having to look and think. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
jfrancis
Senior Member
39 Posts |
Posted - Oct 01 2004 : 10:24:16 AM
|
I wonder if they could make Alt-G go to the one at the top of the list if pressed when the menu of places to go is up? So two Alt-Gs would take you to the 'implementation'.
Alt-G is supposed to take you to the implementation not the declaration anyway. Couldn't there be an option that when switched on just went to wherever was on top of the option list on the first Alt-G?
|
|
|
jfrancis
Senior Member
39 Posts |
Posted - Oct 01 2004 : 11:04:01 AM
|
Another, maybe stupid, question. Why when the source that Alt-G goes to is displayed is it displayed right at the bottom of the source window. In most cases when I go to the implementation of a function I'd rather the function to start at the top of the window otherwise I have to scroll.
|
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 01 2004 : 11:04:01 AM
|
jfrancis, if i understand you, then simply press alt-g then enter |
zen is the art of being at one with the two'ness |
|
|
kevinsikes
Tomato Guru
USA
271 Posts |
Posted - Sep 09 2005 : 5:27:35 PM
|
This is still an issue in build 1418 on VC++ 6.0. I have a situation that is NOT related to the "additional include directories" bug. I have a utility.h and utility.cpp with handy functions. Foo.cpp #includes utility.h. When I goto (Alt+G) a handy function from foo.cpp, it takes me to utility.h and not to the implementation in utility.cpp! All files are in the project directory. This is becoming so irritating I have almost run out of patience. I have to manually open utility.cpp and find the function in the dropdown list. This is an incredible drain on performance, especially when I'm in crunch time trying to get a project done. What is the status of this problem? |
Kevin Sikes Infotainment Platform Design Engineer Ford Motor Company |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Sep 10 2005 : 2:05:31 PM
|
reviewing this thread, and since i do not recall any reports off hand of this for quite some time i suspect the status is "presumed fixed".
are your utility.cpp and utility.h in the same project as foo.cpp? if you open the OFIW dialog and filter on "utility" do you get both utility.h and utility.cpp?
when alt_g takes you to utility.h what happens if you press alt_o?
do you have time to create a new console application, and then add in utility.h and utility.cpp, and see what happens? if alt_g works in this case then this suggests it is something to do with the solution you are using. if it does not work then i would be interested in a copy of the solution, if possible, to test here. |
zen is the art of being at one with the two'ness |
|
|
Zteven
New Member
Netherlands
7 Posts |
Posted - Sep 14 2005 : 07:14:05 AM
|
Hi,
I have the same problem. A prototype is declared in a.h and defined in b.cpp. If I search for the function in VA View, it jumps to a.h. If I place the cursor on the name and press Alt-G, it only presents me with the prototype. Next, if I open b.cpp and go back to a.h, everything works as it should (Alt-G shows the declarations in a.h and b.cpp).
All C++ programmers that use Visual Assist at the place where I work experience the same problem. I have the 1418 build of VA X and use it with Visual Studio 6 SP6. I tried using the 'custom' directories and added all my source directories, rebuild the database and restarted, but it does not make a difference.
Bye,
Steven van Dijk |
Bye,
Steven van Dijk |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Sep 14 2005 : 3:55:07 PM
|
Zteven are you getting this with class definitions and class member functions, or with C functions and prototypes?
using VC6 and VA 1422 if i put function prototypes in the file "header.h" and the functions themselves in a file called "body.cpp", both in the same directory and included in the project i only get the .h listed on alt-g. opening either or both files makes no difference to this.
in contrast using a class in "header.h" with the class member functions in the file "body.cpp" i always get both the .h and the .cpp file on alt_g.
as a test i tried this class split test with 1418, and i only ever get the .h file.
are you in a position to try the 1422 beta of VA? if you are having this problem with classes then hopefully this will help. |
zen is the art of being at one with the two'ness |
|
|
Zteven
New Member
Netherlands
7 Posts |
Posted - Sep 15 2005 : 02:50:08 AM
|
Hi,
Build 1422 fixes the problem.
Thanks,
Steven |
Bye,
Steven van Dijk |
|
|
kevinsikes
Tomato Guru
USA
271 Posts |
Posted - Oct 04 2005 : 11:26:32 AM
|
My issue is also resolved using build 1424. Thank you for fixing this! |
Kevin Sikes Infotainment Platform Design Engineer Ford Motor Company |
|
|
|
Topic |
|