(String prefix)
| 622 | throw new Error(); |
| 623 | } |
| 624 | |
| 625 | |
| 626 | @Override |
| 627 | @HiddenInAutocomplete |
| 628 | public List<Completion> getCompletionsFor(String prefix) { |
| 629 | |
| 630 | Log.log("completion.debug", () -> "inside getCompletionsFor (box) " + prefix); |
| 631 | |
| 632 | Stream<Dict.Prop> propStream = this.breadthFirst(this.upwards()) |
| 633 | .map(x -> x.properties.getMap() |
| 634 | .keySet()).flatMap(Collection::stream); |
| 635 | |
| 636 | List<Completion> l1 = assembleCompletions(prefix, propStream); |
| 637 | l1.forEach(x -> x.rank++); |
| 638 | |
| 639 | List<Completion> l1b = assembleCompletions(prefix, Dict.canonicalProperties()); |
| 640 | l1.addAll(l1b.stream() |
| 641 | .filter(x -> { |
| 642 | for (Completion c : l1) |
| 643 | if (c.replacewith.equals(x.replacewith)) return false; |
| 644 | return true; |
| 645 | }) |
| 646 | .collect(Collectors.toList())); |
| 647 | |
| 648 | List<Completion> l2 = JavaSupport.javaSupport.getOptionCompletionsFor(this, prefix); |
| 649 | |
| 650 | l1.addAll(l2.stream() |
| 651 | .filter(x -> { |
| 652 | for (Completion c : l1) |
| 653 | if (c.replacewith.equals(x.replacewith)) return false; |
| 654 | return true; |
| 655 | }) |
| 656 | .collect(Collectors.toList())); |
| 657 | |
| 658 | |
| 659 | Log.log("completion.debug", () -> "returning " + l1 + " as completions"); |
| 660 | |
| 661 | return l1; |
| 662 | } |
| 663 |
nothing calls this directly
no test coverage detected