Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Goto Implementation not working for MFC

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
Holger Gothan Posted - Nov 27 2018 : 02:54:45 AM
I use visual assist built 2018.1002
I use VS 15.9.2

Alt+G works fine with my own source but not with MFC classes.
Also "toggle header/source" ist not working.

It may be some Problem with mfc pdb?
(Step into seems also broken for MFC functions)


24   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 18 2018 : 12:57:29 PM
Honestly, I have no idea why this happened then. The only thing I can think is that somehow Alt-G was not triggering VA's Goto command at all, and that the IDE restart helped to make sure VA was fully active again. But this is just a wild guess, and doesn't make much sense.

Hopefully this was a one off problem and won't happen again.
Holger Gothan Posted - Dec 18 2018 : 07:12:31 AM
It is turned on
feline Posted - Dec 18 2018 : 06:50:24 AM
That is very strange, and is not what I would expect at all.

Can you look and see if you have:

VA Options -> Performance -> Parse all files when opening a project

turned On or Off?
Holger Gothan Posted - Dec 17 2018 : 09:21:22 AM
Yes, it happened this time inside my own solution.
(But I didn't check some MFC sample.)
feline Posted - Dec 17 2018 : 07:21:36 AM
Can I just double check, when you say "Alt+G didn't jump to my implementations/headers" do you mean jumping inside your solution? Or jumping inside the MFC library? It sounds like jumping inside your solution.

I can sort of understand how an IDE update would upset jumping inside the MFC library, but it should not have any effect inside your solution. I am glad this now fixed, but I am not sure why you had this problem.
Holger Gothan Posted - Dec 17 2018 : 04:24:42 AM
After update VS 15.9.3->15.9.4 Alt+G not working again.
This time: Alt+G didn't jump to my implementations/headers.
VA Options/Performance/Rebuild did the trick again.

feline Posted - Dec 05 2018 : 08:26:46 AM
If you open 2 instances of the IDE, VA will build 2 symbol databases, one per instance. So both will need to be rebuilt. But once they have been rebuilt, the changes should stay, and the problem should be fixed.
Holger Gothan Posted - Dec 05 2018 : 03:46:58 AM
yes, for the test solution I did open parallel VS.
ok, that might have caused the problem
feline Posted - Dec 04 2018 : 10:38:34 AM
Odd. Are you working with more than once instance of the IDE open at the same time?

At least this is fixing the problem for you, that is what matters.
Holger Gothan Posted - Dec 04 2018 : 07:42:50 AM
That's not what I observed:
The test solution opened, "VA/Performance/Rebuild", Close VS, Start VS, test solution opened -> Alt+G working
Test solution closed, opened my real solution, Alt+G still not working
"VA/Performance/Rebuild", Close VS, Start VS, my solution opened -> Alt+G working
But it's still a "solution" even if I have to do it for each solution I use.
feline Posted - Dec 04 2018 : 06:29:53 AM
Thank you for the update, I am glad you have found a solution. So long as you close the IDE after pressing the Rebuild button, this should do a rebuild for all of your solutions, but yes, you will need to open each solution for the rebuild to happen for the solution.
Holger Gothan Posted - Dec 04 2018 : 03:27:39 AM
it's been the same behavoir.
But I found the solution
VA Options/Performance/Rebuild
Restart VS
now is Alt+G working and Shift+Alt+S shows 44

btw: the pasring seems to be per solution, so I have to open every solution and restart the parsing
feline Posted - Dec 03 2018 : 2:44:33 PM
Can you please make a new, default C++ MFC solution, and try the same test there? I am wondering if somehow this is a solution specific effect. I don't see why you should have a different number here, but it does sort of make sense, given what you are seeing with Alt-g.
Holger Gothan Posted - Dec 03 2018 : 06:00:31 AM
I'm seeing only 42
feline Posted - Nov 30 2018 : 09:31:45 AM
Strange. Can you please show the VA Find Symbol dialog, Alt-Shift-S, and filter this with the string "CMFCImageEditorDialog"

Make sure you turn Off both:

Find Symbol dialog -> Show only symbols defined in current solution
Find Symbol dialog -> Only classes, structs & namespaces

how many results are listed? This is the first number in the title bar. I am seeing 44 results here.
Holger Gothan Posted - Nov 29 2018 : 02:47:54 AM
It's the same:
From constructor in Header Alt+G not working,
Alt+O opens source, from constructor in source Alt+G jumps to constructor in Header
But Alt+G jumps not back.
feline Posted - Nov 28 2018 : 4:35:21 PM
This is strange.

After you have opened the cpp file, and used Alt-G to jump back to the header file, does Alt-G on the constructor now work? If for some reason VA had not parsed the cpp file before hand, it will have parsed it when you opened it. So this may have fixed Alt-G from the header file to the cpp file.
Holger Gothan Posted - Nov 28 2018 : 11:08:56 AM
After Alt+O:
line 28 is CMFCImageEditorDialog::CMFCImageEditorDialog
sitting in the first part, Alt+G goes to header: class CMFCImageEditorDialog ...
sitting in the second part, Alt+G goes to constructor
both aa expected
Holger Gothan Posted - Nov 28 2018 : 11:06:01 AM
Yes, Alt+O is now working as expected.

But Alt+G still not.
Same as you've done:
Starting out, I am sitting in the file:
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include\afximageeditordialog.h
which contains the definition for the class "CMFCImageEditorDialog".
Line 49 declares the constructor.
Pressing Alt-G here does nothing for me.

Alt+O shows as expected
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\src\mfc\afximageeditordialog.cpp
feline Posted - Nov 28 2018 : 08:09:36 AM
For Alt-O, jumping between matching cpp and header files, now you are using VA's command, is this working again as expected?

For Alt-G, this is working for me. Starting out, I am sitting in the file:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include\afximageeditordialog.h

which contains the definition for the class "CMFCImageEditorDialog". Line 49 declares the constructor. Pressing Alt-G here takes me to the constructor body, which is the file:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\src\mfc\afximageeditordialog.cpp

Sitting in the header file "afximageeditordialog.h" what happens if you press Alt-O? If nothing happens, please try the menu command:

VAssistX -> Open Corresponding File (h/cpp, aspx/cs)

does this make any difference?

Assuming you can get to the cpp file, if you sit on the constructor implementation, line 32, what happens when you use Alt-G on the constructor implementation?
Holger Gothan Posted - Nov 28 2018 : 02:58:55 AM
Ok, for toogle I used EditorContextMenus.CodeWindow.ToggleHeaderCodeFile instead VAssistX.OpenCorrespondingFile. I'm not shure when this configuration changed.

But Alt+G still works not properly.
When in one of my files
class CMy : public CMFCToolBarImages
Cursor in CMFCToolBarImages, Alt+G, VA jumps to
class CMFCToolBarImages : public CObject -> ok
I place Cursor on CMFCToolBarImages();
Alt+G -> popup with both implementations Shows up -> ok
In afxtoolbarimages.h there is
friend class CMFCImageEditorDialog;
I place the Cursor in CMFCImageEditorDialog,
Alt+G -> VA jumps to
class CMFCImageEditorDialog : public CDialogEx -> OK
I place the Cursor in constructor,
Alt+G -> nothing happens




feline Posted - Nov 27 2018 : 12:10:12 PM
Using VS2017 and VA I have created a new, default MFC solution. In the "ChildFrm.h" file I have the class:

class CChildFrame : public CMDIChildWndEx

when I place the caret into "CMDIChildWndEx" and press Alt-G VA takes me to the file:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\include\afxmdichildwndex.h

when I now press Alt-O to jump to the matching file, I am taken to the file:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\src\mfc\afxmdichildwndex.cpp

Are you only seeing problems with Alt-O inside MFC, or are you also seeing problems inside your solution?

There may not always be a matching file in MFC, so I am wondering if Alt-O will work for you in either of these two MFC files. Also, does Alt-O work correctly in your solution, where you do have matching cpp and .h files?
Holger Gothan Posted - Nov 27 2018 : 08:53:01 AM
For toggle I use Keyboard-command.
MFC has not Header and source in same Directory:
Includes are mostly in �\atlmfc\include
Source in
�\atlmfc\src\atl
�\atlmfc\src\mfc
�\atlmfc\src\mfcm


My Systeminfo:
VA_X.dll file version 10.9.2291.5 built 2018.10.02
DevEnv.exe version 15.9.28307.108 Professional
msenv.dll version 15.0.28302.56
Comctl32.dll version 6.10.17134.407
Windows 10 10.0 1803 Build 17134.407
24 processors (x86-64, WOW64)
Language info: 1252, 0x407

Platform: Project defined
Stable Includes:
E:\Projekte\OpenSSL\include;
D:\Programme\BCGSoft\BCGSuite for MFC\BCGSuite;
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\winrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\VS\UnitTest\include;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\VS\include;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\include;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\include;
E:\OpenSSL\include;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include;
E:\Teigha\Include;
E:\Teigha\Kernel\Include;
E:\Teigha\Drawing\Include;
E:\Teigha\Visualize\Include;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\winrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;
C:\Program Files (x86)\Windows Kits\10\include;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\atlmfc\include;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\include;
E:\Projekte\MF_Rimage\RimageAPI\rapid;
E:\OpenCV\Include\opencv;
E:\OpenCV\Include;

Other Includes:

Stable Source Directories:
C:\Program Files (x86)\Windows Kits\10\Source\10.0.15063.0\ucrt;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\VS\src;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\crt\src;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\src\atl;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\src\mfcm;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\atlmfc\src\mfc;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\crt\src;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\src\atl;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\src\mfcm;
D:\Programme\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\src\mfc;
C:\Program Files (x86)\Windows Kits\10\Source\10.0.16299.0\ucrt;

feline Posted - Nov 27 2018 : 08:18:11 AM
Can you please go to:

VA Options -> System Info -> Copy Info

and paste the details (from the clipboard) into your reply. This will give us the basic information about your setup. I am interested in your include directories, since if these have been changed this may be why VA does not know about MFC classes.

For toggle header / source files, do the files you are trying to jump between have the same filename before the dot? Are the files in the same directory? Are the files both part of the solution?

This should be a simple and reliable command, so I am wondering if there is something odd going on here.

Also, how are you triggering the toggle command? Keyboard shortcut? Menu command? Toolbar button?

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