use of com.intellij.cvsSupport2.cvsoperations.cvsUpdate.MergedWithConflictProjectOrModuleFile in project intellij-community by JetBrains.
the class UpdateHandler method onOperationFinished.
@Override
protected void onOperationFinished(ModalityContext modalityContext) {
if (myUpdateSettings.getPruneEmptyDirectories()) {
final IOFilesBasedDirectoryPruner pruner = new IOFilesBasedDirectoryPruner(ProgressManager.getInstance().getProgressIndicator());
for (FilePath file : myFiles) {
pruner.addFile(file.getIOFile());
}
pruner.execute();
}
if (!myCorruptedFiles.isEmpty()) {
final int showOptions = CvsConfiguration.getInstance(myProject).SHOW_CORRUPTED_PROJECT_FILES;
if (showOptions == Options.PERFORM_ACTION_AUTOMATICALLY) {
for (final MergedWithConflictProjectOrModuleFile myCorruptedFile : myCorruptedFiles) {
myCorruptedFile.setShouldBeCheckedOut();
}
} else if (showOptions == Options.SHOW_DIALOG) {
modalityContext.runInDispatchThread(() -> new CorruptedProjectFilesDialog(myProject, myCorruptedFiles).show(), myProject);
}
final VcsKey vcsKey = CvsVcs2.getKey();
for (final MergedWithConflictProjectOrModuleFile myCorruptedFile : myCorruptedFiles) {
if (myCorruptedFile.shouldBeCheckedOut()) {
addFileToCheckout(myCorruptedFile.getOriginal());
} else {
myUpdatedFiles.getGroupById(FileGroup.MODIFIED_ID).add(myCorruptedFile.getOriginal().getPath(), vcsKey, null);
}
}
}
}
Aggregations