void () { OverrideFileTypeManager manager = OverrideFileTypeManager.getInstance(); VirtualFile xml = myFixture.getTempDirFixture().createFile("test.xml"); FileType originalType = xml.getFileType(); assertEquals(StdFileTypes.XML, originalType); manager.addFile(xml, PlainTextFileType.INSTANCE); UIUtil.dispatchAllInvocationEvents(); // reparseFiles in invokeLater assertEquals(PlainTextFileType.INSTANCE, xml.getFileType()); assertTrue(FileTypeManager.getInstance().isFileOfType(xml, PlainTextFileType.INSTANCE)); assertFalse(FileTypeManager.getInstance().isFileOfType(xml, StdFileTypes.XML)); manager.removeFile(xml); UIUtil.dispatchAllInvocationEvents(); // reparseFiles in invokeLater FileType revertedType = xml.getFileType(); assertEquals(originalType, revertedType); manager.addFile(xml, ArchiveFileType.INSTANCE); UIUtil.dispatchAllInvocationEvents(); // reparseFiles in invokeLater assertEquals(ArchiveFileType.INSTANCE, xml.getFileType()); manager.removeFile(xml); UIUtil.dispatchAllInvocationEvents(); // reparseFiles in invokeLater assertEquals(originalType, xml.getFileType()); }