Java 类com.intellij.psi.impl.AnyPsiChangeListener 实例源码

项目:consulo-csharp    文件:CSharpPartialElementManager.java   
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();
        }
    });
}
项目:intellij-ce-playground    文件:JavaResolveCache.java   
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);
      }
    });
  }
}
项目:intellij-ce-playground    文件:ResolveCache.java   
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);
    }
  });
}
项目:js-graphql-intellij-plugin    文件:JSGraphQLPsiSearchHelper.java   
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();
        }
    });
}
项目:js-graphql-intellij-plugin    文件:JSGraphQLEndpointNamedTypeRegistry.java   
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();
        }
    });
}
项目:consulo    文件:ResolveCache.java   
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);
    }
  });
}
项目:consulo-java    文件:JavaResolveCache.java   
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);
            }
        });
    }
}