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
public static void processCategories(IEclipseContext context, List<MCategory> categories) {
		Activator.trace(Policy.DEBUG_CMDS, "Initialize contexts from model", null); 
		ECommandService cs = (ECommandService) context.get(ECommandService.class.getName());
		for (MCategory category : categories) {
			createCategory(cs, category);
		}
	}
	public static void processCommands(IEclipseContext context, List<MCommand> commands) {
		
		Activator.trace(Policy.DEBUG_CMDS, "Initialize commands from model", null); 
		ECommandService cs = (ECommandService) context.get(ECommandService.class.getName());
		Category undefinedCategory = cs.defineCategory(MApplication.class.getName(),
				"Application Category", null); 
		for (MCommand cmd : commands) {
			createCommand(cs, undefinedCategory, cmd);
		}
	}
	private static void createCategory(ECommandService cs, MCategory category) {
		if (category.getElementId() != null && category.getName() != null) {
			cs.defineCategory(category.getElementId(), category.getName(),
					category.getDescription());
		}
	}
	private static void createCommand(ECommandService cs, Category undefinedCategory, MCommand cmd) {
		IParameter[] parms = null;
		String id = cmd.getElementId();
		String name = cmd.getCommandName();
		List<MCommandParameter> modelParms = cmd.getParameters();
		if (modelParms != null && !modelParms.isEmpty()) {
			ArrayList<Parameter> parmList = new ArrayList<Parameter>();