Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Named file lists

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
gosh Posted - Oct 25 2007 : 05:23:48 AM
Is there any way to define lists of files connected to a project today?

What I would like to have:
When I work with different projects there are often X number of specific files used in different tasks.
- If you have different languages and add/change the name of a string, you need to change in X number of other files.
- Working with X needs those five files to be modified.

Now you need to open each file by remembering all files that take part of that specific functionality, it takes time to search for all files and open them. Also if you start debugging many more files will be opened and the workspace is messed up by a lot of files that isnG??t important for the specific task.

What I would like to have is some way to define different lists of files that can be activated based on the task that should be done. If it is possible to name each list and also set a longer description for that list it would be great. I would like to connect these lists of files to projects but files in the list could be any file on the computer or the network.
Files in a activated list of files should be visible in a docked window, clicking on a file there should open that file, also it should be possible to close all files that donG??t match files in the activated list.

Creating a list of files should be simple, one way could be "add all currently opened files in the workspace to a new list that will be named: ...."
12   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 26 2007 : 2:16:03 PM
This is so sensible I have added this to the FAQ:

http://docs.wholetomato.com?W189
sean Posted - Oct 26 2007 : 1:19:57 PM
It wasn't obvious until you made your post!

In my examples I put comments after the tags, but the macro could be changed so that you do this instead:
#define VA_TODO_TAG(str)


VA_MARKER_TAG("helpful string");
VA_TODO_TAG("this needs more work");
feline Posted - Oct 26 2007 : 12:59:38 PM
That's obvious now you point it out, and so much nicer than my version
sean Posted - Oct 26 2007 : 11:15:28 AM
hmm - going on with the marker - try this:

put these definitions in a header file:
#define VA_MARKER_TAG
#define VA_TODO_TAG
#define VA_FIXTHIS_TAG


use them in source like this:

VA_MARKER_TAG;
void FooBar()
{
}

VA_FIXTHIS_TAG; // this needs to be fixed - it won't compile
void BarFoo()
{
return 0;
}

VA_TODO_TAG; // write the body for this
void Baz();


Now you can do find refs for each marker type independently.
feline Posted - Oct 26 2007 : 09:51:45 AM
As rhummer says, for Find References Results, use the clone button on the toolbar.

Next time you run Find References the "master" list will be replaced, but all of your cloned lists remain untouched. You can refresh the cloned lists, which helps to keep them up to date as well.

I have put in a feature request for a form of Find References that searches comments for "tags", this seems a very sensible idea, and on paper it is quite easy - famous last words

case=9563

*considers* actually you can do this now, you just need to insert a marker that VA will search for with Find References, that does not effect how the code works. Consider the "marker"

#ifdef VA_MARKER_FOR_FIND_REFERENCES_ONLY
int TODO;
#endif // VA_MARKER_FOR_FIND_REFERENCES_ONLY


Now I know this is seriously "ugly", but it does serve the purpose. Since it is code VA will find it, but since it is stripped out by the pre-processor it is "safe", well it should be safe 99% of the time.


The task file, I am considering your comment that it can be shared between developers. I am not sure I really understand what you are thinking of here, but at a very basic level I am wondering if a "persistent" Find References Results list would help.

If it was possible to save and load a Find References Results list to a file, and refresh it after it had been loaded, then this would allow you to share the list between developers, by simply saving the list to an agreed common network share. This bypasses any need for VA to start providing a central network server just for a "simple text file".

If this Find References Results list is for comment "tags" instead of functions then it lets you find the marked code.

Inserting the markers is easy, this is something VA snippets are ideally suited to.
rhummer Posted - Oct 26 2007 : 09:12:54 AM
If you are using the new betas, there is a clone button on the Find References tool bar, that will create a new window with those references, so you are free to run Find References again.
sl@sh Posted - Oct 26 2007 : 04:27:09 AM
Thanks for all the suggestions.

