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('Sub', subMenu)/}",
" {implicit-factory} {empty} {/bar.addItem('Sub', subMenu)/}",
" {new: com.google.gwt.user.client.ui.MenuBar} {local-unique: subMenu} {/new MenuBar(false)/ /bar.addItem('Sub', subMenu)/}");
MenuBarInfo subMenu = getJavaInfoByName("subMenu");
// delete "subMenu", should delete also "item"
subMenu.delete();
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" RootPanel rootPanel = RootPanel.get();",
" MenuBar bar = new MenuBar();",