src/Builder4/config1.builder
[app.Builder.js] / src / Builder4 / ValaCompileErrors.bjs
1 {
2  "name" : "ValaCompileErrors",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/ValaCompileErrors.bjs",
6  "permname" : "",
7  "modOrder" : "",
8  "build_module" : "builder",
9  "items" : [
10   {
11    "| void loadErrors" : "(Json.Object tree) {\n   Gtk.TreeIter piter;\n    //print(\"looking for %s\\n\", id);\n    // loop through parent childnre\n      \n    Gtk.TreeIter iter;\n    Gtk.TreeIter citer;  \n    \n    var store = this.compile_result_store;    \n    \n    store.clear();\n \n    \n    tree.foreach_member((obj, file, node) => {\n        // id line \"display text\", file\n        \n        var title = GLib.Path.get_basename( file) ;\n        \n        store.append(out iter, null);\n        store.set(iter, 0, file, 1, 0, 2, title, 3, file,-1);\n        var lines = tree.get_object_member(file);\n        lines.foreach_member((obja, line, nodea) => {\n            var msg  = \"\";\n            var ar = lines.get_array_member(line);\n            for (var i = 0 ; i < ar.get_length(); i++) {\n\t\t    msg += (msg.length > 0) ? \"\\n\" : \"\";\n\t\t    msg += ar.get_string_element(i);\n\t    }\n            store.append(out citer, iter);\n            store.set(iter, \n                0, file + \":\" + line, \n                1, int.parse(line), \n                2, GLib.Markup.escape_text(line + \": \" + msg), \n                3, file,-1);\n        \n        });\n        \n        \n    \n    });     \n         \n     \n      \n    return   this.el.get_path(iter);\n\n}\n",
12    "id" : "ValaCompileErrors",
13    "xtype" : "Popover",
14    "$ xns" : "Gtk",
15    "items" : [
16     {
17      "id" : "compile_view",
18      "* pack" : "add",
19      "xtype" : "VBox",
20      "gboolean homogeneous" : false,
21      "$ xns" : "Gtk",
22      "items" : [
23       {
24        "xtype" : "HBox",
25        "* pack" : "pack_start,false,false,0",
26        "$ xns" : "Gtk",
27        "items" : [
28         {
29          "* pack" : "pack_start,true,true,0",
30          "xtype" : "Button",
31          "$ xns" : "Gtk",
32          "utf8 label" : "Compile and Run"
33         }
34        ]
35       },
36       {
37        "* pack" : "pack_start,true,true,0",
38        "xtype" : "HPaned",
39        "$ xns" : "Gtk",
40        "items" : [
41         {
42          "* init" : "{\n this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n\n}\n",
43          "xtype" : "ScrolledWindow",
44          "* pack" : "add",
45          "$ xns" : "Gtk",
46          "items" : [
47           {
48            "id" : "compile_tree",
49            "xtype" : "TreeView",
50            "* pack" : "add",
51            "$ xns" : "Gtk",
52            "items" : [
53             {
54              "gint n_columns" : 4,
55              "id" : "compile_result_store",
56              "columns" : "  typeof(string), typeof(int), typeof(string), typeof(string) ",
57              "* pack" : "set_model",
58              "xtype" : "TreeStore",
59              "$ xns" : "Gtk"
60             },
61             {
62              "utf8 title" : "Compile output",
63              "* init" : "{\n  this.el.add_attribute(_this.renderer.el , \"markup\", 2 );\n \n}\n",
64              "xtype" : "TreeViewColumn",
65              "* pack" : "append_column",
66              "string id" : "column",
67              "$ xns" : "Gtk",
68              "items" : [
69               {
70                "id" : "renderer",
71                "* pack" : "pack_start,true",
72                "xtype" : "CellRendererText",
73                "$ xns" : "Gtk"
74               }
75              ]
76             }
77            ]
78           }
79          ]
80         },
81         {
82          "* pack" : "add",
83          "xtype" : "ScrolledWindow",
84          "$ xns" : "Gtk",
85          "items" : [
86           {
87            "gboolean show_line_marks" : true,
88            "* pack" : "add",
89            "xtype" : "SourceView",
90            "$ xns" : "Gtk",
91            "gboolean show_line_numbers" : true,
92            "gboolean editable" : false
93           }
94          ]
95         }
96        ]
97       }
98      ]
99     }
100    ]
101   }
102  ]
103 }