Uses 1113K of libraries. Click here for Pure Java version (21791L/116K).
!7 set flag DynModule. // for transpilation cm JavaEval > DynPrintLog { S expression; bool realEval = true; transient bool calculating; transient O value; transient JTextArea taInput; transient Throwable error; visual withMargin(jvsplit( centerAndEastWithMarginInbetween( onCtrlEnter(taInput = jEnableUndoRedo(dm_typeWriterTextArea expression()), rThread { mediumRefresh(); evalIt() }), withTopMargin(3, vstackWithSpacing(5, withBottomMargin(fontSizePlus(4, makeBold(toolTip("Evaluate the code (always medium-refreshes)", jbutton("EVAL", rThread { mediumRefresh(); evalIt() }))))), toolTip("Evaluate in latest language version", jbutton("Fresh", rThread { refresh(); evalIt() })), centerAndEastWithMargin( withToolTip("Use the real Java compiler, don't use shortcuts - just leave checked if in doubt", dm_fieldCheckBox("Real", 'realEval)), jPopDownButton_noText( "Show Java Transpilation", rThread showJavaTranspilation, ))))), super)); void mediumRefresh enter { dm_mediumRefreshTranspiler(); loadFunctions_clearCache(); print("Medium-refreshed translator."); } void refresh enter { dm_refreshTranspiler(); loadFunctions_clearCache(); print("Refreshed translator."); } void evalIt enter { if (calculating) ret; dm_action_printHere(shorten80(getText(taInput)), r { calculating = true; temp afterwards(r { calculating = false }); dm_javaEvalModule_doIt(getText(taInput), realEval); }, printName := false); } void showJavaTranspilation enter { dm_showText("Java Transpilation", loadProgramTextFile("main.java")); } }
Began life as a copy of #1016755
download show line numbers debug dex old transpilations
Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, nazvggbglmsf, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment