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 candidates)
Populates candidates with a list of possible
completions for the buffer.
|
int |
matchFiles(String buffer,
String translated,
File[] entries,
List candidates)
Match the specified buffer to the array of entries
and enter the matches into the list of candidates.
|
protected void |
sortFileNames(List fileNames) |
public int complete(String buf, int cursor, List candidates)
Completor
List
before returning.protected void sortFileNames(List fileNames)
public int matchFiles(String buffer, String translated, File[] entries, List candidates)
buffer
- the untranslated buffertranslated
- the buffer with common characters replacedentries
- the list of files to matchcandidates
- the list of candidates to populateCopyright © 2002–2020. All rights reserved.