ULCMenuItem menuItem = null;
if (commands != null) {
for (DataModelCommand m = commands.firstItem(); m != null; m = commands.nextItem()) {
if (m.getCommandName().equals(name)) {
MenuItemULCEditor viewer = null;
try {
viewer = (MenuItemULCEditor) factory.createUlcViewer(new ULCViewerCreator(MenuItemULCEditor.class), m);
menuItem = (ULCMenuItem) viewer.getULCComponent(factory);
} catch (Exception e) {
e.printStackTrace(); //TODO
}
}
}