@Override
      public void elementChosen(ChooseByNamePopup popup, final Object element) {
        ApplicationManager.getApplication().invokeLater(
          () -> runInspection(project, (((InspectionElement)element)).getToolWrapper().getShortName(), virtualFiles, psiElement, psiFile));
      }
@Override
      public void elementChosen(ChooseByNamePopup popup, final Object element)