!7 concept Rule { S in, out; } cmodule Rules > DynCRUD { *() { super(Rule); } afterVisualize { replaceComponent(crud.tableSearcher.tfInput, func(JComponent c) -> JComponent { centerAndEastWithMargin(c, jbutton("Add rule...", rThread { addRule(searchTerm()) })) }); onEnter(crud.tableSearcher.tfInput, rThread { addRule(searchTerm()) }); } void addRule(fS term) enter { final JTextField tfIn = jtextfield(or2(term, dm_topInput())), tfOut = jtextfield(); showFormTitled("Add Rule", "Input:", tfIn, "Output:", tfOut, rThread { S in = gtt(tfIn), out = gtt(tfOut); uniq_sync(Rule, +in, +out); }); focus(nempty(term) ? tfOut : tfIn); } }