Create Flex Skin, custom Event and other classes easilyFebruary 21st, 2011 by Alexander Doroshko
Do you know that one of the most effective ways of writing code in IntelliJ IDEA is Create From Usage approach, when first use a class, method, or other symbol, and IntelliJ IDEA then generates its declaration in a single click? Well, you do now, plus I’d like to give you two more examples of useful quick fixes that can generate routine code for you in no time.
Create Flex Skin
IntelliJ IDEA knows which MXML attributes must contain qualified name of a class. Class doesn’t exist? Invoke quick fix and get it right away.
In case of Skin class its behavior is even smarter. Write a skin class usage…
… and get MyButtonSkin.mxml file with host component and states correctly set up:
Create Custom Event class
Some Flex metadata attributes require qualified name of a class. Again, IDEA suggests to create class if it doesn’t exist yet. Correct base class is automatically suggested if needed. For example write following…
… and get custom event class with correct base class and constructor matching super:
P.S. Some features (like creating Flex Skin) are already available in IDEA 10.0.2 release, others (like creating custom event class) will be available in upcoming IDEA 10.x update release.