private Set<String> getRelevantItemNamesForWidgets(List<Widget> children) {
Set<String> itemNames = new HashSet<String>();
for(Widget child : children) {
if (child instanceof Frame) {
Frame frame = (Frame) child;
String itemName = frame.getItem();
if(itemName!=null) {
itemNames.add(itemName);
}
itemNames.addAll(getRelevantItemNamesForWidgets(frame.getChildren()));
} else {
String itemName = child.getItem();
if(itemName!=null) {
itemNames.add(itemName);
}