mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
IDEA-152325 Smart completion should not suggest class fields in its this/super constructor call
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
class SearchParameters {
|
||||
|
||||
public SearchParameters(PsiElement element) {
|
||||
this(e<caret>);
|
||||
this(e<caret>x);
|
||||
}
|
||||
|
||||
public SearchParameters(final PsiElement element, final boolean checkDeep) {
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
final int field;
|
||||
A(int field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
A(A delegate, int x) {
|
||||
this(<caret>)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testDelegatingConstructorCall() {
|
||||
checkPreferredItems 0, 'element', 'equals'
|
||||
checkPreferredItems 0, 'element'
|
||||
}
|
||||
|
||||
public void testPreferAnnotationMethods() throws Throwable {
|
||||
|
||||
+5
@@ -230,4 +230,9 @@ public class SecondSmartTypeCompletionTest extends LightFixtureCompletionTestCas
|
||||
LookupManager.getInstance(getProject()).hideActiveLookup();
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public void testNoThisFieldsInDelegatingConstructorCall() {
|
||||
configure();
|
||||
assertOrderedEquals(myFixture.getLookupElementStrings(), "delegate.field", "x");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user