Uses 911K of libraries. Click here for Pure Java version (8206L/42K).
1 | !7 |
2 | |
3 | cmodule SmartParser > DynTextArea {
|
4 | transient SingleComponentPanel scp; |
5 | transient L<ExtS> parsed; |
6 | |
7 | visual jvsplit(super, jCenteredSection("Parsed", scp = singleComponentPanel(makeComponent())));
|
8 | |
9 | start {
|
10 | dm_watchFieldAndNow text(r parse); |
11 | } |
12 | |
13 | void parse {
|
14 | setField(parsed := map getVarOpt(smartParser1_generic(text))); |
15 | if (scp != null) |
16 | scp.setComponent(makeComponent()); |
17 | } |
18 | |
19 | JComponent makeComponent() {
|
20 | pnl(+parsed); |
21 | ret jscroll(jTree_hideRoot(jDynamicTree( |
22 | (O) parsed, o -> makeChildren(o), makeChildrenIsFast := true))); |
23 | } |
24 | |
25 | Cl makeChildren(O o) {
|
26 | o = fullyUnpackVar(o); |
27 | if (o cast Cl) ret o; |
28 | if (o cast S) ret smartParser1_subParse(o); |
29 | null; |
30 | } |
31 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025647 |
| Snippet name: | Smart Parser Text Area [OK] |
| Eternal ID of this version: | #1025647/26 |
| Text MD5: | 17562dc7e8eed0cb8d767aed16d34d0e |
| Transpilation MD5: | bc6b5dac5850cc449f8fa65e83ee7d96 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-10-19 14:30:56 |
| Source code size: | 758 bytes / 31 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 537 / 9030 |
| Version history: | 25 change(s) |
| Referenced in: | [show references] |