本文整理了Java中org.jetbrains.yaml.YAMLFileType
类的一些代码示例,展示了YAMLFileType
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAMLFileType
类的具体详情如下:
包路径:org.jetbrains.yaml.YAMLFileType
类名称:YAMLFileType
暂无
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
@NotNull
public static PsiFile createDummyFile(Project p, String fileText) {
return PsiFileFactory.getInstance(p).createFileFromText("DUMMY__." + YAMLFileType.YML.getDefaultExtension(), YAMLFileType.YML, fileText, System.currentTimeMillis(), false);
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
@NotNull
private PsiElement createYamlFile(@NotNull String content) {
return PsiFileFactory.getInstance(getProject()).createFileFromText("DUMMY__." + YAMLFileType.YML.getDefaultExtension(), YAMLFileType.YML, content);
}
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
/**
* @see TwigUtil#getTwigGlobalsFromYamlConfig
*/
public void testGetTwigGlobalsFromYamlConfig() {
String content = "twig:\n" +
" globals:\n" +
" ga_tracking: '%ga_tracking%'\n" +
" user_management: '@AppBundle\\Service\\UserManagement'\n"
;
YAMLFile yamlFile = (YAMLFile) PsiFileFactory.getInstance(getProject())
.createFileFromText("DUMMY__." + YAMLFileType.YML.getDefaultExtension(), YAMLFileType.YML, content, System.currentTimeMillis(), false);
Map<String, String> globals = TwigUtil.getTwigGlobalsFromYamlConfig(yamlFile);
assertEquals("%ga_tracking%", globals.get("ga_tracking"));
assertEquals("@AppBundle\\Service\\UserManagement", globals.get("user_management"));
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
.createFileFromText("DUMMY__." + YAMLFileType.YML.getDefaultExtension(), YAMLFileType.YML, content, System.currentTimeMillis(), false);
内容来源于网络,如有侵权,请联系作者删除!