The last commit here demonstrates the various aspects of the macro engine via improvements to the Tophat wrappers. It is included mostly for demonstrations purposes, that change should be tested or rolled back post commit.
Let me know what your thoughts are. I am happy to make changes obviously.
This looks fantastic. A question: what is the purpose of using imports rather than defining the macros in the file? Do you see potential reuse of macros? Finally, did you run the Tophat functional tests to see if they still pass (only 2 of 4 will pass when running locally).
My whole point is reuse of macros, though I guess they increase readability which is important. The tophat example shows an import file allowing reuse between the three tophat wrappers and the total amount of XML for the three wrappers together is much reduced as a result. Is usefulness will be even more clear with JJ's mothur suite for instance which has 100 wrappers.
If you agree to the implementation, I will be happy to fix the tophat wrappers or just rollback f522eea altogether.
I'm not sure how macro reuse will work with the tool shed, but having the ability to import doesn't impact anything else, so I'm sold on everything. It would be super nice if you added descriptions of the macro language to the wiki tool config page: http://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax