本文整理汇总了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;
}
示例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;
}
}
示例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;
}
}
示例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();
}
示例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();
}