public void release() { super.release(); getModelItem().removeMockServiceListener(mockServiceListener); for (MockOperationTreeNode treeNode : mockOperationNodes) { treeNode.getModelItem().removePropertyChangeListener(propertyChangeListener); treeNode.release(); } propertiesTreeNode.release(); }
public MockServiceTreeNode(MockService mockService, SoapUITreeModel treeModel) { super(mockService, mockService.getProject(), treeModel); mockServiceListener = new InternalMockServiceListener(); mockService.addMockServiceListener(mockServiceListener); for (int c = 0; c < mockService.getMockOperationCount(); c++) { MockOperation mockOperation = mockService.getMockOperationAt(c); mockOperation.addPropertyChangeListener(MockService.NAME_PROPERTY, propertyChangeListener); mockOperationNodes.add(new MockOperationTreeNode(mockOperation, getTreeModel())); } getTreeModel().mapModelItems(mockOperationNodes); propertiesTreeNode = PropertiesTreeNode.createDefaultPropertiesNode(mockService, getTreeModel()); getTreeModel().mapModelItem(propertiesTreeNode); }