mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
allow override in interfaces (IDEA-109506)
This commit is contained in:
@@ -30,7 +30,7 @@ public class OverrideImplementExploreUtil {
|
||||
|
||||
@NotNull
|
||||
public static Collection<MethodSignature> getMethodSignaturesToOverride(@NotNull PsiClass aClass) {
|
||||
if (aClass.isInterface()) return Collections.emptySet();
|
||||
if (aClass.isAnnotationType()) return Collections.emptySet();
|
||||
return getMapToOverrideImplement(aClass, false).keySet();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
interface A {
|
||||
void foo();
|
||||
}
|
||||
|
||||
interface B extends A {
|
||||
@Override
|
||||
void foo();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
interface A {
|
||||
void foo();
|
||||
}
|
||||
|
||||
interface B extends A {
|
||||
<caret>
|
||||
}
|
||||
@@ -71,6 +71,9 @@ public class OverrideImplementTest extends LightCodeInsightTestCase {
|
||||
public void testOverrideExtensionMethods() { doTest8(false, false); }
|
||||
public void testDoNotImplementExtensionMethods() { doTest8(false, true); }
|
||||
|
||||
|
||||
public void testOverrideInInterface() { doTest8(false, false); }
|
||||
|
||||
public void testLongFinalParameterList() {
|
||||
CodeStyleSettings codeStyleSettings = CodeStyleSettingsManager.getSettings(getProject()).clone();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user