@NotNull public static List<DocumentWindow> getCachedInjectedDocuments(@NotNull PsiFile hostPsiFile) { // modification of cachedInjectedDocuments must be under PsiLock only List<DocumentWindow> injected = hostPsiFile.getUserData(INJECTED_DOCS_KEY); if (injected == null) { injected = ((UserDataHolderEx) hostPsiFile) .putUserDataIfAbsent( INJECTED_DOCS_KEY, ContainerUtil.<DocumentWindow>createEmptyCOWList()); } return injected; }
public static List< Trinity<IElementType, SmartPsiElementPointer<PsiLanguageInjectionHost>, TextRange>> getHighlightTokens(@NotNull PsiFile file) { return file.getUserData(HIGHLIGHT_TOKENS); }