private static List<ProblemDescriptor> runInspectionOnFile( @NotNull PsiFile file, @NotNull LocalInspectionTool inspectionTool) { InspectionManager inspectionManager = InspectionManager.getInstance(file.getProject()); GlobalInspectionContext context = inspectionManager.createNewGlobalContext(false); return InspectionEngine.runInspectionOnFile( file, new LocalInspectionToolWrapper(inspectionTool), context); }