void (@NotNull Collection<? extends TextAnnotationGutterProvider> annotations) { if (!myCanCloseAnnotations) return; ReferenceOpenHashSet<TextAnnotationGutterProvider> toClose = new ReferenceOpenHashSet<>(annotations); for (int i = myTextAnnotationGutters.size() - 1; i >= 0; i--) { TextAnnotationGutterProvider provider = myTextAnnotationGutters.get(i); if (toClose.contains(provider)) { provider.gutterClosed(); myTextAnnotationGutters.remove(i); myTextAnnotationGutterSizes.removeInt(i); myProviderToListener.remove(provider); fireTextAnnotationGutterProviderRemoved(provider); } } updateSize(); }