Warning: session_start(): open(/var/lib/php/sessions/sess_ig3k3hfi5qplpofrg971o57krd, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
static AutoComboBox3 tf;
static SingleComponentPanel scp;
static ReliableSingleThread rst = new(r go);
sS loaded;
p-subst {
autoRestart();
showFrame(northAndCenterWithMargins(
fontSize(15, centerComboBox(tf = standardFunctionComboBox())),
scp = singleComponentPanel()));
onChange(tf, rstTrigger(rst));
}
svoid go {
S s = getTextTrim(tf);
if (eq(loaded, s)) ret;
loaded = s;
JComponent c = renderSafeFunction(s, r { loaded = false; rst.trigger() });
if (c != null) scp.setComponent(c);
}
static JComponent 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(ll("safe", "awt"), tokSplitAtComma(safety)))
ret jfullcenter(jbutton("Check " + s + " for safety" + (empty(safety) ? "" : ": " + safety), rThread(r { checkStandardFunctionForSafety(fname); callF(refresh) })));
O o = callAndMake(s);
Component c;
if (o instanceof JComponent)
c = o/JComponent;
else
c = jCenteredMultiLineLabel(str(o));
ret withCenteredTitle(s + " [" + safety + "]", c);
}