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
 Extract method and trailing blank line
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kimgr
New Member

Sweden
2 Posts

Posted - Mar 18 2009 :  06:07:49 AM  Show Profile  Reply with Quote
Hello,

When I use Extract Method the new method is usually added to the bottom of my current .cpp file. This is all well and good.

However, the almighty C++ standard requires that every translation unit ends with a blank line, and you don't add that after the last closing brace.

Granted, most, if not all, compilers accept translation units without a trailing line, but some tools such as PC-Lint highlight it as a problem.

Any chance you could throw in an extra CR/LF or LF, depending on the file's current default?

Thanks,
- Kim

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Mar 18 2009 :  10:52:57 AM  Show Profile  Reply with Quote
We are considering a feature to make sure there is a blank line at the end of the file, when you are editing:

case=158

To fix Extract Method simply edit the VA Snippet "Refactor Extract Method" for C++ and add an extra blank line at the end of this snippet, which will then be inserted when you trigger Extract Method.

http://www.wholetomato.com/products/features/vasnippets.asp

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

kimgr
New Member

Sweden
2 Posts

Posted - Mar 18 2009 :  11:52:46 AM  Show Profile  Reply with Quote
Hi feline,

Thanks, I didn't know the refactorings were snippets, too.

That should definitely do it for me.

Cheers,
- Kim
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