void (LanguageFileType fileType, String text, String ext) { if (ext == null) ext = fileType.getDefaultExtension(); configureFromFileText("test." + ext, text, true); final SearchContext context = new SearchContext(getProject(), getFile(), getEditor()); assertEquals(fileType, UIUtil.detectFileType(context)); }