SMTestProxy (final Object treeNode) { final Object userObj = ((DefaultMutableTreeNode)treeNode).getUserObject(); if (userObj instanceof SMTRunnerNodeDescriptor) { return ((SMTRunnerNodeDescriptor)userObj).getElement(); } return null; }