Search in sources :

Example 1 with CChangeFunctionNameAction

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

the class CCodeNodeMenu method addFunctionOperandMenu.

private void addFunctionOperandMenu(final CGraphModel model, final INaviReplacement replacement) {
    final INaviFunction function = ((CFunctionReplacement) replacement).getFunction();
    final INaviView view = function.getModule().getContent().getViewContainer().getView(function);
    add(new CChangeFunctionNameAction(model.getParent(), view));
    addSeparator();
}
Also used : CChangeFunctionNameAction(com.google.security.zynamics.binnavi.ZyGraph.Menus.Actions.CChangeFunctionNameAction) CFunctionReplacement(com.google.security.zynamics.binnavi.disassembly.CFunctionReplacement) INaviView(com.google.security.zynamics.binnavi.disassembly.views.INaviView) INaviFunction(com.google.security.zynamics.binnavi.disassembly.INaviFunction)

Example 2 with CChangeFunctionNameAction

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

the class CCodeNodeMenu method addRenameFunctionMenu.

private void addRenameFunctionMenu(final INaviCodeNode codeNode, final CGraphModel model) {
    try {
        final INaviFunction function = codeNode.getParentFunction();
        final INaviView view = function.getModule().getContent().getViewContainer().getView(function);
        add(new CChangeFunctionNameAction(model.getParent(), view));
    } catch (final MaybeNullException e) {
    // no parent function no menu entry we are ok with this.
    }
}
Also used : CChangeFunctionNameAction(com.google.security.zynamics.binnavi.ZyGraph.Menus.Actions.CChangeFunctionNameAction) INaviView(com.google.security.zynamics.binnavi.disassembly.views.INaviView) MaybeNullException(com.google.security.zynamics.binnavi.Exceptions.MaybeNullException) INaviFunction(com.google.security.zynamics.binnavi.disassembly.INaviFunction)

Aggregations

CChangeFunctionNameAction (com.google.security.zynamics.binnavi.ZyGraph.Menus.Actions.CChangeFunctionNameAction)2 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)2 INaviView (com.google.security.zynamics.binnavi.disassembly.views.INaviView)2 MaybeNullException (com.google.security.zynamics.binnavi.Exceptions.MaybeNullException)1 CFunctionReplacement (com.google.security.zynamics.binnavi.disassembly.CFunctionReplacement)1