!7 set flag DynModule. sclass Entry { S function; S tokenized; } cmodule InputTokenizer > DynBigInputAndSections { transient LS functions = ll( f javaTok, f javaTokWithBrackets, f javaTokNPunct, f javaTokWithAngleBrackets); void makeSections_impl() { S text = this.text; JTextPane tp = fontSizePlus(5, setFont(typeWriterFont(), jTextPane())); bool first = true; LPair toks = map_pcall(fn -> pair(fn, (LS) callAndMake(fn, text))); // find out max width int maxWidth = 0; for (LS tok : pairsB(toks)) { ai_tokenizationToTextPane(jTextPane(), tok); maxWidth = max(maxWidth, ai_tokenizationToTextPane_charsWritten!); } for (Pair fAndTok : toks) pcall { if (!first) appendToTextPane(tp, "\n"); else first = false; ai_tokenizationToTextPane(tp, fAndTok.b); appendToTextPane(tp, spaces(maxWidth-ai_tokenizationToTextPane_charsWritten!+1) + "[" + f + "]"); } addSection("Tokenizations", tp); } }