use of com.google.security.zynamics.binnavi.disassembly.views.INaviView in project binnavi by google.
the class PostgreSQLProviderTest method testCNodeFunctionsUnTagNode1.
@Test
public void testCNodeFunctionsUnTagNode1() throws CouldntSaveDataException, CouldntLoadDataException, LoadCancelledException, CPartialLoadException {
final INaviModule module = getProvider().loadModules().get(0);
module.load();
final INaviView view = module.getContent().getViewContainer().getViews().get(0);
view.load();
PostgreSQLNodeFunctions.untagNode(getProvider(), view.getGraph().getNodes().get(0), 1);
}
use of com.google.security.zynamics.binnavi.disassembly.views.INaviView in project binnavi by google.
the class PostgreSQLProviderTestSetup method testCreateViewModule4.
@Test
public void testCreateViewModule4() throws CouldntLoadDataException, CouldntSaveDataException, CPartialLoadException, LoadCancelledException {
final INaviModule module = getProvider().loadModules().get(0);
module.load();
final INaviView view = module.getContent().getViewContainer().getViews().get(223);
view.load();
final CView newView = getProvider().createView(module, view, "Module View Name", "Module View Description");
assertEquals("Module View Name", newView.getName());
assertEquals("Module View Description", newView.getConfiguration().getDescription());
}
use of com.google.security.zynamics.binnavi.disassembly.views.INaviView in project binnavi by google.
the class PostgreSQLProviderTestSetup method testCreateViewProject4.
@Test(expected = CouldntSaveDataException.class)
public void testCreateViewProject4() throws CouldntSaveDataException, CouldntLoadDataException, LoadCancelledException, CPartialLoadException {
final INaviView view = getKernel32Module().getContent().getViewContainer().getViews().get(223);
view.load();
getProvider().createView(new MockProject(), view, "View Name", null);
}
use of com.google.security.zynamics.binnavi.disassembly.views.INaviView in project binnavi by google.
the class ViewGenerator method createView.
/**
* Creates a new REIL view from a list of REIL instructions.
*
* @param module The module where the view is created.
* @param instructions The instructions which are put into the view.
*
* @return The new view.
*/
public static View createView(final Module module, final List<ReilInstruction> instructions) {
Preconditions.checkNotNull(module, "Error: Module argument can not be null");
Preconditions.checkNotNull(instructions, "Error: Instructions argument can not be null");
final INaviView view = CReilViewCreator.create(module.getNative(), convert(instructions));
return ObjectFinders.getObject(view, module.getViews());
}
use of com.google.security.zynamics.binnavi.disassembly.views.INaviView in project binnavi by google.
the class Project method convertData.
/**
* Converts the internal project data to API project data.
*/
private void convertData() {
m_debuggerTemplates = new FilledList<DebuggerTemplate>();
final List<DebuggerTemplate> apiTemplates = m_database.getDebuggerTemplateManager().getDebuggerTemplates();
for (final com.google.security.zynamics.binnavi.debug.debugger.DebuggerTemplate debuggerTemplate : m_project.getConfiguration().getDebuggers()) {
m_debuggerTemplates.add(ObjectFinders.getObject(debuggerTemplate, apiTemplates));
}
m_traces = new FilledList<Trace>();
for (final TraceList trace : m_project.getContent().getTraces()) {
m_traces.add(new Trace(trace));
}
m_addressSpaces = new FilledList<AddressSpace>();
for (final INaviAddressSpace addressSpace : m_project.getContent().getAddressSpaces()) {
m_addressSpaces.add(new AddressSpace(m_database, this, addressSpace));
}
m_views = new FilledList<View>();
for (final INaviView view : m_project.getContent().getViews()) {
m_views.add(new View(this, view, m_nodeTagManager, m_viewTagManager));
}
}
Aggregations