assertHierarchy(
"{RootPanel.get()} {local-unique: rootPanel} {/RootPanel.get()/ /rootPanel.add(bar)/}",
" {new: com.google.gwt.user.client.ui.MenuBar} {local-unique: bar} {/new MenuBar()/ /rootPanel.add(bar)/ /bar.addItem('A', (Command) null)/}",
" {implicit-factory} {empty} {/bar.addItem('A', (Command) null)/}");
MenuBarInfo bar = getJavaInfoByName("bar");
MenuItemInfo item = bar.getItems().get(0);
// association
assertInstanceOf(InvocationVoidAssociation.class, item.getAssociation());
// only item in "bar"
assertThat(bar.getAllItems()).containsOnly(item);
// check "Factory" property
{
assertNotNull(PropertyUtils.getByPath(item, "Factory/text"));
assertNotNull(PropertyUtils.getByPath(item, "Factory/cmd"));
}
// check "text" property
Property textProperty = item.getPropertyByTitle("text");
assertEquals("A", textProperty.getValue());
textProperty.setValue("B");
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",