mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Clear view providers on any fileTypesChanged event (IDEA-CR-52705)
GitOrigin-RevId: 273767948c64dcced81b0538a012d76155b3257a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2c8ff937db
commit
f38a0e1d34
@@ -263,7 +263,7 @@ public final class FileManagerImpl implements FileManager {
|
||||
|
||||
private boolean myProcessingFileTypesChange;
|
||||
|
||||
void processFileTypesChanged(boolean fileTypeRemoved) {
|
||||
void processFileTypesChanged(boolean clearViewProviders) {
|
||||
if (myProcessingFileTypesChange) return;
|
||||
myProcessingFileTypesChange = true;
|
||||
DebugUtil.performPsiModification(null, () -> {
|
||||
@@ -274,7 +274,7 @@ public final class FileManagerImpl implements FileManager {
|
||||
myManager.beforePropertyChange(event);
|
||||
|
||||
possiblyInvalidatePhysicalPsi();
|
||||
if (fileTypeRemoved) {
|
||||
if (clearViewProviders) {
|
||||
clearViewProviders();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class PsiVFSListener implements BulkFileListener {
|
||||
connection.subscribe(FileTypeManager.TOPIC, new FileTypeListener() {
|
||||
@Override
|
||||
public void fileTypesChanged(@NotNull FileTypeEvent e) {
|
||||
myFileManager.processFileTypesChanged(e.getRemovedFileType() != null);
|
||||
myFileManager.processFileTypesChanged(true);
|
||||
}
|
||||
});
|
||||
connection.subscribe(AppTopics.FILE_DOCUMENT_SYNC, new MyFileDocumentManagerAdapter());
|
||||
|
||||
Reference in New Issue
Block a user