Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

C++0x autocomplete

<< < (2/4) > >>

Alpha:
Now I understand.  Try the following patch.

--- Code: ---Index: src/plugins/astyle/astyle/ASBeautifier.cpp
===================================================================
--- src/plugins/astyle/astyle/ASBeautifier.cpp (revision 7900)
+++ src/plugins/astyle/astyle/ASBeautifier.cpp (working copy)
@@ -2373,9 +2373,9 @@
  tabCount += classInitializerTabs;
  }
 
- else if (isJavaStyle() && lastLineHeader == &AS_FOR)
+ else if ((isJavaStyle() || isCStyle()) && lastLineHeader == &AS_FOR)
  {
- // found a java for-each statement
+ // found a java/C++0x for-each statement
  // so do nothing special
  }
 

--- End code ---

ollydbg:
I suggest OP give us a step by step instructions, so we won't guess.
It should related to CodeCompletion OR cbEditor,  not astyle, right?

Alpha:
The AStyle plugin was the only thing I could get to reproduce this behavior.  (Although the lack of steps is why it took me some time to track it down.)

Halan:
Yeah I am using the AStyle formatter. Didn't even know there were other sourcecode-formatters in Code::Blocks.

And sorry, I thought my last post made the behaviour clear..

Alpha:
@Developers:  The patch in my previous post appears to solve the problem (although it would probably be best if the OP could confirm this as well).  Is this something that should be submitted to Code::Block's patch tracker, or to the actual AStyle project?  (If it is the AStyle project, could someone who already has a SourceForge account submit it there - I do not really want to create an account just for a single action.)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version