(UPDATED) astyle plugin - for astyle 1.19

Alexander Dymo dymo at mk.ukrtelecom.ua
Sat Oct 14 22:33:30 UTC 2006


On Sunday 15 October 2006 00:37, Megan Webb wrote:
> Bug 70818 <http://bugs.kde.org/show_bug.cgi?id=70818>: Source formatter
> setup example window is not implemented for custom format
>     (Though I know that some format types, could display better, and
> that some of the examples are hard to see.
>       Still thinking how to improve this.  Decided to submit what I had
> so that other people can benefit, and I don't have
>       to patch my build with the updated plugin each release.)

I've noticed that astyle part is actually reversing the meaning of
two one-liner options. When the ui says "keep blocks", the formatter breaks
them" for example.
If we use the modification below, the custom formatter suddenly starts to 
look much better ;) And actually astyle has been doing that since ages for
unknown reason.
+++ astyle_adaptor.cpp  (working copy)
@@ -194,2 +194,2 @@
        // oneliner
-       setBreakOneLineBlocksMode( widget->Keep_Blocks->isChecked() );
-       setSingleStatementsMode( widget->Keep_Statements->isChecked() );
+       setBreakOneLineBlocksMode( !widget->Keep_Blocks->isChecked() );
+       setSingleStatementsMode( !widget->Keep_Statements->isChecked() );




More information about the KDevelop-devel mailing list