use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Tag.CTagNode 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.Gui.MainWindow.ProjectTree.Nodes.Tag.CTagNode in project binnavi by google.
the class CViewsToTagHandler method canHandle.
@SuppressWarnings("unchecked")
@Override
public boolean canHandle(final DefaultMutableTreeNode parentNode, final Object data) {
if (parentNode instanceof CTagNode) {
final List<INaviView> views = (List<INaviView>) data;
final CTag tag = ((CTagNode) parentNode).getObject().getObject();
for (final INaviView view : views) {
if (!view.getConfiguration().isTagged(tag) && view.inSameDatabase(tag)) {
return true;
}
}
return false;
}
return false;
}
use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Tag.CTagNode in project binnavi by google.
the class CTagContainerNode method createChildren.
@Override
protected void createChildren() {
if (m_database.isLoaded()) {
final List<? extends ITreeNode<CTag>> children = m_rootTag.getChildren();
Collections.sort(children, new TagComparator());
for (final ITreeNode<CTag> tag : children) {
add(new CTagNode(getProjectTree(), m_database, (TreeNode<CTag>) tag));
}
}
}
Aggregations