@Override public void evaluatePre(int depth, OutputManager out) { // If parent is MethoNode, this Node is not the last child of parent node Node parent = this.getParent(); if (parent instanceof MethodNode && parent.getChildren().get(parent.numChildren() - 1) != this) out.writeStatement(data + ","); else out.writeStatement(data); }
@Override public void evaluatePre(int depth, OutputManager out) { // Here we will get the event listener // This should be derived at the semantic analyzer using a library or something of the sort XmlNode parent = (XmlNode) this.getParent(); out.setCurrentToActivity(); out.writeEvent( Node.stripQuotes(parent.getAttributes().get("id")) + "." + SemanticManager.getEventMethodHeader(Node.stripQuotes(this.data)) + "\n"); }
@Override public void evaluatePost(int depth, OutputManager out) { out.closeEvent(); }