remove unhelpful assertion (IDEA-73526)

This commit is contained in:
Dmitry Jemerov
2011-09-06 20:51:16 +02:00
parent ff60789f47
commit a45e02726c
3 changed files with 2 additions and 9 deletions
@@ -28,13 +28,6 @@ public final class MouseShortcut extends Shortcut {
private final int myClickCount;
public MouseShortcut(int button, int modifiers, int clickCount) {
if (
MouseEvent.BUTTON1 != button &&
MouseEvent.BUTTON2 != button &&
MouseEvent.BUTTON3 != button
) {
throw new IllegalArgumentException("unknown button: " + button);
}
myButton = button;
// TODO[vova] check modifiers?
myModifiers = mapOldModifiers(modifiers);
@@ -128,7 +128,7 @@ public class KeymapUtil {
// do nothing
}
else {
throw new IllegalStateException("unknown button: " + button);
buttonNum = button;
}
if (clickCount == 1) {
@@ -801,7 +801,7 @@ public class KeymapImpl implements Keymap, ExternalizableScheme {
buffer.append(' ');
}
else {
throw new IllegalStateException("unknown button: " + button);
buffer.append("button").append(button);
}
if (shortcut.getClickCount() > 1) {