From 7ad6bc8256e67a24a7aaba30738ff469d5011bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Sun, 19 Aug 2012 00:27:39 +0200 Subject: [PATCH] performance --- .../codeInsight/daemon/RelatedItemLineMarkerProvider.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/lang-api/src/com/intellij/codeInsight/daemon/RelatedItemLineMarkerProvider.java b/platform/lang-api/src/com/intellij/codeInsight/daemon/RelatedItemLineMarkerProvider.java index ccda13a1dda5..28af427a227b 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/daemon/RelatedItemLineMarkerProvider.java +++ b/platform/lang-api/src/com/intellij/codeInsight/daemon/RelatedItemLineMarkerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,9 @@ public abstract class RelatedItemLineMarkerProvider implements LineMarkerProvide public void collectNavigationMarkers(List elements, Collection result, boolean forNavigation) { - for (PsiElement element : elements) { + //noinspection ForLoopReplaceableByForEach + for (int i = 0, size = elements.size(); i < size; i++) { + PsiElement element = elements.get(i); collectNavigationMarkers(element, result); if (forNavigation && element instanceof PsiNameIdentifierOwner) { PsiElement nameIdentifier = ((PsiNameIdentifierOwner)element).getNameIdentifier();