From: Jean Privat Date: Wed, 8 Apr 2015 05:22:11 +0000 (+0700) Subject: highlight: add infoboxes with messages X-Git-Tag: v0.7.4~34^2~3 X-Git-Url: http://nitlanguage.org highlight: add infoboxes with messages Signed-off-by: Jean Privat --- diff --git a/src/highlight.nit b/src/highlight.nit index 2017ae7..d48f0f4 100644 --- a/src/highlight.nit +++ b/src/highlight.nit @@ -71,6 +71,17 @@ class HighlightVisitor end end end + var messages = anode.location.messages + if messages != null then + tag.css("border-bottom", "solid 2px red") + if infobox == null then + infobox = new HInfoBox(hv, "Messages") + end + var c = infobox.new_dropdown("{messages.length} message(s)", "") + for m in messages do + c.open("li").append(m.text) + end + end if infobox != null then tag.attach_infobox(infobox) end @@ -645,6 +656,7 @@ redef class AStdClassdef end redef fun decorate_tag(v, res, token) do + if not token isa TClassid then return null res.add_class("nc_def") var md = mclassdef