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
 Feature Requests
 Contructor direct jump
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Adequat
Tomato Guru

182 Posts

Posted - Jun 29 2009 :  12:39:26 PM  Show Profile  Reply with Quote
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.

khb
Tomato Guru

Germany
337 Posts

Posted - Jun 30 2009 :  08:06:55 AM  Show Profile  Reply with Quote
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
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 02 2009 :  5:29:32 PM  Show Profile  Reply with Quote
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.

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

Adequat
Tomato Guru

182 Posts

Posted - Jul 12 2012 :  08:47:59 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 12 2012 :  4:40:19 PM  Show Profile  Reply with Quote
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.

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

Adequat
Tomato Guru

182 Posts

Posted - Jul 13 2012 :  01:58:35 AM  Show Profile  Reply with Quote
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."
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 13 2012 :  11:09:19 PM  Show Profile  Reply with Quote
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?

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

Adequat
Tomato Guru

182 Posts

Posted - Jul 14 2012 :  01:20:17 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 14 2012 :  12:21:45 PM  Show Profile  Reply with Quote
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?

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

Adequat
Tomato Guru

182 Posts

Posted - Jul 14 2012 :  5:27:11 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 14 2012 :  6:52:18 PM  Show Profile  Reply with Quote
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?

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

Adequat
Tomato Guru

182 Posts

Posted - Jul 16 2012 :  06:43:31 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 16 2012 :  10:11:39 AM  Show Profile  Reply with Quote
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.

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

Adequat
Tomato Guru

182 Posts

Posted - Jul 16 2012 :  2:18:57 PM  Show Profile  Reply with Quote
Your parser is working somehow, as the VA function "GotoImplementation" (Alt+G) works in all cases.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 16 2012 :  4:41:49 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
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