ide: Improved error handling for MSC

git-svn-id: svn://ultimatepp.org/upp/trunk@7452 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-06-17 08:07:43 +00:00
parent 0091ad896f
commit f0dfb73e21
2 changed files with 8 additions and 8 deletions

View file

@ -5,7 +5,7 @@ bool Ide::FindLineError(const String& ln, FindLineErrorCache& cache, ErrorInfo&
VectorMap<String, String> bm = GetMethodVars(method);
bool is_java = (bm.Get("BUILDER", Null) == "JDK");
const char *s = ln;
f.kind = ln.Find("error:", 0) > 0 ? 1 : (ln.Find("warning:", 0) > 0 ? 2 : ln.Find("note:") > 0 ? 3 : 4);
f.kind = ln.Find("error", 0) > 0 ? 1 : (ln.Find("warning", 0) > 0 ? 2 : ln.Find("note") > 0 ? 3 : 4);
while(*s == ' ' || *s == '\t')
s++;
for(; s < ln.End(); s++) {
@ -260,17 +260,17 @@ void Ide::ConsoleLine(const String& line)
if(FindLineError(line, error_cache, f)) {
int cnt = error.GetCount();
Value rf = RawToValue(f);
if(f.kind == 3 && cnt) {
ValueArray n = error.Get(cnt - 1, "NOTES");
n.Add(rf);
error.Set(cnt - 1, "NOTES", n);
}
else
if(findarg(f.kind, 1, 2) >= 0 || cnt == 0)
error.Add(GetFileName(f.file), f.lineno,
AttrText(f.message)
.NormalPaper(HighlightSetup::GetHlStyle(f.kind == 1 ? HighlightSetup::PAPER_ERROR
: HighlightSetup::PAPER_WARNING).color),
rf);
else {
ValueArray n = error.Get(cnt - 1, "NOTES");
n.Add(rf);
error.Set(cnt - 1, "NOTES", n);
}
}
}

View file

@ -309,7 +309,7 @@ void SetupError(ArrayCtrl& error, const char *s)
error.AddColumn("Line");
error.AddColumn(s);
error.AddIndex("INFO");
error.ColumnWidths("150 119 800");
error.ColumnWidths("200 119 800");
error.NoWantFocus();
}