Search in sources :

Example 1 with CActionDifferenceTraces

use of com.google.security.zynamics.binnavi.Gui.Debug.EventLists.Actions.CActionDifferenceTraces in project binnavi by google.

the class CEventListTableMenu method addCombineMenu.

/**
   * Adds the sub menu that is makes it possible to combine multiple traces into one trace.
   *
   * @param parent Parent window used for dialogs.
   * @param traceProvider Trace provider that provides the trace information shown in the table.
   * @param selectedRows Table row indices of the selected traces.
   */
private void addCombineMenu(final JFrame parent, final ITraceListProvider traceProvider, final int[] selectedRows) {
    addSeparator();
    final JMenu combineMenu = new JMenu("Combine Traces");
    final List<TraceList> traces = getTraces(traceProvider, selectedRows);
    combineMenu.add(CActionProxy.proxy(new CActionCombineTraces(parent, traceProvider, traces)));
    combineMenu.add(CActionProxy.proxy(new CActionIntersectTraces(parent, traceProvider, traces)));
    if (traces.size() == 2) {
        combineMenu.addSeparator();
        combineMenu.add(CActionProxy.proxy(new CActionDifferenceTraces(parent, traceProvider, traces.get(0), traces.get(1))));
        combineMenu.add(CActionProxy.proxy(new CActionDifferenceTraces(parent, traceProvider, traces.get(1), traces.get(0))));
    }
    add(combineMenu);
}
Also used : CActionIntersectTraces(com.google.security.zynamics.binnavi.Gui.Debug.EventLists.Actions.CActionIntersectTraces) CActionCombineTraces(com.google.security.zynamics.binnavi.Gui.Debug.EventLists.Actions.CActionCombineTraces) CActionDifferenceTraces(com.google.security.zynamics.binnavi.Gui.Debug.EventLists.Actions.CActionDifferenceTraces) TraceList(com.google.security.zynamics.binnavi.debug.models.trace.TraceList) JMenu(javax.swing.JMenu)

Aggregations

CActionCombineTraces (com.google.security.zynamics.binnavi.Gui.Debug.EventLists.Actions.CActionCombineTraces)1 CActionDifferenceTraces (com.google.security.zynamics.binnavi.Gui.Debug.EventLists.Actions.CActionDifferenceTraces)1 CActionIntersectTraces (com.google.security.zynamics.binnavi.Gui.Debug.EventLists.Actions.CActionIntersectTraces)1 TraceList (com.google.security.zynamics.binnavi.debug.models.trace.TraceList)1 JMenu (javax.swing.JMenu)1