use of com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider in project intellij-community by JetBrains.
the class DaemonRespondToChangesTest method testCodeFoldingInSplittedWindowAppliesToAllEditors.
public void testCodeFoldingInSplittedWindowAppliesToAllEditors() throws Exception {
final Set<Editor> applied = new THashSet<>();
final Set<Editor> collected = new THashSet<>();
registerFakePass(applied, collected);
configureByText(PlainTextFileType.INSTANCE, "");
Editor editor1 = getEditor();
final Editor editor2 = EditorFactory.getInstance().createEditor(editor1.getDocument(), getProject());
Disposer.register(getProject(), () -> EditorFactory.getInstance().releaseEditor(editor2));
TextEditor textEditor1 = new PsiAwareTextEditorProvider().getTextEditor(editor1);
TextEditor textEditor2 = new PsiAwareTextEditorProvider().getTextEditor(editor2);
List<HighlightInfo> errors = myDaemonCodeAnalyzer.runPasses(myFile, editor1.getDocument(), Arrays.asList(textEditor1, textEditor2), new int[0], false, null);
assertEmpty(errors);
assertEquals(collected, ContainerUtil.newHashSet(editor1, editor2));
assertEquals(applied, ContainerUtil.newHashSet(editor1, editor2));
}
Aggregations