mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
wording: don't suggest to make enum constant abstract (IDEA-98165)
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ public class HighlightClassUtil {
|
||||
}
|
||||
String baseClassName = HighlightUtil.formatClass(aClass, false);
|
||||
String methodName = HighlightUtil.formatMethod(abstractMethod);
|
||||
String message = JavaErrorMessages.message("class.must.be.abstract",
|
||||
String message = JavaErrorMessages.message(aClass instanceof PsiEnumConstantInitializer ? "enum.constant.should.implement.method" : "class.must.be.abstract",
|
||||
baseClassName,
|
||||
methodName,
|
||||
HighlightUtil.formatClass(abstractMethod.getContainingClass(), false));
|
||||
|
||||
@@ -95,6 +95,7 @@ implements.after.interface=No implements clause allowed for interface
|
||||
extends.after.enum=No extends clause allowed for enum
|
||||
static.declaration.in.inner.class=Inner classes cannot have static declarations
|
||||
class.must.be.abstract=Class ''{0}'' must either be declared abstract or implement abstract method ''{1}'' in ''{2}''
|
||||
enum.constant.should.implement.method=Class ''{0}'' must implement abstract method ''{1}'' in ''{2}''
|
||||
abstract.cannot.be.instantiated=''{0}'' is abstract; cannot be instantiated
|
||||
duplicate.class.in.other.file=Duplicate class found in the file ''{0}''
|
||||
duplicate.class=Duplicate class: ''{0}''
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<error descr="Modifier 'abstract' not allowed here">abstract</error> enum OurEnum {
|
||||
A <error descr="Class 'Anonymous class derived from OurEnum' must either be declared abstract or implement abstract method 'foo()' in 'OurEnum'">{</error>
|
||||
A <error descr="Class 'Anonymous class derived from OurEnum' must implement abstract method 'foo()' in 'OurEnum'">{</error>
|
||||
},
|
||||
<error descr="'OurEnum' is abstract; cannot be instantiated">B</error>,
|
||||
C {
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
enum xxx {
|
||||
<error descr="'xxx' is abstract; cannot be instantiated">X</error>,
|
||||
Y <error descr="Class 'Anonymous class derived from xxx' must either be declared abstract or implement abstract method 'f()' in 'xxx'">{</error>
|
||||
Y <error descr="Class 'Anonymous class derived from xxx' must implement abstract method 'f()' in 'xxx'">{</error>
|
||||
};
|
||||
|
||||
abstract void f();
|
||||
|
||||
Reference in New Issue
Block a user