Update Toolbar.java

Add code for code generation on the toolbar.