public <T> T disablePostprocessFormattingInside(Computable<T> computable) { try { myDisabledCounter++; return computable.compute(); } finally { myDisabledCounter--; LOG.assertTrue(myDisabledCounter > 0 || !isDisabled()); } }
public <T> T postponeFormattingInside(Computable<T> computable) { try { // if(myPostponedCounter == 0) myDisabled = false; myPostponedCounter++; return computable.compute(); } finally { decrementPostponedCounter(); } }
public <T> T postponeFormattingInside(@NotNull Computable<T> computable) { Application application = ApplicationManager.getApplication(); application.assertIsDispatchThread(); try { incrementPostponedCounter(); return computable.compute(); } finally { decrementPostponedCounter(); } }