本文整理了Java中com.intellij.psi.xml.XmlTag.findFirstSubTag()
方法的一些代码示例,展示了XmlTag.findFirstSubTag()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlTag.findFirstSubTag()
方法的具体详情如下:
包路径:com.intellij.psi.xml.XmlTag
类名称:XmlTag
方法名:findFirstSubTag
暂无
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
XmlTag entity = rootTag.findFirstSubTag("entity");
if(entity != null) {
String name = entity.getAttributeValue("name");
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
/**
* Extract default values for services tag scope
*
* <defaults autowire="true" public="false" />
*/
private static ServiceFileDefaults createDefaults(@NotNull XmlTag servicesTag) {
XmlTag xmlDefaults = servicesTag.findFirstSubTag("defaults");
if(xmlDefaults == null) {
return ServiceFileDefaults.EMPTY;
}
return new ServiceFileDefaults(
getBooleanValueOf(xmlDefaults.getAttributeValue("public")),
getBooleanValueOf(xmlDefaults.getAttributeValue("autowire"))
);
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
XmlTag thead = result[0].findFirstSubTag("thead");
if(thead == null) {
return Collections.emptyList();
XmlTag tr1 = thead.findFirstSubTag("tr");
if(tr1 == null) {
return Collections.emptyList();
XmlTag tbody = result[0].findFirstSubTag("tbody");
if(tbody == null) {
return Collections.emptyList();
XmlTag tokenLink = row.get("token").getFirst().findFirstSubTag("a");
if(tokenLink != null) {
String href = tokenLink.getAttributeValue("href");
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
@Override
protected void run() {
XmlTag services = rootTag.findFirstSubTag("services");
XmlElementFactory instance = XmlElementFactory.getInstance(SymfonyCreateService.this.project);
if(services == null) {
services = rootTag.addSubTag(instance.createTagFromText("<services/>", rootTag.getLanguage()), false);
}
XmlTag tag = instance.createTagFromText(createServiceAsText(ServiceBuilder.OutputType.XML).replace("\r\n", "\n").replace("\n", " "), services.getLanguage());
textRange[0] = services.addSubTag(tag, false).getTextRange();
}
}.execute();
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
XmlTag tbody = tableTag.findFirstSubTag("tbody");
if(tbody == null) {
return Collections.emptyMap();
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
XmlTag source = xmlTag.findFirstSubTag("source");
if (source != null) {
String text = source.getValue().getText();
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
final XmlTag entity = rootTag.findFirstSubTag("entity");
if(entity == null) {
return Collections.emptyList();
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
XmlTag file = rootTag.findFirstSubTag("file");
if(file == null) {
return null;
};
XmlTag body = file.findFirstSubTag("body");
if(body != null) {
return func12.apply(body);
XmlTag group = file.findFirstSubTag("group");
if(group != null) {
return func20.apply(group);
代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij
/**
* Given an artifact, returns the xml tag corresponding to the artifact's appengine-web.xml compat
* configuration or null if there isn't one.
*/
@Nullable
private XmlTag getFlexCompatXmlConfiguration(@Nullable XmlFile webXml) {
if (webXml != null) {
XmlTag root = webXml.getRootTag();
if (root != null) {
XmlTag vmTag = root.findFirstSubTag("vm");
if (vmTag != null) {
return vmTag;
} else {
return root.findFirstSubTag("env");
}
}
}
return null;
}
代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij
@VisibleForTesting
String getServiceNameFromAppEngineWebXml(XmlFile appengineWebXml) {
if (appengineWebXml != null) {
XmlTag root = appengineWebXml.getRootTag();
if (root != null) {
XmlTag serviceTag = root.findFirstSubTag("service");
if (serviceTag != null) {
return serviceTag.getValue().getText();
}
XmlTag moduleTag = root.findFirstSubTag("module");
if (moduleTag != null) {
return moduleTag.getValue().getText();
}
}
}
return DEFAULT_SERVICE;
}
内容来源于网络,如有侵权,请联系作者删除!