Hello,
I have been trying to add a circle node as a child node with the code below:
public void createSubTree(String bt) throws TreeStructureException {
ProgramAPI programAPI = apiProvider.getProgramAPI();
ProgramModel programModel = programAPI.getProgramModel();
ProgramNodeFactory nf = programModel.getProgramNodeFactory();
TreeNode root = programModel.getRootTreeNode(this);
if (bt == "b1") {
root.addChild(nf.createMoveNode());
root.addChild(nf.createMoveNode());
}else if(bt == "b2") {
root.addChild(nf.createCircleMoveNode());
}
}
When executed and pressed “b1”, this code generates 2 MoveP child nodes. But it doesn’t create any circleMoveNode child node when pressed “b2”. The program doesn’t give any errors.
Am I missing something here?
Thank you,