void (@NotNull Object action) { assertTrue(application.isWriteIntentLockAcquired()); assertTrue(application.isWriteAccessAllowed()); assertTrue(application.isWriteActionInProgress()); assertFalse(application.isWriteActionPending()); if (nestingCount.get() < 2) { // strange to allow it but this is how reformat works application.runWriteAction(() -> { }); } }