Search in sources :

Example 1 with BlockEdge

use of com.google.security.zynamics.binnavi.API.disassembly.BlockEdge in project binnavi by google.

the class PathFinder method createInitialEdges.

/**
   * Creates view edges for all edges in the passed functions.
   *
   * @param view The view where the edges are created.
   * @param passedFunctions All functions that lie on the path.
   * @param nodeMap Maps between the basic blocks of the functions and their corresponding code
   *        nodes.
   */
private static void createInitialEdges(final View view, final Collection<FunctionBlock> passedFunctions, final Map<BasicBlock, ViewNode> nodeMap) {
    for (final FunctionBlock functionBlock : passedFunctions) {
        final Function function = functionBlock.getFunction();
        for (final BlockEdge edge : function.getGraph().getEdges()) {
            final ViewEdge newEdge = view.createEdge(nodeMap.get(edge.getSource()), nodeMap.get(edge.getTarget()), edge.getType());
            newEdge.setColor(getEdgeColor(edge));
        }
    }
}
Also used : Function(com.google.security.zynamics.binnavi.API.disassembly.Function) BlockEdge(com.google.security.zynamics.binnavi.API.disassembly.BlockEdge) ViewEdge(com.google.security.zynamics.binnavi.API.disassembly.ViewEdge) FunctionBlock(com.google.security.zynamics.binnavi.API.disassembly.FunctionBlock)

Aggregations

BlockEdge (com.google.security.zynamics.binnavi.API.disassembly.BlockEdge)1 Function (com.google.security.zynamics.binnavi.API.disassembly.Function)1 FunctionBlock (com.google.security.zynamics.binnavi.API.disassembly.FunctionBlock)1 ViewEdge (com.google.security.zynamics.binnavi.API.disassembly.ViewEdge)1