Fix EditorTestHelper to work with 2020.2
In 2020.2, the old way we obtained a PostprocessReformattingAspect doesn't work anymore (-> returns null). Hence, switch to a different approach which is also used by other parts of the platform.
@@ -110,7 +110,7 @@ public class EditorTestHelper {
/** Simulates a user typing action, at current caret position of document. */
public void performTypingAction(Editor editor, char typedChar) {
EditorTestUtil.performTypingAction(editor, typedChar);
- project.getComponent(PostprocessReformattingAspect.class).doPostponedFormatting();
+ PostprocessReformattingAspect.getInstance(project).doPostponedFormatting();
PsiDocumentManager.getInstance(project).commitAllDocuments();
}
