Пример #1
0
 public void AddError(TaskError aError)
 {
     if (!String.IsNullOrWhiteSpace(aError.Message))
     {
         mErrorWindow.AddError(aError);
     }
 }
Пример #2
0
 public void AddError(TaskError aError)
 {
     if (!String.IsNullOrWhiteSpace(aError.Description))
     {
         mErrorWindow.AddError(aError);
     }
 }
Пример #3
0
        public bool FindErrors(string aMessages, out TaskError aError)
        {
            Regex regex       = new Regex(kCompileErrorsRegex);
            Match matchResult = regex.Match(aMessages);

            aError = null;
            if (!matchResult.Success)
            {
                return(false);
            }

            var    groups  = matchResult.Groups;
            string message = groups[9].Value;

            if (string.IsNullOrWhiteSpace(message))
            {
                return(false);
            }

            string path = groups[1].Value;

            int.TryParse(groups[3].Value, out int line);
            string category = groups[7].Value;

            CategoryAndFullMessageBuilder(category, message, path, line,
                                          out TaskErrorCategory errorCategory, out string fullMessage);

            message = message.Insert(0, ErrorParserConstants.kClangTag);
            aError  = new TaskError(path, fullMessage, message, line, errorCategory);
            return(true);
        }
Пример #4
0
        public void AddError(TaskError aError)
        {
            DispatcherHandler.BeginInvoke(() =>
            {
                mErrorWindow.SuspendRefresh();

                if (!String.IsNullOrWhiteSpace(aError.Description))
                {
                    mErrorWindow.AddError(aError);
                }

                mErrorWindow.Show();
                mErrorWindow.ResumeRefresh();
            });
        }
        private void AddTask(TaskError aError)
        {
            ErrorTask errorTask = new ErrorTask
            {
                ErrorCategory = aError.Category,
                Document      = aError.FilePath,
                Text          = aError.Description,
                Line          = aError.Line - 1,
                Category      = TaskCategory.BuildCompile,
                Priority      = TaskPriority.High
            };

            errorTask.Navigate += ErrorTaskNavigate;
            mErrorProvider.Tasks.Add(errorTask);
        }
Пример #6
0
        public void AddError(TaskError aError)
        {
            UIUpdater.Invoke(() =>
            {
                mErrorWindow.SuspendRefresh();

                if (!String.IsNullOrWhiteSpace(aError.Description))
                {
                    mErrorWindow.AddError(aError);
                }

                mErrorWindow.Show();
                mErrorWindow.ResumeRefresh();
            });
        }
Пример #7
0
        public bool FindErrors(string aMessages, out TaskError aError)
        {
            Regex regex       = new Regex(kErrorMessageRegex);
            Match matchResult = regex.Match(aMessages);

            aError = null;

            if (!matchResult.Success)
            {
                return(false);
            }

            var    groups             = matchResult.Groups;
            string messageDescription = groups[9].Value;

            if (string.IsNullOrWhiteSpace(messageDescription))
            {
                return(false);
            }

            string path = groups[1].Value;

            int.TryParse(groups[3].Value, out int line);
            int.TryParse(groups[5].Value, out int column);

            string            categoryAsString = groups[7].Value;
            TaskErrorCategory category         = FindErrorCategory(ref categoryAsString);

            string clangTidyChecker = groups[10].Value;

            string fullMessage = CreateFullErrorMessage(path, line, categoryAsString, clangTidyChecker, messageDescription);

            messageDescription = messageDescription.Insert(0, ErrorParserConstants.kClangTag); // Add clang prefix for error list
            aError             = new TaskError(path, line, column, category, messageDescription, fullMessage);

            return(true);
        }
Пример #8
0
 public void AddError(TaskError aError) => AddTask(aError);