public class FileNameCompletor extends Object implements Completor
This completor tries to behave as similar as possible to bash's file name completion (using GNU readline) with the following exceptions:
TODO
Constructor and Description |
---|
FileNameCompletor() |
Modifier and Type | Method and Description |
---|---|
int |
complete(String buf,
int cursor,
List<String> candidates)
Populates candidates with a list of possible completions for the
buffer.
|
int |
matchFiles(String buffer,
String translated,
File[] entries,
List<String> candidates)
Match the specified buffer to the array of entries
and enter the matches into the list of candidates.
|
protected void |
sortFileNames(List<String> fileNames) |
public int complete(String buf, int cursor, List<String> candidates)
Completor
List
before returning.public int matchFiles(String buffer, String translated, File[] entries, List<String> candidates)
buffer
- the untranslated buffertranslated
- the buffer with common characters replacedentries
- the list of files to matchcandidates
- the list of candidates to populateCopyright © 2024. All rights reserved.