Beispiel #1
0
 // 计算函数参数提示
 public void ReCalcSignature(ALanguageSignature signature, int offset)
 {
     if (m_view.Properties.TryGetProperty(nameof(ALanguageServer), out ALanguageServer server))
     {
         server.AddTask(() => server.ReCalcSignature(m_full_path, signature, offset));
     }
 }
 public void ReCalcSignature(string full_path, ALanguageSignature signature, int offset)
 {
     if (!m_views.TryGetValue(full_path, out ViewItem view_item))
     {
         return;
     }
     view_item.ReCalcSignature(signature, offset);
 }
Beispiel #3
0
        // 计算参数提示位置
        public void ReCalcSignature(ALanguageSignature signature, int offset)
        {
            var element = GetException(offset);

            if (element == null)
            {
                return;
            }

            int index = m_factory.ReCalcSignature(element, offset);

            Application.Current.Dispatcher.Invoke(() =>
            {
                if (m_view.Properties.TryGetProperty(nameof(ALanguageSignature), out ALanguageSignature o) &&
                    signature == o)
                {
                    signature.ReCalcCurParam(index);
                }
            });
        }