method ref completion: allow non static methods (IDEA-92705)

This commit is contained in:
anna
2012-10-11 12:42:09 +02:00
parent c58a833be1
commit 451d88906b
5 changed files with 20 additions and 2 deletions
@@ -0,0 +1,8 @@
import java.util.*;
class Test {
void aaa(Test p) { return 1; }
void test() {
Comparator<Test> r2 = Test::<caret>
}
}
@@ -0,0 +1,8 @@
import java.util.*;
class Test {
void aaa(Test p) { return 1; }
void test() {
Comparator<Test> r2 = Test::test;
}
}
@@ -99,7 +99,7 @@ public class KeywordCompletionTest extends LightCompletionTestCase {
public void testDefaultInExtMethod() throws Exception { doTest(false); }
public void testNullInMethodCall() throws Exception { doTest(true); }
public void testNullInMethodCall2() throws Exception { doTest(false); }
public void testNewInMethodRefs() throws Exception { doTest(false); }
public void testNewInMethodRefs() throws Exception { doTest(1, "new"); }
public void testSpaceAfterInstanceof() throws Exception { doTest(false); }
public void testAbstractInInterface() throws Exception { doTest(1, "abstract"); }
public void testCharInAnnotatedParameter() throws Exception { doTest(1, "char"); }
@@ -39,6 +39,8 @@ public class Normal17CompletionTest extends LightFixtureCompletionTestCase {
public void testOnlyResourcesInResourceList3() { doTest() }
public void testOnlyResourcesInResourceList4() { doTest() }
public void testMethodReferenceNoStatic() { doTest() }
public void testResourceParentInResourceList() {
configureByFile(getTestName(false) + ".java")
assert 'MyOuterResource' == myFixture.lookupElementStrings[0]