From 5ee38daf37617725386defcd8069f0ddf88f58f7 Mon Sep 17 00:00:00 2001 From: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Sun, 19 Oct 2025 19:34:36 +0300 Subject: [PATCH] Revert description refreshing for generic function instances (#3348) * Revert description refreshing for generic function instances * Add assigning original function description for generic function instances --- CodeCompletion/DomConverter.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CodeCompletion/DomConverter.cs b/CodeCompletion/DomConverter.cs index 65d00821f..a35848766 100644 --- a/CodeCompletion/DomConverter.cs +++ b/CodeCompletion/DomConverter.cs @@ -1018,10 +1018,22 @@ namespace CodeCompletion { // в случае операции преобразования типа эта ветка срабатывает if (ss is ElementScope && string.IsNullOrEmpty(ss.si.description) && (ss as ElementScope).sc is TypeScope) + { ss.si.description = (ss as ElementScope).sc.Description; + } + // к сожалению, при текущей реализации обновлять описание для инстансов функций не представляется возможным + // описания типов аргументов составляются неправильно + // обновляем описание для исходной функции EVA + else if (ss is ProcScope procScope && procScope.original_function != null) + { + // обновление описания + ss = procScope.original_function.WithRefreshedDescription(); + } else + { // обновление описания ss = ss.WithRefreshedDescription(); + } try { @@ -1060,11 +1072,11 @@ namespace CodeCompletion } } catch (Exception e) - { + { #if DEBUG - File.AppendAllText("log.txt", e.Message + Environment.NewLine + e.StackTrace + Environment.NewLine); + File.AppendAllText("log.txt", e.Message + Environment.NewLine + e.StackTrace + Environment.NewLine); #endif - } + } RestoreCurrentUsedAssemblies(); string description = ss.si.description; if (description != null)