本文整理汇总了Java中com.intellij.mock.MockDumbService类的典型用法代码示例。如果您正苦于以下问题:Java MockDumbService类的具体用法?Java MockDumbService怎么用?Java MockDumbService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MockDumbService类属于com.intellij.mock包,在下文中一共展示了MockDumbService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CoreProjectEnvironment
import com.intellij.mock.MockDumbService; //导入依赖的package包/类
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);
}
示例2: CoreProjectEnvironment
import com.intellij.mock.MockDumbService; //导入依赖的package包/类
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));
}
示例3: CoreProjectEnvironment
import com.intellij.mock.MockDumbService; //导入依赖的package包/类
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));
}
示例4: setUp
import com.intellij.mock.MockDumbService; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
myCompositeFilter = new CompositeFilter(new MockDumbService(null));
myCompositeFilter.setForceUseAllFilters(false);
}