Changeset 1086 for trunk/autoquest-ui-swt/src/main/java/de
- Timestamp:
- 02/18/13 09:31:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowGuiModelDialog.java
r927 r1086 119 119 120 120 private void buildGuiTree() { 121 for (IGUIElement element : model.getRootElements()) { 121 GUIModel.Traverser traverser = model.getTraverser(); 122 123 IGUIElement root = traverser.firstChild(); 124 125 while (root != null) { 122 126 TreeItem child = new TreeItem(guiTree, SWT.NULL); 123 child.setText(element.toString()); 124 child.setData(element); 125 buildGuiTree(child, model.getChildren(element)); 127 child.setText(root.toString()); 128 child.setData(root); 129 buildGuiTree(child, traverser); 130 root = traverser.nextSibling(); 131 } 132 } 133 134 private void buildGuiTree(TreeItem currentParent, GUIModel.Traverser traverser) { 135 if (traverser.hasFirstChild()) { 136 IGUIElement childElement = traverser.firstChild(); 137 138 while (childElement != null) { 139 TreeItem child = new TreeItem(currentParent, SWT.NULL); 140 child.setText(childElement.toString()); 141 child.setData(childElement); 142 buildGuiTree(child, traverser); 143 childElement = traverser.nextSibling(); 144 } 145 146 traverser.parent(); 126 147 } 127 148 }
Note: See TracChangeset
for help on using the changeset viewer.