Search in sources :

Example 1 with COpenOriginalFunction

use of com.google.security.zynamics.binnavi.ZyGraph.Menus.Actions.COpenOriginalFunction in project binnavi by google.

the class CCodeNodeMenu method addOpenOriginalFunctionMenu.

private void addOpenOriginalFunctionMenu(final CGraphModel model, final NaviNode node) {
    final INaviCodeNode rawNode = (INaviCodeNode) node.getRawNode();
    try {
        final INaviFunction nodeFunction = rawNode.getParentFunction();
        final INaviFunction viewFunction = model.getViewContainer().getFunction(model.getGraph().getRawView());
        if (nodeFunction != viewFunction) {
            add(CActionProxy.proxy(new COpenOriginalFunction(model.getParent(), model.getViewContainer(), nodeFunction)));
        }
    } catch (final MaybeNullException e) {
    // If there is no original function then we can not open it.
    }
}
Also used : COpenOriginalFunction(com.google.security.zynamics.binnavi.ZyGraph.Menus.Actions.COpenOriginalFunction) INaviCodeNode(com.google.security.zynamics.binnavi.disassembly.INaviCodeNode) MaybeNullException(com.google.security.zynamics.binnavi.Exceptions.MaybeNullException) INaviFunction(com.google.security.zynamics.binnavi.disassembly.INaviFunction)

Aggregations

MaybeNullException (com.google.security.zynamics.binnavi.Exceptions.MaybeNullException)1 COpenOriginalFunction (com.google.security.zynamics.binnavi.ZyGraph.Menus.Actions.COpenOriginalFunction)1 INaviCodeNode (com.google.security.zynamics.binnavi.disassembly.INaviCodeNode)1 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)1