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
 Padding/Deleting spaces after suggestions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

azur
Ketchup Master

Germany
52 Posts

Posted - Jan 13 2012 :  10:42:43 AM  Show Profile  Reply with Quote
Here is a example:

CString   strTool     = "VAssistX"
BYTE      nOurLicense = GetLicenseCount( strTool );

If our company grow a 'little bit' I have to adjust the variable. So I doubleklick BYTE, type "UL", and choose "ULONGLONG" - and lost my nice formating:

CString   strTool     = "VAssistX"
ULONGLONG      nOurLicense = GetLicenseCount( strTool );

I have to delete the surplus spaces.

The same happens if I use "int" instead of "ULONGLONG" - I had to add one space.




feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 13 2012 :  1:02:03 PM  Show Profile  Reply with Quote
Unfortunately we don't have any current plans to try and do this, since this gets us into code formatting, which is a very complex area, partly due to the vast number of different options you need to make everyone happy.

You might want to look into this commercial tool for code formatting:

http://www.profactor.co.uk/stylemanager.php

I have never used it myself, but it sounds promising from its website.

Alternatively, in the VS2010 sample IDE marco's, in the VSEditor section, there is a macro called "LineEmUp" which should help with reformatting your code after an edit.

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

azur
Ketchup Master

Germany
52 Posts

Posted - Jan 16 2012 :  03:01:46 AM  Show Profile  Reply with Quote
I see the point.
I have tested the "StyleManager" but unfortunately he don't have the key features I need.
Thank you for the hint to "LineEmUp". This can be a start for my own macro.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 16 2012 :  10:11:24 AM  Show Profile  Reply with Quote
It is interesting that StyleManager did not have all the features you need, it seems to have quite a few options.

Another code formatting tool that I have come across is GC, Great Code, http://sourceforge.net/projects/gcgreatcode/
Which might be worth a look. From memory it takes a bit of setting up, but seems quite powerful.

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

azur
Ketchup Master

Germany
52 Posts

Posted - Jan 17 2012 :  02:43:18 AM  Show Profile  Reply with Quote
Yes, there are many options but especially I miss 2 options:

At first: a Parameter on a new line begins with a comma. That's a little bit unusual but have some advantage.

CString GetDisplayName                   // get the display name
      ( const CString & i_strSurename    // the surename
      , const CString & i_strFirstname   // the firstname
      , const CString & i_strTile        // the title
      );                                 // "[Title ] Surename [,Firstname]

At second: Declaration with assignment can only be aligned on name or assignment and not on both.

CString   strTool     = "VAssistX"
BYTE      nOurLicense = 42;

Thanks for the hint to "Great Code". It has also many options but it is a command line tool. The first thing to spring to mind is that you can't format only a marked part in a source file.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 17 2012 :  3:15:06 PM  Show Profile  Reply with Quote
Unfortunately this just confirms that code formatting is quite a complex area, since no matter how many options you add, there are always likely to be requests for even more. Hopefully you can get somewhere using the IDE macro as a start point.

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