public CSharpPartialElementManager(@NotNull Project project) { myProject = project; project.getMessageBus().connect().subscribe(PsiManagerImpl.ANY_PSI_CHANGE_TOPIC, new AnyPsiChangeListener.Adapter() { @Override public void beforePsiChanged(boolean isPhysical) { myCache.clear(); } }); project.getMessageBus().connect().subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() { @Override public void rootsChanged(ModuleRootEvent event) { myCache.clear(); } }); }
public JavaResolveCache(@Nullable("can be null in com.intellij.core.JavaCoreApplicationEnvironment.JavaCoreApplicationEnvironment") MessageBus messageBus) { if (messageBus != null) { messageBus.connect().subscribe(PsiManagerImpl.ANY_PSI_CHANGE_TOPIC, new AnyPsiChangeListener.Adapter() { @Override public void beforePsiChanged(boolean isPhysical) { clearCaches(isPhysical); } }); } }
public ResolveCache(@NotNull MessageBus messageBus) { for (int i = 0; i < myMaps.length; i++) { myMaps[i] = createWeakMap(); } messageBus.connect().subscribe(PsiManagerImpl.ANY_PSI_CHANGE_TOPIC, new AnyPsiChangeListener.Adapter() { @Override public void beforePsiChanged(boolean isPhysical) { clearCache(isPhysical); } }); }
public JSGraphQLPsiSearchHelper(@NotNull final Project project) { myProject = project; searchScope = GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.projectScope(myProject), FILE_TYPES); project.getMessageBus().connect().subscribe(PsiManagerImpl.ANY_PSI_CHANGE_TOPIC, new AnyPsiChangeListener.Adapter() { @Override public void beforePsiChanged(boolean isPhysical) { // clear the cache on each PSI change fragmentDefinitionsByName.clear(); } }); }
public JSGraphQLEndpointNamedTypeRegistry(Project project) { this.project = project; this.configurationProvider = JSGraphQLConfigurationProvider.getService(project); project.getMessageBus().connect().subscribe(PsiManagerImpl.ANY_PSI_CHANGE_TOPIC, new AnyPsiChangeListener.Adapter() { @Override public void beforePsiChanged(boolean isPhysical) { // clear the cache on each PSI change endpointTypesByName.clear(); endpointEntryPsiFile.clear(); } }); }
public ResolveCache(@Nonnull MessageBus messageBus) { for (int i = 0; i < myMaps.length; i++) { myMaps[i] = createWeakMap(); } messageBus.connect().subscribe(PsiManagerImpl.ANY_PSI_CHANGE_TOPIC, new AnyPsiChangeListener.Adapter() { @Override public void beforePsiChanged(boolean isPhysical) { clearCache(isPhysical); } }); }
public JavaResolveCache(@Nullable("can be null in com.intellij.core.JavaCoreApplicationEnvironment.JavaCoreApplicationEnvironment") MessageBus messageBus) { if(messageBus != null) { messageBus.connect().subscribe(PsiManagerImpl.ANY_PSI_CHANGE_TOPIC, new AnyPsiChangeListener.Adapter() { @Override public void beforePsiChanged(boolean isPhysical) { clearCaches(isPhysical); } }); } }