Changed diagnostic factory hierarchy (added DiagnosticFactoryWithPsiElement)
This commit is contained in:
+4
-4
@@ -6,13 +6,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* @author abreslav
|
||||
*/
|
||||
public class PsiElementOnlyDiagnosticFactory2<A, B> extends DiagnosticFactoryWithMessageFormat {
|
||||
public class DiagnosticFactoryWithPsiElement2<A, B> extends DiagnosticFactoryWithMessageFormat {
|
||||
|
||||
public static <A, B> PsiElementOnlyDiagnosticFactory2<A, B> create(Severity severity, String message) {
|
||||
return new PsiElementOnlyDiagnosticFactory2<A, B>(severity, message);
|
||||
public static <A, B> DiagnosticFactoryWithPsiElement2<A, B> create(Severity severity, String message) {
|
||||
return new DiagnosticFactoryWithPsiElement2<A, B>(severity, message);
|
||||
}
|
||||
|
||||
public PsiElementOnlyDiagnosticFactory2(Severity severity, String message) {
|
||||
public DiagnosticFactoryWithPsiElement2(Severity severity, String message) {
|
||||
super(severity, message);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface Errors {
|
||||
|
||||
UnresolvedReferenceDiagnosticFactory UNRESOLVED_REFERENCE = UnresolvedReferenceDiagnosticFactory.INSTANCE;
|
||||
RedeclarationDiagnosticFactory REDECLARATION = RedeclarationDiagnosticFactory.INSTANCE;
|
||||
PsiElementOnlyDiagnosticFactory2<JetType, JetType> TYPE_MISMATCH = PsiElementOnlyDiagnosticFactory2.create(ERROR, "Type mismatch: inferred type is {1} but {0} was expected");
|
||||
DiagnosticFactoryWithPsiElement2<JetType, JetType> TYPE_MISMATCH = DiagnosticFactoryWithPsiElement2.create(ERROR, "Type mismatch: inferred type is {1} but {0} was expected");
|
||||
|
||||
SimpleDiagnosticFactory SAFE_CALLS_ARE_NOT_ALLOWED_ON_NAMESPACES = SimpleDiagnosticFactory.create(ERROR, "Safe calls are not allowed on namespaces");
|
||||
SimpleDiagnosticFactory TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM = SimpleDiagnosticFactory.create(ERROR, "Type checking has run into a recursive problem"); // TODO: message
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* @author abreslav
|
||||
*/
|
||||
public class ParameterizedDiagnosticFactory2<A, B> extends PsiElementOnlyDiagnosticFactory2<A,B> {
|
||||
public class ParameterizedDiagnosticFactory2<A, B> extends DiagnosticFactoryWithPsiElement2<A,B> {
|
||||
public static <A, B> ParameterizedDiagnosticFactory2<A, B> create(Severity severity, String messageStub) {
|
||||
return new ParameterizedDiagnosticFactory2<A, B>(severity, messageStub);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user