From 1dd84fdf6bd51ee085d6d4aaa97d9aa4cafe85b8 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Thu, 26 Jan 2012 17:49:37 +0100 Subject: [PATCH] CommandProcessor: assertion improved --- .../openapi/command/impl/CommandProcessorImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/command/impl/CommandProcessorImpl.java b/platform/platform-impl/src/com/intellij/openapi/command/impl/CommandProcessorImpl.java index 71494e542fac..33596a4f619d 100644 --- a/platform/platform-impl/src/com/intellij/openapi/command/impl/CommandProcessorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/command/impl/CommandProcessorImpl.java @@ -57,6 +57,11 @@ public class CommandProcessorImpl extends CommandProcessorEx { myUndoConfirmationPolicy = undoConfirmationPolicy; myDocument = document; } + + @Override + public String toString() { + return "'" + myName + "', group: '" + myGroupId + "'"; + } } private CommandDescriptor myCurrentCommand = null; @@ -219,7 +224,8 @@ public class CommandProcessorImpl extends CommandProcessorEx { } public void leaveModal() { - CommandLog.LOG.assertTrue(myCurrentCommand == null); + CommandLog.LOG.assertTrue(myCurrentCommand == null, "Command must not run: " + String.valueOf(myCurrentCommand)); + myCurrentCommand = myInterruptedCommands.pop(); if (myCurrentCommand != null) { fireCommandStarted();