java 18 is generally available

GitOrigin-RevId: 6da5af5f9d23adf4aacfc5752765103bb6732a8a
This commit is contained in:
Anna Kozlova
2022-03-22 21:31:47 +01:00
committed by intellij-monorepo-bot
parent e3bed0914c
commit 0039037092
18 changed files with 21 additions and 21 deletions

View File

@@ -46,7 +46,7 @@ public enum LanguageLevel {
/**
* Should point to the last released JDK.
*/
public static final LanguageLevel HIGHEST = JDK_17;
public static final LanguageLevel HIGHEST = JDK_18;
public static final Key<LanguageLevel> KEY = Key.create("LANGUAGE_LEVEL");
private final Supplier<@Nls String> myPresentableText;

View File

@@ -1,6 +1,6 @@
/**
* A simple program.
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :}
* {@snippet :}
*/
class A {
}

View File

@@ -1,6 +1,6 @@
/**
* A simple program.
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
* {@snippet :
*
* }
*/

View File

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

View File

@@ -1,5 +1,5 @@
/**
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> lang=JAVA :
* {@snippet lang=JAVA :
* public class ShowOptional {
* void show(Optional<String> v) {
* // @start region="example"

View File

@@ -1,4 +1,4 @@
/** {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
/** {@snippet :
* Optional<Integer> v = null;
* if (v.isPresent()) {
* System.out.println("v: " + v.get());

View File

@@ -1,4 +1,4 @@
/** {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
/** {@snippet :
* FileInputStream is = new FileInputStream("hello.world");
* int r = is.read();
* }

View File

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

View File

@@ -2,7 +2,7 @@ class A {
/**
* A simple program.
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
* {@snippet :
* class HelloWorld {
* void
* f(

View File

@@ -1,6 +1,6 @@
/**
* A simple program.
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :}
* {@snippet :}
*/
class A {
}

View File

@@ -1,6 +1,6 @@
/**
* A simple program.
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
* {@snippet :
*
* }
*/

View File

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

View File

@@ -1,5 +1,5 @@
/**
* {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> lang=JAVA :
* {@snippet lang=JAVA :
* public class ShowOptional {
* void show(Optional<String> v) {
* // @start region="example"

View File

@@ -1,4 +1,4 @@
/** {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
/** {@snippet :
* Optional<Integer> v = null;
* if (v.isPresent()) {
* System.out.println("v: " + v.get());

View File

@@ -1,4 +1,4 @@
/** {<warning descr="'@snippet' tag is not available at this language level">@snippet</warning> :
/** {@snippet :
* FileInputStream is = new FileInputStream("hello.world");
* int r = is.read();
* }

View File

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

View File

@@ -160,7 +160,7 @@ class JavadocCompletionTest extends LightFixtureCompletionTestCase {
void testInlineLookup() {
configureByFile("InlineTagName.java")
assertStringItems("code", "docRoot", "index", "inheritDoc", "link", "linkplain", "literal", "summary", "systemProperty", "value")
assertStringItems("code", "docRoot", "index", "inheritDoc", "link", "linkplain", "literal", "snippet", "summary", "systemProperty", "value")
}
@NeedsIndex.ForStandardLibrary
@@ -775,7 +775,7 @@ interface Bar<T> extends Foo<T> {
void "test tags at top level inline"() {
myFixture.configureByText 'a.java', "interface Foo { /** Hello <caret> */void foo(int a); }"
myFixture.completeBasic()
assert myFixture.lookupElementStrings == ['{@code}', '{@docRoot}', '{@index}', '{@inheritDoc}', '{@linkplain}', '{@link}', '{@literal}', '{@summary}', '{@systemProperty}', '{@value}']
assert myFixture.lookupElementStrings == ['{@code}', '{@docRoot}', '{@index}', '{@inheritDoc}', '{@linkplain}', '{@link}', '{@literal}', '{@snippet}', '{@summary}', '{@systemProperty}', '{@value}']
def element = myFixture.lookupElements[5]
assert element.lookupString == "{@link}"
selectItem(element)
@@ -785,7 +785,7 @@ interface Bar<T> extends Foo<T> {
void "test tags after return"() {
myFixture.configureByText 'a.java', "interface Foo { /** @return <caret> */int foo(int a); }"
myFixture.completeBasic()
assert myFixture.lookupElementStrings == ['{@code}', '{@docRoot}', '{@index}', '{@inheritDoc}', '{@linkplain}', '{@link}', '{@literal}', '{@return}', '{@summary}', '{@systemProperty}', '{@value}']
assert myFixture.lookupElementStrings == ['{@code}', '{@docRoot}', '{@index}', '{@inheritDoc}', '{@linkplain}', '{@link}', '{@literal}', '{@return}', '{@snippet}', '{@summary}', '{@systemProperty}', '{@value}']
def element = myFixture.lookupElements[5]
assert element.lookupString == "{@link}"
selectItem(element)
@@ -795,7 +795,7 @@ interface Bar<T> extends Foo<T> {
void "test tags at top level inline in brace"() {
myFixture.configureByText 'a.java', "interface Foo { /** Hello {<caret>} */void foo(int a); }"
myFixture.completeBasic()
assert myFixture.lookupElementStrings == ['@code', '@docRoot', '@index', '@inheritDoc', '@link', '@linkplain', '@literal', '@summary', '@systemProperty', '@value']
assert myFixture.lookupElementStrings == ['@code', '@docRoot', '@index', '@inheritDoc', '@link', '@linkplain', '@literal', '@snippet', '@summary', '@systemProperty', '@value']
def element = myFixture.lookupElements[4]
assert element.lookupString == "@link"
selectItem(element)

View File

@@ -26,7 +26,7 @@ public enum LanguageLevel {
JDK_18(18), JDK_18_PREVIEW(18),
JDK_X(19);
public static final LanguageLevel HIGHEST = JDK_17;
public static final LanguageLevel HIGHEST = JDK_18;
private final JavaVersion myVersion;