registerComponentInstance(appContainer, PsiDocumentManager.class, new MockPsiDocumentManager());
registerComponentInstance(appContainer, FileTypeManager.class, new MockFileTypeManager(new MockLanguageFileType(PlainTextLanguage.INSTANCE, "txt")));
registerApplicationService(project, PsiBuilderFactory.class, new PsiBuilderFactoryImpl());
registerApplicationService(project, DefaultASTFactory.class, new DefaultASTFactoryImpl());
registerApplicationService(project, ReferenceProvidersRegistry.class, new ReferenceProvidersRegistryImpl());
project.registerService(CachedValuesManager.class, new CachedValuesManagerImpl(project, new PsiCachedValuesFactory(psiManager)));
project.registerService(PsiManager.class, psiManager);
project.registerService(StartupManager.class, new StartupManagerImpl(project));
registerExtensionPoint(FileTypeFactory.FILE_TYPE_FACTORY_EP, FileTypeFactory.class);
return Trinity.create(project, psiManager, psiFileFactory);
}