Can Intellij create class properties in ActionScript?

Is there a way to create or refactor a class property when I am writing a function? For example, if I want to have "someFlag" as a variable in my function, can IntelliJ create the declaration "private var _someFlag:Boolean"? Can I convert a function variable, "var someFlag:Boolean=false" to a class property?

1 comment
Comment actions Permalink

There is a bunch of quick fixes for unresolved references, aka 'Create from usage' fixes. You can write 'whatever', it will become highlighted red and via Alt+Enter you can create field, var or function called 'whatever'.
Also there's "Create Getter/Setter" intention: press Alt+Enter when caret is onany field declaration to use it or press Generate shortcut (Alt+Ins on Windows, Cmd+N or Ctrl+Enter on Mac) and select "Generate Getter/Setter" in the popup.

0

Please sign in to leave a comment.