Introduce HTML redenred version for compatibility warning

This commit is contained in:
Mikhail Zarechenskiy
2020-06-01 10:00:48 +03:00
parent 569b6eaff2
commit 7ec8716d65
11 changed files with 40 additions and 12 deletions
@@ -3,6 +3,7 @@ html.0.has.no.corresponding.expected.declaration.1.html={0} has no corresponding
html.0.is.not.abstract.and.does.not.implement.abstract.base.class.member.br.1.html={0} is not abstract and does not implement abstract base class member<br/>{1}
html.0.is.not.abstract.and.does.not.implement.abstract.member.br.1.html={0} is not abstract and does not implement abstract member<br/>{1}
html.0.method.may.be.missing.none.of.the.following.functions.will.be.called.ul.1.ul.html=''{0}'' method may be missing. None of the following functions will be called: <ul>{1}</ul>
html.candidate.resolution.will.be.changed.please.invoke.explicitly.ul.0.ul.html=Candidate resolution will be changed, please invoke explicitly: <ul>{0}</ul>
html.expected.0.has.no.actual.declaration.in.module.1.2.html=Expected {0} has no actual declaration in module {1}{2}
html.accidental.override.0.html=Accidental override: {0}
html.method.contains.from.concurrenthashmap.may.have.unexpected.semantics.it.calls.containsvalue.instead.of.containskey.br.use.explicit.form.of.the.call.to.containskey.containsvalue.contains.or.cast.the.value.to.kotlin.collections.map.instead.br.see.https.youtrack.jetbrains.com.issue.kt.18053.for.more.details.html=Method ''contains'' from ConcurrentHashMap may have unexpected semantics: it calls ''containsValue'' instead of ''containsKey''.<br/>Use explicit form of the call to ''containsKey''/''containsValue''/''contains'' or cast the value to kotlin.collections.Map instead.<br/>See https://youtrack.jetbrains.com/issue/KT-18053 for more details
@@ -170,6 +170,10 @@ public class IdeErrorMessages {
KotlinIdeaAnalysisBundle.htmlMessage("html.0.method.may.be.missing.none.of.the.following.functions.will.be.called.ul.1.ul.html"),
STRING, HTML_NONE_APPLICABLE_CALLS);
MAP.put(COMPATIBILITY_WARNING,
KotlinIdeaAnalysisBundle.htmlMessage("html.candidate.resolution.will.be.changed.please.invoke.explicitly.ul.0.ul.html"),
HTML_COMPATIBILITY_CANDIDATE);
MAP.put(CONFLICTING_JVM_DECLARATIONS, KotlinIdeaAnalysisBundle.htmlMessage("html.platform.declaration.clash.0.html"), HTML_CONFLICTING_JVM_DECLARATIONS_DATA);
MAP.put(ACCIDENTAL_OVERRIDE, KotlinIdeaAnalysisBundle.htmlMessage("html.accidental.override.0.html"), HTML_CONFLICTING_JVM_DECLARATIONS_DATA);
@@ -24,6 +24,11 @@ object IdeRenderers {
renderAmbiguousDescriptors(calls.map { it.resultingDescriptor })
}
@JvmField
val HTML_COMPATIBILITY_CANDIDATE = Renderer { call: CallableDescriptor ->
renderAmbiguousDescriptors(listOf(call))
}
@JvmField
val HTML_AMBIGUOUS_REFERENCES = Renderer { descriptors: Collection<CallableDescriptor> ->
renderAmbiguousDescriptors(descriptors)