Uses 2805K of libraries. Click here for Pure Java version (14557L/101K).
1 | !7 |
2 | |
3 | sclass ShowJDKClass extends DynModule { |
4 | S file, text; |
5 | |
6 | transient SingleComponentPanel scp; |
7 | |
8 | JComponent visualize() { scp = singleComponentPanel(); updateVis(); ret scp; } |
9 | void unvisualize() { scp = null; } |
10 | |
11 | start { dm_onTopInput(r updateMe); } |
12 | |
13 | void update { |
14 | S s = dm_getInterestingString(); |
15 | if (isIdentifier(s)) { |
16 | S file = first(endingWithIC(allJDKSourceFileNames(), "/" + s + ".java")); |
17 | if (file == null) ret; |
18 | if (!setField(+file)) ret; |
19 | setField(text := loadTextFileFromZip(jdkSrcZip(), file)); |
20 | setModuleName(file); |
21 | updateVis(); |
22 | } |
23 | } |
24 | |
25 | void updateVis { |
26 | if (scp != null) scp.setComponent(scrollableJavaxSyntaxTextAreaOrNull(text)); |
27 | } |
28 | } |
Began life as a copy of #1015869
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015930 |
Snippet name: | ShowJDKClass [DynModule] |
Eternal ID of this version: | #1015930/4 |
Text MD5: | 7c7c8025f20a1fa678f99dd397563875 |
Transpilation MD5: | 80192ada6056ced9ea30d8c48241f28e |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-14 16:57:49 |
Source code size: | 741 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 412 / 852 |
Version history: | 3 change(s) |
Referenced in: | [show references] |