use of com.google.security.zynamics.binnavi.disassembly.INaviViewNode in project binnavi by google.
the class CViewInserter method createGroupNodes.
/**
* Clones the group nodes of the source view and inserts them into the target view.
*
* @param target The target view where the cloned group nodes are inserted.
* @param sourceNodes The nodes of the source view.
* @param nodeMap Maps between the source nodes and their cloned counterparts.
*/
private static void createGroupNodes(final INaviView target, final Collection<INaviViewNode> sourceNodes, final Map<INaviViewNode, INaviViewNode> nodeMap) {
for (final INaviViewNode blockNode : sourceNodes) {
if (blockNode instanceof INaviGroupNode) {
final INaviGroupNode gnode = (INaviGroupNode) blockNode;
final CGroupNode newGroupNode = target.getContent().createGroupNode(getNodes(gnode.getElements(), nodeMap));
newGroupNode.initializeComment(gnode.getComments());
}
}
}
use of com.google.security.zynamics.binnavi.disassembly.INaviViewNode in project binnavi by google.
the class CView method close.
@Override
public boolean close() {
if (!isLoaded()) {
throw new IllegalStateException("IE00284: View is not loaded");
}
for (final INaviViewListener listener : m_listeners) {
try {
if (!listener.closingView(this)) {
return false;
}
} catch (final Exception exception) {
CUtilityFunctions.logException(exception);
}
}
final IDirectedGraph<INaviViewNode, INaviEdge> oldGraph = m_content.getGraph();
for (final INaviViewNode node : oldGraph) {
node.close();
}
for (final INaviEdge edge : oldGraph.getEdges()) {
edge.dispose();
}
m_nodeTags.clear();
m_nodeTags.addAll(m_content.getNodeTags());
m_content = null;
for (final INaviViewListener listener : m_listeners) {
try {
listener.closedView(this, oldGraph);
} catch (final Exception exception) {
CUtilityFunctions.logException(exception);
}
}
return true;
}
use of com.google.security.zynamics.binnavi.disassembly.INaviViewNode in project binnavi by google.
the class CViewContent method deleteGroupNode.
/**
* Deletes a group node from the view.
*
* @param groupNode The group node to delete.
*/
private static void deleteGroupNode(final INaviGroupNode groupNode) {
final List<INaviViewNode> elements = groupNode.getElements();
groupNode.setCollapsed(false);
for (final INaviViewNode node : elements) {
groupNode.removeElement(node);
if (groupNode.getParentGroup() != null) {
groupNode.getParentGroup().addElement(node);
}
}
}
Aggregations