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

29
LINES

< > BotCompany Repo | #1015747 // Check standard function for safety Spike [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (11306L/84K).

1  
!7
2  
3  
static S listName = "JavaX Identifier Safety";
4  
static JTable table;
5  
6  
p-exp {
7  
  makeTable();
8  
  final JTextField tf = jtextfield();
9  
  Runnable save = r {
10  
    S value = getTextTrim(tf);
11  
    if (nempty(value))
12  
      if (ml_isChange(addToMechMap(listName,
13  
        mapWithSingleValue(selectedTableRowsFirstColumn(table), value))))
14  
          makeTable()
15  
  };
16  
  onEnter(tf, save);
17  
  addToWindowWithMargin(table, jcenteredline(
18  
    jlabel("Safety comment:"), jminwidth(250, tf),
19  
    selectedRowCountTableButton(table, jbutton("Save", save))));
20  
}
21  
22  
svoid makeTable {
23  
  S fname = 'standardBotsToRun;
24  
  Set<S> identifiers = setMinus(tok_allIdentifiers(textOfStandardFunction(fname)), fname);
25  
  final SS map = mechHashMap(listName);
26  
  O f = func(S id) -> Map { litorderedmap("Identifier" := id, Safety := or2(map.get(id), "?")) };
27  
  sexyTable_drag = false;
28  
  table = showTable(table, map(f, sortedIC(identifiers)));
29  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015747
Snippet name: Check standard function for safety Spike [OK]
Eternal ID of this version: #1015747/25
Text MD5: d10b2bf3509b76a953f86a08875bea59
Transpilation MD5: 25bf120f079568d3b1e0c31cf9716b95
Author: stefan
Category: javax / code analysis
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-27 00:10:56
Source code size: 935 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 377 / 1031
Version history: 24 change(s)
Referenced in: [show references]