void (@NotNull ListPopup popup) { ApplicationManager.getApplication().invokeLater(() -> { popup.getContent().setPreferredSize(new Dimension(DEFAULT_WIDTH, popup.getContent().getPreferredSize().height)); popup.getContent().setSize(new Dimension(DEFAULT_WIDTH, popup.getContent().getPreferredSize().height)); popup.setSize(popup.getContent().getPreferredSize()); }); }