Package javarepl.completion

Examples of javarepl.completion.CompletionResult.position()

    public void returnsCompletions() throws Exception {
        client.execute("life = 42");
        CompletionResult result = client.completions("li");

        assertThat(result.expression(), is("li"));
        assertThat(result.position(), is(0));
        assertThat(result.candidates().map(candidateValue()), is(one("life")));

View Full Code Here

                return new jline.console.completer.Completer() {
                    public int complete(String expression, int cursor, List<CharSequence> candidates) {
                        try {
                            CompletionResult result = client.completions(expression);
                            return result.candidates().isEmpty() ? -1 : result.position();
                        } catch (Exception e) {
                            return -1;
View Full Code Here

Copyright © 2018 All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact