public CoreProjectEnvironment(@NotNull Disposable parentDisposable, @NotNull CoreApplicationEnvironment applicationEnvironment) { myParentDisposable = parentDisposable; myEnvironment = applicationEnvironment; myProject = createProject(myEnvironment.getApplication().getPicoContainer(), myParentDisposable); preregisterServices(); myFileIndexFacade = createFileIndexFacade(); myMessageBus = MessageBusFactory.newMessageBus("CoreProjectEnvironment"); PsiModificationTrackerImpl modificationTracker = new PsiModificationTrackerImpl(myProject); myProject.registerService(PsiModificationTracker.class, modificationTracker); myProject.registerService(FileIndexFacade.class, myFileIndexFacade); myProject.registerService(ResolveCache.class, new ResolveCache(myMessageBus)); myPsiManager = new PsiManagerImpl(myProject, null, null, myFileIndexFacade, myMessageBus, modificationTracker); ((FileManagerImpl) myPsiManager.getFileManager()).markInitialized(); registerProjectComponent(PsiManager.class, myPsiManager); myProject.registerService(SmartPointerManager.class, SmartPointerManagerImpl.class); registerProjectComponent(PsiDocumentManager.class, new CorePsiDocumentManager(myProject, myPsiManager, myMessageBus, new MockDocumentCommitProcessor())); myProject.registerService(ResolveScopeManager.class, createResolveScopeManager(myPsiManager)); myProject.registerService(PsiFileFactory.class, new PsiFileFactoryImpl(myPsiManager)); myProject.registerService(CachedValuesManager.class, new CachedValuesManagerImpl(myProject, new PsiCachedValuesFactory(myPsiManager))); myProject.registerService(PsiDirectoryFactory.class, new PsiDirectoryFactoryImpl(myPsiManager)); myProject.registerService(ProjectScopeBuilder.class, createProjectScopeBuilder()); myProject.registerService(DumbService.class, new MockDumbService(myProject)); myProject.registerService(CoreEncodingProjectManager.class, CoreEncodingProjectManager.class); }
public CoreProjectEnvironment(Disposable parentDisposable, CoreApplicationEnvironment applicationEnvironment) { myParentDisposable = parentDisposable; myEnvironment = applicationEnvironment; myProject = new MockProject(myEnvironment.getApplication().getPicoContainer(), myParentDisposable); preregisterServices(); myFileIndexFacade = createFileIndexFacade(); myMessageBus = new MessageBusImpl("CoreProjectEnvironment", null); PsiModificationTrackerImpl modificationTracker = new PsiModificationTrackerImpl(myProject); myProject.registerService(PsiModificationTracker.class, modificationTracker); myProject.registerService(FileIndexFacade.class, myFileIndexFacade); myProject.registerService(ResolveCache.class, new ResolveCache(myMessageBus)); registerProjectExtensionPoint(PsiTreeChangePreprocessor.EP_NAME, PsiTreeChangePreprocessor.class); myPsiManager = new PsiManagerImpl(myProject, null, null, myFileIndexFacade, myMessageBus, modificationTracker); ((FileManagerImpl) myPsiManager.getFileManager()).markInitialized(); registerProjectComponent(PsiManager.class, myPsiManager); myProject.registerService(ResolveScopeManager.class, createResolveScopeManager(myPsiManager)); myProject.registerService(PsiFileFactory.class, new PsiFileFactoryImpl(myPsiManager)); myProject.registerService(CachedValuesManager.class, new CachedValuesManagerImpl(myProject, new PsiCachedValuesFactory(myPsiManager))); myProject.registerService(PsiDirectoryFactory.class, new PsiDirectoryFactoryImpl(myPsiManager)); myProject.registerService(ProjectScopeBuilder.class, createProjectScopeBuilder()); myProject.registerService(DumbService.class, new MockDumbService(myProject)); }
public CoreProjectEnvironment(Disposable parentDisposable, CoreApplicationEnvironment applicationEnvironment) { myParentDisposable = parentDisposable; myEnvironment = applicationEnvironment; myProject = new MockProject(myEnvironment.getApplication().getPicoContainer(), myParentDisposable); preregisterServices(); myFileIndexFacade = createFileIndexFacade(); myMessageBus = (MessageBusImpl)myProject.getMessageBus(); PsiModificationTrackerImpl modificationTracker = new PsiModificationTrackerImpl(myProject); myProject.registerService(PsiModificationTracker.class, modificationTracker); myProject.registerService(FileIndexFacade.class, myFileIndexFacade); myProject.registerService(ResolveCache.class, new ResolveCache(myMessageBus)); registerProjectExtensionPoint(PsiTreeChangePreprocessor.EP_NAME, PsiTreeChangePreprocessor.class); myPsiManager = new PsiManagerImpl(myProject, null, null, myFileIndexFacade, myMessageBus, modificationTracker); ((FileManagerImpl)myPsiManager.getFileManager()).markInitialized(); registerProjectComponent(PsiManager.class, myPsiManager); registerProjectComponent(PsiDocumentManager.class, new CorePsiDocumentManager(myProject, myPsiManager, myMessageBus, new MockDocumentCommitProcessor())); myProject.registerService(ResolveScopeManager.class, createResolveScopeManager(myPsiManager)); myProject.registerService(PsiFileFactory.class, new PsiFileFactoryImpl(myPsiManager)); myProject.registerService(CachedValuesManager.class, new CachedValuesManagerImpl(myProject, new PsiCachedValuesFactory(myPsiManager))); myProject.registerService(ProjectScopeBuilder.class, createProjectScopeBuilder()); myProject.registerService(DumbService.class, new MockDumbService(myProject)); }
@NotNull @Override public PsiImportStatement[] getImportStatements() { return CachedValuesManagerImpl.getCachedValue(myJspJavaFile, () -> CachedValueProvider.Result.create(calcImportStatements(), PsiModificationTracker.MODIFICATION_COUNT)); }