Sdk () { Logger .getInstance(getClass()) .warn("Call to the deprecated ProjectSettingsService#chooseAndSetSdk method. Please use new API instead"); if (myDeprecatedChosenSdk != null) { Sdk chosenSdk = myDeprecatedChosenSdk; myDeprecatedChosenSdk = null; return chosenSdk; } SdkPopupFactory .newBuilder() .withProject(myProject) .withSdkType(JavaSdk.getInstance()) .updateProjectSdkFromSelection() .onSdkSelected(sdk -> myDeprecatedChosenSdk = sdk) .buildPopup() .showInFocusCenter(); return null; }