KT-4070 KotlinSignature icons in the gutter on a Java source blink/flash on every change of the file

#KT-4070 Fixed
This commit is contained in:
Nikolay Krasko
2013-10-24 16:31:09 +04:00
parent da8a3c52a0
commit 04115ab8bf
@@ -214,7 +214,7 @@ public class KotlinSignatureInJavaMarkerProvider implements LineMarkerProvider {
private static class MyLineMarkerInfo extends LineMarkerInfo<PsiModifierListOwner> { private static class MyLineMarkerInfo extends LineMarkerInfo<PsiModifierListOwner> {
public MyLineMarkerInfo(PsiModifierListOwner element, @Nullable List<String> errors, boolean hasAnnotation) { public MyLineMarkerInfo(PsiModifierListOwner element, @Nullable List<String> errors, boolean hasAnnotation) {
super(element, element.getTextOffset(), errors != null ? AllIcons.Ide.Error : JetIcons.SMALL_LOGO, Pass.UPDATE_ALL, super(element, element.getTextOffset(), errors != null ? AllIcons.Ide.Error : JetIcons.SMALL_LOGO, Pass.UPDATE_OVERRIDEN_MARKERS,
new TooltipProvider(errors), hasAnnotation ? NAVIGATION_HANDLER : null); new TooltipProvider(errors), hasAnnotation ? NAVIGATION_HANDLER : null);
} }
@@ -249,13 +249,11 @@ public class KotlinSignatureInJavaMarkerProvider implements LineMarkerProvider {
if (annotation == null) return errorsString(); if (annotation == null) return errorsString();
String signature = KotlinSignatureUtil.getKotlinSignature(annotation); String signature = KotlinSignatureUtil.getKotlinSignature(annotation);
String text = "Alternative Kotlin signature is available for this method:\n" String text = "Alternative Kotlin signature is available for this method:\n" + StringUtil.escapeXml(signature);
+ StringUtil.escapeXml(signature);
if (errors == null) { if (errors == null) {
return text; return text;
} }
return text + "\nIt has the following " + StringUtil.pluralize("error", errors.size()) + ":\n" return text + "\nIt has the following " + StringUtil.pluralize("error", errors.size()) + ":\n" + errorsString();
+ errorsString();
} }
@NotNull @NotNull