private static @Nullable String getItemText(LookupElementPresentation base, LookupElement castItem) {
    final LookupElementPresentation castPresentation = new LookupElementPresentation();
    castItem.renderElement(castPresentation);
    return castPresentation.getItemText();
  }
private static @Nullable String getItemText(LookupElementPresentation base, LookupElement castItem)