in src/net/sourceforge/transparent/CCaseUpdateEnvironment.java [55:90]
public UpdateSession updateDirectories(@NotNull FilePath[] contentRoots, UpdatedFiles updatedFiles, ProgressIndicator progressIndicator,
@NotNull final Ref<SequentialUpdatesContext> context) throws ProcessCanceledException
{
for (FilePath contentRoot : contentRoots) {
final VirtualFile vf = contentRoot.getVirtualFile();
if (vf != null) {
VfsUtil.processFilesRecursively(vf, virtualFile -> {
virtualFile.putUserData(CCaseChangeProvider.ourVersionedKey, null);
return true;
});
}
}
final ArrayList<VcsException> errors = new ArrayList<>();
progressIndicator.setText(PROGRESS_TEXT);
runOrInvokeLaterAboveProgress(() -> FileDocumentManager.getInstance().saveAllDocuments(), ModalityState.NON_MODAL, myProject);
for( FilePath root : contentRoots )
{
String out = TransparentVcs.cleartoolWithOutput( "update", "-force", root.getPath() );
// Correctly process the case when "Update Project" is done over the
// dynamic view (only snapshot views can handle this operation).
if( out.indexOf( ERROR_MSG_SIG ) != -1 )
errors.add( new VcsException( "You can not update a dynamic view: " + out ) );
else
parseOutput( root.getPath(), out, updatedFiles );
}
return new UpdateSession(){
@NotNull
public List<VcsException> getExceptions() { return errors; }
public void onRefreshFilesCompleted() {}
public boolean isCanceled() { return false; }
};
}