use textrange to show execute file icon
authorliana.bakradze <liana.bakradze@jetbrains.com>
Wed, 26 Aug 2015 11:39:41 +0000 (14:39 +0300)
committerliana.bakradze <liana.bakradze@jetbrains.com>
Wed, 26 Aug 2015 11:39:41 +0000 (14:39 +0300)
we need this because icon disappears after import folding

python/edu/src/com/jetbrains/python/edu/PyExecuteFileLineMarkerProvider.java

index e0c76446ce4e396fe542b2211302d4b5ed993568..e037bf944e833863ffb37c31b3e505f6df4026d2 100644 (file)
@@ -34,10 +34,10 @@ public class PyExecuteFileLineMarkerProvider implements LineMarkerProvider {
     if (elements.isEmpty()) {
       return;
     }
-    PsiElement element = elements.get(0).getContainingFile();
+    PsiElement file = elements.get(0).getContainingFile();
     final RunContextAction runAction = new RunContextAction(DefaultRunExecutor.getRunExecutorInstance());
     final LineMarkerInfo<PsiElement> markerInfo = new LineMarkerInfo<PsiElement>(
-      element, 0, AllIcons.Actions.Execute, Pass.UPDATE_OVERRIDEN_MARKERS,
+      file, file.getTextRange(), AllIcons.Actions.Execute, Pass.UPDATE_OVERRIDEN_MARKERS,
       new Function<PsiElement, String>() {
         @Override
         public String fun(PsiElement e) {