void (@NotNull AnActionEvent e) { PsiFile psiFile = getTargetFile(e.getDataContext()); LOG.assertTrue(psiFile != null); Project project = e.getProject(); LOG.assertTrue(project != null); DaemonCodeAnalyzer codeAnalyzer = DaemonCodeAnalyzer.getInstance(project); codeAnalyzer.setImportHintsEnabled(psiFile, !codeAnalyzer.isImportHintsEnabled(psiFile)); }