IDE Productivity enhancements added to Flash Builder Burrito
I am extremely delighted in sharing the fact that we have added an immense set of editor based IDE productivity features for the Flash Builder Preview release.
Here is the list of those features and a brief description on the same:
a) Code Templates:
Code templates are a structured description of code patterns that reoccur in source code. Support of these editor level templates with in action script/MXML and CSS documents, will enable flash builder ‘Burrito’ users to auto insert these code patterns using content assist (Ctrl+Space).
FB ‘Burrito’ proposes set of Pre-defined templates/code snippets for ActionScript,CSS and MXML under Editors preference page:
Templates can be newly created, an existing templates can be edited, templates can be imported/exported in the form of XML file.
The feature also supports linked mode to display multiple values.
Templates are defined based on contexts in MXML and AS. The various contexts defined are:
MXML: MXML, MXML Attributes,MX Components and Spark Components.
AS: ActionScript, ActionScript Statements, ActionScript type members and ActionScript package scope.
Usage: In the editor on entering the name of template and hitting CMD/CTRL SPACE will bring up a list of code templates defined with similar name.
Action Script Proposal Cycling:
FB 4.5 will allow user to select the proposal kinds or related group of proposals to cycle through when repeatedly invoking content assist (Ctrl+Space). User can select a proposal kind/group and invoke Up and Down to change the order under FlashBuilder->ActionScript Code -> Content Assist Cycling preference page. We would be changing the name of the preference page in MXML cycling also.
One can change the order in which the cycling proposals should show on content assist and the editor content assist would reflect the preference.
Usage: Subsequent content assist cycles(CTRL-SPACE) would bring up different proposal cycles as defined in the preference. On an empty line only code templates would appear.
FYI, This feature was available for MXML in the earlier releases.
Flash Builder “Burrito” will allow the developer to display a list of actions that relate to the current code fragment and select an action to perform a task with/without interacting with a dialog, either by selecting “Quick Fix” from the context menu or by pressing a keyboard shortcut combination (that is, CTRL +1).
The set of Quick Assist features supported are:
- Split Variable Declaration
- Assign to Variable
- Convert local variable to field
- Generate Getter/Setter (with UI)
- Rename in Workspace (with UI)
- Rename in File
- Organize imports
Metadata Code Completion:
This feature will allow the developer to use content assist for metadata code completion when beginning a code statement with the ‘[‘ character. The list of metadata presented to the developer must be contextual to the location within the class or MXML document so that only valid metadata can be inserted via content assist. Where appropriate, content assist should present a list of values for metadata properties. Support for metadata content assist should be provided for metadata defined for use with the version of the Flex SDK the developer is using in their project.
This features supports Code hinting inside metadata for optional attributes, linked mode support and proposal cycling support.
Generate From Usage:
Flash Builder “Burrito” will offer the developer the option to generate the stub code for a method, variable and class via the Quick Assist (CTRL/CMD 1)menu.
Few of the options available here are:
Generate method: selecting this action will create a new method in the appropriate class or
MXML script block with the name of the method supplied by the developer.
Invoking Quick Assist on an expression like
bar(x, y); // bar is not defined anywhere in the document Selecting will create a new method named bar(var x:int, var y:int) if x and y are of int type. If the type of the argument is not known then Object will be generated.
Generate variable: selecting this action will create a new property in the appropriate class or
MXML script block with the name of the property supplied by the developer.
Invoking Quick Assist on an expression like
bar; // bar is not defined anywhere in the document
On Selecting, the statement will be changed to:
Generate Class/Interface: selecting this action will create a new class with the name of the class supplied by the developer. eg: Invoking Quick Assist on an expression like: new Bar(); // Bar is not defined anywhere in the document will give option to Generate the Class Bar. Selecting will open the new Class Wizard UI with the name 'Bar' pre-populated.I am also proud to share that the initial feedback from our customers have been exceedingly good.However, i request you guys to try them out and provide us your feedback.