Code generation

Ctrl+Shift+1: The shortcut for code generation

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.

Generating fields from 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.

Automatic imports

Method override generation

In Haxe, 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.

Method override generation

Event handlers generation

Write an addEventListener call (for example in NME/OpenFL), move your cursor on the (missing) handler's name and press Ctrl+Shift+1 to generate the event handler.

addEventListener(type, Ctrl+Shift+1

FlashDevelop can completely generate the event handler name.

Event handlers generation

Getter/setter generation

Move your cursor on a variable and press Ctrl+Shift+1 to generate the appropriate getter/setter.

Getter/setter generation

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. FlashDevelop will also offer to "move the variable(s) declaration" at the beginning of the function body. It can also declare new elements in other classes. Function generation will take automatically detect the parameters types.

Unknown member generation

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).

Snippets in HaxeDevelop

Zen Coding / Emmet abbreviations

Write CSS-like snippets, press Ctrl+B

Emmet abbreviations in HaxeDevelop

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.