JavaSdkVersion (PsiElement element) { final Module module = ModuleUtilCore.findModuleForPsiElement(element); if (module != null) { final Sdk sdk = ModuleRootManager.getInstance(module).getSdk(); if (sdk != null && sdk.getSdkType() instanceof JavaSdk) { final JavaSdkVersion version = JavaSdk.getInstance().getVersion(sdk); if (version != null) { return version; } } } return JavaSdkVersion.JDK_1_9; }