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
 Source Links
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Adequat
Tomato Guru

182 Posts

Posted - Jul 07 2017 :  02:57:17 AM  Show Profile  Reply with Quote
Thanks a lot for the new Source Links enhancements, especially the "Exe Args", that let me open any *relative* document file from a source file. That's really great :)

Now, a suggestion to make it perfect and complete:

I would like to be able to create a "link" to another source code of the project.
IOW, to manually hyperlink, as desired, by code base.

Something like: "clicking on the source link "stuff-foo" in file f1.cpp, takes me to file "f2.cpp", at line containing the token "foo".

Somehow, this is a matter of adding a source link command that is able to open another file to a specific location.

You get the idea?

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jul 07 2017 :  08:06:07 AM  Show Profile  Reply with Quote
Are you familiar with VA Hashtags? VA Hashtags are multi-way navigable. Drop #stuff-foo in two files in your project, then use alt+g to go back and forth between the two instances.

Some differences between Hashtags and Source Links are:
- Hashtags support goto (alt+g)
- by default, visually Hashtags are bold and Source Links are boxed
- Source Links execute on double-click
- Source Links support Quick Info (tooltip on mouse hover)
- Source Links can execute arbitrary commands
- Hashtags are like bookmarks

By default, hashtags don't support '-' character, but you can tell VA to honor the character as part of the hashtag via the HashtagsAllowHyphens registry value as described at https://docs.wholetomato.com/default.asp?W634

Docs for VA Hashtags are at https://docs.wholetomato.com/default.asp?W574
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jul 07 2017 :  08:10:13 AM  Show Profile  Reply with Quote
You could make hashtag navigation via mouse possible by enabling one of the mouse exec settings, assigned to goto: https://docs.wholetomato.com/default.asp?W642
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jul 07 2017 :  12:59:09 PM  Show Profile  Reply with Quote
sigh... Goto doesn't work on hashtags with hyphens. case=109520
Go to Top of Page

Adequat
Tomato Guru

182 Posts

Posted - Jul 18 2017 :  03:25:24 AM  Show Profile  Reply with Quote
I already use VA Hashtags a lot. But I use it as a "table of contents" to my code, accessible from the VA Hashtags window. Adding "hyperlinks" as requested here, would "pollute" that TOC.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Jul 18 2017 :  07:13:47 AM  Show Profile  Reply with Quote
As I understand this, to make the "stuff-foo" hashtag go to the file "stuff" you would have to add this hashtag at both ends. When you have more than one instance of a hashtag you can jump between them with alt-g. This is a standard feature of hashtags, and won't effect your usage.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jul 18 2017 :  2:54:05 PM  Show Profile  Reply with Quote
VA Hashtags was made for opening files to specific locations. Source Links was made to execute actions outside of the editor. You could try your hand at creating a Source Links plugin overriding the execute action and using it instead for editor navigation.

Start with the example plugin hosted at https://github.com/WholeTomatoSoftware/SourceLinksExamplePlugin

Alternatively, you could continue to use the toolwindow for TOC hashtags if those hashtags use a common substring (like #tocIntro #tocThing1 #tocThing2). Put the common substring (toc) in the filter and only those hashtags will appear in the toolwindow. Other hashtags used for alt+g navigation will still work; they just won't appear in the toolwindow.
Go to Top of Page

Adequat
Tomato Guru

182 Posts

Posted - Jul 24 2017 :  4:52:48 PM  Show Profile  Reply with Quote
Thanks for your suggestions. These are workaround, though. My original post is more of a suggestion _for you_ to introduce a new cool feature to VA ;)

Edited by - Adequat on Jul 24 2017 4:53:23 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Jul 25 2017 :  09:23:14 AM  Show Profile  Reply with Quote
What are you trying to achieve in your original post? What is the aim here?

If you want to jump to a specific function then you can put this function name into a comment, and then use alt-g on the function name in the comment text. This will take you to the file and place of the function.

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

Adequat
Tomato Guru

182 Posts

Posted - Aug 01 2017 :  02:52:40 AM  Show Profile  Reply with Quote
The aim is to create specific "hyperlinks" from one place to the code to another one (in comments).
This, independently from the code (I don't want to jump to some code, I want to jump from one comment to some other comment).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 01 2017 :  08:25:44 AM  Show Profile  Reply with Quote
Do you need many links all going directly to a single target, or is a "many to many" behaviour acceptable? If you can work with "many to many", which works perfectly well when there are only 2, then hashtags as they already are already give you what you want and need.

Since you want this in comments, how about making the destination link a normal hashtag, but put a space between the # and the tag name for all of the link tabs. Now to use a link you delete the space, give VA a couple of seconds to parse the change, and then you have a live and working direct link to your destination.

I realise this is not as straight forward as the direct links you are looking for here, but it does the same job, and it is available now with current functionality.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 01 2017 :  09:56:59 AM  Show Profile  Reply with Quote
Hashtags also work well with many to one. The one target is defined using normal hashtag syntax:
// #oneTarget

To jump to that target, use cross-reference syntax like:
// see:#oneTarget for an explanation
// goto:#oneTarget to see an example

If there is only one instance of the target hashtag, alt+g on any of the cross-reference instances will go directly to the target.
Go to Top of Page

Adequat
Tomato Guru

182 Posts

Posted - Aug 01 2017 :  1:36:28 PM  Show Profile  Reply with Quote
Thanks for your suggestions. This can be useful. But I would like to reiterate a previous comment:.

quote:
I already use VA Hashtags a lot. But I use it as a "table of contents" to my code, accessible from the VA Hashtags window. Adding "hyperlinks" as requested here, would "pollute" that TOC.


I will describe my request in another way. You certain know doxygen, the documentation tool. Then imagine a way to jump from doxygen topic to topic, within the IDE.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Aug 01 2017 :  2:39:43 PM  Show Profile  Reply with Quote
If you use a "hyperlink hashtag", so the comments:

// #foo - my important destination

// goto:#foo - a link to the important destination

this will add "foo" to the VA Hashtags window by default, but you can simply right click on this entry and select "Hide Tag Foo". It will then be removed from your TOC, so it won't be an issue, but it will still work as before.

Or you could tell VA Hashtags window to show the hidden items dimmed, so they are still listed for reference, but are less obvious. The hidden items are remembered next time you reload the solution, so there is no need to keep on hiding these "hyperlink" tags, so they won't have any effect on your current usage of VA Hashtags.

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