request.communicateWork(com.aptana.shared_core.string.StringUtils.format("Found: %s parents for: %s", definitions.size(), d.value));
//and add a parent for each definition found (this will make up what the next search we will do)
for (IDefinition def : definitions) {
Definition definition = (Definition) def;
HierarchyNodeModel model2 = createHierarhyNodeFromClassDef(definition);
if (model2 != null) {
if (allFound.containsKey(model2) == false) {
allFound.put(model2, model2);
toFindOnRound.parents.add(model2);
foundOnRound.add(model2);
} else {
model2 = allFound.get(model2);
Assert.isNotNull(model2);
toFindOnRound.parents.add(model2);
}
} else {
withoutAstDefinitions.add(definition.value);
}
}
for (String def : withoutAstDefinitions) {
toFindOnRound.parents.add(new HierarchyNodeModel(def));
}
}
}
} finally {
request.getMonitor().done();