private void _CmdUser_TriggerBuild()
 {
     try
     {
         var prolog = new PrologEngine(persistentCommandHistory: false);
         prolog.ConsultFromString(CodeDocument.Text);
         prolog.GetFirstSolution(CodeDocumentQuery.Text);
         MyConsole.WriteLine("----------------------");
         foreach (var sol in prolog.GetEnumerator())
         {
             var errorInfo = MyPrologUtils.TryToGetErrorFromPrologSolution(sol);
             if (errorInfo != null)
             {
                 CurErrorMessage = errorInfo.Message;
                 var errorLine = CodeDocumentQuery.GetLineByNumber(1);
                 CurErrorWordHighlightQuery = new WordHighlight(errorLine.Offset, errorLine.Length);
                 break;
             }
             var stringified = sol.VarValuesIterator.Select(val => $"{val.Name}:{val.Value}").StringJoin(", ");
             MyConsole.WriteLine(stringified);
         }
     }
     catch (Exception ex)
     {
         var errorInfo = MyPrologUtils.TryToGetErrorFromException(ex);
         if (errorInfo.Line != null)
         {
             var errorLine = CodeDocument.GetLineByNumber(errorInfo.Line.Value);
             CurErrorWordHighlight = new WordHighlight(errorLine.Offset, errorLine.Length);
         }
         CurErrorMessage = errorInfo.Message;
     }
 }