TransactionIdImpl () { if (ApplicationManager.getApplication().isWriteIntentLockAcquired()) { if (!myWritingAllowed) { return null; } } else if (ProgressIndicatorProvider.getGlobalProgressIndicator() == null) { return null; } ModalityState state = ModalityState.defaultModalityState(); return isWriteSafeModality(state) ? new TransactionIdImpl(state) : null; }