use of com.google.security.zynamics.binnavi.Tagging.ITagManager in project binnavi by google.
the class CTagSortingHandler method drop.
@Override
public void drop(final DNDTree target, final DefaultMutableTreeNode parentNode, final DefaultMutableTreeNode draggedNode) {
final ITagManager tagManager = ((CTagTreeNode) parentNode).getTagManager();
final ITreeNode<CTag> parentNodeNode = ((CTagTreeNode) parentNode).getTag();
final ITreeNode<CTag> draggedNodeNode = ((CTagTreeNode) draggedNode).getTag();
try {
tagManager.moveTag(parentNodeNode, draggedNodeNode);
} catch (final CouldntSaveDataException e) {
// TODO: Improve this
CUtilityFunctions.logException(e);
}
}
use of com.google.security.zynamics.binnavi.Tagging.ITagManager in project binnavi by google.
the class CTagSortingHandler method drop.
@Override
public void drop(final DNDTree target, final DefaultMutableTreeNode parentNode, final DefaultMutableTreeNode draggedNode) {
final ITagManager tagManager = ((CTagNode) parentNode).getTagManager();
final TreeNode<CTag> parentNodeNode = ((CTagNode) parentNode).getObject();
final TreeNode<CTag> draggedNodeNode = ((CTagNode) draggedNode).getObject();
try {
tagManager.moveTag(parentNodeNode, draggedNodeNode);
CNodeExpander.expandNode(target, parentNodeNode);
} catch (final CouldntSaveDataException e) {
// TODO: Improve this
CUtilityFunctions.logException(e);
}
}
use of com.google.security.zynamics.binnavi.Tagging.ITagManager in project binnavi by google.
the class TagManagerTest method testGetTag.
@Test
public void testGetTag() throws com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException {
final TreeNode<CTag> rootNode = new TreeNode<CTag>(new CTag(1, "root", "", TagType.NODE_TAG, m_provider));
final Tree<CTag> tree = new Tree<CTag>(rootNode);
final ITagManager manager = new CTagManager(tree, TagType.NODE_TAG, m_provider);
final ITreeNode<CTag> secondNode = manager.addTag(rootNode, "2nd");
final ITreeNode<CTag> thirdNode = manager.addTag(rootNode, "3rd");
final TagManager tagManager = new TagManager(manager);
assertNotNull(tagManager.getTag(rootNode.getObject()));
assertNotNull(tagManager.getTag(secondNode.getObject()));
assertNotNull(tagManager.getTag(thirdNode.getObject()));
}
Aggregations