@Override public int getRowForModelItem(ModelItem modelItem) { if (modelItem == null) return -1; TreePath treePath = SoapUI.getNavigator().getTreePath(modelItem); return getTree().getRowForPath(treePath); }
public Component getRenderer(ModelItem modelItem) { TreePath treePath = SoapUI.getNavigator().getTreePath(modelItem); int row = getTree().getRowForPath(treePath); SoapUITreeNode treeNode = (SoapUITreeNode) treePath.getLastPathComponent(); return getTree() .getCellRenderer() .getTreeCellRendererComponent( getTree(), treeNode, true, getTree().isExpanded(row), treeNode.isLeaf(), row, true); }