List<Module> (@NotNull Project project, ModifiableModuleModel model, ModulesProvider modulesProvider) { LanguageLevelProjectExtension extension = LanguageLevelProjectExtension.getInstance(ProjectManager.getInstance().getDefaultProject()); Boolean aDefault = extension.getDefault(); LOG.debug("commit: aDefault=" + aDefault); LanguageLevelProjectExtension instance = LanguageLevelProjectExtension.getInstance(project); if (aDefault != null && !aDefault) { instance.setLanguageLevel(extension.getLanguageLevel()); } else { //setup language level according to jdk, then setup default flag Sdk sdk = ProjectRootManager.getInstance(project).getProjectSdk(); LOG.debug("commit: projectSdk=" + sdk); if (sdk != null) { JavaSdkVersion version = JavaSdk.getInstance().getVersion(sdk); LOG.debug("commit: sdk.version=" + version); if (version != null) { instance.setLanguageLevel(version.getMaxLanguageLevel()); instance.setDefault(true); } } } return super.commit(project, model, modulesProvider); }