use of org.gradle.openapi.external.ui.SettingsNodeVersion1 in project gradle by gradle.
the class TestSettingsNodeVersion1 method getNodeAtPath.
public SettingsNodeVersion1 getNodeAtPath(String... pathPortions) {
if (pathPortions == null || pathPortions.length == 0) {
return null;
}
String firstPathPortion = pathPortions[0];
SettingsNodeVersion1 currentNode = getChildNode(firstPathPortion);
//Skip the first one. we've already used that one.
int index = 1;
while (index < pathPortions.length && currentNode != null) {
String pathPortion = pathPortions[index];
currentNode = currentNode.getChildNode(pathPortion);
index++;
}
return currentNode;
}
use of org.gradle.openapi.external.ui.SettingsNodeVersion1 in project gradle by gradle.
the class TestSettingsNodeVersion1 method getNodeAtPathCreateIfNotFound.
private SettingsNodeVersion1 getNodeAtPathCreateIfNotFound(String... pathPortions) {
if (pathPortions == null || pathPortions.length == 0) {
return null;
}
String firstPathPortion = pathPortions[0];
SettingsNodeVersion1 currentNode = getChildNode(firstPathPortion);
if (currentNode == null) {
currentNode = addChild(firstPathPortion);
}
int index = 1;
while (index < pathPortions.length) {
String pathPortion = pathPortions[index];
currentNode = currentNode.getChildNode(pathPortion);
if (currentNode == null) {
currentNode = addChild(firstPathPortion);
}
index++;
}
return currentNode;
}
use of org.gradle.openapi.external.ui.SettingsNodeVersion1 in project gradle by gradle.
the class TestSettingsNodeVersion1 method getChildNodes.
public List<SettingsNodeVersion1> getChildNodes(String name) {
List<SettingsNodeVersion1> children = new ArrayList<SettingsNodeVersion1>();
Iterator<SettingsNodeVersion1> iterator = children.iterator();
while (iterator.hasNext()) {
SettingsNodeVersion1 childNode = iterator.next();
if (name.equals(childNode.getName())) {
children.add(childNode);
}
}
return children;
}
use of org.gradle.openapi.external.ui.SettingsNodeVersion1 in project gradle by gradle.
the class TestSettingsNodeVersion1 method setValueOfChild.
public void setValueOfChild(String name, String value) {
SettingsNodeVersion1 settingsNode = addChildIfNotPresent(name);
settingsNode.setValue(value);
}
use of org.gradle.openapi.external.ui.SettingsNodeVersion1 in project gradle by gradle.
the class TestSettingsNodeVersion1 method addChild.
public SettingsNodeVersion1 addChild(String name) {
SettingsNodeVersion1 childNode = new TestSettingsNodeVersion1(this);
childNode.setName(name);
children.add(childNode);
return childNode;
}
Aggregations