completion: don't start template if Object was inferred by the parent type

This commit is contained in:
Anna.Kozlova
2017-04-25 17:03:13 +02:00
parent 19ae6ceb50
commit 20113417a0
4 changed files with 25 additions and 1 deletions
@@ -0,0 +1,11 @@
import pack.Foo;
class Test {
{
Foo<Objec> f = new Foo<Objec>() {
@Override
public void foo(Objec objec) {
<caret>
}
}
}
}
@@ -0,0 +1,6 @@
import pack.Foo;
class Test {
{
Foo<Objec> f = new <caret>
}
}
@@ -95,6 +95,11 @@ public class ClassNameCompletionTest extends LightFixtureCompletionTestCase {
selectItem(myItems[0]);
assert TemplateManagerImpl.getTemplateState(myFixture.getEditor()) == null;
checkResultByFile(path +"/after2.java");
configureByFile(path + "/before3.java");
selectItem(myItems[0]);
assert TemplateManagerImpl.getTemplateState(myFixture.getEditor()) == null;
checkResultByFile(path +"/after3.java");
}
private void createClass(String text) {