in src/net/sourceforge/transparent/CCaseEditFileProvider.java [40:77]
public void editFiles( final VirtualFile[] files ) throws VcsException {
final List<VcsException> errors = new ArrayList<>();
final ChangeListManager mgr = ChangeListManager.getInstance( host.getProject() );
final CurrentStatusHelper[] statusHelper = new CurrentStatusHelper[1];
final boolean succeeded = ProgressManager.getInstance().runProcessWithProgressSynchronously(
(Runnable)() -> statusHelper[0] = preProcessFiles(files), "ClearCase checkout: preprocessing files", true, host.getProject());
if (! succeeded || statusHelper[0] == null) return;
final String comment = getEditComment(files, statusHelper[0]);
if (comment == null) return; // was cancelled
ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> {
int cnt = 0;
for( VirtualFile file : files )
{
final boolean ignoredFile = mgr.isIgnoredFile(file);
final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
if (indicator != null) {
indicator.checkCanceled();
indicator.setText2((ignoredFile ? "Ignored: " : "Checking out: ") + getFileDescriptionForProgress(file));
indicator.setFraction((double) cnt/files.length);
}
++ cnt;
if(! ignoredFile) {
try {
statusHelper[0].checkOutOrHijackFile(file, errors, comment);
}
catch (VcsException e) {
return;
// exit, exception already kept
}
}
}
}, "Checkout files", true, host.getProject());
if( errors.size() > 0 )
{
throw errors.get(0);
}
}