From 83575c8d89a25c9d03e768978c9a8772cc0b84a6 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 9 Apr 2012 11:17:10 +0400 Subject: [PATCH] IDEA-84195 single line of code has multiple methods on it IDEA displays the interface icon multiple times causing display to be funky --- .../jetbrains/python/codeInsight/PyLineMarkerProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java b/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java index bc4df5565776..ec7da19f3f19 100644 --- a/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java +++ b/python/src/com/jetbrains/python/codeInsight/PyLineMarkerProvider.java @@ -23,6 +23,7 @@ import com.jetbrains.python.psi.PyUtil; import com.jetbrains.python.psi.search.PyClassInheritorsSearch; import com.jetbrains.python.psi.search.PyOverridingMethodsSearch; import com.jetbrains.python.psi.search.PySuperMethodsSearch; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -141,7 +142,7 @@ public class PyLineMarkerProvider implements LineMarkerProvider, PyLineSeparator } }; - public LineMarkerInfo getLineMarkerInfo(final PsiElement element) { + public LineMarkerInfo getLineMarkerInfo(@NotNull final PsiElement element) { final ASTNode node = element.getNode(); if (node != null && node.getElementType() == PyTokenTypes.IDENTIFIER && element.getParent() instanceof PyFunction) { final PyFunction function = (PyFunction)element.getParent(); @@ -199,7 +200,7 @@ public class PyLineMarkerProvider implements LineMarkerProvider, PyLineSeparator return null; } - public void collectSlowLineMarkers(final List elements, final Collection result) { + public void collectSlowLineMarkers(@NotNull final List elements, @NotNull final Collection result) { Set functions = new HashSet(); for(PsiElement element: elements) { if (element instanceof PyClass) {