!7 static double delay = 1.0; // need 1 second hover before showing source code static JFrame frame; static new RestartableCountdown countdown; static S snippetToShow; p-subst-autorestart { onLocalMechAppend("Mouse hovers", vf1(f update)); } svoid update(S s) { //infoBox(s); bool off = jfind(s, "no longer") >= 0; if (off) { print("off"); countdown.stop(); } else { final TextImageAction tia = jextractSerializedObject(s, TextImageAction); if (tia != null && isSnippetID(tia.toolTip)) countdown.start(delay, r { snippetToShow = tia.toolTip; fS text = loadSnippet_cached(tia.toolTip); if (nempty(text)) swing { if (eq(snippetToShow, tia.toolTip)) frame = showFrame(snippetWithTitle_rev(tia.toolTip), jscroll(withMargin(wordWrapTypeWriterTextArea(text))), frame); } }); } }