GitChangesSaver (@NotNull Project project, @NotNull Git git, @NotNull ProgressIndicator progressIndicator, @NotNull @Nls String stashMessage, @NotNull GitSaveChangesPolicy saveMethod) { if (saveMethod == GitSaveChangesPolicy.SHELVE) { return new GitShelveChangesSaver(project, git, progressIndicator, stashMessage); } return new GitStashChangesSaver(project, git, progressIndicator, stashMessage); }