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
 'find tags' method?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Nov 09 2006 :  04:48:04 AM  Show Profile  Reply with Quote
In reference to what I said in http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5593 I would like to suggest a feature that maybe leaves the scope VAX is aiming at.

What I'm looking for is a method to locate certain 'tags' I've put into my code for different purposes. One purpose could be just a reminder to work on a particular piece of code (TODO tag), another could be some kind of comment extraction to provide a basis for a software documentation. The features such a method should supply to be helpful for me would be

  • arguments: should take the tag under the cursor starting with some kind of special character (i.e. '/' or '.') and locate comment lines containing this tag

  • scope: at least project, maybe solution

  • result: list of entries containing the location and any text following the tags found

  • usability: double-click on items in the list to move to the file and position found

  • usability: resulting list or parts of it can be copied into the clipboard



At first sight this looks like a minor extension to the already existing 'find references' function, so it might not be that hard to implement. Or is it?

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 09 2006 :  11:49:41 AM  Show Profile  Reply with Quote
The main objection to using Find References is that you are now searching comments, which could have side effects. Also Find References needs some understanding of the code, while you are simply after a straight search of the files.

Reading your description, it sounds like you are describing "select some text and press CTRL-SHIFT-F", which is the IDE's find in files feature The real trick here is making sure that your selected tags are in a standard format and are fairly unique. Have you considered using autotext to allow you to quickly and easily insert the "leading comment" part, perhaps something like:

/// triggers //**TODO** $end$

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Nov 10 2006 :  03:08:34 AM  Show Profile  Reply with Quote
Erm... never mind, I'm just being stupid. While find in files is nowhere near the ease of use VAX functions are it should do the job just fine. Should've thought of that myself...
Go to Top of Page

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Nov 10 2006 :  04:25:58 AM  Show Profile  Reply with Quote
maybe it would be a good idea for find reference to put keyword found within comments in a separate section (for example, 'comment' subtree which would be collapsed by default)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 10 2006 :  09:01:00 AM  Show Profile  Reply with Quote
It is an interesting idea, but what scope should be searched? If you use Find References on a local variable then VA understands the scope to check, but what if there are two comments you want to update, one inside this scope and one outside of it?

Find References looking inside comments or strings quickly runs into some "interesting" problems *sigh*

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

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Nov 10 2006 :  09:18:04 AM  Show Profile  Reply with Quote
>It is an interesting idea, but what scope should be searched? If
>you use Find References on a local variable then VA understands the
>scope to check, but what if there are two comments you want to
>update, one inside this scope and one outside of it?

Two options might be:
- all files
- all files in which at least one reference is found


>Find References looking inside comments or strings quickly runs
>into some "interesting" problems *sigh*

That's obvious, but, at least there would be an opportunity to see/change then when doing rename/findref. As I said, such section would be collapsed by default and unchecked in rename dialog to be least intrusive as possible if not used.

Personally, I don't use rename, but, I would consider it useful in findref.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 10 2006 :  12:13:58 PM  Show Profile  Reply with Quote
I have put in a feature request to see what the developers think of this. I am not quite sure what they will make of it to be honest I see the appeal, but I also see certain problems. Imagine searching for the variable:

std::vector::iterator it;


"it" tends to be a rather common word in English comments. The more unique the word you search for, the more accurate the results will be.

case=3565

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