mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-195668 Do not show completion hints in improper context
This commit is contained in:
+7
-1
@@ -1369,7 +1369,7 @@ public class CompletionHintsTest extends AbstractParameterInfoTestCase {
|
||||
"}");
|
||||
}
|
||||
|
||||
public void testCaretMovementOverVirtualComma() throws Exception {
|
||||
public void testCaretMovementOverVirtualComma() {
|
||||
enableVirtualComma();
|
||||
|
||||
configureJava("class C { void m() { System.getPro<caret> } }");
|
||||
@@ -1380,6 +1380,12 @@ public class CompletionHintsTest extends AbstractParameterInfoTestCase {
|
||||
checkResultWithInlays("class C { void m() { System.getProperty(<Hint text=\"key:\"/>, <HINT text=\"def:\"/><caret>) } }");
|
||||
}
|
||||
|
||||
public void testHintsAreNotShownInImproperContext() {
|
||||
configureJava("class C { void m() { int a = Math.ma<caret>5; } }");
|
||||
complete("max(int a, int b)");
|
||||
checkResult("class C { void m() { int a = Math.max(<caret>)5; } }");
|
||||
}
|
||||
|
||||
private void checkResultWithInlays(String text) {
|
||||
myFixture.checkResultWithInlays(text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user