void () { CommandProcessor.getInstance().executeCommand(getProject(), () -> { try { configureByFile(BASE_PATH + "ErrorMarkAtEnd.java"); } catch (Exception e) { LOG.error(e); } }, "Cc", this); EditorTestUtil.setEditorVisibleSizeInPixels(getEditor(), 1000, 1000); assertEmpty(highlightErrors()); CommandProcessor.getInstance().executeCommand(getProject(), () -> { Document document = getEditor().getDocument(); int offset = getEditor().getCaretModel().getOffset(); while (offset < document.getTextLength()) { int i = StringUtil.indexOf(document.getText(), '}', offset, document.getTextLength()); if (i == -1) break; getEditor().getCaretModel().moveToOffset(i); delete(getEditor()); } }