User forums > Help

AStyle Plugin Bug in Beta-5

(1/1)

Anonymous:
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: ---
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);
    }
}

--- End code ---


CUSTOM STLYE (same source)
 
--- Code: ---
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 );
}

}

--- End code ---


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]

mandrav:

--- Quote from: Anonymous ---Hi,

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

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.
--- End quote ---

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.
--- End quote ---

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

Thanx,
Yiannis.

mike:

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

--- End quote ---


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

mandrav:

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


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

Yiannis.

Navigation

[0] Message Index

Go to full version