void (@NotNull CompletionResultSet result, @NotNull MavenDomShortArtifactCoordinates coordinates, @NotNull ConcurrentLinkedDeque<RepositoryArtifactData> cld, @NotNull Promise<Integer> promise, @NotNull String completionPrefix) { while (promise.getState() == PENDING || !cld.isEmpty()) { ProgressManager.checkCanceled(); RepositoryArtifactData item = cld.poll(); if (item instanceof MavenRepositoryArtifactInfo) { fillResult(coordinates, result, (MavenRepositoryArtifactInfo)item, completionPrefix); } if (item == PoisonedRepositoryArtifactData.INSTANCE) break; } }