use of org.eclipse.ui.internal.cheatsheets.registry.CheatSheetItemExtensionElement in project org.eclipse.rap by eclipse-rap.
the class CheatSheetParser method handleUnknownItemAttribute.
private AbstractItemExtensionElement[] handleUnknownItemAttribute(Node item, Node node) {
ArrayList al = new ArrayList();
if (itemExtensionContainerList == null)
return null;
for (int i = 0; i < itemExtensionContainerList.size(); i++) {
CheatSheetItemExtensionElement itemExtensionElement = (CheatSheetItemExtensionElement) itemExtensionContainerList.get(i);
if (itemExtensionElement.getItemAttribute().equals(item.getNodeName())) {
AbstractItemExtensionElement itemElement = itemExtensionElement.createInstance();
if (itemElement != null) {
itemElement.handleAttribute(item.getNodeValue());
al.add(itemElement);
}
}
}
if (al.size() == 0) {
String message = NLS.bind(Messages.get().WARNING_PARSING_UNKNOWN_ATTRIBUTE, (new Object[] { item.getNodeName(), node.getNodeName() }));
addStatus(IStatus.WARNING, message, null);
}
return (AbstractItemExtensionElement[]) al.toArray(new AbstractItemExtensionElement[al.size()]);
}
Aggregations