From FlashDevelop
Features Tour
Interface
| Code completion
| Code generation
| SWF/SWC exploration
| Code documentation
Code generation
Shortcut
- Ctrl+Shift+1 - request contextual generation (see below)
Generate fields from function parameters
|
- Place your cursor on a function parameter name and press Ctrl+Shift+1 to generate Class members corresponding to the function parameters.
|
Import declaration generation
- If a class in your code is not imported (and if it is correctly written),
- Move your cursor on the class name and press Ctrl+Shift+1 to generate the missing import.
Method override generation
|
- In AS3, type 'override'-space and select a method in the list:
- The method signature and body will be generated (including super call).
- Notice that the required imports will automatically be added to your code.
|
Event handlers generation
|
- Write a regular addEventListener call, move your cursor on the (missing) handler's name and press Ctrl+Shift+1 to generate the event handler.
- This works also with AS2 Delegate handlers.
- New: FlashDevelop can completely generate the event handler name too:
addEventListener(type, <Ctrl+Shift+1>
|
Getter/setter generation
|
- Move your cursor on a non-public variable declaration and press Ctrl+Shift+1 to generate the appropriate getter/setter.
- The property name is automatic: for a variable called "_somevar", "$somevar", "mc_somevar" or "somevar_txt", the property will be called "somevar".
- If the variable doesn't have a '_' or a '$' in its name, then it will be renamed: a variable "somevar" would be renamed as "_somevar".
|
Unknown members generation
|
- Move your cursor on a non-declared variable or function and press Ctrl+Shift+1 to generate the member.
- Generator will offer to generate: const (new), variable, function or class (new).
- New: generator can declare new elements in other classes.
- New: function generation will take automatically detect the parameters types.
|
Local variables promotion
|
- Move your cursor on a local variable inside a function and press Ctrl+Shift+1 to declare this variable as a class member or as a parameter of the current function (new).
- This even removes the local declaration in the function.
- New: FlashDevelop will also offer to "move the variable(s) declaration" at the beginning of the function body.
|
Interface methods implementation
|
- Move your cursor on an interface type and press Ctrl+Shift+1 to generate the required interface methods.
- Notice that the required imports will automatically be added to your code.
|
Snippets
|
- Code snippets are chunks of code that you often need to insert in your code.
- Press Ctrl+B to expand a code snippet or view the snippets list.
- Snippets can be smarter by using contextual "variables".
- FlashDevelop includes a Snippets editor (puzzle button in the toolbar).
|
More?
See SWF/SWC exploration