Bookmark (@NotNull VirtualFile file, int lineIndex, @NotNull @NlsSafe String description) { ThreadingAssertions.assertEventDispatchThread(); Bookmark b = new Bookmark(myProject, file, lineIndex, description); // increment all other indices and put new bookmark at index 0 myBookmarks.values().forEach(bookmark -> bookmark.index++); myBookmarks.putValue(file, b); getPublisher().bookmarkAdded(b); return b; }