@NotNull @Override public final MultiplePsiFilesPerDocumentFileViewProvider createCopy( @NotNull final VirtualFile fileCopy) { final MultiplePsiFilesPerDocumentFileViewProvider copy = cloneInner(fileCopy); copy.myOriginal = myOriginal == null ? this : myOriginal; return copy; }
@Override protected PsiFile getPsiInner(@NotNull final Language target) { PsiFileImpl file = myRoots.get(target); if (file == null) { if (isPhysical()) { VirtualFile virtualFile = getVirtualFile(); if (isIgnored()) return null; VirtualFile parent = virtualFile.getParent(); if (parent != null) { getManager().findDirectory(parent); } } if (target != getBaseLanguage() && !getLanguages().contains(target)) { return null; } file = (PsiFileImpl) createFile(target); if (file == null) return null; if (myOriginal != null) { final PsiFile originalFile = myOriginal.getPsi(target); if (originalFile != null) { file.setOriginalFile(originalFile); } } file = ConcurrencyUtil.cacheOrGet(myRoots, target, file); } return file; }