Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 "Create implementation" annoyance

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
znakeeye Posted - Feb 12 2010 : 04:26:57 AM
This behavior is still present in VAX 1738...

In header I type the following:
void foo(int x);
After issuing the VAX command, the implementation looks like this:
void MyClass::foo( int x )
{

}
1) There is no newline-character after the scope. Wrong!
2) I do not want the spaces around the function argument. Annoyance!
3) If placed under "bar", the implementation should be inserted under "MyClass::bar" scope and not at the end of the file. Annoyance!

#1 could in fact produce a warning on some compilers.
#2 actually yields more typing than if I write all this manually.
4   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Feb 13 2015 : 8:18:12 PM
case=12454 is fixed in build 2059
feline Posted - Feb 15 2010 : 09:32:41 AM
The blank line at the end of the file, some UNIX compilers complain, some do not. We are considering changing VA to try and make sure there is normally / always a blank line at the end of the file:

case=158
znakeeye Posted - Feb 15 2010 : 03:43:00 AM
#1: The C++ standard requires a newline-character at the end of each .h/.cpp. Nothing special about that, except that Visual C++ does not produce a warning. However, if I recall correctly, GCC will produce a warning.

ISO C++ Standard.

2.1/1.2 "If a source file that is not empty does not end in a new-line
character, or ends in a new-line character immediately preceded by a
backslash character, the behavior is undefined".
accord Posted - Feb 12 2010 : 6:21:38 PM
1. An extra <enter> (empty line) will help with this in the snippet for Create Implementation. You can edit snippets here:

VA Options -> Advanced -> Suggestions -> Edit VA Snippets (button)

Select the snippet for Create Implementation and here we go.

2. The spaces also can be deleted around the param. list by editing the snippet.

3. I agree. We are considering implementing this at some point:

case=12454

#1: what warning? which part of the created implementation is problematic? I'm really surprised.
#2: I hope that changing the snippet will help a little bit. Also, VA Outline can help dragging the function to the final location. The created implementation is selected by default in recent versions. This is to support moving the result. VA "cooks" you an empty implementation, takes you to the cpp so you just need to "specify" the location.

The actual logic contains a plus when you are working with more classes in the same file: it will find the place where you have put the other implementations for the class you are working with and put the new function after these functions. So VA keeps member functions grouped by classnames.

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