private string getText(CacheBuildMessage message) { if (File.Exists(Path.Combine(Path.GetDirectoryName(message.Project), message.BuildItem.File))) { return string.Format( "Project: {0}{6}{6}" + "File: {4}{1}:line {2}{5}{6}{6}" + "Message:{6}{3}", message.Project, message.BuildItem.File, message.BuildItem.LineNumber, message.BuildItem.ErrorMessage, LinkParser.TAG_START, LinkParser.TAG_END, Environment.NewLine); } else { return string.Format( "Project: {0}{4}" + "File: {1}:line {2}{4}" + "Message:{4}{3}", message.Project, message.BuildItem.File, message.BuildItem.LineNumber, message.BuildItem.ErrorMessage, Environment.NewLine); } }
private void onBuildMessage(CacheBuildMessage cacheBuildMessage, bool isRunning) { if (isRunning) displayAndOrder(new string[] { _control.linkLabelErrorDescription.Name, _control.linkLabelCancelRun.Name }); else displayAndOrder(new string[] { _control.linkLabelErrorDescription.Name }); }
public void SetDataFrom(BinaryReader reader) { _errorsToAdd = new List<CacheBuildMessage>(); _errorsToRemove = new List<CacheBuildMessage>(); _warningsToAdd = new List<CacheBuildMessage>(); _warningsToRemove = new List<CacheBuildMessage>(); _failedToAdd = new List<CacheTestMessage>(); _ignoredToAdd = new List<CacheTestMessage>(); _testsToRemove = new List<CacheTestMessage>(); var errors = reader.ReadInt32(); for (int i = 0; i < errors; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _errorsToAdd.Add(message); } errors = reader.ReadInt32(); for (int i = 0; i < errors; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _errorsToRemove.Add(message); } var warnings = reader.ReadInt32(); for (var i = 0; i < warnings; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _warningsToAdd.Add(message); } warnings = reader.ReadInt32(); for (var i = 0; i < warnings; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _warningsToRemove.Add(message); } var failed = reader.ReadInt32(); for (var i = 0; i < failed; i++) { var result = new CacheTestMessage("", null); result.SetDataFrom(reader); _failedToAdd.Add(result); } var ignored = reader.ReadInt32(); for (var i = 0; i < ignored; i++) { var result = new CacheTestMessage("", null); result.SetDataFrom(reader); _ignoredToAdd.Add(result); } ignored = reader.ReadInt32(); for (var i = 0; i < ignored; i++) { var result = new CacheTestMessage("", null); result.SetDataFrom(reader); _testsToRemove.Add(result); } }
public DetailBuilder(CacheBuildMessage message) { Text = getText(message); Links = getLinks(); }
public void AddWarning(CacheBuildMessage warning) { _warningsToAdd.Add(warning); }
public void RemoveWarning(CacheBuildMessage warning) { _warningsToRemove.Add(warning); }
public void AddError(CacheBuildMessage error) { _errorsToAdd.Add(error); }
private void onBuildMessage(CacheBuildMessage cacheBuildMessage) { displayAndOrder(new string[] { _control.linkLabelErrorDescription.Name }); //displayAndOrder(new string[] { _control.linkLabelErrorDescription.Name, _control.linkLabelSystemMessages.Name }); }
public void RemoveWarning(CacheBuildMessage warning) { _warningsToRemove.Add(warning); }
public void SetDataFrom(BinaryReader reader) { _errorsToAdd = new List <CacheBuildMessage>(); _errorsToRemove = new List <CacheBuildMessage>(); _warningsToAdd = new List <CacheBuildMessage>(); _warningsToRemove = new List <CacheBuildMessage>(); _failedToAdd = new List <CacheTestMessage>(); _ignoredToAdd = new List <CacheTestMessage>(); _testsToRemove = new List <CacheTestMessage>(); var errors = reader.ReadInt32(); for (int i = 0; i < errors; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _errorsToAdd.Add(message); } errors = reader.ReadInt32(); for (int i = 0; i < errors; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _errorsToRemove.Add(message); } var warnings = reader.ReadInt32(); for (var i = 0; i < warnings; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _warningsToAdd.Add(message); } warnings = reader.ReadInt32(); for (var i = 0; i < warnings; i++) { var message = new CacheBuildMessage("", null); message.SetDataFrom(reader); _warningsToRemove.Add(message); } var failed = reader.ReadInt32(); for (var i = 0; i < failed; i++) { var result = new CacheTestMessage("", null); result.SetDataFrom(reader); _failedToAdd.Add(result); } var ignored = reader.ReadInt32(); for (var i = 0; i < ignored; i++) { var result = new CacheTestMessage("", null); result.SetDataFrom(reader); _ignoredToAdd.Add(result); } ignored = reader.ReadInt32(); for (var i = 0; i < ignored; i++) { var result = new CacheTestMessage("", null); result.SetDataFrom(reader); _testsToRemove.Add(result); } }
public void AddWarning(CacheBuildMessage warning) { _warningsToAdd.Add(warning); }
public void RemoveError(CacheBuildMessage error) { _errorsToRemove.Add(error); }
public void AddError(CacheBuildMessage error) { _errorsToAdd.Add(error); }
private string formatBuildResult(CacheBuildMessage item) { return string.Format("{0}, {1}", item.BuildItem.ErrorMessage, item.BuildItem.File); }
public void RemoveError(CacheBuildMessage error) { _errorsToRemove.Add(error); }
private void goToBuildItemReference(CacheBuildMessage buildItem) { goToReference(buildItem.BuildItem.File, buildItem.BuildItem.LineNumber, buildItem.BuildItem.LinePosition); }
private void parseLine(string line) { if (line.Contains("------ Build started: Project:")) getProject(line); if (line.StartsWith("Compile complete --")) _currentWasCompiled = true; if (line.StartsWith(string.Format(" {0} -> ", _currentProjectID))) _currentAssembly = getAssembly(line); string id = null; if (line.Contains(": error")) id = ": error"; if (line.StartsWith("fatal error")) id = "fatal error"; if (line.Contains(": warning")) id = ": warning"; if (id == null) return; var fileRaw = line.Substring(0, line.IndexOf(id)); string file = ""; int lineNumber = 0; int column = 0; if (fileRaw.IndexOf("(") != -1) { file = fileRaw.Substring(0, fileRaw.IndexOf("(")); var locationRaw = fileRaw.Substring(fileRaw.IndexOf("(") + 1, fileRaw.IndexOf(")") - (fileRaw.IndexOf("(") + 1)); var location = locationRaw.Split(new char[] { ',' }); lineNumber = int.Parse(location[0]); column = int.Parse(location[1]); } var message = line.Substring(line.IndexOf(id) + id.Length, line.Length - (line.IndexOf(id) + id.Length)).Trim(); var cacheMsg = new CacheBuildMessage(_currentProject, new Messages.BuildMessage() { File = file, LineNumber = lineNumber, LinePosition = column, ErrorMessage = message }); if (id == ": error") { if (_currentErrors.Count(x => x.Equals(cacheMsg)) == 0) _currentErrors.Add(cacheMsg); } else { if (_currentWarnings.Count(x => x.Equals(cacheMsg)) == 0) _currentWarnings.Add(cacheMsg); } }