SlickEdit Community

Archived Beta Discussions => SlickEdit® Core for Eclipse => Topic started by: sean_kelly on February 19, 2009, 07:26:33 PM

Title: beautify for actionscript
Post by: sean_kelly on February 19, 2009, 07:26:33 PM
Hi Again,

beautify and gui-beatify also have the 2 space curly bracket issue - beautify selection run on the below code
results in a 2 space mismatch with the final paren (using style 1)

cheers

Sean


  public function push(det:kdraw_detector):void {
      _list.push(det);
    }
[\pre]
Title: Re: beautify for actionscript
Post by: Ryan on February 23, 2009, 04:59:07 PM
Hi Sean,

Sorry so late on the reply, but I had a chance to look into this and I think I might be able to help you out.  Here's the deal...we only have beautifiers written specifically for a few languages: C, C#, Java, JavaScript, and SlickC.  Other languages which we can beautify are lumped into one of these categories and we make use of the beautifier for that "parent" language. 

For ActionScript, we are using the C beautifier.  What's tripping it up is the modifier for the functions (ie. public)...the C beautifier normally doesn't have to deal with these.  I made a little change to instead use the Java beautifier for ActionScript (which has modifiers for methods), and it seems to be working much better.  I've attached a macro file which makes the change for you...feel free to try it out:


Now try your beautify...let me know if it works better for you, and if there are other issues.

- Ryan
Title: Re: beautify for actionscript
Post by: sean_kelly on February 25, 2009, 10:12:38 PM
Thanks Ryan !!