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

27
LINES

< > BotCompany Repo | #1016639 // Show Error Line [Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (14762L/103K).

1  
!7
2  
3  
sclass ShowErrorLine extends DynTextArea {
4  
  transient L<S> lastOne;
5  
  
6  
  void start {
7  
    dm_requireModule("#1016638/LineAtMouse");
8  
    doEvery(1.0, r updateMe);
9  
  }
10  
  
11  
  void update {
12  
    O mod = dm_moduleOfType("#1016638/LineAtMouse");
13  
    S text = castCall(mod, 'getText);
14  
    if (empty(text)) ret;
15  
    L<S> l = regexpFirstGroups([[\(m(\d+)\.java:(\d+)\)]], text);
16  
    //print("Have groups: " + l);
17  
    if (empty(l) || eq(lastOne, l)) ret;
18  
    lastOne = l;
19  
    S progID = fsI(first(l));
20  
    int line = parseInt(second(l));
21  
    
22  
    setModuleName("Error line " + progID + " : " + line);
23  
    
24  
    setText(getServerTranspiledWithoutLibs(progID));
25  
    textAreaGoToRow(textArea, line);
26  
  }
27  
}

Author comment

Began life as a copy of #1012341

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: #1016639
Snippet name: Show Error Line [Dyn Module]
Eternal ID of this version: #1016639/10
Text MD5: 6de91e2be6ba1ac60875486532f96fca
Transpilation MD5: 6ce0b5fe3d79909bab59b0f3ae7ac9d2
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-07 15:48:45
Source code size: 720 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 336 / 666
Version history: 9 change(s)
Referenced in: [show references]