How does WindowBuilder Pro help set the nodes of a JFace TreeViewer?
I see a data Property, which accepts Keys and Values. Entering data there doesn't change anything - the TreeViewer still contains the default Item 1 and Item 2 settings.
The following code is generated, where treeViewer.setInput has the parameter new Object(). I'm not sure how to set treeViewer values in WBP.
protected void createContents() {
shell = new Shell();
shell.setLayout(new RowLayout());
shell.setSize(467, 309);
shell.setText("SWT Application");
final TreeViewer treeViewer = new TreeViewer(shell, SWT.BORDER);
treeViewer.setLabelProvider(new TreeLabelProvider());
tree = treeViewer.getTree();
final RowData rowData = new RowData();
rowData.height = 243;
rowData.width = 168;
tree.setLayoutData(rowData);
tree.setLinesVisible(true);
tree.setData("k2", "k2v");
tree.setData("k1", "k1v");
treeViewer.setInput(new Object());
final Button button = new Button(shell, SWT.NONE);
final RowData rowData_1 = new RowData();
rowData_1.width = 247;
button.setLayoutData(rowData_1);
button.setText("button");
}