public JMeterTreeModel(TestElement tp) { super(new JMeterTreeNode(tp, null)); initTree(tp); }
/** * Clear the test plan, and use specified node for test plan * * N.B. Should only be called by {@link GuiPackage#clearTestPlan(TestElement)} * * @param testPlan the node to use as the testplan top node */ public void clearTestPlan(TestElement testPlan) { // Remove testplan nodes int children = getChildCount(getRoot()); while (children > 0) { JMeterTreeNode child = (JMeterTreeNode)getChild(getRoot(), 0); super.removeNodeFromParent(child); children = getChildCount(getRoot()); } // Init the tree initTree(testPlan); // Assumes this is only called from GUI mode }