scope iPanel_renderSafeFunction. static Set #safeTags = lithashset("safe", "awt", "mech", "variable"); static JComponent iPanel_renderSafeFunction(S s, final Runnable refresh) { if (!isStandardFunction(s)) null; SS safetyMap = mechHashMap("JavaX Identifier Safety"); S safety = safetyMap.get(s); print("Safety for " + s + ": " + safety); fS fname = s; if (empty(safety) || !setContainsSet(safeTags, tokSplitAtComma(safety))) ret jfullcenter(jbutton( "Check " + s + " for safety" + (empty(safety) ? "" : ": " + safety), rThread(r { checkStandardFunctionForSafety(fname); callF(refresh) }))); Component c; try { O o = callAndMake(s); if (o instanceof JComponent) c = o/JComponent; else c = jCenteredMultiLineLabel(str(o)); } catch e { c = exceptionInTextArea(e); } ret withCenteredTitle(s + " [" + safety + "]", c); } end scope