public abstract class MultiplePsiFilesPerDocumentFileViewProvider extends AbstractFileViewProvider
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.ConcurrentMap<Language,PsiFileImpl> |
myRoots |
FREE_THREADED
Constructor and Description |
---|
MultiplePsiFilesPerDocumentFileViewProvider(PsiManager manager,
VirtualFile virtualFile,
boolean eventSystemEnabled) |
Modifier and Type | Method and Description |
---|---|
void |
checkAllTreesEqual() |
protected abstract MultiplePsiFilesPerDocumentFileViewProvider |
cloneInner(VirtualFile fileCopy) |
void |
contentsSynchronized()
Invoked after PSI in the corresponding file is synchronized with the corresponding document, which can happen
after VFS, document or PSI changes.
|
MultiplePsiFilesPerDocumentFileViewProvider |
createCopy(VirtualFile fileCopy)
Creates a copy of this view provider linked with the given (typically light) file.
|
protected PsiFileImpl |
createPsiFileImpl(Language target) |
PsiElement |
findElementAt(int offset) |
PsiElement |
findElementAt(int offset,
java.lang.Class<? extends Language> lang) |
PsiReference |
findReferenceAt(int offset) |
java.util.List<PsiFile> |
getAllFiles() |
abstract Language |
getBaseLanguage() |
PsiFile |
getCachedPsi(Language target) |
java.util.List<PsiFile> |
getCachedPsiFiles() |
java.util.List<FileElement> |
getKnownTreeRoots() |
protected PsiFile |
getPsiInner(Language target) |
protected void |
removeFile(Language language) |
beforeContentsSynchronized, clone, createFile, createFile, createFile, findElementAt, findElementAt, findReferenceAt, findReferenceAt, getContents, getDocument, getFilePsiLock, getFileType, getManager, getModificationStamp, getPsi, getStubBindingRoot, getVirtualFile, isEventSystemEnabled, isFreeThreaded, isIgnored, isPhysical, markInvalidated, markPossiblyInvalidated, onContentReload, registerAsCopy, rootChanged, shouldCreatePsi, supportsIncrementalReparse, toString
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLanguages, hasLanguage
putUserDataIfAbsent, replace
getUserData, putUserData
protected final java.util.concurrent.ConcurrentMap<Language,PsiFileImpl> myRoots
public MultiplePsiFilesPerDocumentFileViewProvider(PsiManager manager, VirtualFile virtualFile, boolean eventSystemEnabled)
public abstract Language getBaseLanguage()
PsiManager.findFile(VirtualFile)
,
PsiDocumentManager.getPsiFile(Document)
etc.public java.util.List<PsiFile> getAllFiles()
FileViewProvider.getLanguages()
. The main file which corresponds to FileViewProvider.getBaseLanguage()
, should be the first one. Otherwise
the order is non-deterministic and should not be relied upon.protected final void removeFile(Language language)
protected PsiFile getPsiInner(Language target)
getPsiInner
in class AbstractFileViewProvider
protected PsiFileImpl createPsiFileImpl(Language target)
public final PsiFile getCachedPsi(Language target)
getCachedPsi
in class AbstractFileViewProvider
public final java.util.List<PsiFile> getCachedPsiFiles()
getCachedPsiFiles
in class AbstractFileViewProvider
public final java.util.List<FileElement> getKnownTreeRoots()
getKnownTreeRoots
in class AbstractFileViewProvider
public void checkAllTreesEqual()
public final MultiplePsiFilesPerDocumentFileViewProvider createCopy(VirtualFile fileCopy)
FileViewProvider
protected abstract MultiplePsiFilesPerDocumentFileViewProvider cloneInner(VirtualFile fileCopy)
public PsiElement findElementAt(int offset, java.lang.Class<? extends Language> lang)
FileViewProvider.getBaseLanguage()
,
FileViewProvider.findElementAt(int)
public PsiElement findElementAt(int offset)
FileViewProvider.getBaseLanguage()
,
FileViewProvider.findElementAt(int, Class)
,
FileViewProvider.findElementAt(int, Language)
,
PsiElement.findElementAt(int)
public PsiReference findReferenceAt(int offset)
FileViewProvider.getBaseLanguage()
,
PsiElement.findReferenceAt(int)
,
FileViewProvider.findReferenceAt(int, Language)
public void contentsSynchronized()
FileViewProvider
Multi-language file view providers may override this method to recalculate template data languages.
contentsSynchronized
in interface FileViewProvider
contentsSynchronized
in class AbstractFileViewProvider
FileViewProvider.getLanguages()