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);
}
}
}
Aggregations