mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed assertion fail (EA-29575).
This commit is contained in:
@@ -952,7 +952,7 @@ public class PsiTreeUtil {
|
||||
throw new AssertionError(descendant + " is not a descendant of " + ancestor);
|
||||
}
|
||||
|
||||
public static List<PsiElement> getInjectedElements(OuterLanguageElement outerLanguageElement) {
|
||||
public static List<PsiElement> getInjectedElements(@NotNull OuterLanguageElement outerLanguageElement) {
|
||||
PsiElement psi = outerLanguageElement.getContainingFile().getViewProvider().getPsi(outerLanguageElement.getLanguage());
|
||||
TextRange injectionRange = outerLanguageElement.getTextRange();
|
||||
List<PsiElement> res = Lists.newArrayList();
|
||||
|
||||
+5
-1
@@ -189,7 +189,11 @@ public class CommentByBlockCommentHandler implements CodeInsightActionHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isInjectedWhiteSpace(TextRange range, OuterLanguageElement element) {
|
||||
private boolean isInjectedWhiteSpace(@NotNull TextRange range, @NotNull OuterLanguageElement element) {
|
||||
PsiElement psi = element.getContainingFile().getViewProvider().getPsi(element.getLanguage());
|
||||
if (psi == null) {
|
||||
return false;
|
||||
}
|
||||
List<PsiElement> injectedElements = PsiTreeUtil.getInjectedElements(element);
|
||||
for (PsiElement el : injectedElements) {
|
||||
if (!isWhiteSpaceOrComment(el, range)) {
|
||||
|
||||
Reference in New Issue
Block a user