mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
suggest several parameters when delegating
This commit is contained in:
+1
-3
@@ -99,9 +99,7 @@ class SameSignatureCallParametersProvider extends CompletionProvider<CompletionP
|
||||
final PsiClass psiClass = ((PsiMethod)element).getContainingClass();
|
||||
if (psiClass != null) {
|
||||
for (Pair<PsiMethod, PsiSubstitutor> overload : psiClass.findMethodsAndTheirSubstitutorsByName(((PsiMethod)element).getName(), true)) {
|
||||
if (!overload.first.hasModifierProperty(PsiModifier.ABSTRACT)/* && overload.first.hasModifierProperty(PsiModifier.STATIC)*/) {
|
||||
candidates.add(overload);
|
||||
}
|
||||
candidates.add(overload);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import java.io.File;
|
||||
|
||||
public interface Zoo {
|
||||
void foo(String s, File file);
|
||||
}
|
||||
|
||||
class ZooImpl implements Zoo {
|
||||
private Zoo delegate;
|
||||
@Override
|
||||
public void foo(String s, File file) {
|
||||
delegate.foo(s, file);<caret>
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import java.io.File;
|
||||
|
||||
public interface Zoo {
|
||||
void foo(String s, File file);
|
||||
}
|
||||
|
||||
class ZooImpl implements Zoo {
|
||||
private Zoo delegate;
|
||||
@Override
|
||||
public void foo(String s, File file) {
|
||||
delegate.foo(<caret>);
|
||||
}
|
||||
}
|
||||
+7
@@ -769,6 +769,13 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
|
||||
checkResultByTestName();
|
||||
}
|
||||
|
||||
public void testSameNamedArgumentsDelegation() throws Throwable {
|
||||
configureByTestName();
|
||||
getLookup().setCurrentItem(getLookup().getItems().get(1));
|
||||
select();
|
||||
checkResultByTestName();
|
||||
}
|
||||
|
||||
public void testWrongAnonymous() throws Throwable {
|
||||
configureByTestName();
|
||||
select();
|
||||
|
||||
Reference in New Issue
Block a user