Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Source Links

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 - Jul 07 2017 : 02:57:17 AM
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?

13   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 01 2017 : 2:39:43 PM
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.
Adequat Posted - Aug 01 2017 : 1:36:28 PM
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.
sean Posted - Aug 01 2017 : 09:56:59 AM
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.
feline Posted - Aug 01 2017 : 08:25:44 AM
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.
Adequat Posted - Aug 01 2017 : 02:52:40 AM
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).
feline Posted - Jul 25 2017 : 09:23:14 AM
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.
Adequat Posted - Jul 24 2017 : 4:52:48 PM
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 ;)
sean Posted - Jul 18 2017 : 2:54:05 PM
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.
feline Posted - Jul 18 2017 : 07:13:47 AM
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.
Adequat Posted - Jul 18 2017 : 03:25:24 AM
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.
sean Posted - Jul 07 2017 : 12:59:09 PM
sigh... Goto doesn't work on hashtags with hyphens. case=109520
sean Posted - Jul 07 2017 : 08:10:13 AM
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
sean Posted - Jul 07 2017 : 08:06:07 AM
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

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