[stringtemplate-interest] visualizer mockup

Gerald Rosenberg gerald at certiv.net
Mon Nov 23 12:21:50 PST 2009


At 10:35 AM 11/23/2009, Terence Parr wrote:
>Hiya...ST v3 has a nice XML tagged output that shows which template generated which output. I'd like an interactive thing that's easier to read for ST v4  I'm including a mockup.
>
>It starts with a window with the generated output.  As I mouse over a section generated by a template, it highlights (one at a time) with a box or whatever.  I can collapse output for any expression/template.  If I hit "get info" key it would pop up a dialog showing the template pattern and the attribute table (an inspector).  It seems like I'd need to detect mouse movement over a textpane and then expand and collapse sections (hopefully w/o having to do much; perhaps replace the char sequence with a new "collapse icon"). 

And here I thought you were a tools kinda guy; you know, pick the best tool for the job and build on it.  Thinking of doing this stuff from scratch is so 1999.  ;)

All of the major tools platforms (Eclipse for certain, NetBeans, Intellij I believe) give you all of what you are asking for largely for free: code folding, code assist, templates, code completion, and more.  Actually, a fair bit is already implemented in AntlrDT's string template editor* -- just need to burnish the code assist adaptor and template hierarchy visitor a bit to do the lookups.

If you are willing to go with a platform -- and there is really no credible reason not to** -- just pick one as none would be a wrong choice.  Even if all you want is the visualization part, without any editor or project support, Eclipse can be stripped down to provide just the essentials.

If you go with Eclipse, I can certainly contribute.

Best,
Gerald

---------
* at least 90% is the existing Eclipse platform implementation 
** they even have vi and emacs bindings for the old school hard-cores



More information about the stringtemplate-interest mailing list