Skip to content

Instantly share code, notes, and snippets.

@zoodor
zoodor / gist:5539057
Created May 8, 2013 08:30
Generate the appropriate XML for a Run Configuration in an IntelliJ IDEA workspace file.
def createOptionNode(Node parentNode, String nameAttributeValue, String valueAttributeValue) {
def patternOption = createNode(parentNode, 'option', nameAttributeValue)
patternOption.@value = valueAttributeValue
}
def createNode(Node parentNode, String nodeName, String nameAttributeValue) {
def node = new Node(parentNode, nodeName)
node.@name = nameAttributeValue
return node
}