FileTypeRegistry () { Supplier<? extends FileTypeRegistry> instanceGetter = FileTypeRegistry.instanceGetter; if (instanceGetter == null) { // in tests FileTypeManager service maybe not preloaded, so, ourInstanceGetter is not set //noinspection deprecation return ApplicationManager.getApplication().getServiceByClassName("com.intellij.openapi.fileTypes.FileTypeManager"); } return instanceGetter.get(); }