in src/net/sourceforge/transparent/VFSListener.java [298:332]
public void commandFinished(final CommandEvent event) {
if (project != event.getProject()) return;
commandLevel--;
if (commandLevel == 0) {
if (!filesAdded.isEmpty() || !filesDeleted.isEmpty()) {
// avoid reentering commandFinished handler - saving the documents may cause a "before file deletion" event firing,
// which will cause closing the text editor, which will itself run a command that will be caught by this listener
commandLevel++;
try {
FileDocumentManager.getInstance().saveAllDocuments();
}
finally {
commandLevel--;
}
if (!filesAdded.isEmpty()) {
try {
executeAdd();
}
catch (VcsException e) {
AbstractVcsHelper.getInstance(project).showError(e, "Add File failure");
}
}
if (!filesDeleted.isEmpty()) {
executeDelete();
}
reportDirty();
filesAdded.clear();
filesDeleted.clear();
}
}
}