Search in sources :

Example 1 with Suggestion

use of io.jmix.ui.component.autocomplete.Suggestion in project jmix by jmix-framework.

the class SourceCodeEditorScreenTest method sourceCodeEditorSuggester.

@Install(to = "sourceCodeEditor", subject = "suggester")
private List<Suggestion> sourceCodeEditorSuggester(AutoCompleteSupport source, String text, int cursorPosition) {
    List<String> options = Arrays.asList("___");
    List<Suggestion> suggestions = new ArrayList<>();
    for (String item : options) {
        suggestions.add(new Suggestion(source, item, item, null, startPosition, endPosition));
    }
    return suggestions;
}
Also used : Suggestion(io.jmix.ui.component.autocomplete.Suggestion) ArrayList(java.util.ArrayList) Install(io.jmix.ui.screen.Install)

Aggregations

Suggestion (io.jmix.ui.component.autocomplete.Suggestion)1 Install (io.jmix.ui.screen.Install)1 ArrayList (java.util.ArrayList)1