Search in sources :

Example 1 with SvnMergeProvider

use of org.jetbrains.idea.svn.actions.SvnMergeProvider in project intellij-community by JetBrains.

the class ResolveWorker method execute.

// on EDT, dispose checked
public void execute(final UpdatedFiles updatedFiles) {
    if (myConflictedVirtualFiles.isEmpty()) {
        return;
    }
    final AbstractVcsHelper vcsHelper = AbstractVcsHelper.getInstance(myProject);
    List<VirtualFile> mergedFiles = vcsHelper.showMergeDialog(myConflictedVirtualFiles, new SvnMergeProvider(myProject));
    final FileGroup mergedGroup = updatedFiles.getGroupById(FileGroup.MERGED_ID);
    final FileGroup conflictedGroup = updatedFiles.getGroupById(FileGroup.MERGED_WITH_CONFLICT_ID);
    final VcsKey vcsKey = SvnVcs.getKey();
    for (final VirtualFile mergedFile : mergedFiles) {
        String path = FileUtil.toSystemDependentName(mergedFile.getPresentableUrl());
        conflictedGroup.remove(path);
        mergedGroup.add(path, vcsKey, null);
        mergedFile.refresh(false, false);
        // for additionally created files removal to be detected
        mergedFile.getParent().refresh(false, false);
        if (myChangesUnderProjectRoot) {
            myDirtyScopeManager.fileDirty(mergedFile);
        }
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) VcsKey(com.intellij.openapi.vcs.VcsKey) SvnMergeProvider(org.jetbrains.idea.svn.actions.SvnMergeProvider) AbstractVcsHelper(com.intellij.openapi.vcs.AbstractVcsHelper) FileGroup(com.intellij.openapi.vcs.update.FileGroup)

Aggregations

AbstractVcsHelper (com.intellij.openapi.vcs.AbstractVcsHelper)1 VcsKey (com.intellij.openapi.vcs.VcsKey)1 FileGroup (com.intellij.openapi.vcs.update.FileGroup)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 SvnMergeProvider (org.jetbrains.idea.svn.actions.SvnMergeProvider)1