void (@NotNull SdkType newSdkType) { for (Sdk sdk : mySdks) { SdkTypeId sdkType = sdk.getSdkType(); if (sdkType instanceof UnknownSdkType && sdkType.getName().equals(newSdkType.getName()) && sdk instanceof ProjectJdkImpl) { WriteAction.run(() -> { Element additionalData = saveSdkAdditionalData(sdk); ((ProjectJdkImpl)sdk).changeType(newSdkType, additionalData); }); } } }