/**
* Two grids with <code>ColumnModel</code> in variable.
*/
public void test_columns_parse_twoGrids() throws Exception {
ComplexPanelInfo panel =
parseJavaInfo(
"import java.util.List;",
"import java.util.ArrayList;",
"import com.extjs.gxt.ui.client.store.*;",
"import com.extjs.gxt.ui.client.widget.grid.*;",
"public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
" public Test() {",
" {",
" List<ColumnConfig> configs = new ArrayList<ColumnConfig>();",
" {",
" ColumnConfig column_1 = new ColumnConfig();",
" configs.add(column_1);",
" }",
" ColumnModel cm = new ColumnModel(configs);",
" Grid grid_1 = new Grid(new ListStore(), cm);",
" add(grid_1);",
" }",
" {",
" List<ColumnConfig> configs = new ArrayList<ColumnConfig>();",
" {",
" ColumnConfig column_2 = new ColumnConfig();",
" configs.add(column_2);",
" }",
" ColumnModel cm = new ColumnModel(configs);",
" Grid grid_2 = new Grid(new ListStore(), cm);",
" add(grid_2);",
" }",
" }",
"}");
assertHierarchy(
"{this: com.google.gwt.user.client.ui.HorizontalPanel} {this} {/add(grid_1)/ /add(grid_2)/}",
" {new: com.extjs.gxt.ui.client.widget.grid.Grid} {local-unique: grid_1} {/new Grid(new ListStore(), cm)/ /add(grid_1)/}",
" {new: com.extjs.gxt.ui.client.widget.grid.ColumnConfig} {local-unique: column_1} {/new ColumnConfig()/ /configs.add(column_1)/}",
" {new: com.extjs.gxt.ui.client.widget.grid.Grid} {local-unique: grid_2} {/new Grid(new ListStore(), cm)/ /add(grid_2)/}",
" {new: com.extjs.gxt.ui.client.widget.grid.ColumnConfig} {local-unique: column_2} {/new ColumnConfig()/ /configs.add(column_2)/}");
panel.refresh();
assertNoErrors(panel);
}