Using the PlantUML [1] extention to generate uml code. See the PlantUML [2] web page for detailes on syntax. See the UML page for how to use UML for design.