コード例 #1
0
 public <T> T disablePostprocessFormattingInside(Computable<T> computable) {
   try {
     myDisabledCounter++;
     return computable.compute();
   } finally {
     myDisabledCounter--;
     LOG.assertTrue(myDisabledCounter > 0 || !isDisabled());
   }
 }
コード例 #2
0
 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();
   }
 }