if (vertex.getAddon() == null)
{
AddonView view = vertex.getViews().iterator().next();
AddonId addonId = vertex.getAddonId();
Addon addon = null;
if (lastMasterGraph != null)
{
for (AddonVertex last : lastMasterGraph.getGraph().vertexSet())
{
if (last.getAddon().getId().equals(addonId) && last.getViews().contains(view))
{
addon = last.getAddon();
break;
}
}
}
vertex.setAddon(addon);
}
};
});
while (iterator.hasNext())
iterator.next();
iterator = new DepthFirstIterator<AddonVertex, AddonDependencyEdge>(graph.getGraph());
iterator.addTraversalListener(new TraversalListenerAdapter<AddonVertex, AddonDependencyEdge>()
{
@Override
public void vertexFinished(VertexTraversalEvent<AddonVertex> event)
{
AddonVertex vertex = event.getVertex();
if (vertex.getAddon() == null)
{
AddonView view = vertex.getViews().iterator().next();
AddonId addonId = vertex.getAddonId();
Addon addon = null;
Set<Addon> orphans = lifecycleManager.getOrphanAddons(addonId);
if (!orphans.isEmpty())
addon = orphans.iterator().next();
if (addon == null)