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
 Indentation for method arguments in source file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rryk
Senior Member

Germany
48 Posts

Posted - Feb 26 2012 :  05:24:57 AM  Show Profile  Reply with Quote
Hi,

By default VAX adds spaces around arguments to the function. This leads to an additional space after opening parenthis:
void Foo:bar( int argument1, float argument2, Foo & other )
However when breaking the arguments line into several lines (usually to keep code under 80 characters wide) it aligns second and other arguments to the first character after parenthsis:
void Foo:bar( int argument1, 
             float argument2,
             Foo & other )
In my opinion this should be consistent - either remove the space or make arguments align to the first argument.

Edited by - rryk on Feb 26 2012 06:42:05 AM

feline
Whole Tomato Software

United Kingdom
17110 Posts

Posted - Feb 28 2012 :  3:05:17 PM  Show Profile  Reply with Quote
The formatting / indenting when you break these lines is coming from the IDE, not from VA. You may be able to control this slightly in the IDE options, depending on the IDE you are using.

For the leading and trailing spaces around the arguments, you can control these yourself. Assuming you are seeing this happening when using VA's refactoring commands, just look for and edit the spacing in the VA Snippets for the refactoring commands. The Snippets are called:

Refactor Create Implementation
Refactor Encapsulate Field
Refactor Document Method
Refactor Extract Method

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

rryk
Senior Member

Germany
48 Posts

Posted - Feb 29 2012 :  03:29:18 AM  Show Profile  Reply with Quote
My suggestion was to make no spaces around arguments as a default to make it consistent, though I didn't know that Visual Studio makes the indentation when the like is broken on its own. What made you choose this style as default? I think it's more common not to have spaces.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17110 Posts

Posted - Feb 29 2012 :  11:50:25 AM  Show Profile  Reply with Quote
Spaces around the brackets seems to be quite common, and having the spaces there helps to show that VA can do this, and this leads to the observation that the spaces can be removed.

Any default formatting or style is going to look wrong for quite a few of our users, since there are so many different styles and standards out there. So we just had to pick something and hope it was not to bad.

As for the indenting of the line when you split it, an easy check is to select the code and press CTRL-K, CTRL-F which is the default keyboard shortcut for the IDE command:

Edit menu -> Advanced -> Format Selection

this way you can see what the IDE thinks the formatting should look like, so you can tell if the formatting is coming from the IDE or not.

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000