Author Topic: Source code formatter (AStyle) 1.2  (Read 8104 times)

Offline kateausten

  • Multiple posting newcomer
  • *
  • Posts: 19
Source code formatter (AStyle) 1.2
« on: March 21, 2010, 08:44:09 am »
Hello,

I'm having quite some trouble to understand the features of Source code formatter (AStyle) 1.2, maybe due to the fact that I'm not English native, although it might seem so when you read these lines.
I searched it on the net but I found no tutorials or any kind of help regarding this plugin, maybe because the options seemed clear enough to all of you. Not to me. Is there any chance one of you could be kind enough to take the time to make examples showing the difference between having one option checked or not, for the 20ish options that this plugin has in the 'custom style' (around 10 in 'indentation' and 10 others in 'formatting') ?

The reason why I'm asking for this is that I tried to use the 'preview' button but most of the time it wouldn't show any difference whether one option is checked or not.

Thanks a lot in advance.

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: Source code formatter (AStyle) 1.2
« Reply #1 on: March 21, 2010, 10:04:34 am »
Maybe documentation for astyle will help: http://astyle.sourceforge.net/astyle.html

But there is one big problem .. to find out connection between checkboxes in C::B and command line parameters of astyle. I dont know if this plugin is actively devleoped, but it would be nice, if those checkboses had in tooltop or in label these command line parameter. It would spare lot of time for those, who are migrating from command line astyle usage to C::B astyle plugin. Even better will be possibility to "paste" command line directly as a string ...

Offline kateausten

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Source code formatter (AStyle) 1.2
« Reply #2 on: March 25, 2010, 10:02:12 am »
I don't use a command line to use this plugin so this help file is not helpful.

Hence my problem is unsolved.

Can someone please take the time to tell me what he thinks each option does ?

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: Source code formatter (AStyle) 1.2
« Reply #3 on: March 25, 2010, 02:46:55 pm »
I gave you link, where are described all formating options, which can be achieved using AStyle. When using C::B astyle plugin, you are using API and not command line parameters, but formating options are the same. Only problem is to find, which checkbox is related to which formating options ..

1. STYLE - fist tab in plugin configuration:  
        Possible styles are described here (with examples): http://astyle.sourceforge.net/astyle.html#_Predefined_Style_Options

2. INDENTATION tab
        Options for using spaces / tabs, and number of space representing tabs is described here: http://astyle.sourceforge.net/astyle.html#_Tab_and_Bracket_Options
        Other options related to indentation of brackets, classes .. : http://astyle.sourceforge.net/astyle.html#_Indentation_Options

3. FORMATING tab:
        Brackets format: http://astyle.sourceforge.net/astyle.html#_Tab_and_Bracket_Options
        Pointer allignement: search for "--align-pointer=", there are examples.
        Break closing headers: http://astyle.sourceforge.net/astyle.html#_Formatting_Options
        
I have now no time for other options. You should make up list of formating options, where you dont understrand its "effects" and someone will answer it ...  it is quiet compilcated to make compehensive list of examples, especially when I am also not very skilled in using Astyle.


PS: it look like, that checkbox labels are at least partialy copied from AStyle documentation, so try to search and you should find examples with more complex description.
« Last Edit: March 25, 2010, 02:51:32 pm by koso »