mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
clear language cache even if extension is not removed
GitOrigin-RevId: 8bb03573b5053a7dac9188b252ae21181c13928a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6af20d1eda
commit
454e3bb003
@@ -30,10 +30,12 @@ public final class ReferenceProviders {
|
||||
private final Map<Class<? extends Symbol>, List<PsiSymbolReferenceProviderBean>> myByTargetClass = new ConcurrentHashMap<>();
|
||||
|
||||
public ReferenceProviders() {
|
||||
EP_NAME.addExtensionPointListener(() -> {
|
||||
myByHostLanguage.clear();
|
||||
myByTargetClass.clear();
|
||||
}, ApplicationManager.getApplication());
|
||||
EP_NAME.addExtensionPointListener(this::clearCaches, ApplicationManager.getApplication());
|
||||
}
|
||||
|
||||
public void clearCaches() {
|
||||
myByHostLanguage.clear();
|
||||
myByTargetClass.clear();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.intellij.ide.SaveAndSyncHandler
|
||||
import com.intellij.ide.plugins.cl.PluginClassLoader
|
||||
import com.intellij.ide.ui.UIThemeProvider
|
||||
import com.intellij.lang.Language
|
||||
import com.intellij.model.psi.impl.ReferenceProviders
|
||||
import com.intellij.notification.NotificationDisplayType
|
||||
import com.intellij.notification.NotificationGroup
|
||||
import com.intellij.notification.NotificationType
|
||||
@@ -25,7 +26,6 @@ import com.intellij.openapi.extensions.ExtensionsArea
|
||||
import com.intellij.openapi.extensions.PluginDescriptor
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
import com.intellij.openapi.extensions.impl.ExtensionPointImpl
|
||||
import com.intellij.openapi.extensions.impl.ExtensionsAreaImpl
|
||||
import com.intellij.openapi.keymap.impl.BundledKeymapBean
|
||||
import com.intellij.openapi.keymap.impl.BundledKeymapProvider
|
||||
import com.intellij.openapi.module.ModuleManager
|
||||
@@ -326,6 +326,7 @@ object DynamicPlugins {
|
||||
for (project in ProjectManager.getInstance().openProjects) {
|
||||
(CachedValuesManager.getManager(project) as CachedValuesManagerImpl).clearCachedValues()
|
||||
}
|
||||
ReferenceProviders.getInstance().clearCaches()
|
||||
jdomSerializer.clearSerializationCaches()
|
||||
BeanBinding.clearSerializationCaches()
|
||||
TypeFactory.defaultInstance().clearCache()
|
||||
|
||||
Reference in New Issue
Block a user