protected void updateRunMenu() {
super.updateRunMenu();
StandardAction simulateAction = null;
StandardAction interactivePlotsAction = null;
UINeoNode node = null;
WorldObject selectedObj = SelectionHandler.getActiveObject();
if (selectedObj != null) {
if (selectedObj instanceof UINeoNode) {
node = (UINeoNode) selectedObj;
} else if (selectedObj instanceof UIProjection) {
if (((UIProjection) selectedObj).getTermination() != null) {
node = ((UIProjection) selectedObj).getTermination().getNodeParent();
} else {
node = ((UIProjection) selectedObj).getOriginUI().getNodeParent();
}
} else if (selectedObj instanceof Widget){
node = ((Widget) selectedObj).getNodeParent();
} else if (selectedObj instanceof UIProbe) {
node = ((UIProbe) selectedObj).getProbeParent();
}
}
if (node != null) {
while (node.getNetworkParent() != null) {
node = node.getNetworkParent();
}
UINetwork network = (UINetwork) node;
simulateAction = new RunSimulatorAction("Simulate " + network.getName(), network);