Search in sources :

Example 11 with INaviAddressSpace

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

the class CNameListGenerators method getNameList.

/**
   * Generates a name list from the names of the given address spaces.
   * 
   * @param addressSpaces The address spaces that provide the names.
   * 
   * @return The generated name list.
   */
public static String getNameList(final INaviAddressSpace[] addressSpaces) {
    int count = 0;
    final StringBuilder list = new StringBuilder();
    for (final INaviAddressSpace addressSpace : addressSpaces) {
        list.append("- ");
        list.append(addressSpace.getConfiguration().getName());
        list.append('\n');
        count++;
        if ((count == MAX_LIST_LENGTH) && (addressSpaces.length != MAX_LIST_LENGTH)) {
            list.append("\n... ");
            list.append(String.format("%d others ...", addressSpaces.length - count));
            break;
        }
    }
    return list.toString();
}
Also used : INaviAddressSpace(com.google.security.zynamics.binnavi.disassembly.INaviAddressSpace)

Aggregations

INaviAddressSpace (com.google.security.zynamics.binnavi.disassembly.INaviAddressSpace)11 CouldntSaveDataException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)2 CAddressSpaceNode (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.AddressSpace.CAddressSpaceNode)2 CDefaultProgressOperation (com.google.security.zynamics.binnavi.Gui.Progress.CDefaultProgressOperation)2 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 CouldntDeleteException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntDeleteException)1 CouldntLoadDataException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntLoadDataException)1 LoadCancelledException (com.google.security.zynamics.binnavi.Database.Exceptions.LoadCancelledException)1 IDatabase (com.google.security.zynamics.binnavi.Database.Interfaces.IDatabase)1 CLoadAddressSpaceAction (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Actions.CLoadAddressSpaceAction)1 CTracesNode (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Traces.CTracesNode)1 CProjectViewsContainerNode (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Views.Project.CProjectViewsContainerNode)1 MemoryModule (com.google.security.zynamics.binnavi.debug.models.processmanager.MemoryModule)1 TraceList (com.google.security.zynamics.binnavi.debug.models.trace.TraceList)1 CAddressSpace (com.google.security.zynamics.binnavi.disassembly.AddressSpaces.CAddressSpace)1 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)1 INaviProject (com.google.security.zynamics.binnavi.disassembly.INaviProject)1