本文整理汇总了Java中groovy.util.Node.remove方法的典型用法代码示例。如果您正苦于以下问题:Java Node.remove方法的具体用法?Java Node.remove怎么用?Java Node.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类groovy.util.Node
的用法示例。
在下文中一共展示了Node.remove方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: storeBytecodeLevels
import groovy.util.Node; //导入方法依赖的package包/类
private void storeBytecodeLevels() {
Node bytecodeLevelConfiguration = findOrCreateBytecodeLevelConfiguration();
bytecodeLevelConfiguration.attributes().put("target", bytecodeVersion.toString());
for (IdeaModule module : modules) {
List<Node> bytecodeLevelModules = getChildren(bytecodeLevelConfiguration, "module");
Node moduleNode = findFirstWithAttributeValue(bytecodeLevelModules, "name", module.getName());
JavaVersion moduleBytecodeVersionOverwrite = module.getTargetBytecodeVersion();
if (moduleBytecodeVersionOverwrite == null) {
if (moduleNode != null) {
bytecodeLevelConfiguration.remove(moduleNode);
}
} else {
if (moduleNode == null) {
moduleNode = bytecodeLevelConfiguration.appendNode("module");
moduleNode.attributes().put("name", module.getName());
}
moduleNode.attributes().put("target", moduleBytecodeVersionOverwrite.toString());
}
}
}
示例2: removeConfigurableDataFromXml
import groovy.util.Node; //导入方法依赖的package包/类
private void removeConfigurableDataFromXml() {
Node wbModuleNode = getWbModuleNode(getXml());
for (String elementName : Arrays.asList("property", "wb-resource", "dependent-module")) {
for (Node elementNode : XmlPersistableConfigurationObject.getChildren(wbModuleNode, elementName)) {
wbModuleNode.remove(elementNode);
}
}
}
示例3: store
import groovy.util.Node; //导入方法依赖的package包/类
@Override
protected void store(Node xml) {
for (String childNodeName : Arrays.asList("name", "comment", "projects", "natures", "buildSpec", "linkedResources")) {
Node childNode = findFirstChildNamed(xml, childNodeName);
if (childNode != null) {
xml.remove(childNode);
}
}
xml.appendNode("name", nullToEmpty(name));
xml.appendNode("comment", nullToEmpty(comment));
addReferencedProjectsToXml();
addNaturesToXml();
addBuildSpecToXml();
addLinkedResourcesToXml();
}
示例4: store
import groovy.util.Node; //导入方法依赖的package包/类
@Override
protected void store(Node xml) {
NodeList classpathEntryNodes = (NodeList)xml.get("classpathentry");
for (Object classpathEntry : classpathEntryNodes) {
xml.remove((Node) classpathEntry);
}
for (ClasspathEntry entry : entries) {
entry.appendNode(xml);
}
}
示例5: removeSourceAndExcludeFolderFromXml
import groovy.util.Node; //导入方法依赖的package包/类
private void removeSourceAndExcludeFolderFromXml() {
Node content = findOrCreateContentNode();
for (Node sourceFolder : findSourceFolder()) {
content.remove(sourceFolder);
}
for (Node excludeFolder : findExcludeFolder()) {
content.remove(excludeFolder);
}
}
示例6: removeDependenciesFromXml
import groovy.util.Node; //导入方法依赖的package包/类
private void removeDependenciesFromXml() {
Node moduleRoot = getNewModuleRootManager();
for (Node orderEntry : findOrderEntries()) {
if (isDependencyOrderEntry(orderEntry)) {
moduleRoot.remove(orderEntry);
}
}
}