"<ui:UiBinder>",
" <g:FlowPanel width='100px'/>",
"</ui:UiBinder>"));
waitForAutoBuild();
// parse
ComplexPanelInfo panel =
parse(
"// filler filler filler filler filler",
"// filler filler filler filler filler",
"<ui:UiBinder>",
" <g:FlowPanel>",
" <t:MyComponent wbp:name='component'/>",
" </g:FlowPanel>",
"</ui:UiBinder>");
refresh();
WidgetInfo component = getObjectByName("component");
// initially "100px"
assertThat(component.getBounds().width).isEqualTo(100);
// initially no refresh required
{
EditorActivatedRequest request = new EditorActivatedRequest();
panel.getBroadcast(EditorActivatedListener.class).invoke(request);
assertFalse(request.isReparseRequested());
assertFalse(request.isRefreshRequested());
}
// update UiBinder template
setFileContentSrc(
"test/client/MyComponent.ui.xml",
getTestSource(
"// filler filler filler filler filler",
"// filler filler filler filler filler",
"// filler filler filler filler filler",
"<ui:UiBinder>",
" <g:FlowPanel width='200px'/>"));
waitForAutoBuild();
// now reparse required
{
EditorActivatedRequest request = new EditorActivatedRequest();
panel.getBroadcast(EditorActivatedListener.class).invoke(request);
assertTrue(request.isReparseRequested());
assertFalse(request.isRefreshRequested());
}
}