From 4c5a80714d1ca50786a1721358b947c539b87700 Mon Sep 17 00:00:00 2001 From: dgelessus <dgelessus@users.noreply.github.com> Date: Tue, 18 Mar 2025 11:48:11 +0100 Subject: [PATCH] Update for incompatible changes to CompleteIdentifierCommand --- src/main/java/de/prob2/jupyter/CommandUtils.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/prob2/jupyter/CommandUtils.java b/src/main/java/de/prob2/jupyter/CommandUtils.java index 09d582d..2ff7249 100644 --- a/src/main/java/de/prob2/jupyter/CommandUtils.java +++ b/src/main/java/de/prob2/jupyter/CommandUtils.java @@ -409,13 +409,18 @@ public final class CommandUtils { cmdExact.addKeywordContext(CompleteIdentifierCommand.KeywordContext.ALL); trace.getStateSpace().execute(cmdExact); // Use LinkedHashSet to remove duplicates while maintaining order. - final Set<String> completions = new LinkedHashSet<>(cmdExact.getCompletions()); + final Set<String> completions = new LinkedHashSet<>(); + for (CompleteIdentifierCommand.Completion completion : cmdExact.getCompletions()) { + completions.add(completion.getCompletion()); + } final CompleteIdentifierCommand cmdIgnoreCase = new CompleteIdentifierCommand(prefix); cmdIgnoreCase.setIgnoreCase(true); cmdIgnoreCase.addKeywordContext(CompleteIdentifierCommand.KeywordContext.ALL); trace.getStateSpace().execute(cmdIgnoreCase); - completions.addAll(cmdIgnoreCase.getCompletions()); + for (CompleteIdentifierCommand.Completion completion : cmdExact.getCompletions()) { + completions.add(completion.getCompletion()); + } return new ReplacementOptions(new ArrayList<>(completions), start, end); }; -- GitLab