本文整理汇总了Java中com.intellij.application.options.editor.XmlFoldingSettings类的典型用法代码示例。如果您正苦于以下问题:Java XmlFoldingSettings类的具体用法?Java XmlFoldingSettings怎么用?Java XmlFoldingSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XmlFoldingSettings类属于com.intellij.application.options.editor包,在下文中一共展示了XmlFoldingSettings类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ApplicationEnvironment
import com.intellij.application.options.editor.XmlFoldingSettings; //导入依赖的package包/类
public ApplicationEnvironment(CoreApplicationEnvironment appEnvironment) {
appEnvironment.registerFileType(HtmlFileType.INSTANCE, "html;htm;sht;shtm;shtml");
appEnvironment.registerFileType(XHtmlFileType.INSTANCE, "xhtml");
appEnvironment.registerFileType(DTDFileType.INSTANCE, "dtd;ent;mod;elt");
appEnvironment.registerFileType(XmlFileType.INSTANCE, "xml;xsd;tld;xsl;jnlp;wsdl;jhm;ant;xul;xslt;rng;fxml");
SyntaxHighlighterFactory.LANGUAGE_FACTORY.addExplicitExtension(XMLLanguage.INSTANCE, new XmlSyntaxHighlighterFactory());
SyntaxHighlighterFactory.LANGUAGE_FACTORY.addExplicitExtension(DTDLanguage.INSTANCE, new DtdSyntaxHighlighterFactory());
SyntaxHighlighterFactory.LANGUAGE_FACTORY.addExplicitExtension(HTMLLanguage.INSTANCE, new HtmlSyntaxHighlighterFactory());
SyntaxHighlighterFactory.LANGUAGE_FACTORY.addExplicitExtension(XHTMLLanguage.INSTANCE, new XhtmlSyntaxHighlighterFactory());
appEnvironment.addExplicitExtension(LanguageParserDefinitions.INSTANCE, XMLLanguage.INSTANCE, new XMLParserDefinition());
appEnvironment.addExplicitExtension(LanguageParserDefinitions.INSTANCE, DTDLanguage.INSTANCE, new DTDParserDefinition());
appEnvironment.addExplicitExtension(LanguageParserDefinitions.INSTANCE, HTMLLanguage.INSTANCE, new HTMLParserDefinition());
appEnvironment.addExplicitExtension(LanguageParserDefinitions.INSTANCE, XHTMLLanguage.INSTANCE, new XHTMLParserDefinition());
appEnvironment.addExplicitExtension(IdIndexers.INSTANCE, XmlFileType.INSTANCE, new XmlIdIndexer());
appEnvironment.addExplicitExtension(IdIndexers.INSTANCE, DTDFileType.INSTANCE, new XmlIdIndexer());
appEnvironment.addExplicitExtension(TodoIndexers.INSTANCE, XmlFileType.INSTANCE, new XmlTodoIndexer());
appEnvironment.addExplicitExtension(TodoIndexers.INSTANCE, DTDFileType.INSTANCE, new XmlTodoIndexer());
appEnvironment.addExplicitExtension(TodoIndexers.INSTANCE, XHtmlFileType.INSTANCE, new XHtmlTodoIndexer());
appEnvironment.addExtension(MetaDataContributor.EP_NAME, new XmlApplicationComponent());
appEnvironment.addExtension(FileBasedIndexExtension.EXTENSION_POINT_NAME, new XmlNamespaceIndex());
appEnvironment.addExtension(FileBasedIndexExtension.EXTENSION_POINT_NAME, new SchemaTypeInheritanceIndex());
appEnvironment.addExtension(FileBasedIndexExtension.EXTENSION_POINT_NAME, new XmlTagNamesIndex());
appEnvironment.addExtension(StandardResourceProvider.EP_NAME, new InternalResourceProvider());
appEnvironment.registerApplicationComponent(PathMacros.class, new PathMacrosImpl());
appEnvironment.registerApplicationService(ExternalResourceManager.class, new ExternalResourceManagerExImpl());
appEnvironment.registerApplicationService(XmlFoldingSettings.class, new XmlFoldingSettings());
Language[] myLanguages = new Language[]{XMLLanguage.INSTANCE, HTMLLanguage.INSTANCE, XHTMLLanguage.INSTANCE, DTDLanguage.INSTANCE};
for (Language myLanguage : myLanguages) {
appEnvironment.addExplicitExtension(LanguageFolding.INSTANCE, myLanguage, new XmlFoldingBuilder());
appEnvironment.addExplicitExtension(LanguageFindUsages.INSTANCE, myLanguage, new XmlFindUsagesProvider());
appEnvironment.addExplicitExtension(LanguageASTFactory.INSTANCE, myLanguage, new XmlASTFactory());
}
}
示例2: getFoldingSettings
import com.intellij.application.options.editor.XmlFoldingSettings; //导入依赖的package包/类
@Override
protected XmlCodeFoldingSettings getFoldingSettings() {
return XmlFoldingSettings.getInstance();
}