void (@NotNull VirtualFile vFile) { LanguageSubstitutors.cancelReparsing(vFile); FileViewProvider viewProvider = findCachedViewProvider(vFile); if (viewProvider == null) { return; } if (!viewProvider.isEventSystemEnabled()) { setViewProvider(vFile, null); return; } ApplicationManager.getApplication().assertWriteAccessAllowed(); VirtualFile dir = vFile.getParent(); PsiDirectory parentDir = dir == null ? null : getCachedDirectory(dir); PsiTreeChangeEventImpl event = new PsiTreeChangeEventImpl(myManager); if (parentDir == null) { event.setPropertyName(PsiTreeChangeEvent.PROP_UNLOADED_PSI); myManager.beforePropertyChange(event); setViewProvider(vFile, null); myManager.propertyChanged(event); } else { event.setParent(parentDir); myManager.beforeChildrenChange(event); setViewProvider(vFile, null); myManager.childrenChanged(event); } }