more logging

This commit is contained in:
Alexey Kudravtsev
2015-05-21 14:09:23 +03:00
parent 8b66cb60d7
commit 3a8c5c15f3
2 changed files with 4 additions and 4 deletions
@@ -206,7 +206,7 @@ public class FileTypeManagerImpl extends FileTypeManagerEx implements Persistent
Collection<VirtualFile> files = ContainerUtil.map2Set(events, new Function<VFileEvent, VirtualFile>() {
@Override
public VirtualFile fun(VFileEvent event) {
VirtualFile file = event instanceof VFileCreateEvent ? null : event.getFile();
VirtualFile file = event instanceof VFileCreateEvent ? /* avoid expensive find child here */ null : event.getFile();
return file != null && wasAutoDetectedBefore(file) && isDetectable(file) ? file : null;
}
});
@@ -350,11 +350,11 @@ public class FileTypesTest extends PlatformTestCase {
private void ensureRedetected(VirtualFile vFile, Set<VirtualFile> detectorCalled) {
PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
log("T: ensureRedetected: commit");
log("T: ensureRedetected: commit. queue: "+myFileTypeManager.dumpReDetectQueue());
UIUtil.dispatchAllInvocationEvents();
log("T: ensureRedetected: dispatch");
log("T: ensureRedetected: dispatch. queue: "+ myFileTypeManager.dumpReDetectQueue());
myFileTypeManager.drainReDetectQueue();
log("T: ensureRedetected: drain");
log("T: ensureRedetected: drain. queue: "+myFileTypeManager.dumpReDetectQueue());
UIUtil.dispatchAllInvocationEvents();
log("T: ensureRedetected: dispatch");
FileType type = vFile.getFileType();