2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# Xcls_MainWindow window" : "",
8 "* ctor" : "new Gtk.Popover()",
9 "Gtk.PositionType position" : "Gtk.PositionType.TOP",
10 "bool autohide" : true,
11 "bool loaded" : false,
12 "id" : "ValaCompileErrors",
13 "int height_request" : 800,
14 "int width_request" : 900,
18 "* pack" : "set_child",
19 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
20 "bool hexpand" : false,
21 "gboolean homogeneous" : false,
22 "id" : "compile_view",
28 " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
37 "* pack" : "set_child",
38 "bool hexpand" : true,
39 "bool vexpand" : true,
55 "new Gtk.TreeListModel(",
56 " new GLib.ListStore(typeof(Palete.CompileError)), //..... << that's our store..",
57 " false, // passthru",
58 " false, // autexpand",
62 " \t return ((Palete.CompileError)item).lines;",
71 "xtype" : "TreeListModel"
83 "* prop" : "expression",
84 "GLib.Type this_type" : "typeof(Palete.CompileError)",
85 "string property_name" : "linemsg",
86 "xtype" : "PropertyExpression"
89 "xtype" : "StringSorter"
92 "xtype" : "TreeListRowSorter"
95 "xtype" : "SortListModel",
96 "| Json.Object getNodeAt" : [
99 " var tr = (Gtk.TreeListRow)this.el.get_item(row);",
102 " // GLib.debug(\"get_item (2) = %s\", a.get_type().name());",
105 " return (Json.Object)tr.get_item();",
111 "xtype" : "SingleSelection",
112 "| Json.Object getNodeAt" : [
115 " var tr = (Gtk.TreeListRow)this.el.get_item(row);",
117 " var a = tr.get_item();; ",
118 " GLib.debug(\"get_item (2) = %s\", a.get_type().name());",
120 " return (Json.Object)tr.get_item();",
127 "* pack" : "append_column",
128 "bool expand" : true,
129 "bool resizable" : true,
133 "* prop" : "factory",
137 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
141 "\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
142 "\tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
145 "\tvar lbl = (Gtk.Label) expand.child;",
147 "\t if (lbl.label != \"\") { // do not update",
152 "\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
153 "\tvar np = (Palete.CompileError) lr.get_item();",
156 "\t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
157 "\tlbl.label = np.linemsg;",
158 "\t//lbl.tooltip_markup = np.to_property_option_tooltip();",
160 " expand.set_hide_expander( np.lines.n_items < 1);",
161 "\texpand.set_list_row(lr);",
163 " \t// expand current file.",
164 " \t// this causes problems? - critical errors?",
165 " \t// maybe do it on show",
166 " \t//if (_this.window.windowstate.file.path == np.file.path &&",
167 " \t//\tnp.line < 0) {",
168 " \t//\tlr.expanded = true;",
172 " \t// bind image...",
180 "\tvar expand = new Gtk.TreeExpander();",
182 "\texpand.set_indent_for_depth(true);",
183 "\texpand.set_indent_for_icon(true);",
185 "\tvar lbl = new Gtk.Label(\"\");",
186 "\tlbl.use_markup = true;",
189 " \tlbl.justify = Gtk.Justification.LEFT;",
190 " \tlbl.xalign = 0;",
193 "\texpand.set_child(lbl);",
194 "\t((Gtk.ListItem)listitem).set_child(expand);",
195 "\t((Gtk.ListItem)listitem).activatable = false;",
200 "xtype" : "SignalListItemFactory"
203 "string title" : "Compile Result",
204 "xtype" : "ColumnViewColumn"
210 "(n_press, x, y) => {",
212 "\tif (n_press < 2) { /// doubleclick?",
218 "\t// use selection?!",
219 "\tvar tr = (Gtk.TreeListRow)_this.selmodel.el.selected_item;",
220 "\t//GLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
221 "\tvar ce = (Palete.CompileError) tr.item;",
223 "\tif (ce.line < 0) {",
224 "\t\t// did not click on a line.",
229 " var fname = ce.file;",
230 " \tvar line = ce.line; ",
231 " GLib.debug(\"open %s @ %d\\n\", ce.file.path, ce.line);",
236 " var regex = new Regex(\"\\\\.vala$\");",
239 " bjsf = regex.replace(fname.path,fname.path.length , 0 , \".bjs\");",
240 " } catch (GLib.RegexError e) {",
243 " var p = _this.window.project;",
247 " var jsr = p.getByPath(bjsf);",
248 " if (jsr != null) {",
249 " _this.window.windowstate.fileViewOpen(jsr, true, line);",
251 " if (jsr.path == _this.window.windowstate.file.path) {",
254 " \t_this.el.hide();",
260 "\tvar pf = p.getByPath(fname.path);",
261 "\t_this.el.hide();",
262 "\t_this.window.windowstate.fileViewOpen(pf, true, line);",
270 "xtype" : "GestureClick"
273 "xtype" : "ColumnView"
276 "xtype" : "ScrolledWindow"
285 "\tGLib.debug(\"errors : show\");",
287 "\tif (_this.model.el.get_n_items() < 1) {",
289 " \t GLib.debug(\"errors : none available\");",
292 " \t//this.el.present();",
293 " //this.el.popup();",
295 " //print(\"looking for %s\\n\", id);",
296 " // loop through parent childnre",
299 " ; //<< very important!!!",
301 " // store.set_sort_column_id(0,Gtk.SortType.ASCENDING);",
303 " var win = this.window.el;",
304 " var w = win.get_width();",
305 " var h = win.get_height();",
308 " // left tree = 250, editor area = 500?",
311 " var new_w = int.min(650, w-100);",
312 " if (new_w > (w-100)) {",
315 " GLib.debug(\"set size\");",
316 " this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));",
319 " // this.el.set_relative_to(onbtn);",
320 "\t//Gtk.Allocation rect;",
321 "\t//onbtn.get_allocation(out rect);",
322 " //this.el.set_pointing_to(rect);",
323 "\t//this.el.present();",
325 "\tGLib.debug(\"call popup\");",
327 " // only need to load once.",
328 " \t//if (!this.loaded) {",
330 "\t\t//this.loaded = true;",
335 " \t//if (expand != null) {",
336 " //\t_this.compile_tree.el.expand_row( store.get_path(expand) , true);",
339 " // this.hpane.el.set_position( 0);",
343 "| void updateNotices" : [
344 "( GLib.ListStore? ls) {",
345 "\tGLib.debug(\"errors : update\");",
346 " if (ls == null || ls.get_n_items() < 1) {",
347 " \t GLib.debug(\"errors : none available\");",
351 "\tGLib.debug(\"Loading list into tree\");",
352 "\tthis.tree.el.hide();",
353 "\tvar tm = new Gtk.TreeListModel(",
354 "\t\tls, //..... << that's our store..",
355 "\t\tfalse, // passthru",
356 "\t\tfalse, // autexpand",
359 "\t\t\t return ((Palete.CompileError)item).lines;",
365 "\t_this.model.el = tm;",
366 "\t_this.sortmodel.el.set_model(tm);",
367 "\t this.tree.el.show();",
372 "name" : "ValaCompileErrors"