FileType (String className, String fileTypeName) { try { return (FileType)Class.forName(className).getField("INSTANCE").get(null); } catch (Exception ignored) { return new MockLanguageFileType(PlainTextLanguage.INSTANCE, fileTypeName.toLowerCase(Locale.ENGLISH)); } }