From e9f915e1a6613ca9cfd07f85362dc075c6012fdd Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 8 Apr 2015 12:22:11 +0700 Subject: [PATCH] highlight: add infoboxes with messages Signed-off-by: Jean Privat --- src/highlight.nit | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 1.7.9.5