From a55e50525c7d6dc57bc616a465cf3153c08ed244 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Mon, 13 May 2013 16:03:39 +0400 Subject: [PATCH] Renamed deepCodeAnalysis() context to deepCodeInsight() --- .../python/psi/types/TypeEvalContext.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java b/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java index 1301b7e655b4..773651e5e590 100644 --- a/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java +++ b/python/psi-api/src/com/jetbrains/python/psi/types/TypeEvalContext.java @@ -62,18 +62,11 @@ public class TypeEvalContext { return new TypeEvalContext(true, true, null); } - /** - * Create a type evaluation context for deeper and slower code analysis. - * - * Should be used only when normal analysis context is not enough for getting good results. - */ - public static TypeEvalContext deepCodeAnalysis() { - return new TypeEvalContext(false, true, null); - } - /** * Create a type evaluation context for performing analysis operations on the specified file which is currently open in the editor, * without accessing stubs. For such a file, additional slow operations are allowed. + * + * Inspections should not create a new type evaluation context. They should re-use the context of the inspection session. */ public static TypeEvalContext codeAnalysis(@Nullable PsiFile origin) { return new TypeEvalContext(false, false, origin); @@ -87,7 +80,16 @@ public class TypeEvalContext { public static TypeEvalContext codeInsightFallback() { return new TypeEvalContext(false, false, null); } - + + /** + * Create a type evaluation context for deeper and slower code insight. + * + * Should be used only when normal code insight context is not enough for getting good results. + */ + public static TypeEvalContext deepCodeInsight() { + return new TypeEvalContext(false, true, null); + } + public TypeEvalContext withTracing() { if (myTrace == null) { myTrace = new ArrayList();