Adobe Flex 3 Help

About code editing in Flex Builder

%embedded%ActionScriptEditor | About code editing in Flex BuilderWhen designing and developing Flex and ActionScript applications, you work in the Flex Development perspective, which contains the Flex Builder editors and all the views that support code editing and design tasks. The configuration of the Flex Development perspective depends on which editor and mode you're working in. For example, when you create a Flex project, the MXML editor works in two modes (Source and Design) and each mode contains its own collection of supporting views. For an overview of the Flex Development perspective, see The Flex Development perspective.

MXML, ActionScript, and CSS editors

Flex Builder contains three editors for writing MXML, ActionScript, and CSS code.

The MXML editor lets you edit MXML files. The MXML editor contains two modes: Source and Design. In Source mode, you write MXML and embed ActionScript and CSS code contained within <mx:Script> and <mx:Style> tags. In Design mode, you lay out and design your Flex applications (see Building a Flex User Interface).

The ActionScript editor lets you edit AS files, which include main files for ActionScript projects, and class and interface files. For more information, see About ActionScript projects.

You use the CSS editor to write Cascading Style Sheets (CSS files). For more information, see Applying styles and skins and Using Styles and Themes in the Adobe Flex 3 Developer Guide.

MXML, ActionScript, and CSS content assistance

As you enter MXML, ActionScript, and CSS code, hints are displayed to help you complete your code. This feature is called Content Assist. Flex Builder also assists you in quickly developing your code by including MXML tag completion, automatic import management, integration with Adobe Flex Language Reference, and the capability of choosing different colors and fonts to display your code in the workspace. For more information, see About Content Assist and

Custom component and ActionScript class and interface code hints

In addition to the built-in support for the Flex framework, code hints are provided for all custom components and ActionScript classes and interfaces that are included in your project. For more information, see Using Content Assist.

Streamlined code navigation

To easily navigate the many files and lines of code in your projects, Flex Builder provides convenient shortcuts, such as folding and unfolding code blocks, opening the source of external code definitions, browsing and opening class types, and so on. The Outline view also provides you with a convenient way to inspect the structure of and navigate to lines of code in your documents. For more information, see Navigating and organizing code.

Find references and code refactoring

Flex Builder lets you find all references and declarations to identifiers in a given file, project, or workspace including references found in elements linked from SWC files and other entries on a library path (for example, classes, interfaces, functions, variables, and some metadata). You use refactoring to rename identifiers in your code while updating all references to them in your entire code base. For more information, see Finding references and refactoring code.

Automatic syntax error checking

Flex Builder compiles your projects incrementally, giving you feedback as you work with your documents. If you introduce syntax errors while writing MXML and ActionScript code, error indicators are displayed next to the line of code in the editor and an error message is displayed in the Problems view. For more information, see Apply syntax coloring preferences.

Syntax coloring

You specify the set of colors to be applied throughout your code in the MXML, ActionScript, and CSS editors on the Syntax Coloring Preferences page. Font style options can also be applied and previewed from the same page. For more information, see Getting help while writing code and Using Content Assist

Editor and debugger integration

The MXML and ActionScript editors work with the Flex Debugging perspective to assist you in debugging your code. You set breakpoints in your code to suspend your application at troublesome or otherwise crucial lines of code. When you begin a debugging session, the Flex Debugging perspective is displayed when the first breakpoint is reached. You can then inspect the state of your application and isolate and resolve the problems in your code. For more information about debugging your code, see Running and Debugging Applications.