IDEA-188988 <statement> or DELIMITER expected in Java constants

This commit is contained in:
Alexey Kudravtsev
2018-04-12 15:36:03 +03:00
parent b5b8f4d37f
commit 147f7d169e
@@ -689,7 +689,7 @@ public class InjectedLanguageUtil {
public static <T> void putInjectedFileUserData(@NotNull PsiElement element,
@NotNull Language language,
@NotNull Key<T> key,
T value) {
@Nullable T value) {
PsiFile file = getCachedInjectedFileWithLanguage(element, language);
if (file != null) {
file.putUserData(key, value);
@@ -718,7 +718,8 @@ public class InjectedLanguageUtil {
.getCachedInjectedDocumentsInRange(containingFile, element.getTextRange())
.stream()
.map(documentWindow -> PsiDocumentManager.getInstance(containingFile.getProject()).getPsiFile(documentWindow))
.filter(file -> file != null && file.getLanguage() == language)
.filter(file -> file != null && file.getLanguage() == LanguageSubstitutors.INSTANCE.substituteLanguage(language, file.getVirtualFile(),
file.getProject()))
.findFirst()
.orElse(null);
}