@Override public Object[] getChildElements(Object element) { if (element == myTreeRoot) { return myGroups; } if (element instanceof ResourceGroup) { ResourceGroup group = (ResourceGroup) element; return group.getItems().toArray(); } return ArrayUtil.EMPTY_OBJECT_ARRAY; }
private void select(String type, String name) { for (ResourceGroup group : myGroups) { if (type.equalsIgnoreCase(group.getName())) { for (ResourceItem item : group.getItems()) { if (name.equals(item.toString())) { myTreeBuilder.select(item); return; } } return; } } }