[java] fix language level required for @snippet

GitOrigin-RevId: 093605a5d64aba4de5c9331ad6fc604e9f014328
This commit is contained in:
Roman Ivanov
2021-12-28 12:24:03 +01:00
committed by intellij-monorepo-bot
parent 6adb883a5a
commit 2345574a96
3 changed files with 3 additions and 4 deletions

View File

@@ -45,8 +45,7 @@ public class JavadocManagerImpl implements JavadocManager {
myInfos.add(new SimpleDocTagInfo("index", LanguageLevel.JDK_1_9, true, PsiElement.class));
myInfos.add(new SimpleDocTagInfo("summary", LanguageLevel.JDK_10, true, PsiElement.class));
myInfos.add(new SimpleDocTagInfo("systemProperty", LanguageLevel.JDK_12, true, PsiElement.class));
// TODO nikita.eshkeev@jetbrains.com, please change the language level to LanguageLevel.JDK_18 when it's available
myInfos.add(new SimpleDocTagInfo("snippet", LanguageLevel.JDK_17, true, PsiElement.class));
myInfos.add(new SimpleDocTagInfo("snippet", LanguageLevel.JDK_18, true, PsiElement.class));
// not a standard tag, used by IDEA for suppressing inspections
myInfos.add(new SimpleDocTagInfo(SuppressionUtilCore.SUPPRESS_INSPECTIONS_TAG_NAME, LanguageLevel.JDK_1_3, false, PsiElement.class));

View File

@@ -1,4 +1,4 @@
/** {<warning descr="'@snippet' tag is not available at this language level"><warning descr="Wrong tag 'snippet'">@snippet</warning></warning> :
/** {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
* Body
* }
*/

View File

@@ -126,7 +126,7 @@ public class JavadocHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testAuthoredMethod() { doTest(); }
public void testThrowsInheritDoc() { doTest(); }
public void testSnippetInlineTag() { doTest(); }
public void testSnippet() { doTest(); }
public void testSnippet() { setLanguageLevel(LanguageLevel.JDK_17); doTest(); }
public void testIssueLinksInJavaDoc() {
IssueNavigationConfiguration navigationConfiguration = IssueNavigationConfiguration.getInstance(getProject());