void (Element macro) { setName(macro.getAttributeValue(ATTRIBUTE_NAME)); List actions = macro.getChildren(); for (final Object o : actions) { Element action = (Element)o; if (ELEMENT_TYPING.equals(action.getName())) { Couple<List<Integer>> codes = parseKeyCodes(action.getAttributeValue(ATTRIBUTE_KEY_CODES)); String text = action.getText(); if (text == null || text.length() == 0) { text = action.getAttributeValue(ATTRIBUTE_TEXT); } text = text.replaceAll("&#x20;", " "); if (!StringUtil.isEmpty(text)) { myActions.add(new TypedDescriptor(text, codes.getFirst(), codes.getSecond())); } } else if (ELEMENT_ACTION.equals(action.getName())) { myActions.add(new IdActionDescriptor(action.getAttributeValue(ATTRIBUTE_ID))); } else if (ELEMENT_SHORTCUT.equals(action.getName())) { myActions.add(new ShortcutActionDescription(action.getAttributeValue(ATTRIBUTE_TEXT))); } } }