• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XmlSchemaProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.xml.XmlSchemaProvider的典型用法代码示例。如果您正苦于以下问题:Java XmlSchemaProvider类的具体用法?Java XmlSchemaProvider怎么用?Java XmlSchemaProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XmlSchemaProvider类属于com.intellij.xml包,在下文中一共展示了XmlSchemaProvider类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: isDevKitConfig

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
private boolean isDevKitConfig(XmlTag tag, XmlFile baseFile) {
    Module module = ModuleUtilCore.findModuleForPsiElement(baseFile);

    String namespace = tag.getNamespace();
    List<XmlSchemaProvider> providers = XmlSchemaProvider.getAvailableProviders(baseFile);

    for (XmlSchemaProvider provider : providers) {
        Set<String> locations = provider.getLocations(namespace, baseFile);
        for (String location : locations) {
            XmlFile schema = provider.getSchema(location, module, baseFile);
            if (schema != null) {
                String schemaFile = schema.getText();
                if (schemaFile.contains("http://www.mulesoft.org/schema/mule/devkit")) {
                    return true;
                }
            }
        }
    }

    return false;
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:22,代码来源:GlobalConfigsToolWindowPanel.java


示例2: suggestPrefix

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Nullable
public static String suggestPrefix(XmlFile file, @Nullable String namespace)
{
	if(namespace == null)
	{
		return null;
	}
	for(XmlSchemaProvider provider : XmlSchemaProvider.getAvailableProviders(file))
	{
		String prefix = provider.getDefaultPrefix(namespace, file);
		if(prefix != null)
		{
			return prefix;
		}
	}
	return null;
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:18,代码来源:ExtendedTagInsertHandler.java


示例3: suggestPrefix

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Nullable
public static String suggestPrefix(XmlFile file, @Nullable String namespace) {
    if (namespace == null) {
        return null;
    }
    for (XmlSchemaProvider provider : XmlSchemaProvider.getAvailableProviders(file)) {
        String prefix = provider.getDefaultPrefix(namespace, file);
        if (prefix != null) {
            return prefix;
        }
    }
    return null;
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:14,代码来源:MuleElementInsertHandler.java


示例4: setUp

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  final LocalInspectionTool[] tools = configureLocalInspectionTools();

  CodeInsightTestFixtureImpl.configureInspections(tools, getProject(), Collections.<String>emptyList(),
                                                  getTestRootDisposable());

  DaemonCodeAnalyzerImpl daemonCodeAnalyzer = (DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(getProject());
  daemonCodeAnalyzer.prepareForTest();
  final StartupManagerImpl startupManager = (StartupManagerImpl)StartupManagerEx.getInstanceEx(getProject());
  startupManager.runStartupActivities();
  startupManager.startCacheUpdate();
  startupManager.runPostStartupActivities();
  DaemonCodeAnalyzerSettings.getInstance().setImportHintEnabled(false);

  if (isPerformanceTest()) {
    IntentionManager.getInstance().getAvailableIntentionActions();  // hack to avoid slowdowns in PyExtensionFactory
    PathManagerEx.getTestDataPath(); // to cache stuff
    ReferenceProvidersRegistry.getInstance(); // pre-load tons of classes
    InjectedLanguageManager.getInstance(getProject()); // zillion of Dom Sem classes
    LanguageAnnotators.INSTANCE.allForLanguage(JavaLanguage.INSTANCE); // pile of annotator classes loads
    LanguageAnnotators.INSTANCE.allForLanguage(StdLanguages.XML);
    ProblemHighlightFilter.EP_NAME.getExtensions();
    Extensions.getExtensions(ImplicitUsageProvider.EP_NAME);
    Extensions.getExtensions(XmlSchemaProvider.EP_NAME);
    Extensions.getExtensions(XmlFileNSInfoProvider.EP_NAME);
    Extensions.getExtensions(ExternalAnnotatorsFilter.EXTENSION_POINT_NAME);
    Extensions.getExtensions(IndexPatternBuilder.EP_NAME);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:DaemonAnalyzerTestCase.java


示例5: getResourceLocation

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Override
@Nullable
public PsiFile getResourceLocation(@NotNull @NonNls final String url, @NotNull final PsiFile baseFile, final String version) {
  final XmlFile schema = XmlSchemaProvider.findSchema(url, baseFile);
  if (schema != null) {
    return schema;
  }
  final String location = getResourceLocation(url, version, baseFile.getProject());
  return XmlUtil.findXmlFile(baseFile, location);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ExternalResourceManagerExImpl.java


示例6: suggestPrefix

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Nullable
public static String suggestPrefix(XmlFile file, @Nullable String namespace) {
  if (namespace == null) {
    return null;
  }
  for (XmlSchemaProvider provider : XmlSchemaProvider.getAvailableProviders(file)) {
    String prefix = provider.getDefaultPrefix(namespace, file);
    if (prefix != null) {
      return prefix;
    }
  }
  return null; 
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ExtendedTagInsertHandler.java


示例7: getUnboundNamespaceForPrefix

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
/** Given a prefix in a file and a set of candidate namespaces, returns the namespace that matches the prefix (if any)
 * as determined by the {@link XmlSchemaProvider#getDefaultPrefix(String, XmlFile)}
 * implementations */
@Nullable
public static String getUnboundNamespaceForPrefix(String prefix, XmlFile xmlFile, Set<String> namespaces) {
  final List<XmlSchemaProvider> providers = XmlSchemaProvider.getAvailableProviders(xmlFile);
  for (XmlSchemaProvider provider : providers) {
    for (String namespace : namespaces) {
      if (prefix.equals(provider.getDefaultPrefix(namespace, xmlFile))) {
        return namespace;
      }
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:CreateNSDeclarationIntentionFix.java


示例8: getResourceLocation

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Nullable
public PsiFile getResourceLocation(@NotNull @NonNls final String url, @NotNull final PsiFile baseFile, final String version) {
  final XmlFile schema = XmlSchemaProvider.findSchema(url, baseFile);
  if (schema != null) {
    return schema;
  }
  final String location = getResourceLocation(url, version, baseFile.getProject());
  return XmlUtil.findXmlFile(baseFile, location);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:ExternalResourceManagerExImpl.java


示例9: findNamespace

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Nullable
public static XmlFile findNamespace(@NotNull PsiFile base, @NotNull String nsLocation)
{
	final String location = ExternalResourceManager.getInstance().getResourceLocation(nsLocation, base.getProject());
	if(!location.equals(nsLocation))
	{ // is mapped
		return findXmlFile(base, location);
	}
	final XmlFile xmlFile = XmlSchemaProvider.findSchema(location, base);
	return xmlFile == null ? findXmlFile(base, location) : xmlFile;
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:12,代码来源:XmlUtil.java


示例10: getResourceLocation

import com.intellij.xml.XmlSchemaProvider; //导入依赖的package包/类
@Override
@Nullable
public PsiFile getResourceLocation(@NotNull @NonNls final String url, @NotNull final PsiFile baseFile, final String version)
{
	final XmlFile schema = XmlSchemaProvider.findSchema(url, baseFile);
	if(schema != null)
	{
		return schema;
	}
	final String location = getResourceLocation(url, version, baseFile.getProject());
	return XmlUtil.findXmlFile(baseFile, location);
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:13,代码来源:ExternalResourceManagerExImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CastExpr类代码示例发布时间:2022-05-22
下一篇:
Java Connection类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap