Sdk (@NotNull SdkModel sdkModel, @NotNull SdkType sdkType, @NotNull Consumer<? super Sdk> sdkCreatedCallback) { final Ref<Sdk> result = new Ref<>(null); SdkConfigurationUtil.selectSdkHome(sdkType, home -> { final ProjectJdkImpl newJdk = SdkConfigurationUtil.createSdk(Arrays.asList(sdkModel.getSdks()), home, sdkType, null, null); sdkCreatedCallback.consume(newJdk); result.set(newJdk); }); return result.get(); }