use of com.intellij.psi.impl.file.impl.FileManager in project intellij-community by JetBrains.
the class PyExpressionCodeFragmentImpl method clone.
protected PyExpressionCodeFragmentImpl clone() {
final PyExpressionCodeFragmentImpl clone = (PyExpressionCodeFragmentImpl) cloneImpl((FileElement) calcTreeElement().clone());
clone.myPhysical = false;
clone.myOriginalFile = this;
FileManager fileManager = ((PsiManagerEx) getManager()).getFileManager();
SingleRootFileViewProvider cloneViewProvider = (SingleRootFileViewProvider) fileManager.createFileViewProvider(new LightVirtualFile(getName(), getLanguage(), getText()), false);
cloneViewProvider.forceCachedPsi(clone);
clone.myViewProvider = cloneViewProvider;
return clone;
}
use of com.intellij.psi.impl.file.impl.FileManager in project intellij-community by JetBrains.
the class IpnbPyFragment method clone.
protected IpnbPyFragment clone() {
final IpnbPyFragment clone = (IpnbPyFragment) cloneImpl((FileElement) calcTreeElement().clone());
clone.myPhysical = false;
clone.myOriginalFile = this;
FileManager fileManager = ((PsiManagerEx) getManager()).getFileManager();
SingleRootFileViewProvider cloneViewProvider = (SingleRootFileViewProvider) fileManager.createFileViewProvider(new LightVirtualFile(getName(), getLanguage(), getText()), false);
cloneViewProvider.forceCachedPsi(clone);
clone.myViewProvider = cloneViewProvider;
return clone;
}
use of com.intellij.psi.impl.file.impl.FileManager in project intellij-community by JetBrains.
the class SingleRootFileViewProvider method getPsi.
@Override
@Nullable
public final PsiFile getPsi(@NotNull Language target) {
if (!isPhysical()) {
FileManager fileManager = ((PsiManagerEx) myManager).getFileManager();
VirtualFile virtualFile = getVirtualFile();
if (fileManager.findCachedViewProvider(virtualFile) == null) {
fileManager.setViewProvider(virtualFile, this);
}
}
return getPsiInner(target);
}
use of com.intellij.psi.impl.file.impl.FileManager in project intellij-community by JetBrains.
the class PsiManagerImpl method dropResolveCaches.
@Override
public void dropResolveCaches() {
FileManager fileManager = myFileManager;
if (fileManager instanceof FileManagerImpl) {
// mock tests
((FileManagerImpl) fileManager).processQueue();
}
beforeChange(true);
beforeChange(false);
}
use of com.intellij.psi.impl.file.impl.FileManager in project intellij-community by JetBrains.
the class GroovyCodeFragment method clone.
@Override
protected GroovyCodeFragment clone() {
final GroovyCodeFragment clone = (GroovyCodeFragment) cloneImpl((FileElement) calcTreeElement().clone());
clone.myOriginalFile = this;
clone.myPseudoImports.putAll(myPseudoImports);
FileManager fileManager = ((PsiManagerEx) getManager()).getFileManager();
SingleRootFileViewProvider cloneViewProvider = (SingleRootFileViewProvider) fileManager.createFileViewProvider(new LightVirtualFile(getName(), getLanguage(), getText()), false);
cloneViewProvider.forceCachedPsi(clone);
clone.myViewProvider = cloneViewProvider;
return clone;
}
Aggregations