Search in sources :

Example 1 with AddressSpace

use of com.google.security.zynamics.binnavi.API.disassembly.AddressSpace in project binnavi by google.

the class CAddressSpaceNodeMenuBuilder method getPluginAddressSpaces.

/**
 * Returns the API address space objects for the address spaces for which the menu was built.
 *
 * @return The API address space objects.
 */
private List<AddressSpace> getPluginAddressSpaces() {
    final DatabaseManager manager = PluginInterface.instance().getDatabaseManager();
    for (final Database database : manager) {
        if (database.getNative() == m_database) {
            for (final Project project : database.getProjects()) {
                if (project.getNative() == m_project) {
                    final List<AddressSpace> allSpaces = project.getAddressSpaces();
                    final List<AddressSpace> menuSpaces = new ArrayList<AddressSpace>();
                    for (final INaviAddressSpace addressSpace : m_addressSpaces) {
                        menuSpaces.add(ObjectFinders.getObject(addressSpace, allSpaces));
                    }
                    return menuSpaces;
                }
            }
        }
    }
    throw new IllegalStateException("IE01159: Unknown database");
}
Also used : Project(com.google.security.zynamics.binnavi.API.disassembly.Project) INaviProject(com.google.security.zynamics.binnavi.disassembly.INaviProject) INaviAddressSpace(com.google.security.zynamics.binnavi.disassembly.INaviAddressSpace) AddressSpace(com.google.security.zynamics.binnavi.API.disassembly.AddressSpace) DatabaseManager(com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager) Database(com.google.security.zynamics.binnavi.API.disassembly.Database) IDatabase(com.google.security.zynamics.binnavi.Database.Interfaces.IDatabase) ArrayList(java.util.ArrayList) INaviAddressSpace(com.google.security.zynamics.binnavi.disassembly.INaviAddressSpace)

Aggregations

AddressSpace (com.google.security.zynamics.binnavi.API.disassembly.AddressSpace)1 Database (com.google.security.zynamics.binnavi.API.disassembly.Database)1 DatabaseManager (com.google.security.zynamics.binnavi.API.disassembly.DatabaseManager)1 Project (com.google.security.zynamics.binnavi.API.disassembly.Project)1 IDatabase (com.google.security.zynamics.binnavi.Database.Interfaces.IDatabase)1 INaviAddressSpace (com.google.security.zynamics.binnavi.disassembly.INaviAddressSpace)1 INaviProject (com.google.security.zynamics.binnavi.disassembly.INaviProject)1 ArrayList (java.util.ArrayList)1