use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Database.CDatabaseNode in project binnavi by google.
the class CDatabaseNodeTest method testUnloaded.
@Test
public void testUnloaded() throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException {
final CDatabaseNode node = new CDatabaseNode(m_tree, new DefaultMutableTreeNode(), m_database);
m_database.load();
node.dispose();
assertTrue(((LinkedHashSet<?>) ReflectionHelpers.getField(ReflectionHelpers.getField(m_database, "listeners"), "m_listeners")).isEmpty());
}
use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Database.CDatabaseNode in project binnavi by google.
the class CDatabaseNodeTest method testListenersRemoved.
@Test
public void testListenersRemoved() throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException {
final CDatabaseNode node = new CDatabaseNode(m_tree, new DefaultMutableTreeNode(), m_database);
node.dispose();
assertTrue(((LinkedHashSet<?>) ReflectionHelpers.getField(ReflectionHelpers.getField(m_database, "listeners"), "m_listeners")).isEmpty());
}
use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Database.CDatabaseNode in project binnavi by google.
the class CDatabaseNodeTest method testConstructor.
@Test
public void testConstructor() {
final CDatabaseNode node = new CDatabaseNode(m_tree, new DefaultMutableTreeNode(), m_database);
assertEquals(m_database, node.getObject());
assertNotNull(node.getComponent());
}
use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Database.CDatabaseNode in project binnavi by google.
the class CDatabaseNodeTest method testLoaded.
@Test
public void testLoaded() throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException {
m_database.load();
final CDatabaseNode node = new CDatabaseNode(m_tree, new DefaultMutableTreeNode(), m_database);
node.dispose();
assertTrue(((LinkedHashSet<?>) ReflectionHelpers.getField(ReflectionHelpers.getField(m_database, "listeners"), "m_listeners")).isEmpty());
}
use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Database.CDatabaseNode in project binnavi by google.
the class CDatabaseSortingHandler method drop.
@Override
public void drop(final DNDTree target, final DefaultMutableTreeNode parentNode, final DefaultMutableTreeNode draggedNode) {
final IDatabase draggedDatabase = ((CDatabaseNode) draggedNode).getObject();
final IDatabase parentDatabase = ((CDatabaseNode) parentNode).getObject();
int pnIndex = 0;
for (final IDatabase database : m_manager) {
if (database == parentDatabase) {
break;
}
pnIndex++;
}
m_manager.moveDatabase(draggedDatabase, pnIndex + 1);
}
Aggregations