- Quick Outline - Press Ctrl+O to access the Quick Outline view.
The Quick Outline view is displayed in a pop-up window within the editor itself, and not as a separate view. You can use it to quickly navigate and inspect your code.
Start typing the first few letters of what you're looking in the Quick Outline view and select it to take you to the right line in your code.
*Code templates - Code templates let you speed-up your coding efforts by letting you auto-insert frequently used coding patterns. Flash Builder provides over 100 pre-defined templates for ActionScript, CSS, and MXML code.
To insert a code template, just type the name of the template in the code editor, and press Ctrl+Space. For example, to insert a 'for loop' in your code, just type
fori and press Ctrl+Space.
To display all the available code templates in the context of your code, press Ctrl+Space twice.
To create and edit code templates, go to the Preferences dialog box, and select Flash Builder > Editors > Code Templates.
For more information, see Code templates.
Place your cursor on an import statement, press Ctrl+1, and select Organize Imports.
To sort the import statements alphabetically by package name, pressCtrl+Shift+O.
Press Ctrl+Alt+H to open the Call Hierarchy view. You can use this view to find all the instances in your project where a specific method, property, or variable is used.
Double-click an entry to open the file that contains the entry, and inspect the code. You can also click a node to see the call stack trace. You can view the calls from and calls to a method in both Flex and ActionScript projects.
To fix the indentation for a block of code without using tabs, select the block of code and press Ctrl+I.
Use the Ctrl+F shortcut to find and optionally replace text strings in the file that is currently open in your editor.
To search all resources across projects in the workspace, use the advanced search features of Flash Builder. SeeFinding code references in the Advanced Tips & Tricks section below.
You can quickly comment-out lines of code in your ActionScript and MXML code using the Ctrl+Shift+Ckeyboard shortcut. The keyboard shortcut works as a toggle letting you add or remove comments.
You can add the following types of comments:
- Source comment for ActionScript (//)
- Block comment for ActionScript (/* */)
- ASDoc comments for ActionScript (/** */)
- Block comment for MXML (<!---->)
To add CDATA blocks (<![CDATA[ ]]>) in your MXML code, press Ctrl+Shift+D.
Flash Builder automatically indents the line of code according to your indentation preferences (In the Preferences dialog, select Flash Builder > Editors, and specify the indent type and size).
If you, however, want to fix any indentation, you can do it without manually indenting individual lines of code using the Tab key.
Just select the block of code for which you want to fix the indentation, and press Ctrl+I.
*Block selection and edit mode
If you have multiple instances of a variable name or a package name that you want to change, click in the Flash Builder toolbar and select the multiple lines of code. You can edit once and all the lines of code change.
*Format MXML documents
To format code in a swift keystroke, select one or more lines of MXML code and press Ctrl+Shift+F.
You can change the default formatting using the Preferences dialog box. In the Preferences dialog box, go to Flash Builder > MXML Code > Formatting to change the order and grouping of the attributes.
Move lines of code
You can quickly move lines of code up and down by selecting the lines of code and pressing Alt and the Up or Down Arrow keys.
Delete lines of code
Select the lines of code that you want to delete and press Ctrl+D.
To delete only the last character in a line of code, press Ctrl+Backspace.