Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
About AStyle plugin, Here is a new problem
Loaden:
--- Quote from: MortenMacFly on January 25, 2010, 06:26:27 am ---
--- Quote from: Loaden on January 25, 2010, 01:11:01 am ---
--- Quote from: MortenMacFly on January 24, 2010, 06:42:03 pm ---That's simply not possible with the set of options given.
--- End quote ---
Do not, AStyle can do that!
--- End quote ---
Look: I meant it's not possible with the options given by C::B. You can enhance the plugin if you like and add the appropriate options. It's pretty easy.
--- End quote ---
But in SVN5731, it's work fine...
OK, I will try it.
Loaden:
Certainly there are problems, I have read the code, my options and CB option is the same. However, the code is not formatted the same.
Loaden:
As another example, thic code:
--- Code: ---void test() {}
void func(int i) {}
int main()
{
test();
func(1);
if(int i=0;i<10;++i) test();
return 0;
}
--- End code ---
if use run Astyle plugin, it's became to:
--- Code: ---void test() {}
void func (int i) {}
int main()
{
test();
func (1);
if (int i = 0; i < 10; ++i) test();
return 0;
}
--- End code ---
Notice:
--- Code: --- test();
func (1);
--- End code ---
Loaden:
AStyle 1.24 release, I think the reason is:
--- Code: --- --pad-header / -H
Insert space padding after paren headers only (e.g. 'if', 'for', 'while'...). Any end of line comments will remain in the original column, if possible. This can be used with unpad-paren to remove unwanted spaces.
if(isFoo(a, b))
bar(a, b);
becomes:
if (isFoo(a, b))
bar(a, b);
--- End code ---
http://astyle.sourceforge.net/astyle.html
And the : --pad-header will fix this problem. :lol:
Loaden:
Fixed.
http://forums.codeblocks.org/index.php/topic,12279.0.html
Navigation
[0] Message Index
[*] Previous page
Go to full version