JComponent (@NotNull Collection<? extends Change> changes, @Nullable String commitMessage) { String patchPath = StringUtil.nullize(PropertiesComponent.getInstance(myProject).getValue(VCS_PATCH_PATH_KEY)); if (patchPath == null) { patchPath = VcsApplicationSettings.getInstance().PATCH_STORAGE_LOCATION; if (patchPath == null) { patchPath = getDefaultPatchPath(myProject); } } myPanel.setFileName(ShelveChangesManager.suggestPatchName(myProject, commitMessage, new File(patchPath), null).toPath()); myPanel.setToClipboard(PropertiesComponent.getInstance(myProject).getBoolean(VCS_PATCH_TO_CLIPBOARD, false)); File commonAncestor = ChangesUtil.findCommonAncestor(changes); myPanel.setCommonParentPath(commonAncestor); myPanel.selectBasePath(PatchWriter.calculateBaseDirForWritingPatch(myProject, changes).toString()); myPanel.setReversePatch(false); myPanel.setReverseEnabledAndVisible(myPatchBuilder.isReverseSupported()); JComponent panel = myPanel.getPanel(); panel.putClientProperty(SessionDialog.VCS_CONFIGURATION_UI_TITLE, VcsBundle.message("create.patch.settings.dialog.title")); return panel; }