Bug 320162 E4CommandProcessor.createBinding catch IllegalArgumentException which is never thrown
The code looks like this: TriggerSequence sequence = null; try { sequence = bs.createSequence(keySequence); } catch (IllegalArgumentException ex) { // the sequence is not complete Activator.trace(Policy.DEBUG_MENUS, "failed to create: " + binding, ex); //$NON-NLS-1$ return null; } But when looking at code in KeySequence.getInstance the only Exceptions thrown are: * NPE * ParseException (catched in BindingServiceImpl) I guess the code should catch the NPE and not the never thrown IAE
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4CommandProcessor.java
final ContextManager manager = (ContextManager) context.get(ContextManager.class.getName());
		defineContexts(null, root, manager);
		for (MBindingTable bt : bindingContainer.getBindingTables()) {
			final Context bindingContext = manager.getContext(bt.getBindingContextId());
			final BindingTable table = new BindingTable(bindingContext);
			bindingTables.addTable(table);
			List<MKeyBinding> bindings = bt.getBindings();
			for (MKeyBinding binding : bindings) {
				Binding keyBinding = createBinding(bindingContext, cs, bs, binding.getCommand(),
						binding.getParameters(), binding.getKeySequence(), binding);
				if (keyBinding != null) {
					table.addBinding(keyBinding);
				}
			}
		}
	}
	public static void watchForBindingChanges(IEclipseContext context) {
		final ECommandService cs = (ECommandService) context.get(ECommandService.class.getName());
		final EBindingService bs = (EBindingService) context.get(EBindingService.class.getName());
		final ContextManager manager = (ContextManager) context.get(ContextManager.class.getName());
		final BindingTableManager bindingTables = context.get(BindingTableManager.class);
		IEventBroker broker = context.get(IEventBroker.class);
		EventHandler handler = new EventHandler() {
			public void handleEvent(Event event) {
				Object elementObj = event.getProperty(UIEvents.EventTags.ELEMENT);
				if (elementObj instanceof MApplication) {
					Object newObj = event.getProperty(UIEvents.EventTags.NEW_VALUE);
					if (UIEvents.EventTypes.ADD.equals(event.getProperty(UIEvents.EventTags.TYPE))
							&& newObj instanceof MBindingTable) {
						MBindingTable bt = (MBindingTable) newObj;