Changeset 593
- Timestamp:
- 08/23/12 13:38:50 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIModel.java
r589 r593 8 8 9 9 import java.util.ArrayList; 10 import java.util.LinkedList;11 10 import java.util.List; 12 11 … … 77 76 78 77 /** 78 * <p> 79 * TODO: comment 80 * </p> 81 * 82 * @param guiElement 83 * @return 84 */ 85 public IGUIElement getParent(IGUIElement guiElement) { 86 for (TreeNode node : allNodes) { 87 for (TreeNode child : node.children) { 88 if (child.guiElement.equals(guiElement)) { 89 return node.guiElement; 90 } 91 } 92 } 93 94 return null; 95 } 96 97 /** 79 98 * TODO: comment 80 99 * … … 107 126 IGUIElementSpec specToIntegrateElementFor = remainingPath.remove(0); 108 127 109 List<TreeNode> matchingChildren = new LinkedList<TreeNode>();128 List<TreeNode> matchingChildren = new ArrayList<TreeNode>(); 110 129 111 130 if (parentNode.children != null) { 112 131 for (TreeNode child : parentNode.children) { 113 if (specToIntegrateElementFor.getSimilarity(child.guiElement.getSpecification())) {132 if (specToIntegrateElementFor.getSimilarity(child.guiElement.getSpecification())) { 114 133 matchingChildren.add(child); 115 134 } … … 131 150 132 151 if (remainingPath.size() > 0) { 133 // TODO update spec here matchingChildren.get(0).guiElement134 152 matchingChildren.get(0).guiElement.updateSpecification(specToIntegrateElementFor); 135 153 return integratePath(matchingChildren.get(0), remainingPath, guiElementFactory);
Note: See TracChangeset
for help on using the changeset viewer.