SapphireSteel Software

 

  -  
     
     
     
  -  
     
     
     
  -  
     
     
     
  -  
     
     
     
  -  
     
     
     
     

 

  rss
RSS (SITE)
 
  rss
RSS (BLOG ONLY)
 
   
 
 
     

 

Section :: Amethyst
- Format For Printing...

ActionScript Automatic Code Formatting

by Huw Collingbourne
Options in Amethyst PE
Tuesday 6 January 2009.
 

Amethyst, is SapphireSteel Software’s Visual Studio-based IDE for developing Adobe Flex applications. It includes extensive code formatting capabilities which can regularize the layout of your ActionScript code based on user selected preferences.

In a previous article, I gave a broad overview of the formatting options available in the initial beta release of Amethyst. If you haven’t already done so, you are advised to read that article first. For an overview of the software’s other features see: A Brief Guide To Amethyst.

You may reformat an entire document at any time by selecting Edit, Advanced, Format Document or pressing the associated hot-key (the default is CTRL+E, D).

NOTE: The options described here are for Amethyst beta. More options may be added later.

Code Formatting Options

Code formatting options are set in a series of pages in the Options dialog which can be accessed by selecting: Tools, Options, Text Editor, ActionScript, Formatting. These are the effects of each option...

GENERAL

- Automatically format complete block on }
- Automatically format complete statement on ;
- Automatically format on paste

When enabled the options above will auto-format blocks or statements when the terminating character is entered or when a block of ActionScript code is pasted into the editor.

INDENTATION

The images below show how your code will be formatted when each option is enabled (true) or disabled (false). Remember that you will need to reformat the document as explained above before any formatting changes will be applied to your code:

- Indent block contents

When true...

When false...

- Indent open and close braces

When true...

When false...

- Indent case contents

When true...

When false...

- Indent case labels

When true...

When false...

NEWLINES

- Open brace on newline for classes & packages

When true...

When false...

- Open brace on newline for methods

When true...

When false...

- Open brace on newline for control blocks

When true...

When false...

- Place else on new line

When true...

When false...

- Place catch/finally on new line

When true...

When false...

SPACING

- Space between method name and parenthesis in definition

When true...

When false...

- Space between method name and parenthesis in call

When true...

When false...

- Space after keywords in control flow statements

When true...

When false...

- Space after comma

When true...

When false...

- Space before and after assignment operators

When true...

When false...

- Space between ’(’ ’)’ and arguments

When true...

When false...

- Space before and after binary operators

When true...

- Ignore spaces around binary operators

When true... no change will be made.

- Remove spaces before and after binary operators

When true...

AddThis Social Bookmark Button


 

© 2009 SapphireSteel Software. All rights reserved