prefer expected type generics suggestions in java completion, overwrite existing type arguments (IDEA-145119)

This commit is contained in:
peter
2015-09-23 18:08:03 +02:00
parent 061d01c95b
commit ced18f2839
6 changed files with 33 additions and 4 deletions
@@ -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>();
}
}
@@ -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()
}
@@ -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(); }