void (@NotNull Project project) { final ExternalSystemFacadeManager facadeManager = ApplicationManager.getApplication().getService(ExternalSystemFacadeManager.class); for (ExternalSystemManager<?, ?, ?, ?, ?> manager : ExternalSystemApiUtil.getAllManagers()) { AbstractExternalSystemSettings settings = manager.getSettingsProvider().fun(project); //noinspection unchecked settings.subscribe(new ExternalSystemSettingsListener<>() { @Override public void onProjectRenamed(@NotNull String oldName, @NotNull String newName) { facadeManager.onProjectRename(oldName, newName); } }, settings); } }