boolean (PsiJavaFile javaFile, String importStatement) { PsiImportList importList = javaFile.getImportList(); if (importList == null) { return false; } if (importStatement.endsWith(".*")) { return importList.findOnDemandImportStatement(fixImportStatement(importStatement)) != null; } else { return importList.findSingleClassImportStatement(importStatement) != null; } }