use of com.google.security.zynamics.binnavi.disassembly.CProjectContainer in project binnavi by google.
the class CProjectContainerTest method testListenersSomehow.
@Test
public void testListenersSomehow() throws CouldntSaveDataException, CouldntLoadDataException, LoadCancelledException, CouldntDeleteException {
@SuppressWarnings("unused") final CProjectContainer container = new CProjectContainer(m_database, m_project);
final DebuggerTemplate template = new DebuggerTemplate(2, "bla", "horst", 2222, m_provider);
m_space.getConfiguration().setDebuggerTemplate(template);
m_space.getConfiguration().setDebuggerTemplate(null);
assertEquals(1, m_space.getContent().getModules().size());
m_space.getContent().removeModule(m_module);
m_space.getContent().addModule(m_module);
m_module.load();
m_project.load();
m_space.close();
m_space.load();
}
use of com.google.security.zynamics.binnavi.disassembly.CProjectContainer in project binnavi by google.
the class CTracesNodeComponent method showRelevantViews.
/**
* Shows the views that belong to a trace in the table in the lower half of the component.
*
* @param trace The trace list.
*
* @throws CouldntLoadDataException
*/
private void showRelevantViews(final TraceList trace) throws CouldntLoadDataException {
final IFilledList<UnrelocatedAddress> addresses = new FilledList<UnrelocatedAddress>();
for (final ITraceEvent traceEvent : trace) {
addresses.add(traceEvent.getOffset().getAddress());
}
final List<INaviView> views = m_container.getViewsWithAddresses(addresses, false);
if (m_container instanceof CProjectContainer) {
for (final INaviModule module : m_container.getModules()) {
if (module.isLoaded()) {
views.addAll(module.getViewsWithAddresses(addresses, false));
}
}
}
m_model.setViews(views);
}
use of com.google.security.zynamics.binnavi.disassembly.CProjectContainer in project binnavi by google.
the class PluginInterface method showInLastWindow.
/**
* Shows a view in the last window.
*
* @param view The view to show.
*
* @return The view2d object that is shown.
*/
public View2D showInLastWindow(final View view) {
Preconditions.checkNotNull(view, "Error: View argument can not be null");
final ViewContainer container = view.getContainer();
if (container instanceof Module) {
final Module module = (Module) container;
return show(CWindowManager.instance().getLastWindow(), view, new CModuleContainer(container.getDatabase().getNative(), module.getNative()));
} else {
final Project project = (Project) container;
return show(CWindowManager.instance().getLastWindow(), view, new CProjectContainer(container.getDatabase().getNative(), project.getNative()));
}
}
use of com.google.security.zynamics.binnavi.disassembly.CProjectContainer in project binnavi by google.
the class PluginInterface method showInNewWindow.
/**
* Shows a view in a new window.
*
* @param view The view to show.
*
* @return The view2d object that is shown.
*/
public View2D showInNewWindow(final View view) {
Preconditions.checkNotNull(view, "Error: View argument can not be null");
final ViewContainer container = view.getContainer();
if (container instanceof Module) {
final Module module = (Module) container;
return show(null, view, new CModuleContainer(container.getDatabase().getNative(), module.getNative()));
} else {
final Project project = (Project) container;
return show(null, view, new CProjectContainer(container.getDatabase().getNative(), project.getNative()));
}
}
Aggregations