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

21
LINES

< > BotCompany Repo | #1016809 // Diff Two Snippets [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 (11169L/56K).

1  
!7
2  
3  
cm DiffTwoSnippets {
4  
  S s1, s2;
5  
  transient JTextArea taDiff;
6  
  
7  
  visual northAndCenterWithMargins(
8  
    centerAndEastWithMarginInbetween(jhgrid(
9  
      withLabel("Snippet 1 (\"-\"):", onEnter(jLiveValueTextField_bothWays(dm_fieldLiveValue('s1)), rThread go)),
10  
      withLabel("Snippet 2 (\"+\"):", onEnter(jLiveValueTextField_bothWays(dm_fieldLiveValue('s2)), rThread go))),
11  
      jbutton("Diff!", rThread go)),
12  
    taDiff = typeWriterTextArea());
13  
14  
  void go enter {
15  
    temp dm_tempDisableButtons();
16  
    S text1 = loadSnippet(trim(s1));
17  
    S text2 = loadSnippet(trim(s2));
18  
    setText(taDiff, "Diff between " + s1 + " and " + s2 + ":\n\n"
19  
      + or2(unidiff_rtrim(text1, text2), "no differences");
20  
  }
21  
}

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: #1016809
Snippet name: Diff Two Snippets [Dyn Module]
Eternal ID of this version: #1016809/16
Text MD5: d62bc926220a7b115697e096962a9f40
Transpilation MD5: ad4b0a93691d1a0b6ec82c2bb6397cb0
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-08 05:20:53
Source code size: 731 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 349 / 12110
Version history: 15 change(s)
Referenced in: [show references]