boolean (@NotNull Project project) { final boolean projectLevelIsHigh = PsiUtil.getLanguageLevel(project).isAtLeast(LanguageLevel.JDK_1_8); for (Module module : ModuleManager.getInstance(project).getModules()) { final LanguageLevelModuleExtension extension = ModuleRootManager.getInstance(module).getModuleExtension(LanguageLevelModuleExtension.class); if (extension != null) { final LanguageLevel level = extension.getLanguageLevel(); if (level == null ? projectLevelIsHigh : level.isAtLeast(LanguageLevel.JDK_1_8)) { return true; } } } return false; }