void (@NotNull ModifiableRootModel modifiableRootModel, E data) { if (!data.isSetSdkName()) return; if (modifiableRootModel.getSdk() != null) return; String skdName = data.getSdkName(); if (skdName == null) return; ProjectJdkTable projectJdkTable = ProjectJdkTable.getInstance(); Sdk sdk = projectJdkTable.findJdk(skdName); if (sdk == null) return; Project project = modifiableRootModel.getProject(); ProjectRootManager projectRootManager = ProjectRootManager.getInstance(project); Sdk projectSdk = projectRootManager.getProjectSdk(); if (sdk.equals(projectSdk)) { modifiableRootModel.inheritSdk(); } else { modifiableRootModel.setSdk(sdk); } }