2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# Gtk.Widget lastObj" : "null",
7 "# GtkSource.SearchContext searchcontext" : "",
8 "# JsRender.JsRender file" : "null",
9 "# Xcls_MainWindow main_window" : "",
10 "# int last_error_counter" : 0,
11 "# int last_search_end" : 0,
13 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
14 "bool hexpand" : true,
15 "bool vexpand" : true,
20 "Gtk.Overflow overflow" : "Gtk.Overflow.VISIBLE",
26 "id" : "label_preview",
27 "utf8 label" : "Preview",
34 "utf8 label" : "Preview Generated Code",
39 "* pack" : "append_page,_this.label_preview.el",
43 "* pack" : "set_child",
48 "* pack" : "put,10,10",
49 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
54 "string name" : "gtkview-view-layout",
58 "xtype" : "ScrolledWindow"
62 "* pack" : "append_page,_this.label_code.el",
63 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
68 "bool vexpand" : true,
69 "id" : "sourceviewscroll",
72 "# JsRender.Node? node_selected" : "",
73 "# bool loading" : false,
74 "# string prop_selected" : "\"\"",
75 "$ xns" : "GtkSource",
80 "\tthis.loading = true;",
83 "\tvar attrs = new GtkSource.MarkAttributes();",
84 "\t attrs.set_icon_name ( \"process-stop\"); ",
85 "\tattrs.query_tooltip_text.connect(( mark) => {",
86 "\t\t//print(\"tooltip query? %s\\n\", mark.name);",
87 "\t\treturn mark.name;",
90 "\tthis.el.set_mark_attributes (\"ERR\", attrs, 1);",
92 "\t var wattrs = new GtkSource.MarkAttributes();",
93 "\t wattrs.set_icon_name ( \"process-stop\"); ",
94 "\twattrs.query_tooltip_text.connect(( mark) => {",
95 "\t\t//print(\"tooltip query? %s\\n\", mark.name);",
96 "\t\treturn mark.name;",
99 "\tthis.el.set_mark_attributes (\"WARN\", wattrs, 1);",
103 "\t var dattrs = new GtkSource.MarkAttributes();",
104 "\tdattrs.set_icon_name ( \"process-stop\"); ",
105 "\tdattrs.query_tooltip_text.connect(( mark) => {",
106 "\t\t//print(\"tooltip query? %s\\n\", mark.name);",
107 "\t\treturn mark.name;",
110 "\tthis.el.set_mark_attributes (\"DEPR\", dattrs, 1);",
113 "\tvar gattrs = new GtkSource.MarkAttributes();",
114 "\tvar grey = Gdk.RGBA();",
115 "\tgrey.parse ( \"#ccc\");",
116 "\tgattrs.set_background ( grey);",
119 "\tthis.el.set_mark_attributes (\"grey\", gattrs, 1);",
129 "* pack" : "set_child",
130 "css_classes" : "{ \"code-editor\" }",
131 "gboolean editable" : false,
132 "gboolean show_line_marks" : true,
133 "gboolean show_line_numbers" : true,
137 "$ xns" : "GtkSource",
140 "var buf = this.el;",
141 "buf.create_tag (\"bold\", \"weight\", Pango.Weight.BOLD);",
142 "buf.create_tag (\"type\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#204a87\");",
143 "buf.create_tag (\"keyword\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#a40000\");",
144 "buf.create_tag (\"text\", \"weight\", Pango.Weight.NORMAL, \"foreground\", \"#729fcf\");",
145 "buf.create_tag (\"number\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#ad7fa8\");",
146 "buf.create_tag (\"method\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#729fcf\");",
147 "buf.create_tag (\"property\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#BC1F51\");",
148 "buf.create_tag (\"variable\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#A518B5\");",
151 "buf.create_tag (\"ERR\", \"weight\", Pango.Weight.BOLD, \"background\", \"pink\");",
152 "buf.create_tag (\"WARN\", \"weight\", Pango.Weight.BOLD, \"background\", \"#ABF4EB\");",
153 "buf.create_tag (\"DEPR\", \"weight\", Pango.Weight.BOLD, \"background\", \"#EEA9FF\");",
158 "* pack" : "set_buffer",
159 "bool dirty" : false,
160 "bool in_cursor_change" : false,
162 "int error_line" : "-1",
163 "int last_line" : "-1",
167 "GLib.debug(\"cursor moved called\");",
170 " \tif (this.in_cursor_change ) {",
171 " GLib.debug(\"cursor changed : %d [ignoring nested call)\", this.el.cursor_position);",
175 " GLib.debug(\"cursor changed : %d\", this.el.cursor_position);",
176 " Gtk.TextIter cpos;",
177 " this.el.get_iter_at_offset(out cpos, this.el.cursor_position);",
179 " var ln = cpos.get_line();",
180 " if (this.last_line == ln ){",
183 "\tthis.last_line = ln;",
184 " var node = _this.file.lineToNode(ln);",
186 " if (node == null) {",
187 " print(\"can not find node\\n\");",
190 " this.in_cursor_change = true;",
191 " var ltree = _this.main_window.windowstate.left_tree;",
192 " ltree.model.selectNode(node);",
193 " this.in_cursor_change = false;",
204 "(keyval, keycode, state) => {",
208 "\t if (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
209 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
210 "\t\t_this.forwardSearch(true);",
213 " if (keyval == Gdk.Key.f && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
214 "\t GLib.debug(\"SAVE: ctrl-f pressed\");",
215 "\t\t_this.search_entry.el.grab_focus();",
224 "xtype" : "EventControllerKey"
229 "(x, y, keyboard_tooltip, tooltip) => {",
231 "\t//GLib.debug(\"query tooltip\");",
232 "\tGtk.TextIter iter;",
235 "\tvar yoff = (int) _this.sourceviewscroll.el.vadjustment.value;",
237 "\tthis.el.get_iter_at_position (out iter, out trailing, x, y + yoff);",
239 "\tvar l = iter.get_line();",
240 "\t// GLib.debug(\"query tooltip line %d\", (int) l);",
241 "\tvar marks = _this.buffer.el.get_source_marks_at_line(l, \"ERR\");",
242 "\tif (marks.is_empty()) {",
243 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"WARN\");",
245 "\tif (marks.is_empty()) {",
246 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"DEPR\");",
249 "\t// GLib.debug(\"query tooltip line marks %d\", (int) marks.length());",
251 "\tmarks.@foreach((m) => { ",
252 "\t\t//GLib.debug(\"got mark %s\", m.name);",
253 "\t\tstr += (str.length > 0 ? \"\\n\" : \"\") + m.name;",
256 "\t// true if there is a mark..",
257 "\ttooltip.set_text( str);",
258 "\treturn str.length > 0 ? true : false;",
264 "string name" : "gtkview-view",
265 "uint tab_width" : 4,
267 "| string toString" : [
271 " this.el.get_buffer().get_start_iter(out s);",
272 " this.el.get_buffer().get_end_iter(out e);",
273 " var ret = this.el.get_buffer().get_text(s,e,true);",
274 " //print(\"TO STRING? \" + ret);",
279 "| void loadFile" : [
281 " this.loading = true;",
282 " var buf = this.el.get_buffer();",
283 " buf.set_text(\"\",0);",
285 "\tvar cpos = buf.cursor_position;",
287 " \tprint(\"BEFORE LOAD cursor = %d\\n\", cpos);",
288 " var vadj_pos = this.el.get_vadjustment().get_value();",
290 " if (_this.file == null || _this.file.xtype != \"Gtk\") {",
291 " print(\"xtype != Gtk\");",
292 " this.loading = false;",
296 " var valafn = \"\";",
298 " var regex = new Regex(\"\\\\.bjs$\");",
301 " valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");",
302 " } catch (GLib.RegexError e) {",
303 " this.loading = false;",
308 " if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {",
309 " print(\"File path has no errors\\n\");",
310 " this.loading = false;",
317 " GLib.FileUtils.get_contents (valafn, out str);",
318 " } catch (Error e) {",
319 " this.loading = false;",
323 " var str = _this.file.toSource();",
325 "// print(\"setting str %d\\n\", str.length);",
326 " buf.set_text(str, str.length);",
327 " var lm = GtkSource.LanguageManager.get_default();",
329 " //?? is javascript going to work as js?",
331 " ((GtkSource.Buffer)(buf)) .set_language(lm.get_language(_this.file.language));",
334 " _this.main_window.windowstate.updateErrorMarksAll(); ",
335 " // restore the cursor position?",
336 " // after reloading the contents.",
337 " GLib.Timeout.add(500, () => {",
338 "\t\t_this.buffer.in_cursor_change = true;",
339 " print(\"RESORTING cursor to = %d\\n\", cpos);",
340 "\t\tGtk.TextIter cpos_iter;",
341 "\t\tbuf.get_iter_at_offset(out cpos_iter, cpos);",
342 "\t\tbuf.place_cursor(cpos_iter); ",
344 "\t\tthis.el.get_vadjustment().set_value(vadj_pos);;",
345 "\t\t_this.buffer.in_cursor_change = false;",
349 "\t\t//_this.buffer.checkSyntax();",
354 " this.loading = false; ",
358 "| void nodeSelected" : [
359 "(JsRender.Node? sel, bool scroll) {",
362 " if (this.loading) {",
365 " // this is connected in widnowstate",
366 " print(\"Roo-view - node selected\\n\");",
367 " var buf = this.el.get_buffer();",
369 " var sbuf = (GtkSource.Buffer) buf;",
375 " // clear all the marks..",
376 " Gtk.TextIter start;",
377 " Gtk.TextIter end; ",
379 " sbuf.get_bounds (out start, out end);",
380 " sbuf.remove_source_marks (start, end, \"grey\");",
382 " this.node_selected = sel;",
383 " if (sel == null) {",
384 " // no highlighting..",
387 " Gtk.TextIter iter; ",
388 " sbuf.get_iter_at_line(out iter, sel.line_start);",
391 " Gtk.TextIter cur_iter;",
392 " sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);",
395 " if (!_this.buffer.in_cursor_change) {",
397 " \tthis.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);",
402 " for (var i = 0; i < buf.get_line_count();i++) {",
403 " if (i < sel.line_start || i > sel.line_end) {",
405 " sbuf.get_iter_at_line(out iter, i);",
406 " sbuf.create_source_mark(null, \"grey\", iter);",
418 "xtype" : "ScrolledWindow"
422 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
423 "bool homogeneous" : false,
424 "bool vexpand" : false,
429 "Gtk.CssProvider css" : "",
430 "bool hexpand" : true,
431 "id" : "search_entry",
437 "(keyval, keycode, state) => {",
439 "\tif (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
440 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
441 "\t\t_this.forwardSearch(true);",
446 " \tif (keyval == Gdk.Key.Return && _this.search_entry.el.text.length > 0) {",
447 "\t\t_this.forwardSearch(true);",
453 " // print(event.key.keyval)",
460 "xtype" : "EventControllerKey"
467 "\t_this.search(_this.search_entry.el.text);",
468 "\t _this.search_results.updateResults();",
470 "\tGLib.Timeout.add_seconds(1,() => {",
471 "\t\t _this.search_results.updateResults();",
472 "\t\t return false;",
480 "string name" : "gtkview-search-entry",
481 "string placeholder_text" : "Press enter to search",
482 "uint search_delay" : 3,
483 "xtype" : "SearchEntry",
484 "| void forwardSearch" : [
485 "(bool change_focus) {",
488 "\t_this.forwardSearch(change_focus);",
492 "\tswitch(_this.windowstate.state) {",
493 "\t\tcase WindowState.State.CODEONLY:",
494 "\t\t//case WindowState.State.CODE:",
495 "\t\t\t// search the code being edited..",
496 "\t\t\t_this.windowstate.code_editor_tab.forwardSearch(change_focus);",
499 "\t\tcase WindowState.State.PREVIEW:",
500 "\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {",
501 "\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);",
503 "\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);",
516 "id" : "search_results",
517 "int margin_end" : 4,
518 "int margin_start" : 4,
519 "string label" : "No Results",
521 "| void updateResults" : [
523 "\tthis.el.visible = true;",
525 "\tvar res = _this.searchcontext.get_occurrences_count();",
527 "\t\t_this.search_results.el.label = \"??? Matches\";\t\t",
531 "\t_this.nextBtn.el.sensitive = false;",
532 "\t_this.backBtn.el.sensitive = false;\t",
535 "\t\t_this.search_results.el.label = \"%d Matches\".printf(res);",
536 "\t\t_this.nextBtn.el.sensitive = true;",
537 "\t\t_this.backBtn.el.sensitive = true;",
540 "\t_this.search_results.el.label = \"No Matches\";",
547 "bool always_show_image" : true,
548 "bool sensitive" : false,
553 "_this.forwardSearch(true);",
560 "string icon_name" : "go-down",
565 "bool always_show_image" : true,
566 "bool sensitive" : false,
572 "_this.backSearch(true);",
578 "string icon_name" : "go-up",
583 "bool always_show_arrow" : true,
584 "bool always_show_image" : true,
588 "* ctor" : "new Gtk.PopoverMenu.from_model(null)",
589 "* prop" : "popover",
590 "id" : "search_settings",
594 "* pack" : "set_child",
595 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
600 "id" : "case_sensitive",
601 "string label" : "Case Sensitive",
602 "xtype" : "CheckButton"
607 "string label" : "Regex",
608 "xtype" : "CheckButton"
613 "string label" : "Multi-line (add \\n)",
614 "xtype" : "CheckButton"
620 "xtype" : "PopoverMenu"
623 "string icon_name" : "emblem-system",
624 "xtype" : "MenuButton"
639 "\tthis.notebook.el.page = 1;",
643 "\tvar s = new GtkSource.SearchSettings();",
644 "\ts.case_sensitive = _this.case_sensitive.el.active;",
645 "\ts.regex_enabled = _this.regex.el.active;\t",
646 "\ts.wrap_around = false;",
648 "\tthis.searchcontext = new GtkSource.SearchContext(this.buffer.el,s);",
649 "\tthis.searchcontext.set_highlight(true);",
650 "\tvar txt = in_txt;",
652 "\tif (_this.multiline.el.active) {",
653 "\t\ttxt = in_txt.replace(\"\\\\n\", \"\\n\");",
656 "\ts.set_search_text(txt);",
657 "\tGtk.TextIter beg, st,en;",
658 "\tbool has_wrapped_around;",
659 "\tthis.buffer.el.get_start_iter(out beg);",
660 "\tthis.searchcontext.forward(beg, out st, out en, out has_wrapped_around);",
661 "\tthis.last_search_end = 0;",
663 "\treturn this.searchcontext.get_occurrences_count();",
671 "| void backSearch" : [
672 "(bool change_focus) {",
674 "\tif (this.searchcontext == null) {",
678 "\tGtk.TextIter beg, st,en;",
679 "\tbool has_wrapped_around;",
680 "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );",
682 "\tif (!this.searchcontext.backward(beg, out st, out en, out has_wrapped_around)) {",
684 "\t\tthis.last_search_end = 0;",
687 "\tthis.last_search_end = en.get_offset();",
688 "\tif (change_focus) {",
689 "\t\tthis.sourceview.el.grab_focus();",
691 "\tthis.buffer.el.place_cursor(st);",
692 "\tthis.sourceview.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);",
693 "\tvar ln = st.get_line();",
694 "\tthis.highlightNodeAtLine(ln);",
699 "| void createThumb" : [
703 " if (this.file == null) {",
706 " // only screenshot the gtk preview..",
707 " if (this.notebook.el.page > 0 ) {",
712 " \tthis.file.widgetToIcon(this.container.el); ",
721 " // should we hold until it's printed...",
729 "| void forwardSearch" : [
730 "(bool change_focus) {",
732 "\tif (this.searchcontext == null) {",
735 "\tthis.notebook.el.page = 1;",
736 "\tGtk.TextIter beg, st,en;",
737 "\tbool has_wrapped_around;",
738 "\tvar buf = this.sourceview.el.get_buffer();",
739 "\tbuf.get_iter_at_offset(out beg, this.last_search_end);",
740 "\tif (!this.searchcontext.forward(beg, out st, out en, out has_wrapped_around)) {",
741 "\t\tthis.last_search_end = 0;",
744 "\tthis.last_search_end = en.get_offset();",
745 "\tif (change_focus) {",
746 "\t\tthis.sourceview.el.grab_focus();",
748 "\tbuf.place_cursor(st);",
752 "\tthis.sourceview.el.scroll_to_iter(st, 0.0f, true, 0.0f, 0.5f);",
755 "\tvar ln = st.get_line();",
757 "\tthis.highlightNodeAtLine(ln);",
761 "| void highlightNodeAtLine" : [
764 "\t// this is done from clicking on the editor..",
766 "\t// highlight node...",
769 " var node = _this.file.lineToNode(ln+1);",
771 " if (node == null) {",
772 " //print(\"can not find node\\n\");",
775 " var prop = node.lineToProp(ln+1);",
776 " print(\"prop : %s\", prop == null ? \"???\" : prop.name);",
779 " // ---------- this selects the tree's node...",
781 " var ltree = _this.main_window.windowstate.left_tree;",
782 " ltree.model.selectNode(node);",
783 " //var tp = ltree.model.treePathFromNode(node);",
785 " //print(\"got tree path %s\\n\", tp);",
786 " //if (tp == \"\") {",
789 " //_this.sourceview.allow_node_scroll = false; /// block node scrolling..",
792 " //print(\"changing cursor on tree..\\n\");",
796 " // let's try allowing editing on the methods.",
797 " // a little klunky at present..",
798 "\t_this.sourceview.prop_selected = \"\";",
800 " if (prop != null) {",
801 "\t\t//see if we can find it..",
802 "\t\tvar kv = prop.split(\":\");",
803 "\t\tif (kv[0] == \"p\") {",
805 " \t\t//var k = prop.get_key(kv[1]);",
806 " \t\t// fixme -- need to determine if it's an editable property...",
807 " \t\t_this.sourceview.prop_selected = prop;",
809 "\t\t} else if (kv[0] == \"l\") {",
810 "\t\t\t _this.sourceview.prop_selected = prop;",
815 " //ltree.view.setCursor(tp, \"editor\");",
816 " // ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false); ",
817 " _this.sourceview.nodeSelected(node,false);",
819 " // scrolling is disabled... as node selection calls scroll 10ms after it changes.",
820 " // GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {",
821 "\t // this.allow_node_scroll = true;",
822 "\t // return false;",
839 "| void loadFile" : [
840 "(JsRender.JsRender file) ",
842 " this.file = null;",
844 " if (file.tree == null) {",
847 " this.last_error_counter = -1;",
848 " this.notebook.el.page = 0;// gtk preview ",
852 " this.file = file; ",
853 " this.sourceview.loadFile();",
855 " this.searchcontext = null;",
856 " this.last_error_counter = -1;",
857 "\t\tthis.updateErrorMarks();",
858 " if (this.lastObj != null) {",
859 " this.container.el.remove(this.lastObj);",
862 " // hide the compile view at present..",
865 " var w = this.el.get_width();",
866 " var h = this.el.get_height();",
868 " print(\"ALLOC SET SIZES %d, %d\\n\", w,h); ",
870 " // set the container size min to 500/500 or 20 px less than max..",
871 " w = int.max (w-20, 500);",
872 " h = int.max (h-20, 500); ",
874 " print(\"SET SIZES %d, %d\\n\", w,h); ",
875 " _this.container.el.set_size_request(w,h);",
877 " _this.view_layout.el.set_size_request(w,h); ",
878 " // should be baded on calc.. -- see update_scrolled.",
880 " var fc = this.container.el.get_first_child();",
881 " if (fc != null) {",
882 " \t\tthis.container.el.remove(fc);",
885 " \t\tvar xmlstr = JsRender.NodeToGlade.mungeFile( file);",
886 " \t\tvar builder = new Gtk.Builder.from_string (xmlstr, xmlstr.length);",
887 " \t\tvar obj = (Gtk.Widget) builder.get_object(\"w\"+ file.tree.oid.to_string());",
888 " \t\t this.container.el.append(obj);",
890 " this.createThumb();",
898 "| void scroll_to_line" : [
900 " // code preview...",
902 " GLib.Timeout.add(100, () => {",
905 "\t this.notebook.el.set_current_page(1);",
907 "\t\t var buf = this.sourceview.el.get_buffer();",
909 "\t\tvar sbuf = (GtkSource.Buffer) buf;",
912 "\t\tGtk.TextIter iter; ",
913 "\t\tsbuf.get_iter_at_line(out iter, line);",
914 "\t\tthis.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);",
922 "| void updateErrorMarks" : [
927 "\tvar buf = _this.buffer.el;",
928 "\tGtk.TextIter start;",
929 "\tGtk.TextIter end; ",
930 "\tbuf.get_bounds (out start, out end);",
934 "\t//GLib.debug(\"highlight errors\");\t\t ",
936 "\t // we should highlight other types of errors..",
941 "\tif (_this.file == null) {",
942 "\t\tGLib.debug(\"file is null?\");",
946 "\tvar ar = this.file.getErrors();",
947 "\tif (ar.size < 1) {",
948 "\t\tbuf.remove_tag_by_name (\"ERR\", start, end);",
949 "\t\tbuf.remove_tag_by_name (\"WARN\", start, end);",
950 "\t\tbuf.remove_tag_by_name (\"DEPR\", start, end);",
951 "\t\tbuf.remove_source_marks (start, end, \"ERR\");",
952 "\t\tbuf.remove_source_marks (start, end, \"WARN\");",
953 "\t\tbuf.remove_source_marks (start, end, \"DEPR\");",
954 "\t\tthis.last_error_counter = file.error_counter ;",
955 "\t\t//GLib.debug(\"higjlight has no errors\");",
958 " \tif (this.last_error_counter == file.error_counter) {",
966 "\tvar tlines = buf.get_line_count () +1;",
970 "\tbuf.remove_source_marks (start, end, \"ERR\");",
971 "\tbuf.remove_source_marks (start, end, \"WARN\");",
972 "\tbuf.remove_source_marks (start, end, \"DEPR\");",
973 "\tbuf.remove_tag_by_name (\"ERR\", start, end);",
974 "\tbuf.remove_tag_by_name (\"WARN\", start, end);",
975 "\tbuf.remove_tag_by_name (\"DEPR\", start, end);",
976 "\tforeach(var diag in ar) { ",
979 "\t Gtk.TextIter iter;",
980 "// print(\"get inter\\n\");",
981 "\t var eline = (int)diag.range.start.line ;",
982 "\t var eline_to = (int)diag.range.end.line;",
983 "\t if (eline > tlines || eline < 0) {",
988 "\t buf.get_iter_at_line( out iter, eline);",
990 "\t \t buf.get_iter_at_line_offset( out start, ",
991 " \t \teline, (int)diag.range.start.character); ",
992 " \t buf.get_iter_at_line_offset( out end, ",
993 " \t \teline_to, (int)diag.range.end.character); ",
995 "\t buf.apply_tag_by_name(diag.category, start, end);",
998 "\t\tvar msg = \"Line: %d %s : %s\".printf(eline+1, diag.category, diag.message);",
999 "\t buf.create_source_mark( msg, diag.category, iter);",
1000 "\t GLib.debug(\"set line %d to %s\", eline, msg);",
1001 "\t //this.marks.set(eline, msg);",
1003 "\tthis.last_error_counter = file.error_counter ;",