Author Topic: AStyle Plugin Bug in Beta-5  (Read 4398 times)

Anonymous

  • Guest
AStyle Plugin Bug in Beta-5
« on: January 31, 2005, 04:57:47 am »
Hi,

I liked the bug-fixes in beta-5 and I think this IDE is turning out very nice. Good job!

I have a question about the AStlye plugin. I just downloaded Beta-5, and I was impressed with the changes to AStyle, including the ability to be able to specify your own custom style. However, when I try to specify my own style, it doesn't seem to give me what I want.

I set all the options so they're just like the ANSI style except for I set "Indentation size (in spaces)" equal to 2 spaces instead of ANSI's 4 spaces.

I have tried formatting my code with ANSI, and everything displays as I want it except tabs are 4 spaces. When I have the AStyle plugin set to "custom", my code looks nothing like the ANSI style and the tabs are not even 2 spaces.

Here is some code to demonstrate what I'm talking about:
ANSI STYLE
Code: [Select]

for(int i=0;i<MAX_TRIANGLES/4-10;i++)
{
    if(m_Triangles[i].m_Visible==0 || i==m_CurrentTriangle)
        continue;
    if(m_Triangles[i].m_X<temp_x)
    {
        temp_x=m_Triangles[i].m_X;
        closest_row=int(1+(m_Triangles[i].m_Y-top)/25);
    }
}


CUSTOM STLYE (same source)
 
Code: [Select]

for ( int i = 0;i < MAX_TRIANGLES / 4 - 10;i++ )
{
if ( m_Triangles[ i ].m_Visible == 0 || i == m_CurrentTriangle )
continue;

if ( m_Triangles[ i ].m_X < temp_x )
{
temp_x = m_Triangles[ i ].m_X;
closest_row = int( 1 + ( m_Triangles[ i ].m_Y - top ) / 25 );
}

}


I have double-checked all my options for ANSI and custom, and the only difference is the number of spaces to insert to an indentation, but using the plugin shows very different results.

Is the custom AStyle setting supported in beta-5? I was just wondering if I was not doing something right. I realize that it may not be supported and its not much of a problem. I did have a small feature request - would it be possible to allow under "Settings->Editor->General" a spot that would allow the user to specify how many spaces tabs should be? I can't seem to change them from anything other than 4.[/code]

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: AStyle Plugin Bug in Beta-5
« Reply #1 on: January 31, 2005, 09:02:58 am »
Quote from: Anonymous
Hi,

I liked the bug-fixes in beta-5 and I think this IDE is turning out very nice. Good job!

Thanx!

Quote from: Anonymous
I have a question about the AStlye plugin. I just downloaded Beta-5, and I was impressed with the changes to AStyle, including the ability to be able to specify your own custom style. However, when I try to specify my own style, it doesn't seem to give me what I want.

Nothing has been changed in this plugin from 1.0-beta4...
Maybe there are bugs in there, I will check it out.
Quote from: Anonymous
I did have a small feature request - would it be possible to allow under "Settings->Editor->General" a spot that would allow the user to specify how many spaces tabs should be? I can't seem to change them from anything other than 4.

You 're right. It's hardcoded :oops: . I can't believe no one has mentioned it so far :shock:

Thanx,
Yiannis.
Be patient!
This bug will be fixed soon...

Offline mike

  • Multiple posting newcomer
  • *
  • Posts: 53
AStyle Plugin Bug in Beta-5
« Reply #2 on: January 31, 2005, 02:27:48 pm »
Quote

I can't believe no one has mentioned it so far


Actually, I was so sure that someone has already mentioned it, that I was just sitting and waiting for the fix :-)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
AStyle Plugin Bug in Beta-5
« Reply #3 on: January 31, 2005, 02:33:44 pm »
Quote from: mike
Actually, I was so sure that someone has already mentioned it, that I was just sitting and waiting for the fix :-)


 :oops:  :oops:  :oops:
And it's such an easy fix
 :oops:  :oops:  :oops:

Yiannis.
Be patient!
This bug will be fixed soon...