How to make such refactor?

I have method declaration:

public function update(card:CardVO):void {

}



I want to declare class field with same name as method parameter and initiate it with parameter value:

private var card:CardVO;
public function update(card:CardVO):void {
     this.card = card;
}



How can I make such refactor by one key click?
2 comments
Comment actions Permalink

just type this.card = card; inside method block and use intention to create "card" field

0
Comment actions Permalink

No. Im too lazy to type )
In FlashDevelop IDE you can press Ctr+Shift+1
and IDE automaticly generate two lines of code

private var card:CardVO;
this.card = card

0

Please sign in to leave a comment.