mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
[java-completion] IDEA-354763 IJ-CR-137494 Don't suggest protected/transient and so on the top file level
- skip `strictfp` according to language level - more accurately determine position - refactoring GitOrigin-RevId: 2d660d7f4fd86bed089da62f4ca746c6f2348aec
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fc7bb4d813
commit
114a8907cf
@@ -0,0 +1 @@
|
||||
public <caret> Cls
|
||||
@@ -0,0 +1 @@
|
||||
public <caret> Cls
|
||||
@@ -36,12 +36,12 @@ public class KeywordCompletionTest extends LightCompletionTestCase {
|
||||
setLanguageLevel(JavaFeature.IMPLICIT_CLASSES.getMinimumLevel());
|
||||
doTest(16, "package", "public", "import", "final", "class", "interface", "abstract", "enum",
|
||||
"transient", "static", "private", "protected", "volatile", "synchronized", "sealed", "non-sealed");
|
||||
assertNotContainItems("default");
|
||||
assertNotContainItems("default", "strictfp");
|
||||
}
|
||||
|
||||
public void testFileScopeWithoutPackage2() {
|
||||
setLanguageLevel(LanguageLevel.JDK_1_8);
|
||||
doTest(8, "package", "public", "import", "final", "class", "interface", "abstract", "enum");
|
||||
doTest(9, "package", "public", "import", "final", "class", "interface", "abstract", "enum", "strictfp");
|
||||
assertNotContainItems("default", "transient", "static", "private", "protected", "volatile", "synchronized", "sealed", "non-sealed");
|
||||
}
|
||||
|
||||
@@ -66,6 +66,15 @@ public class KeywordCompletionTest extends LightCompletionTestCase {
|
||||
}
|
||||
public void testClassScope3() { doTest(0, CLASS_SCOPE_KEYWORDS); }
|
||||
public void testClassScope4() { doTest(11, CLASS_SCOPE_KEYWORDS_2); }
|
||||
public void testClassScope5() {
|
||||
setLanguageLevel(JavaFeature.ALWAYS_STRICTFP.getMinimumLevel());
|
||||
doTestContains("class", "interface", "enum", "record", "sealed", "non-sealed");
|
||||
assertNotContainItems("default", "transient", "static", "private", "protected", "volatile", "synchronized", "strictfp");
|
||||
}
|
||||
public void testClassScope5WithStrictfp() {
|
||||
setLanguageLevel(LanguageLevel.JDK_1_8);
|
||||
doTestContains("class", "interface", "enum", "strictfp");
|
||||
}
|
||||
public void testInnerClassScope() {
|
||||
doTest(11, CLASS_SCOPE_KEYWORDS_2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user