本文整理汇总了Java中org.jetbrains.yaml.YAMLLanguage类的典型用法代码示例。如果您正苦于以下问题:Java YAMLLanguage类的具体用法?Java YAMLLanguage怎么用?Java YAMLLanguage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
YAMLLanguage类属于org.jetbrains.yaml包,在下文中一共展示了YAMLLanguage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createFileViewProvider
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
@NotNull
@Override
public FileViewProvider createFileViewProvider(@NotNull VirtualFile file, Language language, @NotNull PsiManager manager, boolean eventSystemEnabled) {
return new SingleRootFileViewProvider(manager, file, eventSystemEnabled) {
@NotNull
@Override
public Language getBaseLanguage() {
return YAMLLanguage.INSTANCE;
}
};
}
开发者ID:PioBeat,项目名称:GravSupport,代码行数:12,代码来源:LanguageFileViewProvider.java
示例2: CloudSlangCompletionContributor
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
public CloudSlangCompletionContributor() {
extend(CompletionType.BASIC,
PlatformPatterns.psiElement().withLanguage(YAMLLanguage.INSTANCE),
new CompletionProvider<CompletionParameters>() {
public void addCompletions(@NotNull CompletionParameters parameters, ProcessingContext context, @NotNull CompletionResultSet resultSet) {
addSlangKeywords(resultSet);
addYamlKeywordsUsedByCloudSlang(resultSet);
}
}
);
}
开发者ID:CloudSlang,项目名称:cs-intellij-plugin,代码行数:12,代码来源:CloudSlangCompletionContributor.java
示例3: getWithFirstRootKey
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
public static ElementPattern<PsiElement> getWithFirstRootKey() {
return PlatformPatterns.and(PlatformPatterns.or(
// foo:
// <caret>
PlatformPatterns
.psiElement().with(new ParentPathPatternCondition(
YAMLScalar.class, YAMLMapping.class,
YAMLKeyValue.class, YAMLMapping.class,
YAMLDocument.class
))
.withLanguage(YAMLLanguage.INSTANCE),
// foo:
// <caret> (on incomplete)
PlatformPatterns
.psiElement().afterLeaf(
PlatformPatterns.psiElement(YAMLTokenTypes.INDENT).with(
new ParentPathPatternCondition(YAMLKeyValue.class, YAMLMapping.class, YAMLDocument.class)
)
)
.withLanguage(YAMLLanguage.INSTANCE),
// foo:
// fo<caret>:
PlatformPatterns.psiElement().with(new ParentPathPatternCondition(
YAMLKeyValue.class, YAMLMapping.class,
YAMLKeyValue.class, YAMLMapping.class,
YAMLDocument.class)
)
));
}
开发者ID:cvette,项目名称:intellij-neos,代码行数:33,代码来源:YamlElementPatternHelper.java
示例4: getNodeTypeElementMatcher
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
protected PsiElementPattern.Capture<PsiElement> getNodeTypeElementMatcher(@NotNull String... keys) {
return PlatformPatterns
.psiElement()
.with(new ParentKeysPatternCondition(keys))
.with(new FilenamePrefixPatternCondition("NodeTypes."))
.withLanguage(YAMLLanguage.INSTANCE);
}
开发者ID:cvette,项目名称:intellij-neos,代码行数:8,代码来源:YamlCompletionContributor.java
示例5: localReferencePattern
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private PsiElementPattern.Capture<YAMLQuotedText> localReferencePattern(final String refTypePrefix) {
return psiElement(YAMLQuotedText.class)
.withParent(psiElement(YAMLKeyValue.class).withName(OpenApiConstants.REF_KEY))
.withText(StandardPatterns.string().contains(refTypePrefix))
.andNot(StandardPatterns.string().matches(".ya?ml"))
.withLanguage(YAMLLanguage.INSTANCE);
}
开发者ID:zalando,项目名称:intellij-swagger,代码行数:8,代码来源:OpenApiYamlReferenceContributor.java
示例6: localDefinitionsPattern
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private PsiElementPattern.Capture<YAMLQuotedText> localDefinitionsPattern() {
return swagger(psiElement(YAMLQuotedText.class)
.withParent(psiElement(YAMLKeyValue.class).withName(SwaggerConstants.REF_KEY))
.withText(StandardPatterns.string().contains(SwaggerConstants.LOCAL_DEFINITIONS_PREFIX))
.andNot(StandardPatterns.string().matches(".ya?ml"))
.withLanguage(YAMLLanguage.INSTANCE));
}
开发者ID:zalando,项目名称:intellij-swagger,代码行数:8,代码来源:SwaggerYamlReferenceContributor.java
示例7: getSingleLineScalarKey
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
public static ElementPattern<PsiElement> getSingleLineScalarKey(String... keyName) {
// key: | and key: "quote" is valid here
// getKeyPattern
return PlatformPatterns.or(
PlatformPatterns
.psiElement(YAMLTokenTypes.TEXT)
.withParent(PlatformPatterns.psiElement(YAMLScalar.class)
.withParent(PlatformPatterns
.psiElement(YAMLKeyValue.class)
.withName(
PlatformPatterns.string().oneOf(keyName)
)
))
.withLanguage(YAMLLanguage.INSTANCE)
,
PlatformPatterns
.psiElement(YAMLTokenTypes.SCALAR_DSTRING)
.withParent(PlatformPatterns.psiElement(YAMLScalar.class)
.withParent(PlatformPatterns
.psiElement(YAMLKeyValue.class)
.withName(
PlatformPatterns.string().oneOf(keyName)
)
))
.withLanguage(YAMLLanguage.INSTANCE),
PlatformPatterns
.psiElement(YAMLTokenTypes.SCALAR_STRING)
.withParent(PlatformPatterns.psiElement(YAMLScalar.class)
.withParent(PlatformPatterns
.psiElement(YAMLKeyValue.class)
.withName(
PlatformPatterns.string().oneOf(keyName)
)
))
.withLanguage(YAMLLanguage.INSTANCE)
);
}
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:38,代码来源:YamlElementPatternHelper.java
示例8: getServiceDefinition
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
/**
* find common services: @foo, "@foo", '@foo'
*/
public static ElementPattern<PsiElement> getServiceDefinition() {
return PlatformPatterns
.psiElement().with(SCALAR_ELEMENT_TYPES)
.withParent(
PlatformPatterns.psiElement(YAMLScalar.class).with(new YAMLScalarValueStartsWithPatternCondition("@"))
)
.withLanguage(YAMLLanguage.INSTANCE);
}
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:12,代码来源:YamlElementPatternHelper.java
示例9: getServiceParameterDefinition
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
/**
* find common service parameter: %foo%, %foo%, %foo%
*/
public static ElementPattern<PsiElement> getServiceParameterDefinition() {
return PlatformPatterns
.psiElement().with(SCALAR_ELEMENT_TYPES)
.withParent(
PlatformPatterns.psiElement(YAMLScalar.class).with(new YAMLScalarValueStartsWithPatternCondition("%"))
)
.withLanguage(YAMLLanguage.INSTANCE);
}
开发者ID:Haehnchen,项目名称:idea-php-symfony2-plugin,代码行数:12,代码来源:YamlElementPatternHelper.java
示例10: YamlCompletionContributor
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
public YamlCompletionContributor() {
extend(CompletionType.BASIC, PlatformPatterns.psiElement().withLanguage(YAMLLanguage.INSTANCE),
new YamlCompletionProvider());
}
开发者ID:1tontech,项目名称:intellij-spring-assistant,代码行数:5,代码来源:YamlCompletionContributor.java
示例11: CoffigYamlLanguage
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private CoffigYamlLanguage() {
super(YAMLLanguage.INSTANCE, "coffig/yaml", "application/yaml");
}
开发者ID:seedstack,项目名称:intellij-plugin,代码行数:4,代码来源:CoffigYamlLanguage.java
示例12: CoffigCompletionContributor
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
public CoffigCompletionContributor() {
extend(CompletionType.BASIC, PlatformPatterns.psiElement(YAMLTokenTypes.TEXT).withLanguage(YAMLLanguage.INSTANCE), DISPATCHING_COMPLETION_PROVIDER);
extend(CompletionType.BASIC, PlatformPatterns.psiElement(YAMLTokenTypes.SCALAR_STRING).withLanguage(YAMLLanguage.INSTANCE), DISPATCHING_COMPLETION_PROVIDER);
extend(CompletionType.BASIC, PlatformPatterns.psiElement(YAMLTokenTypes.SCALAR_DSTRING).withLanguage(YAMLLanguage.INSTANCE), DISPATCHING_COMPLETION_PROVIDER);
extend(CompletionType.BASIC, PlatformPatterns.psiElement(YAMLTokenTypes.SCALAR_KEY).withLanguage(YAMLLanguage.INSTANCE), DISPATCHING_COMPLETION_PROVIDER);
}
开发者ID:seedstack,项目名称:intellij-plugin,代码行数:7,代码来源:CoffigCompletionContributor.java
示例13: ThemeConfigurationFileType
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
public ThemeConfigurationFileType() {
super(YAMLLanguage.INSTANCE);
}
开发者ID:PioBeat,项目名称:GravSupport,代码行数:4,代码来源:ThemeConfigurationFileType.java
示例14: ThemeBlueprintsFileType
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
public ThemeBlueprintsFileType() {
super(YAMLLanguage.INSTANCE);
}
开发者ID:PioBeat,项目名称:GravSupport,代码行数:4,代码来源:ThemeBlueprintsFileType.java
示例15: CloudSlangFileType
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private CloudSlangFileType() {
super(YAMLLanguage.INSTANCE);
}
开发者ID:CloudSlang,项目名称:cs-intellij-plugin,代码行数:4,代码来源:CloudSlangFileType.java
示例16: hasYamlRootKey
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private boolean hasYamlRootKey(final PsiFile psiFile, final String lookupKey) {
final Language language = psiFile.getLanguage();
return YAMLLanguage.INSTANCE.is(language) && new PathFinder().findByPathFrom(lookupKey, psiFile).isPresent();
}
开发者ID:zalando,项目名称:intellij-swagger,代码行数:6,代码来源:FileDetector.java
示例17: filePattern
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private PsiElementPattern.Capture<YAMLValue> filePattern() {
return psiElement(YAMLValue.class)
.withText(StandardPatterns.string().matches("(.)*.ya?ml$"))
.withLanguage(YAMLLanguage.INSTANCE);
}
开发者ID:zalando,项目名称:intellij-swagger,代码行数:6,代码来源:OpenApiYamlReferenceContributor.java
示例18: componentFileReferencePattern
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private PsiElementPattern.Capture<YAMLQuotedText> componentFileReferencePattern() {
return psiElement(YAMLQuotedText.class)
.withParent(psiElement(YAMLKeyValue.class).withName(OpenApiConstants.REF_KEY))
.withText(StandardPatterns.string().matches("(.*).ya?ml#/([^/])*$"))
.withLanguage(YAMLLanguage.INSTANCE);
}
开发者ID:zalando,项目名称:intellij-swagger,代码行数:7,代码来源:OpenApiYamlReferenceContributor.java
示例19: externalDefinitionsInRootPattern
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private PsiElementPattern.Capture<YAMLQuotedText> externalDefinitionsInRootPattern() {
return swagger(psiElement(YAMLQuotedText.class)
.withParent(psiElement(YAMLKeyValue.class).withName(SwaggerConstants.REF_KEY))
.withText(StandardPatterns.string().matches("(.*).ya?ml#/([^/])*$"))
.withLanguage(YAMLLanguage.INSTANCE));
}
开发者ID:zalando,项目名称:intellij-swagger,代码行数:7,代码来源:SwaggerYamlReferenceContributor.java
示例20: externalDefinitionsNotInRootPattern
import org.jetbrains.yaml.YAMLLanguage; //导入依赖的package包/类
private PsiElementPattern.Capture<YAMLQuotedText> externalDefinitionsNotInRootPattern() {
return swagger(psiElement(YAMLQuotedText.class)
.withParent(psiElement(YAMLKeyValue.class).withName(SwaggerConstants.REF_KEY))
.withText(StandardPatterns.string().matches("(.*).ya?ml#/(.*)/(.*)"))
.withLanguage(YAMLLanguage.INSTANCE));
}
开发者ID:zalando,项目名称:intellij-swagger,代码行数:7,代码来源:SwaggerYamlReferenceContributor.java
注:本文中的org.jetbrains.yaml.YAMLLanguage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论