public void Write(ProtoCore.OutputMessage message) { if (null == message) { return; } #if DEBUG if (string.IsNullOrEmpty(message.FilePath)) { // Type: Message string formatWithoutFile = "{0}: {1}"; System.Console.WriteLine(string.Format(formatWithoutFile, message.Type.ToString(), message.Message)); } else { // Type: Message (File - Line, Column) string formatWithFile = "{0}: {1} ({2} - line: {3}, col: {4})"; System.Console.WriteLine(string.Format(formatWithFile, message.Type.ToString(), message.Message, message.FilePath, message.Line, message.Column)); } #endif if (message.Type == ProtoCore.OutputMessage.MessageType.Warning) { message.Continue = true; } }
internal void DisplayPossibleErrors() { if (outputMessages.Count > 0) { ProtoCore.OutputMessage message = outputMessages[0]; string display = string.Format("Line {0}, Column {1}: {2}", message.Line, message.Column, message.Message); textEditorControl.DisplayStatusMessage(StatusTypes.Info, display, 6); } else { textEditorControl.HideStatusMessage(); } }
public void Write(ProtoCore.OutputMessage message) { if (null == message) { return; } if (string.IsNullOrEmpty(message.FilePath)) { // Type: Message string formatWithoutFile = "{0}: {1}"; //System.IO.StreamWriter logFile = new System.IO.StreamWriter("c:\\test.txt"); if (null != compileState.ExecutionLog) { compileState.ExecutionLog.WriteLine(string.Format(formatWithoutFile, message.Type.ToString(), message.Message)); } //logFile.Close(); // System.Console.WriteLine(string.Format(formatWithoutFile, // message.Type.ToString(), message.Message)); } else { // Type: Message (File - Line, Column) if (null != compileState.ExecutionLog) { string formatWithFile = "{0}: {1} ({2} - line: {3}, col: {4})"; compileState.ExecutionLog.WriteLine(string.Format(formatWithFile, message.Type.ToString(), message.Message, message.FilePath, message.Line, message.Column)); } //System.Console.WriteLine(string.Format(formatWithFile, // message.Type.ToString(), message.Message, // message.FilePath, message.Line, message.Column)); } if (message.Type == ProtoCore.OutputMessage.MessageType.Warning) { message.Continue = true; } }
public void Write(ProtoCore.OutputMessage message) { outputMessages.Add(message); }