mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 13:15:25 +07:00
prefer expected type generics suggestions in java completion, overwrite existing type arguments (IDEA-145119)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import java.util.*;
|
||||
|
||||
class Foo {
|
||||
|
||||
void bar() {
|
||||
Map<Integer, String> a = new HashMap<Integer, String>(<caret>);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.*;
|
||||
|
||||
class Foo {
|
||||
|
||||
void bar() {
|
||||
Map<Integer, String> a = new HashMap<<caret>, String>();
|
||||
}
|
||||
|
||||
}
|
||||
+1
-2
@@ -1324,8 +1324,7 @@ class XInternalError {}
|
||||
|
||||
public void testSuggestAllTypeArguments() {
|
||||
configure()
|
||||
assert 'String, String' == lookup.items[1].lookupString
|
||||
lookup.currentItem = lookup.items[1]
|
||||
assert 'String, String' == lookup.items[0].lookupString
|
||||
type '\n'
|
||||
checkResult()
|
||||
}
|
||||
|
||||
+1
@@ -909,6 +909,7 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
|
||||
public void testTypeArgs2() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
public void testTypeArgsOverwrite() { doTest(); }
|
||||
|
||||
public void testIfConditionExpectedType() throws Exception { doTest(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user