+ " xmlns:g='urn:import:com.google.gwt.user.client.ui'>",
"<g:FlowPanel width='100px'/>",
"</ui:UiBinder>"));
waitForAutoBuild();
// parse
ComplexPanelInfo panel =
parseJavaInfo(
"public class Test extends FlowPanel {",
" public Test() {",
" MyComponent component = new MyComponent();",
" add(component);",
" }",
"}");
refresh();
WidgetInfo component = getJavaInfoByName("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",
getSourceDQ(
"<ui:UiBinder"
+ " xmlns:ui='urn:ui:com.google.gwt.uibinder'"
+ " xmlns:g='urn:import:com.google.gwt.user.client.ui'>",
"<g:FlowPanel width='200px'/>",
"</ui:UiBinder>"));
waitForAutoBuild();
// now reparse required
{
EditorActivatedRequest request = new EditorActivatedRequest();
panel.getBroadcast(EditorActivatedListener.class).invoke(request);
assertTrue(request.isReparseRequested());
assertFalse(request.isRefreshRequested());
}
}