Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

51
LINES

< > BotCompany Repo | #1017065 // Transpiler [Helper Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 1113K of libraries. Click here for Pure Java version (13291L/72K).

1  
!7
2  
3  
cmodule2 Transpiler > DynPrintLog {
4  
  switchable bool silent = true;
5  
  switchable bool showTrayIcon;
6  
  
7  
  S switchableFields() { ret 'silent; }
8  
  
9  
  start {
10  
    dm_onSnippetTranspiled(voidfunc(S snippetID) {
11  
      if (sameSnippetID(snippetID, defaultTranspilerID()))
12  
        refresh();
13  
    });
14  
15  
    dm_reloadOnFieldChange showTrayIcon();
16  
    if (showTrayIcon)
17  
      dm_addTrayIcon_left(onClickAndPopupItem(jimage_16(#1101475), "Refresh Transpiler", rThread refresh));
18  
  }
19  
  
20  
  void mediumRefresh {
21  
    veryQuickJava_mediumRefresh();
22  
    vmBus_send('refreshedTranspiler);
23  
    print("Medium-refreshed translator.");
24  
  }
25  
  
26  
  void refresh {
27  
    veryQuickJava_refresh();
28  
    vmBus_send('refreshedTranspiler);
29  
    print("Refreshed translator.");
30  
  }
31  
  
32  
  S transpileRaw(S mainJava) {
33  
    transpileRaw_silent = silent;
34  
    ret main.transpileRaw(mainJava);
35  
  }
36  
  
37  
  S transpileRaw(S mainJava, bool fragment, bool useDiskCache) {
38  
    transpileRaw_silent = silent;
39  
    ret main.transpileRaw(mainJava, fragment, useDiskCache);
40  
  }
41  
  
42  
  O mc() {
43  
    ret main.class;
44  
  }
45  
  
46  
  L getTranspilerAndLock() enter {
47  
    transpileRaw_silent = silent;
48  
    transpileRaw_translator();
49  
    ret ll(transpileRaw_trans, transpileRaw_lock);
50  
  }
51  
}

Author comment

Began life as a copy of #1016755

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, hpgrupgrauku, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1017065
Snippet name: Transpiler [Helper Dyn Module]
Eternal ID of this version: #1017065/18
Text MD5: 3246f7e84daecad2ea52d6218ad49e10
Transpilation MD5: 323be34b7fbd94efd52880aa42350965
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-09 17:47:54
Source code size: 1272 bytes / 51 lines
Pitched / IR pitched: No / No
Views / Downloads: 423 / 540298
Version history: 17 change(s)
Referenced in: [show references]