void (final @NotNull String newName, final @NotNull ProjectSystemId externalSystemId, final @NotNull Project project) { if (!(project instanceof ProjectEx) || newName.equals(project.getName())) { return; } ExternalSystemApiUtil.executeProjectChangeAction(true, new DisposeAwareProjectChange(project) { @Override public void execute() { String oldName = project.getName(); ((ProjectEx)project).setProjectName(newName); ExternalSystemApiUtil.getSettings(project, externalSystemId).getPublisher().onProjectRenamed(oldName, newName); } }); }