mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DocumentImpl: a faster check for no assertions
This commit is contained in:
@@ -770,10 +770,10 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
}
|
||||
|
||||
private void assertInsideCommand() {
|
||||
if (!myAssertThreading) return;
|
||||
CommandProcessor commandProcessor = CommandProcessor.getInstance();
|
||||
if (!commandProcessor.isUndoTransparentActionInProgress() &&
|
||||
commandProcessor.getCurrentCommand() == null &&
|
||||
myAssertThreading) {
|
||||
commandProcessor.getCurrentCommand() == null) {
|
||||
throw new IncorrectOperationException("Must not change document outside command or undo-transparent action. See com.intellij.openapi.command.WriteCommandAction or com.intellij.openapi.command.CommandProcessor");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user