scope iPanel_renderSafeFunction. static Set<S> #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
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015778 |
Snippet name: | iPanel_renderSafeFunction [iPanel = "intelligent panel"] |
Eternal ID of this version: | #1015778/5 |
Text MD5: | 55c177dfcb47bcbfb90a4690fca07283 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-27 18:13:01 |
Source code size: | 931 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 409 / 443 |
Version history: | 4 change(s) |
Referenced in: | [show references] |