equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
1438 .map(c -> ((noslash && c.command.startsWith("/")) |
1438 .map(c -> ((noslash && c.command.startsWith("/")) |
1439 ? c.command.substring(1) |
1439 ? c.command.substring(1) |
1440 : c.command) + " ") |
1440 : c.command) + " ") |
1441 .toArray(String[]::new)) |
1441 .toArray(String[]::new)) |
1442 .completionSuggestions(code, cursor, anchor); |
1442 .completionSuggestions(code, cursor, anchor); |
1443 } else if (code.startsWith("/se")) { |
1443 } else if (code.startsWith("/se") || code.startsWith("se")) { |
1444 result = new FixedCompletionProvider(SET_SUBCOMMANDS) |
1444 result = new FixedCompletionProvider(SET_SUBCOMMANDS) |
1445 .completionSuggestions(code.substring(pastSpace), cursor - pastSpace, anchor); |
1445 .completionSuggestions(code.substring(pastSpace), cursor - pastSpace, anchor); |
1446 } else { |
1446 } else { |
1447 result = Collections.emptyList(); |
1447 result = Collections.emptyList(); |
1448 } |
1448 } |