private void handleDefaultValue(GroovySourceAST currentNode, SimpleGroovyParameter parameter) { GroovySourceAST paramPart = (GroovySourceAST) currentNode.getFirstChild(); for (int i = 1; i < currentNode.getNumberOfChildren(); i++) { paramPart = (GroovySourceAST) paramPart.getNextSibling(); } GroovySourceAST nodeToProcess = paramPart; if (paramPart.getNumberOfChildren() > 0) { nodeToProcess = (GroovySourceAST) paramPart.getFirstChild(); } // hack warning! // TODO handle , and ) when they occur within Strings parameter.setDefaultValue(getChildTextFromSource(nodeToProcess, ",)")); }
private void handleDefaultValue(GroovySourceAST currentNode, SimpleGroovyParameter parameter) { GroovySourceAST paramPart = (GroovySourceAST) currentNode.getFirstChild(); for (int i = 1; i < currentNode.getNumberOfChildren(); i++) { paramPart = (GroovySourceAST) paramPart.getNextSibling(); } GroovySourceAST nodeToProcess = paramPart; if (paramPart.getNumberOfChildren() > 0) { nodeToProcess = (GroovySourceAST) paramPart.getFirstChild(); } // hack warning! // TODO handle , and ) when they occur within Strings parameter.setDefaultValue(getChildTextFromSource(nodeToProcess, ",)")); }
private void handleDefaultValue(GroovySourceAST currentNode, SimpleGroovyParameter parameter) { GroovySourceAST paramPart = (GroovySourceAST) currentNode.getFirstChild(); for (int i = 1; i < currentNode.getNumberOfChildren(); i++) { paramPart = (GroovySourceAST) paramPart.getNextSibling(); } GroovySourceAST nodeToProcess = paramPart; if (paramPart.getNumberOfChildren() > 0) { nodeToProcess = (GroovySourceAST) paramPart.getFirstChild(); } // hack warning! // TODO handle , and ) when they occur within Strings parameter.setDefaultValue(getChildTextFromSource(nodeToProcess, ",)")); }
private void handleDefaultValue(GroovySourceAST currentNode, SimpleGroovyParameter parameter) { GroovySourceAST paramPart = (GroovySourceAST) currentNode.getFirstChild(); for (int i = 1; i < currentNode.getNumberOfChildren(); i++) { paramPart = (GroovySourceAST) paramPart.getNextSibling(); } GroovySourceAST nodeToProcess = paramPart; if (paramPart.getNumberOfChildren() > 0) { nodeToProcess = (GroovySourceAST) paramPart.getFirstChild(); } // hack warning! // TODO handle , and ) when they occur within Strings parameter.setDefaultValue(getChildTextFromSource(nodeToProcess, ",)")); }
private void handleDefaultValue(GroovySourceAST currentNode, SimpleGroovyParameter parameter) { GroovySourceAST paramPart = (GroovySourceAST) currentNode.getFirstChild(); for (int i = 1; i < currentNode.getNumberOfChildren(); i++) { paramPart = (GroovySourceAST) paramPart.getNextSibling(); } GroovySourceAST nodeToProcess = paramPart; if (paramPart.getNumberOfChildren() > 0) { nodeToProcess = (GroovySourceAST) paramPart.getFirstChild(); } // hack warning! // TODO handle , and ) when they occur within Strings parameter.setDefaultValue(getChildTextFromSource(nodeToProcess, ",)")); }