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
 Technical Support
 VAX 1845: $FILE_BASE$ doesn't insert extension
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - May 03 2011 :  11:51:42 PM  Show Profile  Reply with Quote
I have a snippet set up like this:
// $Workfile: $FILE_BASE$ $
// $Revision: $
// $AUTHOR: $
// $Date: $DATE$ $
//
// <copyright file="$FILE_BASE$" company="">


Works fine, except in one special case: When I use R#'s "move to another file to match type name", this class gets moved into a new file which is automatically added to the project. When I insert the snippet before saving the file, it will insert only the typename as filename, without the extension .cs, although the tab shows clearly the filename as "typename.cs" and the tabs tooltip shows the full path with filename and extension.

Annoying when doing some refactoring.

sean
Whole Tomato Software

USA
2817 Posts

Posted - May 04 2011 :  03:07:03 AM  Show Profile  Reply with Quote
I don't follow the intermittent behavior part of this. I would expect it to be consistent. $FILE_BASE$ does not include the file extension. Use this instead: $FILE_BASE$.$FILE_EXT$

http://www.wholetomato.com/products/features/vasnippets.asp#reserved
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - May 04 2011 :  10:31:34 AM  Show Profile  Reply with Quote
When I use $FILE_BASE$ in a snippet any other file, it will always insert filename.ext, so maybe this is the error? :)
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - May 04 2011 :  11:08:08 AM  Show Profile  Reply with Quote
Very strange. I'm not able to repro. Is the problem related to the name of the file? Can you give example names where it works consistently and examples where it doesn't work?
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - May 04 2011 :  12:01:14 PM  Show Profile  Reply with Quote
Oh damn it, you know what... just forget what I said. Sometimes we should just run our head through the debugger before releasing. As you can see, the header is designed to be keyword expanded by VSS, and that whats happening. VSS inserts the right filename with extension. Not VA. Sorry.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - May 04 2011 :  12:24:02 PM  Show Profile  Reply with Quote
Ahh; no problem. Forgotten.
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