use of org.candle.decompiler.intermediate.graph.context.GraphUpdatedListener in project candle-decompiler by bradsdavis.
the class GraphIntermediateVisitor method process.
public void process() {
GraphUpdatedListener gul = new GraphUpdatedListener();
if (listenForUpdates) {
igc.getGraph().addGraphListener(gul);
}
while (true) {
Set<AbstractIntermediate> snapshot = new HashSet<AbstractIntermediate>();
snapshot.addAll(igc.getGraph().vertexSet());
for (AbstractIntermediate vertex : snapshot) {
if (igc.getGraph().containsVertex(vertex)) {
vertex.accept(this);
}
}
// reset the update listener.
if (!gul.isUpdated()) {
break;
} else {
gul.reset();
}
}
igc.getGraph().removeGraphListener(gul);
}
Aggregations