private void GoToSelectedTask() { CommentTask task = this.SelectedTask; if (task != null) { task.GoToComment(); } }
private void CopyComment_Click(object sender, RoutedEventArgs e) { CommentTask task = this.SelectedTask; if (task != null) { Clipboard.SetText(task.Comment); } }
private void CopyTask_Click(object sender, RoutedEventArgs e) { CommentTask task = this.SelectedTask; if (task != null) { StringBuilder sb = new StringBuilder(); sb.AppendLine(task.Comment); sb.Append(task.Priority).AppendLine(); sb.AppendLine(task.FilePath); sb.Append(task.Line).AppendLine(); sb.AppendLine(task.Project); Clipboard.SetText(sb.ToString()); } }
private IList <CommentTask> GetNewCommentTasks() { var tokenRegexList = this.provider.BackgroundTokens .Select(token => new { Token = token, Regexes = this.scanInfo.GetTokenRegexes(token).ToList() }); List <CommentTask> result = null; int lineNumber = 0; foreach (string line in this.GetLines()) { lineNumber++; if (!string.IsNullOrEmpty(line)) { foreach (var tokenRegex in tokenRegexList) { foreach (Regex regex in tokenRegex.Regexes) { MatchCollection matches = regex.Matches(line); foreach (Match match in matches) { CommentTask task = new CommentTask( this.provider, tokenRegex.Token.Priority, this.ProjectNames, this.ExactCaseFileName, lineNumber, match.Groups[ScanInfo.RegexCommentGroupName].Value.Trim()); if (result == null) { result = new List <CommentTask>(); } result.Add(task); } } } } } return(result); }