本文整理汇总了Java中com.intellij.pom.java.LanguageLevel.HIGHEST属性的典型用法代码示例。如果您正苦于以下问题:Java LanguageLevel.HIGHEST属性的具体用法?Java LanguageLevel.HIGHEST怎么用?Java LanguageLevel.HIGHEST使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.pom.java.LanguageLevel
的用法示例。
在下文中一共展示了LanguageLevel.HIGHEST属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLanguageLevel
@Override
@NotNull
public LanguageLevel getLanguageLevel() {
LanguageLevel level = myLanguageLevel;
if (level == null) {
List classes = ApplicationManager.getApplication().runReadAction(new Computable<List>() {
@Override
public List compute() {
return getStub().getChildrenStubs();
}
});
myLanguageLevel = level = !classes.isEmpty() ? ((PsiClassStub<?>)classes.get(0)).getLanguageLevel() : LanguageLevel.HIGHEST;
}
return level;
}
示例2: getInstance
public static PsiNameHelper getInstance() {
return new PsiNameHelperImpl() {
@NotNull
@Override
protected LanguageLevel getLanguageLevel() {
return LanguageLevel.HIGHEST;
}
};
}
示例3: createLexer
@Override
@NotNull
public Lexer createLexer(@Nullable Project project) {
LanguageLevel level = project != null ? LanguageLevelProjectExtension.getInstance(project).getLanguageLevel() : LanguageLevel.HIGHEST;
return createLexer(level);
}
示例4: getLanguageLevel
@Override
public LanguageLevel getLanguageLevel() {
return myLanguageLevel != null ? myLanguageLevel : LanguageLevel.HIGHEST;
}
示例5: level
protected static LanguageLevel level(@Nullable final PsiElement context) {
return context != null && context.isValid() ? PsiUtil.getLanguageLevel(context) : LanguageLevel.HIGHEST;
}
示例6: getLanguageLevel
@Override
public LanguageLevel getLanguageLevel(@NotNull PsiDirectory dir) {
return LanguageLevel.HIGHEST;
}
示例7: getLanguageLevel
@NotNull
public static LanguageLevel getLanguageLevel(@NotNull Project project) {
LanguageLevelProjectExtension instance = LanguageLevelProjectExtension.getInstance(project);
return instance != null ? instance.getLanguageLevel() : LanguageLevel.HIGHEST;
}
示例8: getSyntaxHighlighter
/**
* SyntaxHighlighterFactory implementation (for Java source files).
*/
@Override
@NotNull
public SyntaxHighlighter getSyntaxHighlighter(@Nullable Project project, @Nullable VirtualFile file) {
return new JavaFileHighlighter(project == null ? LanguageLevel.HIGHEST : JavaPsiImplementationHelper.getInstance(project).getEffectiveLanguageLevel(file));
}
示例9: JavaFileHighlighter
public JavaFileHighlighter() {
this(LanguageLevel.HIGHEST);
}
示例10: getLanguageLevel
protected LanguageLevel getLanguageLevel() {
return LanguageLevel.HIGHEST;
}
示例11: getHighlighter
@Override
@NotNull
public SyntaxHighlighter getHighlighter() {
return new JavaFileHighlighter(LanguageLevel.HIGHEST);
}
示例12: getDefaultValue
@Override
@NotNull
public LanguageLevel getDefaultValue() {
return LanguageLevel.HIGHEST;
}
示例13: getSyntaxHighlighter
@Override
@NotNull
public SyntaxHighlighter getSyntaxHighlighter(Project project, VirtualFile virtualFile) {
return new JavaFileHighlighter(LanguageLevel.HIGHEST);
}