Download Jar. Uses 1485K of libraries. Click here for Pure Java version (16430L/98K).
1 | !7 |
2 | |
3 | delegate AbstractParser, ParseResult, DefaultParseResult, |
4 | DefaultParserNotice |
5 | to org.fife.ui.rsyntaxtextarea.parser. |
6 | |
7 | import org.fife.ui.rsyntaxtextarea.RSyntaxDocument; |
8 | |
9 | sclass MyParser extends AbstractParser { |
10 | @Override |
11 | public ParseResult parse(RSyntaxDocument doc, String style) ctex { |
12 | print("Parsing"); |
13 | var result = new DefaultParseResult(this); |
14 | S text = doc.getText(0, doc.getLength()); |
15 | print(+text); |
16 | S firstLine = firstLine(text); |
17 | if (l(firstLine) > 1) |
18 | result.addNotice(new DefaultParserNotice(this, "What?", 0, 0, l(firstLine)-1)); |
19 | ret result; |
20 | } |
21 | } |
22 | |
23 | p-exp { |
24 | RSyntaxTextAreaWithSearch ta = rSyntaxTextAreaWithSearch(); |
25 | ta.menuLessOperation(); |
26 | new MyParser parser; |
27 | ta.textArea().addParser(parser); |
28 | |
29 | // You can also call ta.textArea().forceReparsing(parser); |
30 | |
31 | showFrame(ta); |
32 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035118 |
Snippet name: | RSyntaxTextArea Squiggly Line Spike [OK] |
Eternal ID of this version: | #1035118/15 |
Text MD5: | 4e86dc9bb3fbb6c3f6c2ec2967f0dcc1 |
Transpilation MD5: | 612a1bc6c6bda42d39be258399c9e3d0 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-30 17:07:30 |
Source code size: | 876 bytes / 32 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 265 / 972 |
Version history: | 14 change(s) |
Referenced in: | [show references] |