void (@NotNull String sdkName, @NotNull String sdkType) { WriteAction.run(() -> { ModifiableRootModel model = ModuleRootManager.getInstance(getModule()).getModifiableModel(); model.setInvalidSdk(sdkName, sdkType); model.commit(); }); }