mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
disable override method from abstract class intention for static methods (IDEA-98006)
This commit is contained in:
@@ -57,7 +57,7 @@ public class ImplementAbstractMethodAction extends BaseIntentionAction {
|
||||
PsiClass containingClass = method.getContainingClass();
|
||||
if (containingClass == null) return false;
|
||||
final boolean isAbstract = method.hasModifierProperty(PsiModifier.ABSTRACT);
|
||||
if (isAbstract || !method.hasModifierProperty(PsiModifier.PRIVATE)) {
|
||||
if (isAbstract || !method.hasModifierProperty(PsiModifier.PRIVATE) && !method.hasModifierProperty(PsiModifier.STATIC)) {
|
||||
if (!isAbstract && !isOnIdentifier(file, offset)) return false;
|
||||
MyElementProcessor processor = new MyElementProcessor(method);
|
||||
if (containingClass.isEnum()) {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Override method 'foo'" "false"
|
||||
abstract class Test {
|
||||
protected static void fo<caret>o(){}
|
||||
}
|
||||
|
||||
class TImple extends Test {}
|
||||
Reference in New Issue
Block a user