void (final MemberNodeBase<M> node) { final MemberNodeBase<M> parentNode = getCalleeNode(node); final MemberNodeBase<M> callerNode = getCallerNode(node); final String callerText = node != myRoot ? getText(callerNode.getMember()) : getEmptyCallerText(); final Document callerDocument = myCallerEditor.getDocument(); final String calleeText = node != myRoot ? getText(parentNode.getMember()) : getEmptyCalleeText(); final Document calleeDocument = myCalleeEditor.getDocument(); ApplicationManager.getApplication().runWriteAction(() -> { callerDocument.setText(callerText); calleeDocument.setText(calleeText); }); final M caller = callerNode.getMember(); final PsiElement callee = parentNode != null ? parentNode.getElementToSearch() : null; if (caller != null && caller.isPhysical() && callee != null) { HighlightManager highlighter = HighlightManager.getInstance(myProject); for (RangeHighlighter r : myHighlighters) { highlighter.removeSegmentHighlighter(myCallerEditor, r); } myHighlighters.clear(); int start = getStartOffset(caller); InjectedLanguageManager injectedLanguageManager = InjectedLanguageManager.getInstance(myProject); for (PsiElement element : findElementsToHighlight(caller, callee)) { TextRange textRange = element.getTextRange(); textRange = injectedLanguageManager.injectedToHost(element, textRange); highlighter.addRangeHighlight(myCallerEditor, textRange.getStartOffset() - start, textRange.getEndOffset() - start, EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES, false, myHighlighters); } } }