Libraryless. Click here for Pure Java version (15918L/97K).
1 | sclass TranspileWithErrorWindow {
|
2 | settable S snippetID; |
3 | JFastLogView_noWrap transpilationErrorBox; |
4 | settable Runnable transpileAction; |
5 | |
6 | event success; |
7 | event error(Throwable error); |
8 | |
9 | /*void transpile {
|
10 | var tfs = new TranspileForServer_v2(snippetID); |
11 | tfs.run(); |
12 | }*/ |
13 | |
14 | public void run aka runMe() {
|
15 | infoBox("Transpiling " + snippetID);
|
16 | |
17 | try {
|
18 | transpileAction.run(); |
19 | } catch e {
|
20 | infoBox("Transpilation error. " + e);
|
21 | awt {
|
22 | bool first = transpilationErrorBox == null; |
23 | transpilationErrorBox = maximizeFrame(scrollAllTheWayDown(showText_fast_noWrap(transpilationErrorBox, "Transpilation Error", renderStackTrace(e)))); |
24 | if (first) {
|
25 | setFrameIcon(#1101268, transpilationErrorBox); |
26 | addButtonsToWindow(transpilationErrorBox, |
27 | jbuttonWithDisable("Medium transpile", r runMe)
|
28 | ); |
29 | } |
30 | } |
31 | |
32 | error(e); |
33 | ret; |
34 | } |
35 | |
36 | infoBox("Transpiled OK!");
|
37 | hideWindow(transpilationErrorBox); |
38 | transpilationErrorBox = null; |
39 | success(); |
40 | } |
41 | |
42 | /*selfType coresToUse(int coresToUse) {
|
43 | tfs.runTranspiler.coresToUse(coresToUse); |
44 | this; |
45 | }*/ |
46 | } |
Began life as a copy of #1018437
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035543 |
| Snippet name: | TranspileWithErrorWindow - successor of transpileOnServerWithErrorWindow |
| Eternal ID of this version: | #1035543/13 |
| Text MD5: | 273e2326ce9295d935f7c62e1b4e07f6 |
| Transpilation MD5: | 13d2b887d56bf13580ebeef046694ab5 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-06-16 14:23:19 |
| Source code size: | 1232 bytes / 46 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 577 / 750 |
| Version history: | 12 change(s) |
| Referenced in: | [show references] |