Bounded beans in IntelliJ IDEA
Well, for some reason I lost my Intellij IDEA configuration. I had a nice live template to create a firePropertyChange statement. This is not as nice as the bound setter plugin for eclipse as it does not create the method but the methods body.
Basically create a new Live Template and set the name to something like “fpc”. The template is
firePropertyChange("$name$", $name$, this.$name$ = $name$);
and the variable definition for $name$ is variableOfType("Object"). Finally set the default value to “name” and you are ready to go. Let the IDE create a setter, remove the body, type fpc and hit tab. This will expand to the firePropertyChange statement and if you are lucky, the variable name is correct
Of course, the class has to be some sort of AbstractBean and provide a firePropertyChange
No comments yet.