当前位置: 首页>>代码示例>>Java>>正文


Java Html5SchemaProvider.getHtml5SchemaLocation方法代码示例

本文整理汇总了Java中com.intellij.xml.Html5SchemaProvider.getHtml5SchemaLocation方法的典型用法代码示例。如果您正苦于以下问题:Java Html5SchemaProvider.getHtml5SchemaLocation方法的具体用法?Java Html5SchemaProvider.getHtml5SchemaLocation怎么用?Java Html5SchemaProvider.getHtml5SchemaLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.xml.Html5SchemaProvider的用法示例。


在下文中一共展示了Html5SchemaProvider.getHtml5SchemaLocation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDtdUri

import com.intellij.xml.Html5SchemaProvider; //导入方法依赖的package包/类
@Nullable
public static String getDtdUri(XmlDoctype doctype)
{
	if(doctype != null)
	{
		String docType = doctype.getDtdUri();
		if(docType == null)
		{
			final String publicId = doctype.getPublicId();
			if(PsiTreeUtil.getParentOfType(doctype, XmlDocument.class) instanceof HtmlDocumentImpl && publicId != null && publicId.contains("-//W3C//DTD "))
			{
				return guessDtdByPublicId(publicId);
			}
			else if(HtmlUtil.isHtml5Doctype(doctype))
			{
				docType = doctype.getLanguage() instanceof HTMLLanguage ? Html5SchemaProvider.getHtml5SchemaLocation() : Html5SchemaProvider.getXhtml5SchemaLocation();
			}
		}
		return docType;
	}
	return null;
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:23,代码来源:XmlUtil.java

示例2: getDefaultHtmlDoctype

import com.intellij.xml.Html5SchemaProvider; //导入方法依赖的package包/类
@Override
@NotNull
public String getDefaultHtmlDoctype(@NotNull Project project)
{
	final String doctype = getProjectResources(project).myDefaultHtmlDoctype;
	if(XmlUtil.XHTML_URI.equals(doctype))
	{
		return XmlUtil.XHTML4_SCHEMA_LOCATION;
	}
	else if(HTML5_DOCTYPE_ELEMENT.equals(doctype))
	{
		return Html5SchemaProvider.getHtml5SchemaLocation();
	}
	else
	{
		return doctype;
	}
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:19,代码来源:ExternalResourceManagerExImpl.java

示例3: getDefaultHtmlDoctype

import com.intellij.xml.Html5SchemaProvider; //导入方法依赖的package包/类
@Override
@NotNull
public String getDefaultHtmlDoctype(@NotNull Project project) {
  final String doctype = getProjectResources(project).myDefaultHtmlDoctype;
  if (XmlUtil.XHTML_URI.equals(doctype)) {
    return XmlUtil.XHTML4_SCHEMA_LOCATION;
  }
  else if (HTML5_DOCTYPE_ELEMENT.equals(doctype)) {
    return Html5SchemaProvider.getHtml5SchemaLocation();
  }
  else {
    return doctype;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:ExternalResourceManagerExImpl.java

示例4: getDoctype

import com.intellij.xml.Html5SchemaProvider; //导入方法依赖的package包/类
@NotNull
private String getDoctype() {
  if (myHtml4RadioButton.isSelected()) {
    return XmlUtil.XHTML4_SCHEMA_LOCATION;
  }
  if (myHtml5RadioButton.isSelected()) {
    return Html5SchemaProvider.getHtml5SchemaLocation();
  }
  return myDoctypeTextField.getText();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:DefaultSchemasConfigurable.java

示例5: getDoctype

import com.intellij.xml.Html5SchemaProvider; //导入方法依赖的package包/类
@NotNull
public String getDoctype() {
  if (myHtml4RadioButton.isSelected()) {
    return XmlUtil.XHTML_URI;
  }
  if (myHtml5RadioButton.isSelected()) {
    return Html5SchemaProvider.getHtml5SchemaLocation();
  }
  return myDoctypeTextField.getText();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:HtmlLanguageLevelForm.java


注:本文中的com.intellij.xml.Html5SchemaProvider.getHtml5SchemaLocation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。