From da86d9b512c22c6e648c284d928b3f9fc6402f04 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 18 Jun 2018 12:34:43 +0200 Subject: [PATCH] Delete old implementation of multiple file merge dialog --- .../util/resources/misc/registry.properties | 3 - .../vcs/impl/AbstractVcsHelperImpl.java | 18 +- .../vcs/merge/MultipleFileMergeDialog.form | 81 ---- .../vcs/merge/MultipleFileMergeDialog.java | 459 ------------------ ...eDialog2.kt => MultipleFileMergeDialog.kt} | 15 +- .../src/BaseRepositoryManager.kt | 3 +- 6 files changed, 18 insertions(+), 561 deletions(-) delete mode 100644 platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.form delete mode 100644 platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java rename platform/vcs-impl/src/com/intellij/openapi/vcs/merge/{MultipleFileMergeDialog2.kt => MultipleFileMergeDialog.kt} (97%) diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index f683ad9e608f..98ad96b0141d 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -521,9 +521,6 @@ vcs.enable.partial.changelists.redo.restartRequired=true vcs.skip.single.default.changelist=false vcs.skip.single.default.changelist.description=Don't show changelist node in Local Changes view when only the Default changelist exists -vcs.new.multiple.file.merge=true -vcs.new.multiple.file.merge.description=Use new implementation of multiple files merge dialog - psi.incremental.reparse.depth.limit=1000 psi.deferIconLoading=true diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java index ab97170de417..73c4d048fb80 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/AbstractVcsHelperImpl.java @@ -29,7 +29,6 @@ import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Getter; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.io.FileUtil; -import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.*; import com.intellij.openapi.vcs.actions.AnnotateToggleAction; @@ -47,7 +46,6 @@ import com.intellij.openapi.vcs.history.VcsRevisionNumber; import com.intellij.openapi.vcs.merge.MergeDialogCustomizer; import com.intellij.openapi.vcs.merge.MergeProvider; import com.intellij.openapi.vcs.merge.MultipleFileMergeDialog; -import com.intellij.openapi.vcs.merge.MultipleFileMergeDialog2; import com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings; import com.intellij.openapi.vcs.versionBrowser.ChangesBrowserSettingsEditor; import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; @@ -498,18 +496,10 @@ public class AbstractVcsHelperImpl extends AbstractVcsHelper { @NotNull MergeDialogCustomizer mergeDialogCustomizer) { if (files.isEmpty()) return Collections.emptyList(); VfsUtil.markDirtyAndRefresh(false, false, false, ArrayUtil.toObjectArray(files, VirtualFile.class)); - if (Registry.is("vcs.new.multiple.file.merge")) { - final MultipleFileMergeDialog2 fileMergeDialog = new MultipleFileMergeDialog2(myProject, files, provider, mergeDialogCustomizer); - AppIcon.getInstance().requestAttention(myProject, true); - fileMergeDialog.show(); - return fileMergeDialog.getProcessedFiles(); - } - else { - final MultipleFileMergeDialog fileMergeDialog = new MultipleFileMergeDialog(myProject, files, provider, mergeDialogCustomizer); - AppIcon.getInstance().requestAttention(myProject, true); - fileMergeDialog.show(); - return fileMergeDialog.getProcessedFiles(); - } + final MultipleFileMergeDialog fileMergeDialog = new MultipleFileMergeDialog(myProject, files, provider, mergeDialogCustomizer); + AppIcon.getInstance().requestAttention(myProject, true); + fileMergeDialog.show(); + return fileMergeDialog.getProcessedFiles(); } public void openCommittedChangesTab(final AbstractVcs vcs, diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.form b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.form deleted file mode 100644 index 15724dc45ceb..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.form +++ /dev/null @@ -1,81 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java deleted file mode 100644 index 3ee7b26b621d..000000000000 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.java +++ /dev/null @@ -1,459 +0,0 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - -package com.intellij.openapi.vcs.merge; - -import com.intellij.CommonBundle; -import com.intellij.diff.DiffManager; -import com.intellij.diff.DiffRequestFactory; -import com.intellij.diff.InvalidDiffRequestException; -import com.intellij.diff.merge.MergeRequest; -import com.intellij.diff.merge.MergeResult; -import com.intellij.diff.merge.MergeUtil; -import com.intellij.diff.util.DiffUtil; -import com.intellij.ide.presentation.VirtualFilePresentation; -import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.command.CommandProcessor; -import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.diff.impl.mergeTool.MergeVersion; -import com.intellij.openapi.editor.Document; -import com.intellij.openapi.fileEditor.FileDocumentManager; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.project.ex.ProjectManagerEx; -import com.intellij.openapi.ui.DialogWrapper; -import com.intellij.openapi.ui.Messages; -import com.intellij.openapi.util.Ref; -import com.intellij.openapi.util.io.FileUtil; -import com.intellij.openapi.util.text.StringUtil; -import com.intellij.openapi.vcs.VcsBundle; -import com.intellij.openapi.vcs.VcsException; -import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.ui.ColoredTableCellRenderer; -import com.intellij.ui.DoubleClickListener; -import com.intellij.ui.SimpleTextAttributes; -import com.intellij.ui.TableSpeedSearch; -import com.intellij.ui.components.JBLabel; -import com.intellij.ui.speedSearch.SpeedSearchUtil; -import com.intellij.ui.table.TableView; -import com.intellij.util.Consumer; -import com.intellij.util.SmartList; -import com.intellij.util.containers.ContainerUtil; -import com.intellij.util.ui.ColumnInfo; -import com.intellij.util.ui.ListTableModel; -import com.intellij.util.ui.UIUtil; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; -import javax.swing.table.TableCellRenderer; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; -import java.io.IOException; -import java.util.*; - -/** - * @author yole - */ -public class MultipleFileMergeDialog extends DialogWrapper { - private static final Logger LOG = Logger.getInstance(MultipleFileMergeDialog.class); - - private JPanel myRootPanel; - private JButton myAcceptYoursButton; - private JButton myAcceptTheirsButton; - private JButton myMergeButton; - private TableView myTable; - private JBLabel myDescriptionLabel; - private final MergeProvider myProvider; - @Nullable private final MergeSession myMergeSession; - private final List myFiles; - private final ListTableModel myModel; - @Nullable - private final Project myProject; - private final ProjectManagerEx myProjectManager; - private final List myProcessedFiles = new SmartList<>(); - private final Set myBinaryFiles = new HashSet<>(); - private final MergeDialogCustomizer myMergeDialogCustomizer; - - private final VirtualFileRenderer myVirtualFileRenderer = new VirtualFileRenderer(); - - public MultipleFileMergeDialog(@Nullable Project project, @NotNull final List files, @NotNull final MergeProvider provider, - @NotNull MergeDialogCustomizer mergeDialogCustomizer) { - super(project); - - myProject = project; - myProjectManager = ProjectManagerEx.getInstanceEx(); - myProjectManager.blockReloadingProjectOnExternalChanges(); - myFiles = new ArrayList<>(files); - myProvider = provider; - myMergeDialogCustomizer = mergeDialogCustomizer; - - final String description = myMergeDialogCustomizer.getMultipleFileMergeDescription(files); - if (!StringUtil.isEmptyOrSpaces(description)) { - myDescriptionLabel.setText(description); - } - - List columns = new ArrayList<>(); - columns.add(new ColumnInfo(VcsBundle.message("multiple.file.merge.column.name")) { - @Override - public VirtualFile valueOf(final VirtualFile virtualFile) { - return virtualFile; - } - - @Override - public TableCellRenderer getRenderer(final VirtualFile virtualFile) { - return myVirtualFileRenderer; - } - - @Nullable - @Override - public Comparator getComparator() { - return VirtualFileComparator.INSTANCE; - } - }); - columns.add(new ColumnInfo(VcsBundle.message("multiple.file.merge.column.type")) { - @Override - public String valueOf(final VirtualFile virtualFile) { - return myBinaryFiles.contains(virtualFile) - ? VcsBundle.message("multiple.file.merge.type.binary") - : VcsBundle.message("multiple.file.merge.type.text"); - } - - @Override - public String getMaxStringValue() { - return VcsBundle.message("multiple.file.merge.type.binary"); - } - - @Override - public int getAdditionalWidth() { - return 10; - } - }); - if (myProvider instanceof MergeProvider2) { - myMergeSession = ((MergeProvider2)myProvider).createMergeSession(files); - Collections.addAll(columns, myMergeSession.getMergeInfoColumns()); - } - else { - myMergeSession = null; - } - myModel = new ListTableModel<>(columns.toArray(ColumnInfo.EMPTY_ARRAY)); - myModel.setItems(new ArrayList<>(myFiles)); - myTable.setModelAndUpdateColumns(myModel); - myVirtualFileRenderer.setFont(UIUtil.getListFont()); - myTable.setRowHeight(myVirtualFileRenderer.getPreferredSize().height); - setTitle(myMergeDialogCustomizer.getMultipleFileDialogTitle()); - init(); - myAcceptYoursButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(@NotNull ActionEvent e) { - acceptRevision(MergeSession.Resolution.AcceptedYours); - } - }); - myAcceptTheirsButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(@NotNull ActionEvent e) { - acceptRevision(MergeSession.Resolution.AcceptedTheirs); - } - }); - myTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { - @Override - public void valueChanged(@NotNull final ListSelectionEvent e) { - updateButtonState(); - } - }); - for (VirtualFile file : files) { - if (file.getFileType().isBinary() || provider.isBinary(file)) { - myBinaryFiles.add(file); - } - } - myTable.getSelectionModel().setSelectionInterval(0, 0); - new DoubleClickListener() { - @Override - protected boolean onDoubleClick(MouseEvent event) { - showMergeDialog(); - return true; - } - }.installOn(myTable); - new TableSpeedSearch(myTable, o -> { - if (o instanceof VirtualFile) { - return ((VirtualFile)o).getName(); - } - return null; - }); - } - - @Override - public void doCancelAction() { - if (!myProcessedFiles.isEmpty()) { - myProvider.mergeDone(myProcessedFiles); - } - super.doCancelAction(); - } - - private void updateButtonState() { - boolean haveSelection = myTable.getSelectedRowCount() > 0; - boolean haveUnmergeableFiles = false; - for (VirtualFile file : myTable.getSelection()) { - if (myMergeSession != null) { - boolean canMerge = myMergeSession.canMerge(file); - if (!canMerge) { - haveUnmergeableFiles = true; - break; - } - } - } - myAcceptYoursButton.setEnabled(haveSelection); - myAcceptTheirsButton.setEnabled(haveSelection); - myMergeButton.setEnabled(haveSelection && !haveUnmergeableFiles); - } - - @Override - @Nullable - protected JComponent createCenterPanel() { - return myRootPanel; - } - - @NotNull - @Override - protected Action[] createActions() { - return new Action[]{getCancelAction()}; - } - - @NotNull - @Override - protected Action getCancelAction() { - Action action = super.getCancelAction(); - action.putValue(Action.NAME, CommonBundle.getCloseButtonText()); - return action; - } - - @Override - protected void dispose() { - myProjectManager.unblockReloadingProjectOnExternalChanges(); - super.dispose(); - } - - protected boolean beforeResolve(Collection files) { - return true; - } - - @Override - @NonNls - protected String getDimensionServiceKey() { - return "MultipleFileMergeDialog"; - } - - private void acceptRevision(@NotNull MergeSession.Resolution resolution) { - FileDocumentManager.getInstance().saveAllDocuments(); - final Collection files = myTable.getSelection(); - if (!beforeResolve(files)) { - return; - } - - try { - for (VirtualFile file : files) { - acceptFileRevision(file, resolution); - checkMarkModifiedProject(file); - markFileProcessed(file, resolution); - } - } - catch (Exception e) { - LOG.warn(e); - Messages.showErrorDialog(myRootPanel, "Error saving merged data: " + e.getMessage()); - } - - updateModelFromFiles(); - } - - private void acceptFileRevision(@NotNull VirtualFile file, @NotNull MergeSession.Resolution resolution) throws Exception { - if (myMergeSession != null && !myMergeSession.canMerge(file)) return; - - if (!DiffUtil.makeWritable(myProject, file)) { - throw new IOException("File is read-only: " + file.getPresentableName()); - } - - boolean isCurrent = resolution == MergeSession.Resolution.AcceptedYours; - MergeData data = myProvider.loadRevisions(file); - - Ref ex = new Ref<>(); - CommandProcessor.getInstance().executeCommand(myProject, () -> { - ApplicationManager.getApplication().runWriteAction(() -> { - try { - if (isCurrent) { - file.setBinaryContent(data.CURRENT); - } - else { - file.setBinaryContent(data.LAST); - } - } - catch (Exception e) { - ex.set(e); - } - }); - }, "Accept " + (isCurrent ? "Yours" : "Theirs"), null); - - if (!ex.isNull()) throw ex.get(); - } - - private void markFileProcessed(@NotNull VirtualFile file, @NotNull MergeSession.Resolution resolution) { - myFiles.remove(file); - if (myMergeSession != null) { - myMergeSession.conflictResolvedForFile(file, resolution); - } - else { - myProvider.conflictResolvedForFile(file); - } - myProcessedFiles.add(file); - if (myProject != null) { - VcsDirtyScopeManager.getInstance(myProject).fileDirty(file); - } - } - - private void updateModelFromFiles() { - if (myFiles.isEmpty()) { - doCancelAction(); - } - else { - int selIndex = myTable.getSelectionModel().getMinSelectionIndex(); - myModel.setItems(new ArrayList<>(myFiles)); - if (selIndex >= myFiles.size()) { - selIndex = myFiles.size() - 1; - } - myTable.getSelectionModel().setSelectionInterval(selIndex, selIndex); - } - } - - private void showMergeDialog() { - DiffRequestFactory requestFactory = DiffRequestFactory.getInstance(); - Collection files = myTable.getSelection(); - if (!beforeResolve(files)) { - return; - } - - for (final VirtualFile file : files) { - final MergeData mergeData; - try { - mergeData = myProvider.loadRevisions(file); - } - catch (VcsException ex) { - Messages.showErrorDialog(myRootPanel, "Error loading revisions to merge: " + ex.getMessage()); - break; - } - - if (mergeData.CURRENT == null || mergeData.LAST == null || mergeData.ORIGINAL == null) { - Messages.showErrorDialog(myRootPanel, "Error loading revisions to merge"); - break; - } - - String leftTitle = myMergeDialogCustomizer.getLeftPanelTitle(file); - String baseTitle = myMergeDialogCustomizer.getCenterPanelTitle(file); - String rightTitle = myMergeDialogCustomizer.getRightPanelTitle(file, mergeData.LAST_REVISION_NUMBER); - String title = myMergeDialogCustomizer.getMergeWindowTitle(file); - - final List byteContents = ContainerUtil.list(mergeData.CURRENT, mergeData.ORIGINAL, mergeData.LAST); - List contentTitles = ContainerUtil.list(leftTitle, baseTitle, rightTitle); - - Consumer callback = result -> { - Document document = FileDocumentManager.getInstance().getCachedDocument(file); - if (document != null) FileDocumentManager.getInstance().saveDocument(document); - checkMarkModifiedProject(file); - - if (result != MergeResult.CANCEL) { - markFileProcessed(file, getSessionResolution(result)); - } - }; - - MergeRequest request; - try { - if (myProvider.isBinary(file)) { // respect MIME-types in svn - request = requestFactory.createBinaryMergeRequest(myProject, file, byteContents, title, contentTitles, callback); - } - else { - request = requestFactory.createMergeRequest(myProject, file, byteContents, title, contentTitles, callback); - } - - MergeUtil.putRevisionInfos(request, mergeData); - } - catch (InvalidDiffRequestException e) { - LOG.error(e); - Messages.showErrorDialog(myRootPanel, "Can't show merge dialog"); - break; - } - - DiffManager.getInstance().showMerge(myProject, request); - } - updateModelFromFiles(); - } - - @NotNull - private static MergeSession.Resolution getSessionResolution(@NotNull MergeResult result) { - switch (result) { - case LEFT: - return MergeSession.Resolution.AcceptedYours; - case RIGHT: - return MergeSession.Resolution.AcceptedTheirs; - case RESOLVED: - return MergeSession.Resolution.Merged; - default: - throw new IllegalArgumentException(result.name()); - } - } - - private void checkMarkModifiedProject(@NotNull VirtualFile file) { - MergeVersion.MergeDocumentVersion.reportProjectFileChangeIfNeeded(myProject, file); - } - - private void createUIComponents() { - Action mergeAction = new AbstractAction() { - @Override - public void actionPerformed(@NotNull ActionEvent e) { - showMergeDialog(); - } - }; - mergeAction.putValue(DEFAULT_ACTION, Boolean.TRUE); - myMergeButton = createJButtonForAction(mergeAction); - } - - @Override - public JComponent getPreferredFocusedComponent() { - return myTable; - } - - @NotNull - public List getProcessedFiles() { - return myProcessedFiles; - } - - private class VirtualFileRenderer extends ColoredTableCellRenderer { - @Override - protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) { - VirtualFile vf = (VirtualFile)value; - setIcon(VirtualFilePresentation.getIcon(vf)); - append(vf.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); - final VirtualFile parent = vf.getParent(); - if (parent != null) { - append(" (" + FileUtil.toSystemDependentName(parent.getPresentableUrl()) + ")", SimpleTextAttributes.GRAYED_ATTRIBUTES); - } - SpeedSearchUtil.applySpeedSearchHighlighting(myTable, this, true, selected); - } - } - - private static class VirtualFileComparator implements Comparator { - public static final VirtualFileComparator INSTANCE = new VirtualFileComparator(); - - @Override - public int compare(VirtualFile file1, VirtualFile file2) { - int delta = StringUtil.naturalCompare(file1.getName(), file2.getName()); - if (delta != 0) return delta; - - VirtualFile parent1 = file1.getParent(); - VirtualFile parent2 = file2.getParent(); - String path1 = parent1 != null ? parent1.getPath() : null; - String path2 = parent2 != null ? parent2.getPath() : null; - return StringUtil.naturalCompare(path1, path2); - } - } -} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog2.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.kt similarity index 97% rename from platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog2.kt rename to platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.kt index 57e4fa681a5d..e3d1b43d7725 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog2.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/merge/MultipleFileMergeDialog.kt @@ -52,7 +52,7 @@ import javax.swing.tree.TreeNode /** * @author yole */ -open class MultipleFileMergeDialog2( +open class MultipleFileMergeDialog( private val project: Project, files: List, private val mergeProvider: MergeProvider, @@ -71,7 +71,7 @@ open class MultipleFileMergeDialog2( private var groupByDirectory = VcsConfiguration.getInstance(project).GROUP_MULTIFILE_MERGE_BY_DIRECTORY private val virtualFileRenderer = object : ChangesBrowserNodeRenderer(project, { !groupByDirectory }, false) { - override fun calcFocusedState() = UIUtil.isAncestor(this@MultipleFileMergeDialog2.peer.window, IdeFocusManager.getInstance(project).focusOwner) + override fun calcFocusedState() = UIUtil.isAncestor(this@MultipleFileMergeDialog.peer.window, IdeFocusManager.getInstance(project).focusOwner) } init { @@ -232,12 +232,21 @@ open class MultipleFileMergeDialog2( @NonNls override fun getDimensionServiceKey(): String = "MultipleFileMergeDialog" + @JvmSuppressWildcards + protected open fun beforeResolve(files: Collection): Boolean { + return true + } + private fun acceptRevision(resolution: MergeSession.Resolution) { assert(resolution == MergeSession.Resolution.AcceptedYours || resolution == MergeSession.Resolution.AcceptedTheirs) FileDocumentManager.getInstance().saveAllDocuments() val files = getSelectedFiles() + if (!beforeResolve(files)) { + return + } + try { if (mergeSession is MergeSessionEx) { val supportedFiles = files.filter { file -> mergeSession.canMerge(file) } @@ -399,7 +408,7 @@ open class MultipleFileMergeDialog2( companion object { - private val LOG = Logger.getInstance(MultipleFileMergeDialog2::class.java) + private val LOG = Logger.getInstance(MultipleFileMergeDialog::class.java) } } \ No newline at end of file diff --git a/plugins/settings-repository/src/BaseRepositoryManager.kt b/plugins/settings-repository/src/BaseRepositoryManager.kt index 1d7e5b2cbecb..c01ad1308c70 100644 --- a/plugins/settings-repository/src/BaseRepositoryManager.kt +++ b/plugins/settings-repository/src/BaseRepositoryManager.kt @@ -20,6 +20,7 @@ import com.intellij.openapi.application.invokeAndWaitIfNeed import com.intellij.openapi.diagnostic.debug import com.intellij.openapi.diagnostic.runAndLogException import com.intellij.openapi.fileTypes.StdFileTypes +import com.intellij.openapi.project.ProjectManager import com.intellij.openapi.vcs.merge.MergeDialogCustomizer import com.intellij.openapi.vcs.merge.MergeProvider2 import com.intellij.openapi.vcs.merge.MultipleFileMergeDialog @@ -167,7 +168,7 @@ fun resolveConflicts(files: List, mergeProvider: MergeProvider2): L var processedFiles: List? = null invokeAndWaitIfNeed { - val fileMergeDialog = MultipleFileMergeDialog(null, files, mergeProvider, object : MergeDialogCustomizer() { + val fileMergeDialog = MultipleFileMergeDialog(ProjectManager.getInstance().defaultProject, files, mergeProvider, object : MergeDialogCustomizer() { override fun getMultipleFileDialogTitle() = "Settings Repository: Files Merged with Conflicts" }) fileMergeDialog.show()