@Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
      super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
      if (value instanceof PsiVariable psiVariable) {
        final String text = PsiFormatUtil.formatVariable(psiVariable,
                                                         PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_TYPE,
                                                         PsiSubstitutor.EMPTY);
        setIcon(psiVariable.getIcon(0));
        setText(text);
      }
      else if (value instanceof @NlsSafe String s) {
        setText(s);
      }
      return this;
    }
@Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)