Examples of GraphUpdatedListener


Examples of org.candle.decompiler.intermediate.graph.context.GraphUpdatedListener

    this.listenForUpdates = listenForUpdates;
  }
 
  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);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.