-
Notifications
You must be signed in to change notification settings - Fork 85
Code generation
Create new types through the sidebar's context menu or command palette.
Press ctrl+shift+1 inside class with interface to implement all variables and methods.
Press ctrl+I on a qualified class name to shorten it and generate the import statement. Safe to use if the class is already imported.
Press ctrl+shift+h, ctrl+shift+o to add missing, remove unused and sort imports.
All three operations are optional. You can customize the command by passing these arguments:
Argument | Description | Default |
---|---|---|
add |
add missing imports | true |
sort |
sort imports | true |
remove |
remove unused imports | true |
auto_remove |
automaticaly remove all suggested unused imports | false |
Press ctrl+shift+1 on word to generate variable or method.
- Move your cursor on the variable name, press ctrl+shift+1 to convert variable to property.
- Move your cursor on the property name or declaration, press ctrl+shift+1 to generate variable.
- Move your cursor on the property name or declaration, press ctrl+shift+1 to generate getter and setter.
If you don't want to group getter and setter with property, you can set haxe_group_property_and_accessors
setting to false
.
You can change the number of blank lines between property, getter and setter in haxe_bl_property
setting.
Select a code inside a method and press ctrl+shift+1.
Edit your classes (check the cool snippets, like for
).
You can use these shell variables in snippets:
Variable | Description |
---|---|
$HX_W_ORB | whitespaces before opening round bracket |
$HX_K_W_ORB | whitespaces between keyword and opening round bracket |
$HX_ORB_W | whitespaces after opening roundbracket |
$HX_W_CRB | whitespaces before closing round bracket |
$HX_CRB_W_C | whitespaces between closing round bracket and colon |
$HX_W_C | whitespaces before colon |
$HX_C_W | whitespaces after colon |
$HX_W_OAB | whitespaces before opening angle bracket |
$HX_OAB_W | whitespaces after opening angle bracket |
$HX_W_CAB | whitespaces before closing angle bracket |
$HX_W_CM | whitespaces before comma |
$HX_CM_W | whitespaces after comma |
$HX_W_A | whitespaces before assignment |
$HX_A_W | whitespaces after assignment |
$HX_W_AR | whitespaces before arrow |
$HX_AR_W | whitespaces after arrow |
$HX_W_SC | whitespaces before semicolon |
$HX_W_TD | whitespaces before triple dot |
$HX_TD_W | whitespaces after triple dot |
$HX_W_OCB | whitespaces before opening curly bracket |
$HX_CCB_W | whitespaces after closing curly bracket |