2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# Gee.HashMap<string,Gtk.TreeListRow>? rows" : "null",
7 "# Xcls_MainWindow window" : "",
9 "* ctor" : "new Gtk.Popover()",
10 "Gtk.PositionType position" : "Gtk.PositionType.TOP",
11 "bool autohide" : true,
12 "bool loaded" : false,
13 "id" : "ValaCompileErrors",
14 "int height_request" : 800,
15 "int width_request" : 900,
19 "* pack" : "set_child",
20 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
21 "bool hexpand" : false,
22 "gboolean homogeneous" : false,
23 "id" : "compile_view",
29 " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
38 "* pack" : "set_child",
39 "bool hexpand" : true,
40 "bool vexpand" : true,
56 "new Gtk.TreeListModel(",
57 " new GLib.ListStore(typeof(Palete.CompileError)), //..... << that's our store..",
58 " false, // passthru",
59 " false, // autexpand",
63 " \t return ((Palete.CompileError)item).lines;",
72 "xtype" : "TreeListModel"
84 "* prop" : "expression",
85 "GLib.Type this_type" : "typeof(Palete.CompileError)",
86 "string property_name" : "linemsg",
87 "xtype" : "PropertyExpression"
90 "xtype" : "StringSorter"
93 "xtype" : "TreeListRowSorter"
96 "xtype" : "SortListModel",
97 "| Json.Object getNodeAt" : [
100 " var tr = (Gtk.TreeListRow)this.el.get_item(row);",
103 " // GLib.debug(\"get_item (2) = %s\", a.get_type().name());",
106 " return (Json.Object)tr.get_item();",
112 "xtype" : "SingleSelection",
113 "| Json.Object getNodeAt" : [
116 " var tr = (Gtk.TreeListRow)this.el.get_item(row);",
118 " var a = tr.get_item();; ",
119 " GLib.debug(\"get_item (2) = %s\", a.get_type().name());",
121 " return (Json.Object)tr.get_item();",
128 "* pack" : "append_column",
129 "bool expand" : true,
130 "bool resizable" : true,
134 "* prop" : "factory",
138 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
142 "\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
143 "\tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
146 "\tvar lbl = (Gtk.Label) expand.child;",
148 "\t if (lbl.label != \"\") { // do not update",
153 "\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
154 "\tvar np = (Palete.CompileError) lr.get_item();",
156 "\tif (np.diag == null) {",
157 "\t\t_this.rows.set(np.file.path, lr);",
162 "\t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
163 "\tlbl.label = np.linemsg;",
164 "\t//lbl.tooltip_markup = np.to_property_option_tooltip();",
166 " expand.set_hide_expander( np.lines.n_items < 1);",
167 "\texpand.set_list_row(lr);",
169 " \t// expand current file.",
170 " \t// this causes problems? - critical errors?",
171 " \t// maybe do it on show",
172 " \t//if (_this.window.windowstate.file.path == np.file.path &&",
173 " \t//\tnp.line < 0) {",
174 " \t//\tlr.expanded = true;",
178 " \t// bind image...",
186 "\tvar expand = new Gtk.TreeExpander();",
188 "\texpand.set_indent_for_depth(true);",
189 "\texpand.set_indent_for_icon(true);",
191 "\tvar lbl = new Gtk.Label(\"\");",
192 "\tlbl.use_markup = true;",
195 " \tlbl.justify = Gtk.Justification.LEFT;",
196 " \tlbl.xalign = 0;",
199 "\texpand.set_child(lbl);",
200 "\t((Gtk.ListItem)listitem).set_child(expand);",
201 "\t((Gtk.ListItem)listitem).activatable = false;",
206 "xtype" : "SignalListItemFactory"
209 "string title" : "Compile Result",
210 "xtype" : "ColumnViewColumn"
216 "(n_press, x, y) => {",
218 "\tif (n_press < 2) { /// doubleclick?",
224 "\t// use selection?!",
225 "\tvar tr = (Gtk.TreeListRow)_this.selmodel.el.selected_item;",
226 "\t//GLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
227 "\tvar ce = (Palete.CompileError) tr.item;",
229 "\tif (ce.line < 0) {",
230 "\t\t// did not click on a line.",
235 " var fname = ce.file;",
236 " \tvar line = ce.line; ",
237 " GLib.debug(\"open %s @ %d\\n\", ce.file.path, ce.line);",
242 " var regex = new Regex(\"\\\\.vala$\");",
245 " bjsf = regex.replace(fname.path,fname.path.length , 0 , \".bjs\");",
246 " } catch (GLib.RegexError e) {",
249 " var p = _this.window.project;",
253 " var jsr = p.getByPath(bjsf);",
254 " if (jsr != null) {",
255 " _this.window.windowstate.fileViewOpen(jsr, true, line);",
257 " if (jsr.path == _this.window.windowstate.file.path) {",
260 " \t_this.el.hide();",
266 "\tvar pf = p.getByPath(fname.path);",
267 "\t_this.el.hide();",
268 "\t_this.window.windowstate.fileViewOpen(pf, true, line);",
276 "xtype" : "GestureClick"
279 "xtype" : "ColumnView"
282 "xtype" : "ScrolledWindow"
291 "\tGLib.debug(\"errors : show\");",
293 "\tif (_this.model.el.get_n_items() < 1) {",
295 " \t GLib.debug(\"errors : none available\");",
299 " var win = this.window.el;",
300 " var w = win.get_width();",
301 " var h = win.get_height();",
304 " // left tree = 250, editor area = 500?",
307 " var new_w = int.min(650, w-100);",
308 " if (new_w > (w-100)) {",
311 " GLib.debug(\"set size\");",
312 " this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));",
316 "\tGLib.debug(\"call popup\");",
318 " if (this.rows.has_key(this.window.windowstate.file.path)) {",
319 " \tthis.rows.get(this.window.windowstate.file.path).expanded = true;",
324 "| void updateNotices" : [
325 "( GLib.ListStore? ls) {",
326 "\t//GLib.debug(\"errors : update\");",
327 " if (ls == null || ls.get_n_items() < 1) {",
328 " \t// GLib.debug(\"errors : none available\");",
332 "\t//GLib.debug(\"Loading list into tree\");",
333 "\tthis.tree.el.hide();",
334 "\tvar tm = new Gtk.TreeListModel(",
335 "\t\tls, //..... << that's our store..",
336 "\t\tfalse, // passthru",
337 "\t\tfalse, // autexpand",
340 "\t\t\t return ((Palete.CompileError)item).lines;",
345 "\tthis.rows = new Gee.HashMap<string,Gtk.TreeListRow>();",
346 "\t_this.model.el = tm;",
347 "\t_this.sortmodel.el.set_model(tm);",
348 "\t this.tree.el.show();",
349 "\t if (this.rows.has_key(this.window.windowstate.file.path)) {",
350 " \tthis.rows.get(this.window.windowstate.file.path).expanded = true;",
356 "name" : "ValaCompileErrors"