JMeterGUIComponent guicomp = ReportGuiPackage.getInstance().getGui(component);
guicomp.configure(component);
guicomp.modifyTestElement(component);
ReportGuiPackage.getInstance().getCurrentGui(); // put the gui object back
// to the way it was.
ReportTreeNode newNode = new ReportTreeNode(component, this);
// This check the state of the TestElement and if returns false it
// disable the loaded node
try {
if (component.getProperty(TestElement.ENABLED) instanceof NullProperty
|| component.getPropertyAsBoolean(TestElement.ENABLED)) {
newNode.setEnabled(true);
} else {
newNode.setEnabled(false);
}
} catch (Exception e) {
newNode.setEnabled(true);
}
this.insertNodeInto(newNode, node, node.getChildCount());
return newNode;
}