1 | private String[] getCompletions(String str)↵ | | 1 | public static String[] get↵
|
2 | {↵ | | |
|
3 | str = str.toLowerCase();↵ | | |
|
4 | String[] actions = jEdit.getActionNames();↵ | | |
|
5 | ArrayList returnValue = new ArrayList(actions.length);↵ | | |
|
| | | 2 | VFSs()↵
|
| | | 3 | {↵
|
| | | 4 | // the sooner ppl move to the new api, the less we'll need↵
|
| | | 5 | // crap like this↵
|
| | | 6 | List returnValue = new LinkedList();↵
|
| | | 7 | String[] newAPI = ServiceManager.getServiceNames(SERVICE);↵
|
| | | 8 | if(newAPI != null)↵
|
| | | 9 | {↵
|
6 | for(int i = 0; i < actions.length; i++)↵ | | 10 | for(int i = 0; i < newAPI.length; i++)↵
|
7 | {↵ | | 11 | {↵
|
8 | if(actions[i].toLowerCase().indexOf(str) != -1↵ | | 12 | returnValue.add(newAPI[i]);↵
|
| | | 13 | }↵
|
| | | 14 | }↵
|
| | | 15 | Enumeration oldAPI = vfsHash.keys();↵
|
9 | )↵ | | 16 | while(oldAPI.hasMoreElements())↵
|
10 | returnValue.add(actions[i]);↵ | | 17 | returnValue.add(↵
|
11 | }↵ | | |
|
| | | 18 | oldAPI.nextElement());↵
|
12 | return (String[])returnValue.toArray(new String[↵ | | 19 | return (String[])returnValue.toArray(new String[↵
|
13 | returnValue.size()]);↵ | | 20 | returnValue.size()]);↵
|
14 | | | 21 |
|