Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
end
end
+redef class CmdEntityLink
+ redef fun to_json do
+ var obj = new JsonObject
+ var text = self.text
+ if text != null then obj["text"] = text
+ var title = self.title
+ if title != null then obj["title"] = title
+ return obj
+ end
+end
+
redef class CmdEntityCode
redef fun to_json do
var obj = new JsonObject
print_json cmd.to_json
end
+ fun test_cmd_link is test do
+ var cmd = new CmdEntityLink(test_view, mentity_name = "test_prog::Character")
+ cmd.init_command
+ print_json cmd.to_json
+ end
+
# CmdInheritance
fun test_cmd_parents is test do
--- /dev/null
+{
+ "text": "Character",
+ "title": "Characters can be played by both the human or the machine."
+}