Пример #1
0
 LocationContainerImpl CommonImplementationsOfGoto(long hidemaruLine, long hidemaruColumn, InvokeWorker invoke, bool useContentsOfLine)
 {
     try
     {
         var absFileName = FileProc();
         if (String.IsNullOrEmpty(absFileName))
         {
             return(null);
         }
         long line, character;
         Hidemaru.HidemaruToZeroBase(out line, out character, hidemaruLine, hidemaruColumn);
         var locations = invoke(absFileName, line, character);
         List <LocationContainerImpl.WithContent> contents;
         if (useContentsOfLine)
         {
             contents = ConvertLocationsWidthContent(locations);
         }
         else
         {
             contents = ConvertLocations(locations);
         }
         return(new LocationContainerImpl(contents));
     }
     catch (Exception e)
     {
         logger_.Error(e.ToString());
     }
     return(null);
 }
Пример #2
0
 internal string Hover(long hidemaruLine, long hidemaruColumn)
 {
     try {
         if (context_.worker == null)
         {
             return("");
         }
         var absFileName = FileProc();
         if (String.IsNullOrEmpty(absFileName))
         {
             return("");
         }
         long line, character;
         Hidemaru.HidemaruToZeroBase(out line, out character, hidemaruLine, hidemaruColumn);
         var hover = context_.worker.Hover(absFileName, line, character);
         if (hover == null)
         {
             return("");
         }
         return(hover.contents.value);
     }
     catch (Exception e)
     {
         HmOutputPane.OutputW(Hidemaru.Hidemaru_GetCurrentWindowHandle(), e.ToString());
         logger_.Error(e.ToString());
     }
     return("");
 }
Пример #3
0
 /// <summary>
 /// textDocument/completion
 /// </summary>
 /// <param name="absFilename"></param>
 /// <param name="hidemaruLine"></param>
 /// <param name="hidemaruColumn"></param>
 /// <returns>一時的な辞書ファイル名(ファイルはCOM側で一定時間後に削除します)</returns>
 public string Completion(long hidemaruLine, long hidemaruColumn)
 {
     if (context_.worker == null)
     {
         return("");
     }
     try
     {
         var absFileName = FileProc();
         if (String.IsNullOrEmpty(absFileName))
         {
             return("");
         }
         long line, character;
         Hidemaru.HidemaruToZeroBase(out line, out character, hidemaruLine, hidemaruColumn);
         return(context_.worker.Completion(absFileName, line, character));
     }
     catch (Exception e)
     {
         HmOutputPane.OutputW(Hidemaru.Hidemaru_GetCurrentWindowHandle(), e.ToString());
         logger_.Error(e.ToString());
     }
     return("");
 }