public interface PsiLanguageInjectionHost extends PsiElement
In order to do the injection, you have to
LanguageInjector
to describe exact place where injection should occur.LanguageInjector.EXTENSION_POINT_NAME
extension point.
You don't have to implement PsiLanguageInjectionHost
by yourself, unless you want to inject something into your own custom PSI.
For all returned injected PSI elements, InjectedLanguageManager.getInjectionHost(PsiElement)
returns PsiLanguageInjectionHost
they were injected into.
Modifier and Type | Interface and Description |
---|---|
static interface |
PsiLanguageInjectionHost.InjectedPsiVisitor |
static interface |
PsiLanguageInjectionHost.Shred |
Iconable.IconFlags, Iconable.LastComputedIcon
ARRAY_FACTORY, EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
Modifier and Type | Method and Description |
---|---|
LiteralTextEscaper<? extends PsiLanguageInjectionHost> |
createLiteralTextEscaper() |
boolean |
isValidHost() |
PsiLanguageInjectionHost |
updateText(java.lang.String text)
Update the host element using the provided text of the injected file.
|
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
boolean isValidHost()
true
if this instance can accept injections, false
otherwisePsiLanguageInjectionHost updateText(java.lang.String text)
text
in accordance with the host language syntax. The implementation may delegate to ElementManipulators.handleContentChange(PsiElement, String)
if ElementManipulator
implementation is registered for this element class.text
- text of the injected fileLiteralTextEscaper<? extends PsiLanguageInjectionHost> createLiteralTextEscaper()
LiteralTextEscaper
instance which will be used to convert the content of this host element to the content of injected file