I feel like the challenge with stuff like this is that once you edit the resulting code, the original graphical input is no longer in sync. I wish there was a good solution to this.
There are many tools that come close (graphical GUI designers come to mind) by not actually giving you resulting code, but letting you write code separately that interfaces with the graphically designed parts in a well-defined way.