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

Adequat
Tomato Guru

182 Posts

Posted - Jun 28 2019 :  03:43:12 AM  Show Profile  Reply with Quote
I have recently introduced a simple comment convention, that could be useful for anyone, and that would be even more useful with VA support.

Let me explain: I have a large code base, and some parts are inter-related, which causes some complexity.
This is a common scenario I guess...

My system is simply to use UUIDs in comments, to create easy-to-find references by searching code.

Something like:

Somewhere:

// 7e0d25c5-1f71-45b8-480e-69d67c97521c
// some explanation (...)

Somewhere else:

// 7e0d25c5-1f71-45b8-480e-69d67c97521c
// some complementary explanation (...)

Still somewhere else:

// 7e0d25c5-1f71-45b8-480e-69d67c97521c
// some other complementary explanation (...)

Now, I just have to search my whole code base to find the related comments, hence the inter-related code sections.
Simple and effective. Creating new UUIDs is easy, they just serve as stable anchors in comments.

If VA could identify UUIDs and add them to its symbol database, then the workflow would be better
(eg. "Find References" and "Goto Related").

This is my request :)

(independently from this comment system, referencing UUIDs anywhere in a code base, could be useful anyway).


tony.riviere
Ketchup Master

France
57 Posts

Posted - Jun 28 2019 :  08:11:47 AM  Show Profile  Reply with Quote
An alternative would be to use VA Hashtag feature?
It supports "Goto related" and they are all referenced in the same window.
Go to Top of Page

Adequat
Tomato Guru

182 Posts

Posted - Jun 28 2019 :  2:23:49 PM  Show Profile  Reply with Quote
VA hashtag are nice, but I use them sparingly, to reference special code sections.

Using VA hashtags for my comment system:
* Requires to find a unique name each time (and verify it is unique), which is a bit cumbersome, compared to pasting a UUID
* does not have the "Find Reference" feature, which is more practical than browsing the VA hashtag Window, to browse references.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 29 2019 :  01:30:46 AM  Show Profile  Reply with Quote
If you change - to _, you can just put a # before your UUIDs and what you want will immediately happen. I tried it

I think it would be easy to write a regular expression to replace them all to the new format, including even the hasmark before them!
Go to Top of Page

Adequat
Tomato Guru

182 Posts

Posted - Jun 29 2019 :  01:49:26 AM  Show Profile  Reply with Quote
Interesting, thanks for the trick :)
But I would then request one feature about VA hashtag, something like: right click on a hashtag in a source file, and have an option "show in VA hashtag window"
And also have the "Find References" work for hashtags...
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jul 01 2019 :  09:32:55 AM  Show Profile  Reply with Quote
Are you aware of the shortcut alt+shift+h? It will open (or activate) the hashtags window with the focus being inside its editbox. From here, you can simple paste the symbol from the clipboard, providing that you previously copied it (before opening the hashtags window.) This is not the same what you want but something to work with.

Regarding find references: are you aware that you can open the nodes in hashtag window, getting a list of places where a hashtag is located? It's very similar to how find references window works, including the ability to press F8 to step through the "references" for the hashtag.
Go to Top of Page

tony.riviere
Ketchup Master

France
57 Posts

Posted - Jul 02 2019 :  03:40:36 AM  Show Profile  Reply with Quote
If you use the "VAssistX.GotoRelated" shortcut on a VAHashtag in the text editor then you will have the list of all locations when the hashtag is present as a contextual menu.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 07 2020 :  1:16:22 PM  Show Profile  Reply with Quote
Just for reference: you can configure VA to allow hyphens in hashtags:
https://docs.wholetomato.com/default.asp?W574#hyphen
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