Uses 2805K of libraries. Click here for Pure Java version (6265L/43K).
1 | !7 |
2 | |
3 | sclass ShowStandardClass extends DynModule { |
4 | S function, text; |
5 | |
6 | transient SingleComponentPanel scp; |
7 | |
8 | JComponent visualize() { scp = singleComponentPanel(); updateVis(); ret scp; } |
9 | void unvisualize() { scp = null; } |
10 | |
11 | start { |
12 | dm_onTopInput(r updateMe); |
13 | } |
14 | |
15 | void update { |
16 | S s = dm_getInterestingString(); |
17 | print("ShowStandardClass.update " + s); |
18 | if (isIdentifier(s)) { |
19 | S snippetID = standardClassesMap_cached().get(s); |
20 | print("ShowStandardClass.snippetID " + snippetID); |
21 | if (snippetID == null) ret; |
22 | function = s; |
23 | text = loadSnippet(snippetID); |
24 | setModuleName(s + " [Standard Class]"); |
25 | setModuleToolTip(snippetID); // not used yet |
26 | updateVis(); |
27 | } |
28 | } |
29 | |
30 | void updateVis { |
31 | if (scp != null) scp.setComponent(scrollableJavaxSyntaxTextAreaOrNull(text)); |
32 | } |
33 | } |
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, vpdwwinrgdga
No comments. add comment
Snippet ID: | #1015869 |
Snippet name: | ShowStandardClass [DynModule] |
Eternal ID of this version: | #1015869/17 |
Text MD5: | c23a26fd0316284f1472ed3f1baa572c |
Transpilation MD5: | d51b9da2ca9aff4467f8575e66b63398 |
Author: | stefan |
Category: | |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-14 16:55:05 |
Source code size: | 871 bytes / 33 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 491 / 650 |
Version history: | 16 change(s) |
Referenced in: | [show references] |