in src/com/intellij/vssSupport/commands/UndocheckoutDirCommand.java [68:159]
public void everythingFinishedImpl( final String output )
{
final UpdatedFiles updatedFiles = UpdatedFiles.create();
updatedFiles.registerGroup( new FileGroup(VssBundle.message("update.group.name.not.checkedout"),
VssBundle.message("update.group.name.not.checkedout"),
false, NOT_CHECKED_OUT_GROUP, true ));
updatedFiles.registerGroup( new FileGroup(VssBundle.message("update.group.name.notexisting"),
VssBundle.message("update.group.name.notexisting"),
false, NOT_EXISTING_GROUP, true ));
int index;
int logRecordsCount = 0;
String fileName;
String lastFolderName = myDir.getPath();
String[] lines = LineTokenizer.tokenize( output, false );
final VcsKey vcsKey = VssVcs.getKey();
for( String line : lines )
{
if( line.length() == 0 )
continue;
// If the file is modified and local copy will be replace, this
// line is ignored since the next line ("Replacing local copy of...")
// will indicate that file is replaced.
if( line.indexOf( LOSE_CHANGES_YES_MESSAGE ) != -1 )
continue;
// These questions are ignored since all the necessary status information
// is shown afterwards in the "Version Control" toolwindow.
if( line.indexOf( CONTINUE_QUESTION_SIG ) != -1 )
continue;
if( line.charAt( line.length() - 1 ) == ':' )
{
lastFolderName = line.substring( 0, line.length() - 1 );
lastFolderName = VssUtil.getLocalPath( lastFolderName, myProject );
}
else
if( (index = line.indexOf( LOSE_CHANGES_NO_MESSAGE )) != -1 )
{
fileName = line.substring( 0, index - 1 );
logRecordsCount++;
updatedFiles.getGroupById( FileGroup.SKIPPED_ID ).add(fileName, vcsKey, null);
}
else
if( (index = line.indexOf( NOT_EXISTING_MESSAGE )) != -1 )
{
fileName = line.substring( 0, index );
fileName = VssUtil.getLocalPath( fileName, myProject );
logRecordsCount++;
updatedFiles.getGroupById( NOT_EXISTING_GROUP ).add(fileName, vcsKey, null);
}
else
if( (index = line.indexOf( CHECKED_OUT_MESSAGE )) != -1 )
{
fileName = line.substring( 0, index );
logRecordsCount++;
updatedFiles.getGroupById( NOT_CHECKED_OUT_GROUP ).add(fileName, vcsKey, null);
}
else
if( (index = line.indexOf( DELETED_MESSAGE )) != -1 )
{
fileName = line.substring( 0, index );
logRecordsCount++;
updatedFiles.getGroupById( FileGroup.REMOVED_FROM_REPOSITORY_ID ).add(fileName, vcsKey, null);
}
else
if( line.indexOf( REPLACING_LOCAL_COPY_MESSAGE ) != -1 )
{
/*
Do nothing with these files. Since they are successfully replaced,
just do not mess them with other output information.
*/
}
}
if( logRecordsCount > 0 )
{
ApplicationManager.getApplication().invokeLater(() -> {
if (myProject.isDisposed()) return;
ProjectLevelVcsManager.getInstance(myProject).showProjectOperationInfo(
updatedFiles, VssBundle.message("dialog.title.undo.check.out", myDir.getName()) );
});
}
else
{
VcsUtil.showStatusMessage( myProject,
VssBundle.message("message.text.undo.successfully", myDir.getName() ) );
}
}