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

29
LINES

< > BotCompany Repo | #1004661 // Test auto-completion in RSyntaxTextArea [WORKS!] - But only with predefined completions

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

Uses 3874K of libraries. Compilation Failed (6705L/46K).

1  
!752
2  
3  
import org.fife.ui.autocomplete.*;
4  
5  
p-substance {
6  
  editJavaXSnippet_Editor editor = editJavaXSnippet("#636");
7  
  
8  
  new DefaultCompletionProvider provider;
9  
  provider.addCompletion(new BasicCompletion(provider, "abstract"));
10  
  provider.addCompletion(new BasicCompletion(provider, "assert"));
11  
  provider.addCompletion(new BasicCompletion(provider, "break"));
12  
  provider.addCompletion(new BasicCompletion(provider, "case"));
13  
  // ... etc ...
14  
  provider.addCompletion(new BasicCompletion(provider, "transient"));
15  
  provider.addCompletion(new BasicCompletion(provider, "try"));
16  
  provider.addCompletion(new BasicCompletion(provider, "void"));
17  
  provider.addCompletion(new BasicCompletion(provider, "volatile"));
18  
  provider.addCompletion(new BasicCompletion(provider, "while"));
19  
20  
  // Add a couple of "shorthand" completions. These completions don't
21  
  // require the input text to be the same thing as the replacement text.
22  
  provider.addCompletion(new ShorthandCompletion(provider, "sysout",
23  
        "System.out.println(", "System.out.println("));
24  
  provider.addCompletion(new ShorthandCompletion(provider, "syserr",
25  
        "System.err.println(", "System.err.println("));
26  
27  
  AutoCompletion ac = new AutoCompletion(provider);
28  
  ac.install(editor.textArea);
29  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004661
Snippet name: Test auto-completion in RSyntaxTextArea [WORKS!] - But only with predefined completions
Eternal ID of this version: #1004661/2
Text MD5: d46c6770813844a83d7f55ee4edd1808
Transpilation MD5: 625a51f7103849fed76f24e9b8e34045
Author: stefan
Category: javax / editors
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-18 21:33:23
Source code size: 1288 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 566 / 615
Version history: 1 change(s)
Referenced in: [show references]