@task list feature: I tried using it, but since it requires building the solution to update, it's not very practical at all! For example if you change function signatures and in doing this cause fatal compilation errors within a file that is calling it, the task list will be partially destroyed until you fix the code to a point where it at least compiles again! Also it's not very handy to have a mixed list of compiler and linker messages with your todo list when the latter is already long and hard to search! (yes I know I can sort that list, but it's still annoying!)

@dpack: thanks for the link, I'll check it out.

@using breakpoints as bookmarks: interesting idea, but unfortunately this approach will interfere with my debugging analysis of existing code: I am constantly enabling and disabling breakpoints at certain positions to make sure I can check every conceivable call path for a specific function. It won't work.

@how simple can we make this (building it into VAX): as I said, the simple solution would be a function similar to "Find Symbol", but looking for comment tags. Or just an option added to "Find Symbol" that makes it check comments as well as real code.

The more elegant solution would be a "Task File" that VAX would need to create and maintain. This would require a set of new functions, and I am sure quite a lot of work to implement. However, the more I think about the "Task File" concept, the more I am convinced there is a host of new functionality that could be tied to such a task-oriented file some time in the future! For example it could be tied to issue trackers, include links to the description of the task at hand, help coordinate a team of developers working on the same task, etc..

I agree there's a lot to consider, and the "Task File" concept is not going to be implemented for months to come - but please consider it's long term value! The effort might well be worth it in the long run.

P.S. @sean: How can I use multiple Find References windows? My results always show up in the same window. Apart from that, I cannot simulate bookmarks by looking for active code! That's why I am using comment tags at the moment.

P.P.S.: I just checked the dpack bookmark feature description and realized it's not even close to what I need! There's only 10 global bookmarks, and IME I often end up with 50+ open files that are more or less involved in the task at hand! That doesn't neccessarily mean I need to change every single one of those files, but sometimes I do, and even if I don't I crave for a means to revisit all those files to see if the concept I am about to implement would work everywhere as intended!
sean Posted - Oct 25 2007 : 12:52:56 PM
Another option is to use multiple find references windows - though unfortunately, the results aren't persistent. You can delete items from the results leaving only items that are of interest. Navigation works for the last results window to have received focus (F8 and shift+F8) - the results are navigation-wise independent.
feline Posted - Oct 25 2007 : 12:40:57 PM
sl@sh your description makes a lot of sense to me, and I have often found myself in a similar situation. There is a lot to consider and think about here. Part of the question is "how simple can we make this?" A big complex feature is less likely to make it into VA quickly, and is less likely to be used by most of our customers.

Being able to use Find References to pick up specific triggers in comments is appealing, since this builds on existing features. It does require adding the comments, a clear down side, but it might be a good compromise approach.

Have you used the task list feature in VS2003? See:

IDE Options -> Environment -> Task List -> Comment Tokens

I have tried this myself, when I want to keep track of places in a file, but due to various problems I had with it I never used it much. Plus it uses comments, so we are back to modifying the code.

I bookmarked this extension since it sounds like it offers some interesting enhancements to IDE bookmarks, but I have never used it, so I don't know how it works in reality. Might be worth a try though:

http://www.usysware.com/dpack/Bookmarks.aspx

Something I ended up doing was adding breakpoints, disabling them, and then using the IDE's breakpoints window (IDE Debug menu -> Windows -> Breakpoints) to jump around the code.
rhummer Posted - Oct 25 2007 : 10:17:38 AM
Bookmarks work fine across files, projects in VS2005 btw. I use them all the time, though there is an issue with phantom bookmarks, which they are not properly cleaned up.
sl@sh Posted - Oct 25 2007 : 09:04:50 AM
A very good suggestion, I second this. I will even give an example of a problem I am currently faced with:

I am trying to refactor parts of existing code that is mostly not object oriented. Before I even can think of trying to start the refactoring, I need to analyze those parts of the existing code that are involved. Either I do a series of "Find Symbols" to see where specific functions are being called and what the various contexts can be, or I just start the debugger and step through code to see what functions are being called in what order.

While doing the analysis I often get insights into small things I need to change at various locations of the code - but I dare not simply start doing the change, because I first want to make sure I get the whole picture. So I tried bookmarks - but unfortunately these don't work the way I would like: navigating by bookmarks only works within a single file, not within a project - let alone a solution! (I'm talking of VS 2003, I don't know if VS 2005 or 2008 implemented bookmarks that actually work in a useful way). I now insert small bits of comments, starting with certain tags that I can search for later. Often messy, but it does what I need it to (mostly). Searching however is only possible using the built-in Find In Files functionality, with all it's restrictions. VAX "Find Symbol" doesn't work on comment tags, unfortunately.

What I would appreciate is a way to somehow bookmark code passages within files that are distributed over a solution or even without one. And a means to view a list of these bookmarks similar to the current "Find Symbol" window, that primarily shows the passage (with context when hovering over it), and secondarily lets one jump to those passages.

One method, obviously, would just be to introduce a "Find Tag" function, that basically works like "Find Symbol", but works on comment tags, maybe with the restriction these tags need to start with "//" or be enclosed in "/*" and "*/".

Even better - and less messy - would be a method of setting a VAX-bookmark that doesn't require actually editing the code. These bookmarks would have to be saved inside some kind of "Task File", and VAX could offer functions to create, open, or save such files. These Task Files could not only be used to navigate to points of interest for a given task, but also to place comments and prototyped code fragments that might come in handy - of course you could just place these right into the code files, but when you are working on a task that you know will take weeks or even months to complete, it would be very helpful if you weren't forced to clutter your source files with bits of comments and code that you are not sure will go into the final solution!
feline Posted - Oct 25 2007 : 08:14:19 AM
VA does not do anything like this. I have never looked for something like this, so I don't know if anyone else offers these features.

Once you are looking at a function then VA's Find References might help, since this is an easy way to find all of the other files that are using the function.

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