Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Go to Type Declaration directly?

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
tandr Posted - Sep 01 2009 : 11:12:49 AM
Quite often if I am sitting on the piece of code that operates on struct or class members, I need to check "what else is there" in that struct, or (most common for me) to go to definition of operator= which is not handled by VAX yet (if ever be...).

To get to the definition of the struct I do double (or triple, in case of operator=) Alt-G -- first to jump to the current variable definition, then I move cursor to the type of the variable, and do Alt-G again to see the type definition.

I am not sure if there is a one-jump shortcut for the cases like these
where I can jump to the type declaration, not the variable declaration?

Worst case scenario example (C++, might be not compilable)

struct A {
int i_; float f_;
A& operator=(const A& that);
};

A& A::operator=(const A& that)
{
i_ = that.i_;
f_ = that.f_;
return *this;
}


class C {
A aa_;
void func(const A& that)
{
aa_ =| that;
}
};

So, in the example above, I need to move cursor to aa_, then Alt-G, then move cursor to A, then Alt-G again, then go to operator=, and Alt-G again. If at least I would be able to just to "struct A" place directly from aa_, it would be great feature :)

Thank you very much,
t.

PS. I am currently using VAX 1731 on VS2008

7   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Sep 02 2009 : 12:01:09 PM
They are both good ideas and aren't mutually exclusive.
znakeeye Posted - Sep 02 2009 : 06:59:13 AM
I have pinpointed this at least twice before (see http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6703).

The solution is so simple:
Always put the cursor at an identifier, NOT at the beginning of the line.

Why? This makes it possible for "incremental" Alt+G functionality:
CMyClass myClass;
myClass| = foo;
Alt+G jumps to variable above, producing this:
CMyClass myClass|;
myClass = foo;
Alt+G jumps to type, producing this:
CMyClass| myClass;
myClass = foo;
Alt+G jumps to implementation, producing this:
class CMyClass|

I really cannot understand why you did not implement it like this from the beginning. It's 100% intuitive.
sean Posted - Sep 01 2009 : 8:36:17 PM
thanks for input.
tandr Posted - Sep 01 2009 : 5:02:31 PM
quote:
Originally posted by sean

As an independent command, does the command do nothing if not invoked on an instance of a variable?



if this thing is not something that has type and storage, then yes, it should do nothing (imho). Well, it is probably should apply to "int aa" cases as well -- do not jump to definition of "int" or "void" (in case of "void* p" ). In these cases I would love to see tooltip popping up with definition of that variable or message "inti is not declared" so at least I would know why it did not jump there. OTOH, it it did not jump on Alt-@ to the type definition, then I probably will try Alt-G immediately anyway, so tooltip is really optional :)

tandr

PS. Alt-@ is a placeholder for whatever shortcut it is going to be.
sean Posted - Sep 01 2009 : 4:18:23 PM
As an independent command, does the command do nothing if not invoked on an instance of a variable?
tandr Posted - Sep 01 2009 : 12:45:51 PM
quote:
Originally posted by sean

We are looking into doing this. case=9113

There are two options for starting this:
- make it a separate bindable command
or
- append the additional location to the current goto menu (similar to how alt+g on a function gives you two choices) (optionally so that the old alt+g behavior can be retained)


I think this would only apply to alt+g when invoked on variables...

any thoughts?



Make both available - as option on Go-To suggestion box and as separate shortcut?

I can see some people would prefer Alt-G having Type info appended, and once they will get used to it, they will search for shorter shortcut (Alt-T? Shift-Alt-G?) . For heavy users they might find it annoying a bit, so to have option "Show Type in go-to suggestion box" would be welcomed.
sean Posted - Sep 01 2009 : 12:34:16 PM
We are looking into doing this. case=9113

There are two options for starting this:
- make it a separate bindable command
or
- append the additional location to the current goto menu (similar to how alt+g on a function gives you two choices) (optionally so that the old alt+g behavior can be retained)


I think this would only apply to alt+g when invoked on variables...

any thoughts?

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