override public void Process(IDE ide) { //Right now we just print out the build errors and the completions // Ulitimately, we'll need to parse this (on the Euclid side) and display the information to the user somehow. // But I'm not really sure where to put the build errors in our IDE. // And I'm not sure how I want to implement the drop-down menu for the code completion. //In any event, we are fetching the info we need. We just need to massage it and display. /* * string messages = eclipse.JavaSrcUpdateString(short_file_name,project_name); * Debug.Log(messages); * * int cursor = ide.GetCursorPosition(); * * string completions=eclipse.JavaCompleteString(short_file_name,project_name,cursor); * Debug.Log(completions); */ javaCompile(); ide.setErrorMessage(noviceClean(current_error)); ide.clearStyles(); string pat = @":([0-9]+)"; // Instantiate the regular expression object. Regex r = new Regex(pat); // Match the regular expression pattern against a text string. Match m = r.Match(current_error); int matchCount = 0; while (m.Success) { Capture c = m.Groups[1].Captures[0]; int line_num = int.Parse(c.ToString()); ide.addStyle(line_num - 1, "error"); m = m.NextMatch(); } }
public override void Process(IDE ide) { //Right now we just print out the build errors and the completions // Ulitimately, we'll need to parse this (on the Euclid side) and display the information to the user somehow. // But I'm not really sure where to put the build errors in our IDE. // And I'm not sure how I want to implement the drop-down menu for the code completion. //In any event, we are fetching the info we need. We just need to massage it and display. /* string messages = eclipse.JavaSrcUpdateString(short_file_name,project_name); Debug.Log(messages); int cursor = ide.GetCursorPosition(); string completions=eclipse.JavaCompleteString(short_file_name,project_name,cursor); Debug.Log(completions); */ javaCompile(); ide.setErrorMessage(noviceClean(current_error)); ide.clearStyles(); string pat = @":([0-9]+)"; // Instantiate the regular expression object. Regex r = new Regex(pat); // Match the regular expression pattern against a text string. Match m = r.Match(current_error); int matchCount = 0; while (m.Success) { Capture c = m.Groups[1].Captures[0]; int line_num = int.Parse(c.ToString()); ide.addStyle(line_num - 1, "error"); m = m.NextMatch(); } }