Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Contructor direct jump

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
Adequat Posted - Jun 29 2009 : 12:39:26 PM
Wish for a shortcut to list (and jump to) all the constuctors of a given class (depends on the context, eg. method, pointer to object...).

I frequently navigate to the constructors, to verify if/how a member is initialized. This could be made more performant.

Obviously, "initialization" is a core concept of programming, hence any shortcut to navigate directly to where this happens would be productive.

14   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jul 16 2012 : 4:41:49 PM
Interesting, and a little unexpected. Normally parser problems are fairly "complete". Hopefully when you are able to pin down an example of this problem, a few clues will start to appear.
Adequat Posted - Jul 16 2012 : 2:18:57 PM
Your parser is working somehow, as the VA function "GotoImplementation" (Alt+G) works in all cases.

feline Posted - Jul 16 2012 : 10:11:39 AM
At least we now know this is not a project specific effect, which is progress. When you find one of the cpp files that shows this effect, can you please see if the constructor implementation is shown in the Alt-M list, and also is it shown in VA Outline?

If this is caused by a parser bug, by our parser having problems finding the implementation then it should effect one, or both of these places as well.
Adequat Posted - Jul 16 2012 : 06:43:31 AM
Your files inside my project work as expected.
When I find the time, I will have to find and isolate a pair of files that fail. I couldn't figure a pattern so far.
BTW, I also tried a "rebuild all symbols", and my Windows installation is brand new.
feline Posted - Jul 14 2012 : 6:52:18 PM
Can you please try adding the two "hcb_jump_test" code files from my test project to your main project, or to the third party project where you see this problem?

After doing so, or just copy / pasting the code from my sample project into your main project, what happens?

I am trying to work out if the problem is something about the way your project is structured, or if it is code file specific.

If these sample code files still work correctly, can you please try copying a .h and .cpp file pair, that show the problem, from your main project into the sample test project, and see if you can still see the problem there?
Adequat Posted - Jul 14 2012 : 5:27:11 PM
Your test project works for me as you describe. I tested other third party projects, from the VC distribution. They also work. But I confirm the problem on my project, and also on a third party project.
feline Posted - Jul 14 2012 : 12:21:45 PM
I have created a very simple VS2010 test project, to test jumping to the constructor from the HCB, which I have uploaded here:

http://forum.wholetomato.com/colin/forumimages/topic_8836_cpp_hcb_constructor_jump_test.zip

can you please download and open this solution on your system. At the bottom of the file "hcb_jump_test.cpp" there is a function using the class "testingConstructorViaHcb", to test hovering the mouse over a function call on the class.

For me, double clicking on either constructor in the HCB always goes directly to the implementation, in the cpp file. The only time double clicking in the HCB takes me to the header file is when the declaration is in the header file, or when there is no declaration.

What results are you seeing on your system with this test project?
Adequat Posted - Jul 14 2012 : 01:20:17 AM
The problem happens on all classes (well, I tried a wide variety of classes in my project). Not that destructors don't have this problem, only constructors.

I work with VS 2010 SP1.
feline Posted - Jul 13 2012 : 11:09:19 PM
I don't dispute that initialization is a core concept, but it is one of several core concepts. Your experiences with the HCB are concerning me. Since double clicking for a constructor goes to the declaration, and not the implementation, this suggests that VA cannot find the definition of these constructors.

Do you see this problem with all classes, or only some?

Which IDE are you working with?
Adequat Posted - Jul 13 2012 : 01:58:35 AM
I know, but this feature does not work properly for me:

1) For some reasons, double-clicking on a constructor entry jumps to its declaration, and not to its definition (unlike other member functions). And the menu "Jump to definition" has the same effect as "Jump to declaration", hence useless.

2) To be effective, and as an exception, the constructors should be listed at the top of the list, and not in alphabetical orders (again, a constructor is a special function, usually the most often accessed function in a class, and deserves special treatment).

3) Finally, the Hovering feature is not very reactive, which I can understand as my project is huge. Also, but we can't help it by principle, I find it a bit disturbing for the eyes and concentration, to have this view changing all the time.

BTW, while reviewing this VA feature, I found that the option "Update on position change" is not described in your documentation (http://www.wholetomato.com/products/features/hcb.asp)

To sum up, we are very far from the productivity shortcut I am originally requesting... ;-)

Let me repeat an important sentence of my original post:
"initialization is a core concept of programming, hence any shortcut to navigate directly to where this happens would be productive."
feline Posted - Jul 12 2012 : 4:40:19 PM
Are you familiar with the Hovering Class Browser, the bottom half of VA View?

http://www.wholetomato.com/products/features/hcb.asp

By hovering the mouse over a class or instance of the class, you can see the class members, and jump to which ever constructor, or other member, you want by double clicking on it.
Adequat Posted - Jul 12 2012 : 08:47:59 AM
I reiterate this old wish: after years of using your wonderful product, the one missing feature that comes back very regularly to mind, is a shortcut to jump directly to a class's constructor. If there are several available constructors, no problem, show a popup listing them all.
feline Posted - Jul 02 2009 : 5:29:32 PM
At a basic level Find References on the class name should help here. I know this gives you things besides the constructors, but you can then use Find inside the Find References Results list to jump to specific items of interest.

khb this is something we are working towards. Currently VA does not distinguish between overloads of the same function, but we have a long term goal of fixing this. Until this is done we won't be able to think about listing all instances of a specific overloaded constructor.
khb Posted - Jun 30 2009 : 08:06:55 AM
This reminds me that I often want to have it the other way round: I view the definition of a constructor and what to find all references to it. If this would also be possible it would be really helpful.

Regards
Marcus

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