From f303b6dae5c7ebbd4b6afb387ddfd7601b39cf57 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Thu, 26 Dec 2013 17:28:11 +0400 Subject: [PATCH] Reference shortening: simplified code for getting resolve session --- .../jet/plugin/codeInsight/ShortenReferences.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/codeInsight/ShortenReferences.kt b/idea/src/org/jetbrains/jet/plugin/codeInsight/ShortenReferences.kt index 4914a549d6a..d333dff1818 100644 --- a/idea/src/org/jetbrains/jet/plugin/codeInsight/ShortenReferences.kt +++ b/idea/src/org/jetbrains/jet/plugin/codeInsight/ShortenReferences.kt @@ -31,16 +31,8 @@ public object ShortenReferences { } private class Visitor(val file: JetFile) : JetVisitorVoid() { - private var modificationCount = file.getManager()!!.getModificationTracker().getModificationCount() - private val resolveSession : CancelableResolveSession = AnalyzerFacadeWithCache.getLazyResolveSessionForFile(file) - get(){ - val currentModificationCount = file.getManager()!!.getModificationTracker().getModificationCount() - if (currentModificationCount != modificationCount) { - $resolveSession = AnalyzerFacadeWithCache.getLazyResolveSessionForFile(file) - modificationCount = currentModificationCount - } - return $resolveSession - } + private val resolveSession : CancelableResolveSession + get() = AnalyzerFacadeWithCache.getLazyResolveSessionForFile(file) override fun visitJetElement(element : JetElement) { acceptChildren(element)