Search in sources :

Example 1 with CSearchTableAction

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

the class CModuleNodeMenuBuilder method createMenu.

@Override
protected void createMenu(final JComponent menu) {
    menu.add(new JMenuItem(m_loadModulesAction));
    menu.add(new JMenuItem(m_initializeModuleAction));
    menu.add(new JSeparator());
    if (CStaredItemFunctions.allStared(m_modules)) {
        menu.add(new JMenuItem(CActionProxy.proxy(new CUnstarModulesAction(getParent(), m_modules))));
    } else if (CStaredItemFunctions.allNotStared(m_modules)) {
        menu.add(new JMenuItem(CActionProxy.proxy(new CStarModulesAction(getParent(), m_modules))));
    } else {
        menu.add(new JMenuItem(CActionProxy.proxy(new CToggleStarsModulesAction(getParent(), m_modules))));
    }
    if (m_modules.length == 1) {
        menu.add(new JSeparator());
        menu.add(new JMenuItem(m_searchAction));
        menu.add(new JMenuItem(m_resolveAction));
        menu.add(new JMenuItem(m_resolveAllAction));
    }
    menu.add(new JSeparator());
    if (m_addressSpace == null) {
        menu.add(new JMenuItem(CActionProxy.proxy(new CDeleteModuleAction(getParent(), m_database, m_modules, getParentUpdater()))));
    } else {
        menu.add(new JMenuItem(CActionProxy.proxy(new CRemoveModuleAction(getParent(), m_addressSpace, m_modules))));
    }
    if (m_table != null) {
        menu.add(new JSeparator());
        menu.add(new JMenuItem(CActionProxy.proxy(new CSearchTableAction(getParent(), m_table))));
        menu.add(new JMenuItem(CActionProxy.proxy(new CopySelectionAction(m_table))));
    }
    addPluginMenus(menu);
}
Also used : CRemoveModuleAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CRemoveModuleAction) CStarModulesAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CStarModulesAction) CopySelectionAction(com.google.security.zynamics.zylib.gui.tables.CopySelectionAction) CUnstarModulesAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CUnstarModulesAction) JMenuItem(javax.swing.JMenuItem) CSearchTableAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CSearchTableAction) JSeparator(javax.swing.JSeparator) CToggleStarsModulesAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CToggleStarsModulesAction) CDeleteModuleAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CDeleteModuleAction)

Example 2 with CSearchTableAction

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

the class CProjectNodeMenuBuilder method createMenu.

@Override
protected void createMenu(final JComponent menu) {
    if ((m_projects.length == 1) && (m_addAddressSpaceAction == null)) {
        // We delay the creation of the m_addAddressSpaceAction object because we need to have
        // getSelectionUpdater working.
        final INaviProject singleProject = m_projects[0];
        m_addAddressSpaceAction = CActionProxy.proxy(new CAddAddressSpaceAction(getProjectTree(), singleProject, getSelectionUpdater()));
        updateActions(singleProject);
    }
    final boolean isSingleSelection = m_projects.length == 1;
    if (canOpen()) {
        menu.add(new JMenuItem(m_loadProjectAction));
        menu.add(new JSeparator());
    }
    if (isSingleSelection) {
        // We can not search in more than one project at a time, and only if the project
        // is already loaded.
        menu.add(new JMenuItem(m_searchViewAction));
        menu.add(new JSeparator());
        // We do not allow the user to add address spaces to more than one
        // project at a time. And the project must be loaded too.
        menu.add(new JMenuItem(m_addAddressSpaceAction));
        menu.add(new JSeparator());
        menu.add(new JMenuItem(m_forwardAction));
        menu.add(new JSeparator());
    }
    menu.add(new JMenuItem(CActionProxy.proxy(new CDeleteProjectAction(getParent(), m_database, m_projects, getParentUpdater()))));
    if (m_table != null) {
        menu.add(new JSeparator());
        menu.add(new JMenuItem(CActionProxy.proxy(new CSearchTableAction(getParent(), m_table))));
        menu.add(new JMenuItem(CActionProxy.proxy(new CopySelectionAction(m_table))));
    }
    addPluginMenus(menu);
}
Also used : INaviProject(com.google.security.zynamics.binnavi.disassembly.INaviProject) CopySelectionAction(com.google.security.zynamics.zylib.gui.tables.CopySelectionAction) CAddAddressSpaceAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CAddAddressSpaceAction) CDeleteProjectAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CDeleteProjectAction) JMenuItem(javax.swing.JMenuItem) CSearchTableAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CSearchTableAction) JSeparator(javax.swing.JSeparator)

Example 3 with CSearchTableAction

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

the class CAddressSpaceNodeMenuBuilder method createMenu.

@Override
protected void createMenu(final JComponent menu) {
    menu.add(new JMenuItem(m_loadAddressSpaceAction));
    menu.add(new JSeparator());
    menu.add(new JMenuItem(CActionProxy.proxy(new CDeleteAddressSpaceAction(getParent(), m_project, m_addressSpaces, getParentUpdater()))));
    if (m_addressSpaces.length == 1) {
        menu.add(new JSeparator());
        menu.add(new JMenuItem(CActionProxy.proxy(new CCreateCombinedCallgraphAction(getParent(), m_container, m_project, m_addressSpaces[0]))));
        menu.add(new JSeparator());
        menu.add(new JMenuItem(CActionProxy.proxy(new CResolveAllFunctionsSingleAddressSpaceAction(menu, m_database, m_addressSpaces[0]))));
    }
    if (m_table != null) {
        menu.add(new JSeparator());
        menu.add(new JMenuItem(CActionProxy.proxy(new CSearchTableAction(getParent(), m_table))));
        menu.add(new JMenuItem(CActionProxy.proxy(new CopySelectionAction(m_table))));
    }
    addPluginMenus(menu);
}
Also used : CDeleteAddressSpaceAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CDeleteAddressSpaceAction) CResolveAllFunctionsSingleAddressSpaceAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CResolveAllFunctionsSingleAddressSpaceAction) CCreateCombinedCallgraphAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CCreateCombinedCallgraphAction) CopySelectionAction(com.google.security.zynamics.zylib.gui.tables.CopySelectionAction) JMenuItem(javax.swing.JMenuItem) CSearchTableAction(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CSearchTableAction) JSeparator(javax.swing.JSeparator)

Aggregations

CSearchTableAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CSearchTableAction)3 CopySelectionAction (com.google.security.zynamics.zylib.gui.tables.CopySelectionAction)3 JMenuItem (javax.swing.JMenuItem)3 JSeparator (javax.swing.JSeparator)3 CAddAddressSpaceAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CAddAddressSpaceAction)1 CCreateCombinedCallgraphAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CCreateCombinedCallgraphAction)1 CDeleteAddressSpaceAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CDeleteAddressSpaceAction)1 CDeleteModuleAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CDeleteModuleAction)1 CDeleteProjectAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CDeleteProjectAction)1 CRemoveModuleAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CRemoveModuleAction)1 CResolveAllFunctionsSingleAddressSpaceAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CResolveAllFunctionsSingleAddressSpaceAction)1 CStarModulesAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CStarModulesAction)1 CToggleStarsModulesAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CToggleStarsModulesAction)1 CUnstarModulesAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CUnstarModulesAction)1 INaviProject (com.google.security.zynamics.binnavi.disassembly.INaviProject)1