Search in sources :

Example 1 with CActionSortModulesByName

use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CActionSortModulesByName in project binnavi by google.

the class CModuleContainerNodeMenuBuilder method createMenu.

@Override
protected void createMenu(final JComponent menu) {
    if (m_containerNode == null) {
        m_containerNode = getModuleContainerNode(CNodeExpander.findNode(getProjectTree(), m_database));
    }
    menu.add(new JMenuItem(CActionProxy.proxy(new CImportModuleAction(getParent(), m_database))));
    menu.add(new JMenuItem(CActionProxy.proxy(new CRefreshRawModulesAction(getParent(), m_database))));
    menu.add(new JMenuItem(CActionProxy.proxy(new CResolveAllFunctionsAction(menu, m_database))));
    menu.add(new JSeparator());
    final JMenu sortMenu = new JMenu("Sort");
    final JRadioButtonMenuItem idMenu = new JRadioButtonMenuItem(new CActionSortModulesById(m_containerNode));
    idMenu.setSelected(!m_containerNode.isSorted());
    sortMenu.add(idMenu);
    final JRadioButtonMenuItem nameMenu = new JRadioButtonMenuItem(new CActionSortModulesByName(m_containerNode));
    nameMenu.setSelected(m_containerNode.isSorted());
    sortMenu.add(nameMenu);
    menu.add(sortMenu);
}
Also used : CResolveAllFunctionsAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CResolveAllFunctionsAction) CActionSortModulesByName(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CActionSortModulesByName) CActionSortModulesById(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CActionSortModulesById) CImportModuleAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CImportModuleAction) JRadioButtonMenuItem(javax.swing.JRadioButtonMenuItem) CRefreshRawModulesAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CRefreshRawModulesAction) JMenuItem(javax.swing.JMenuItem) JSeparator(javax.swing.JSeparator) JMenu(javax.swing.JMenu)

Aggregations

CActionSortModulesById (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CActionSortModulesById)1 CActionSortModulesByName (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CActionSortModulesByName)1 CImportModuleAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CImportModuleAction)1 CRefreshRawModulesAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CRefreshRawModulesAction)1 CResolveAllFunctionsAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CResolveAllFunctionsAction)1 JMenu (javax.swing.JMenu)1 JMenuItem (javax.swing.JMenuItem)1 JRadioButtonMenuItem (javax.swing.JRadioButtonMenuItem)1 JSeparator (javax.swing.JSeparator)1