2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# GtkSource.SearchContext searchcontext" : "null",
7 "# JsRender.JsRender? file" : "null",
8 "# JsRender.Node node" : "null",
9 "# JsRender.NodeProp? prop" : "null",
10 "# Xcls_MainWindow window" : "null",
11 "# bool dirty" : false,
13 "# int last_error_counter" : 0,
14 "# int pos_root_x" : "",
15 "# int pos_root_y" : "",
16 "# string activeEditor" : "\"\"",
17 "$ homogeneous" : false,
20 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
21 "bool hexpand" : true,
22 "bool vexpand" : true,
23 "int last_search_end" : 0,
27 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
31 "* prop" : "start_child",
32 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
36 "$ homogeneous" : false,
38 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
39 "bool hexpand" : true,
48 " _this.saveContents();",
57 "bool hexpand" : true,
62 "* ctor" : "new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL,6, 30, 1)",
65 "\t//this.el.set_range(6,30);",
66 " \tthis.el.set_value ( BuilderApplication.settings.editor_font_size);",
67 " \tBuilderApplication.settings.editor_font_size_updated.connect(",
69 " \t\t\tBuilderApplication.settings.editor_font_size_inchange = true;",
70 " \t\t//\tGLib.debug(\"update range\");",
71 " \t\t \tthis.el.set_value (BuilderApplication.settings.editor_font_size);",
72 " \t\t \tBuilderApplication.settings.editor_font_size_inchange = false;",
80 "bool draw_value" : false,
81 "bool has_origin" : true,
82 "bool sensitive" : true,
84 "int width_request" : 200,
88 "\tif (BuilderApplication.settings.editor_font_size_inchange) {",
91 " \tBuilderApplication.settings.editor_font_size = val;",
105 "Gtk.IconSize icon_size" : "Gtk.IconSize.NORMAL",
106 "string icon_name" : "window-close",
113 " _this.saveContents();",
114 " _this.window.windowstate.switchState(WindowState.State.PREVIEW);",
119 "string icon_name" : "window-close",
127 "Gtk.PolicyType hscrollbar_policy" : "Gtk.PolicyType.AUTOMATIC",
128 "Gtk.PolicyType vscrollbar_policy" : "Gtk.PolicyType.AUTOMATIC",
129 "bool overlay_scrolling" : false,
130 "bool vexpand" : true,
131 "id" : "RightEditor",
134 "# Gtk.CssProvider css" : "null",
135 "$ gboolean auto_indent" : true,
136 "$ xns" : "GtkSource",
143 "this.el.completion.add_provider(",
144 "\tnew Palete.CompletionProvider(_this)",
147 "// hover seems pretty useless.. - ??",
148 "//var hover = this.el.get_hover();",
149 "//hover.add_provider(new Palete.HoverProvider(_this));",
151 "//this.el.completion.unblock_interactive();",
152 "this.el.completion.select_on_show = true; // select",
153 "//this.el.completion.remember_info_visibility\t = true;",
156 "var attrs = new GtkSource.MarkAttributes();",
158 "attrs.set_icon_name ( \"process-stop\"); ",
159 "attrs.query_tooltip_text.connect(( mark) => {",
160 " GLib.debug(\"tooltip query? %s\", mark.name);",
161 " return strdup( mark.name);",
163 " attrs.query_tooltip_markup.connect(( mark) => {",
164 " GLib.debug(\"tooltip query? %s\", mark.name);",
165 " return strdup( mark.name);",
167 "this.el.set_mark_attributes (\"ERR\", attrs, 1);",
171 "var wattrs = new GtkSource.MarkAttributes();",
172 "wattrs.set_icon_name ( \"process-stop\"); ",
173 "wattrs.query_tooltip_text.connect(( mark) => {",
174 " GLib.debug(\"tooltip query? %s\", mark.name);",
175 " return strdup(mark.name);",
177 "wattrs.query_tooltip_markup.connect(( mark) => {",
178 " GLib.debug(\"tooltip query? %s\", mark.name);",
179 " return strdup(mark.name);",
181 "this.el.set_mark_attributes (\"WARN\", wattrs, 1);",
185 "var dattrs = new GtkSource.MarkAttributes();",
187 "dattrs.set_icon_name ( \"process-stop\"); ",
189 "dattrs.query_tooltip_text.connect(( mark) => {",
190 "\tGLib.debug(\"tooltip query? %s\", mark.name);",
191 " return strdup(mark.name);",
193 "//dattrs.query_tooltip_markup.connect(( mark) => {",
194 "//\tGLib.debug(\"tooltip query? %s\", mark.name);",
195 " // return strdup(mark.name);",
197 "this.el.set_mark_attributes (\"DEPR\", dattrs, 1);",
200 " this.el.get_space_drawer().set_matrix(null);",
201 " this.el.get_space_drawer().set_types_for_locations( ",
202 "\tGtkSource.SpaceLocationFlags.ALL,",
203 "\tGtkSource.SpaceTypeFlags.ALL",
205 "this.el.get_space_drawer().set_enable_matrix(true);",
209 "bool has_tooltip" : true,
210 "bool hexpand" : true,
211 "bool insert_spaces_instead_of_tabs" : true,
212 "bool vexpand" : true,
213 "boolean show_line_marks" : true,
214 "boolean show_line_numbers" : true,
215 "css_classes" : "{ \"code-editor\" }",
216 "gboolean highlight_current_line" : true,
221 "$ Gee.HashMap<int,string>? xmarks" : "null",
222 "$ xns" : "GtkSource",
223 "$ xtype" : "Buffer",
226 "var buf = this.el;",
227 "buf.create_tag (\"bold\", \"weight\", Pango.Weight.BOLD);",
228 "buf.create_tag (\"type\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#204a87\");",
229 "buf.create_tag (\"keyword\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#a40000\");",
230 "buf.create_tag (\"text\", \"weight\", Pango.Weight.NORMAL, \"foreground\", \"#729fcf\");",
231 "buf.create_tag (\"number\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#ad7fa8\");",
232 "buf.create_tag (\"method\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#729fcf\");",
233 "buf.create_tag (\"property\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#BC1F51\");",
234 "buf.create_tag (\"variable\", \"weight\", Pango.Weight.BOLD, \"foreground\", \"#A518B5\");",
237 "buf.create_tag (\"ERR\", \"weight\", Pango.Weight.BOLD, \"background\", \"pink\");",
238 "buf.create_tag (\"WARN\", \"weight\", Pango.Weight.BOLD, \"background\", \"#ABF4EB\");",
239 "buf.create_tag (\"DEPR\", \"weight\", Pango.Weight.BOLD, \"background\", \"#EEA9FF\");",
245 "bool check_queued" : false,
246 "bool enable_undo" : true,
247 "bool highlight_matching_brackets" : true,
248 "bool highlight_syntax" : true,
250 "int error_line" : "-1",
254 " // check syntax??",
256 " _this.save_button.el.sensitive = true;",
257 " print(\"EDITOR CHANGED\");",
258 " this.checkSyntax();",
260 " _this.dirty = true;",
262 " // this.get('/LeftPanel.model').changed( str , false);",
270 "\tGtk.TextIter iter;",
271 "\tthis.el.get_iter_at_offset (",
272 "\t\t\tout iter, this.el.cursor_position);",
274 "\t_this.navigation.updateSelectedLine(",
275 "\t\t\t(uint)iter.get_line(),",
276 "\t\t\t(uint)iter.get_line_offset()",
284 "| bool OLDhighlightErrorsJson" : [
285 "(string type, Json.Object obj) {",
286 "\tGtk.TextIter start;",
287 "\tGtk.TextIter end; ",
288 "\tthis.el.get_bounds (out start, out end);",
290 "\tthis.el.remove_source_marks (start, end, type);",
291 "\tGLib.debug(\"highlight errors\");\t\t ",
293 "\t // we should highlight other types of errors..",
295 "\tif (!obj.has_member(type)) {",
296 "\t\tGLib.debug(\"Return has no errors\\n\");",
300 "\tif (_this.window.windowstate.state != WindowState.State.CODEONLY ",
302 "\t\t_this.window.windowstate.state != WindowState.State.CODE",
304 "\t\tGLib.debug(\"windowstate != CODEONLY?\");",
309 "\t//this.marks = new Gee.HashMap<int,string>();",
310 "\tvar err = obj.get_object_member(type);",
312 "\tif (_this.file == null) {",
313 "\t\tGLib.debug(\"file is null?\");",
317 "\tvar valafn = _this.file.path;",
319 "\tif (_this.file.xtype != \"PlainFile\") {",
321 "\t\tvalafn = \"\";",
323 "\t\t\tvar regex = new Regex(\"\\\\.bjs$\");",
324 "\t\t\t// should not happen",
325 "\t \t\tvalafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");",
326 "\t\t} catch (GLib.RegexError e) {",
327 "\t\t\treturn true;",
333 "\tif (!err.has_member(valafn)) {",
334 "\t\tGLib.debug(\"File path has no errors\");",
338 "\tvar lines = err.get_object_member(valafn);",
341 "\tif (obj.has_member(\"line_offset\")) { // ?? why??",
342 "\t\toffset = (int)obj.get_int_member(\"line_offset\") + 1;",
346 "\tvar tlines = this.el.get_line_count () +1;",
348 "\tif (_this.prop != null) {",
350 "\t\ttlines = _this.prop.end_line + 1;",
351 "\t\toffset = _this.prop.start_line + 1;",
357 "\tlines.foreach_member((obj, line, node) => {",
359 "\t Gtk.TextIter iter;",
360 "// print(\"get inter\\n\");",
361 "\t var eline = int.parse(line) - offset;",
362 "\t GLib.debug(\"GOT ERROR on line %s -- converted to %d (offset = %d)\\n\", line,eline, offset);",
365 "\t if (eline > tlines || eline < 0) {",
370 "\t this.el.get_iter_at_line( out iter, eline);",
371 "\t //print(\"mark line\\n\");",
372 "\t var msg = \"\";",
373 "\t var ar = lines.get_array_member(line);",
374 "\t for (var i = 0 ; i < ar.get_length(); i++) {",
375 "\t \tif (ar.get_string_element(i) == \"Success\") {",
378 "\t\t\tmsg += (msg.length > 0) ? \"\\n\" : \"\";",
379 "\t\t\tmsg += ar.get_string_element(i);",
381 "\t\tif (msg == \"\") {",
384 "\t\tmsg = \"Line: %d\".printf(eline+1) + \" \" + msg;",
385 "\t this.el.create_source_mark(msg, type, iter);",
386 "\t GLib.debug(\"set line %d to %m\", eline, msg);",
387 "\t // this.marks.set(eline, msg);",
398 "| bool checkSyntax" : [
402 " var str = this.toString();",
405 " if (this.error_line > 0) {",
406 " Gtk.TextIter start;",
407 " Gtk.TextIter end; ",
408 " this.el.get_bounds (out start, out end);",
410 " this.el.remove_source_marks (start, end, null);",
412 " if (str.length < 1) {",
413 " print(\"checkSyntax - empty string?\\n\");",
417 " // bit presumptiona",
418 " if (_this.file.xtype == \"PlainFile\") {",
420 " // assume it's gtk...",
421 " var oldcode =_this.file.toSource();",
422 " _this.file.setSource(str);",
423 "\t BuilderApplication.showSpinner(\"appointment soon\",\"document change pending\");",
424 " \t_this.file.getLanguageServer().document_change(_this.file);",
425 "\t\t_this.file.getLanguageServer().queueDocumentSymbols(_this.file);",
426 " _this.file.setSource(oldcode);",
432 " if (_this.file == null) {",
440 " GLib.debug(\"calling validate\"); ",
441 " // clear the buttons.",
442 " \tif (_this.prop.name == \"xns\" || _this.prop.name == \"xtype\") {",
445 "\tvar oldcode = _this.prop.val;",
447 "\t_this.prop.val = str;",
448 "\t_this.node.updated_count++;",
449 " _this.file.getLanguageServer().document_change(_this.file);",
450 " _this.node.updated_count++;",
451 " _this.prop.val = oldcode;",
454 " //print(\"done mark line\\n\");",
456 " return true; // at present allow saving - even if it's invalid..",
460 "| bool highlightErrors" : [
461 "( Gee.HashMap<int,string> validate_res) {",
463 "\tthis.error_line = validate_res.size;",
465 "\tif (this.error_line < 1) {",
468 "\tvar tlines = this.el.get_line_count ();",
469 "\tGtk.TextIter iter;",
470 "\tvar valiter = validate_res.map_iterator();",
471 "\twhile (valiter.next()) {",
473 "\t// print(\"get inter\\n\");",
474 "\t\tvar eline = valiter.get_key();",
475 "\t\tif (eline > tlines) {",
478 "\t\tthis.el.get_iter_at_line( out iter, eline);",
479 "\t\t//print(\"mark line\\n\");",
480 "\t\tthis.el.create_source_mark(valiter.get_value(), \"ERR\", iter);",
485 "| string toString" : [
490 " this.el.get_start_iter(out s);",
491 " this.el.get_end_iter(out e);",
492 " var ret = this.el.get_text(s,e,true);",
493 " //print(\"TO STRING? \" + ret);",
500 "# bool is_control" : false,
505 "(keyval, keycode, state) => {",
507 " \tif (keyval == Gdk.Key.Control_L || keyval == Gdk.Key.Control_R) {",
508 " \t\tthis.is_control = true;",
515 "(keyval, keycode, state) => {",
517 " \t if (keyval == Gdk.Key.Control_L || keyval == Gdk.Key.Control_R) {",
518 " \t\tthis.is_control = false;",
520 " if (keyval == Gdk.Key.s && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
521 " GLib.debug(\"SAVE: ctrl-S pressed\");",
522 " _this.saveContents();",
526 " if (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
527 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
528 "\t\t_this.forwardSearch(true);",
531 "\tif (keyval == Gdk.Key.f && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
532 "\t GLib.debug(\"SAVE: ctrl-f pressed\");",
533 "\t\t_this.search_entry.el.grab_focus();",
534 "\t\t_this.search_entry.el.select_region(0,-1);",
537 "\tif (keyval == Gdk.Key.space && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
538 "\t\t_this.view.el.show_completion();",
541 "\tGtk.TextIter iter;",
542 "\t_this.buffer.el.get_iter_at_offset( out iter, _this.buffer.el.cursor_position); ",
543 "\tvar line = iter.get_line();",
544 "\tvar offset = iter.get_line_offset();",
545 "\tGLib.debug(\"line %d off %d\", line ,offset);",
546 "\tif (_this.prop != null) {",
547 "\t\tline += _this.prop.start_line + 1; // i think..",
548 "\t\toffset += 12; // should probably be 8 without namespaced ",
549 "\t\tGLib.debug(\"guess line %d off %d\", line ,offset);",
551 " //_this.view.el.show_completion();",
552 " // print(event.key.keyval)",
562 "xtype" : "EventControllerKey"
565 "# double distance" : "0.0f",
567 "Gtk.EventControllerScrollFlags flags" : "Gtk.EventControllerScrollFlags.VERTICAL",
571 "\tif (!_this.keystate.is_control) {",
574 "\t //GLib.debug(\"scroll %f\", dy);",
576 "\tthis.distance += dy;",
578 "\t//GLib.debug(\"scroll %f / %f\", dy, this.distance);",
580 "\t if (this.distance < -1) {",
582 "\t\tBuilderApplication.settings.editor_font_size ++;",
583 "\t\tthis.distance = 0;",
585 "\tif (this.distance > 1) {",
586 "\t\tBuilderApplication.settings.editor_font_size --;",
587 "\t\tthis.distance = 0;",
595 "xtype" : "EventControllerScroll"
601 "(n_press, x, y) => {",
602 "\tGtk.TextIter iter;",
603 "\tint buffer_x, buffer_y;",
604 "\t_this.view.window_to_buffer_coords (",
605 "\t\tGtk.TextWindowTyp.TEXT, ",
606 "\t\t(int)x, (int)y, out buffer_x, out buffer_y",
609 "\t_this.view.el.get_iter_at_location (out iter, buffer_x, buffer_x;",
610 "\tif (_this.buffer.el.iter_has_context_class(iter, \"comment\") ||",
611 "\t\t_this.buffer.el.iter_has_context_class(iter, \"string\")",
615 "\tvar back = iter.copy();",
616 "\tback.backward_char();",
618 "\t// what's the character at the iter?",
619 "\tvar str = back.get_text(iter);",
620 "\tif (str.strip().length < 1) {",
624 "\tvar ls = _this.file.getLanguageServer();",
626 "\t\t_this.file, iter.get_line(), iter.get_line_offset(),",
628 "\t\t\tvar res = ls.hover.end(o );",
638 "xtype" : "GestureClick"
643 "(x, y, keyboard_tooltip, tooltip) => {",
645 "\t//GLib.debug(\"query tooltip\");",
646 "\tGtk.TextIter iter;",
649 "\tvar yoff = (int) _this.RightEditor.el.vadjustment.value;",
651 "\t// I think this is problematic - if it's compliing / updating at same time as query.",
653 "\t//if (_this.window.statusbar_compile_spinner.el.spinning) {",
654 "\t//\treturn false;",
657 "\tthis.el.get_iter_at_position (out iter, out trailing, x, y + yoff);",
659 "\tvar l = iter.get_line();",
663 "\t// GLib.debug(\"query tooltip line %d\", (int) l);",
669 "\tif (_this.buffer.marks != null && _this.buffer.marks.has_key(l)) {",
670 "\t\tGLib.debug(\"line %d setting tip to %s\", l, _this.buffer.marks.get(l));",
671 "\t\ttooltip.set_text(_this.buffer.marks.get(l).dup());",
679 "\t// this crashes?? - not sure why.",
680 "\tvar marks = _this.buffer.el.get_source_marks_at_line(l, \"ERR\");",
681 "\tif (marks.is_empty()) {",
682 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"WARN\");",
684 "\tif (marks.is_empty()) {",
685 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"DEPR\");",
688 "\t// GLib.debug(\"query tooltip line %d marks %d\", (int)l, (int) marks.length());",
690 "\tmarks.@foreach((m) => { ",
691 "\t\t//GLib.debug(\"got mark %s\", m.name);",
692 "\t\tstr += (str.length > 0 ? \"\\n\" : \"\") + m.category + \": \" + m.name;",
694 "\t// true if there is a mark..",
695 "\tif (str.length > 0 ) {",
696 "\t\ttooltip.set_text( str );",
698 "\treturn str.length > 0 ? true : false;",
704 "string name" : "editor-view",
705 "uint tab_width" : 4,
710 "// show the help page for the active node..",
711 " //this.get('/Help').show();",
713 " // this.get('/BottomPane').el.set_current_page(0);",
714 " \tGLib.debug(\"load called - Reset undo buffer\");",
716 " var buf = (GtkSource.Buffer)this.el.get_buffer();",
717 " buf.begin_irreversible_action();",
718 " buf.set_text(str, str.length);",
719 " buf.end_irreversible_action();",
721 " var lm = GtkSource.LanguageManager.get_default();",
722 " var lang = \"vala\";",
723 " if (_this.file != null) {",
724 " lang = _this.file.language;",
726 " print(\"lang=%s, content_type = %s\\n\", lang, _this.file.content_type);",
727 " var lg = _this.file.content_type.length > 0 ?",
728 " lm.guess_language(_this.file.path, _this.file.content_type) :",
729 " lm.get_language(lang);",
732 " ((GtkSource.Buffer)(this.el.get_buffer())) .set_language(lg); ",
734 " this.el.insert_spaces_instead_of_tabs = true;",
735 " if (lg != null) {",
736 "\t\tprint(\"sourcelanguage = %s\\n\", lg.name);",
737 "\t\tif (lg.name == \"Vala\") {",
738 "\t\t this.el.insert_spaces_instead_of_tabs = false;",
741 " _this.dirty = false;",
742 " this.el.grab_focus();",
743 " _this.save_button.el.sensitive = false;",
744 " _this.last_error_counter = -1;",
749 "xtype" : "ScrolledWindow"
754 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
755 "bool homogeneous" : false,
756 "bool vexpand" : false,
761 "Gtk.CssProvider css" : "",
762 "bool hexpand" : true,
763 "id" : "search_entry",
769 "(keyval, keycode, state) => {",
771 "\tif (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
772 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
773 "\t\t_this.forwardSearch(true);",
778 " \tif (keyval == Gdk.Key.Return && _this.search_entry.el.text.length > 0) {",
779 "\t\t_this.forwardSearch(true);",
785 " // print(event.key.keyval)",
792 "xtype" : "EventControllerKey"
799 "_this.search(_this.search_entry.el.text);",
800 "\t _this.search_results.updateResults();",
802 "\tGLib.Timeout.add_seconds(1,() => {",
803 "\t\t _this.search_results.updateResults();",
804 "\t\t return false;",
810 "string name" : "editor-search-entry",
811 "string placeholder_text" : "Press enter to search",
812 "uint search_delay" : 3,
813 "xtype" : "SearchEntry",
814 "| void forwardSearch" : [
815 "(bool change_focus) {",
818 "\t_this.forwardSearch(change_focus);",
822 "\tswitch(_this.windowstate.state) {",
823 "\t\tcase WindowState.State.CODEONLY:",
824 "\t\t//case WindowState.State.CODE:",
825 "\t\t\t// search the code being edited..",
826 "\t\t\t_this.windowstate.code_editor_tab.forwardSearch(change_focus);",
829 "\t\tcase WindowState.State.PREVIEW:",
830 "\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {",
831 "\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);",
833 "\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);",
846 "id" : "search_results",
847 "int margin_end" : 4,
848 "int margin_start" : 4,
849 "string label" : "No Results",
851 "| void updateResults" : [
853 "\tthis.el.visible = true;",
855 "\tvar res = _this.searchcontext.get_occurrences_count();",
857 "\t\t_this.search_results.el.label = \"??? Matches\";\t\t",
861 "\t_this.nextBtn.el.sensitive = false;",
862 "\t_this.backBtn.el.sensitive = false;\t",
865 "\t\t_this.search_results.el.label = \"%d Matches\".printf(res);",
866 "\t\t_this.nextBtn.el.sensitive = true;",
867 "\t\t_this.backBtn.el.sensitive = true;",
870 "\t_this.search_results.el.label = \"No Matches\";",
877 "bool always_show_image" : true,
878 "bool sensitive" : false,
884 "\t_this.forwardSearch(true);",
891 "string icon_name" : "go-down",
896 "bool always_show_image" : true,
897 "bool sensitive" : false,
903 "\t_this.backSearch(true);",
909 "string icon_name" : "go-up",
914 "bool always_show_arrow" : true,
915 "bool always_show_image" : true,
919 "* prop" : "popover",
920 "id" : "search_settings",
925 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
936 "id" : "case_sensitive",
937 "string label" : "Case Sensitive",
938 "xtype" : "CheckButton"
949 "string label" : "Regex",
950 "xtype" : "CheckButton"
955 "string label" : "Multi-line (add \\n)",
956 "xtype" : "CheckButton"
965 "string icon_name" : "emblem-system",
966 "xtype" : "MenuButton"
976 "* prop" : "end_child",
977 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
978 "bool hexpand" : true,
979 "bool vexpand" : true,
984 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
990 "bool hexpand" : true,
991 "bool vexpand" : true,
992 "bool visible" : false,
993 "id" : "navigationwindow",
996 "# int last_selected_line" : "-1",
997 "$ Gtk.Widget? selected_row" : "null",
1000 "id" : "navigation",
1004 "bool expand" : true,
1008 "* prop" : "factory",
1013 "\t// GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
1015 "\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1016 "\tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1019 "\tvar hbox = (Gtk.Box) expand.child;",
1022 "\tvar img = (Gtk.Image) hbox.get_first_child();",
1023 "\tvar lbl = (Gtk.Label) img.get_next_sibling();",
1025 "\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
1026 "\tvar sym = (Lsp.DocumentSymbol) lr.get_item();",
1028 "\tsym.set_data<Gtk.Widget>(\"widget\", expand.get_parent());",
1029 "\texpand.get_parent().get_parent().set_data<Lsp.DocumentSymbol>(\"symbol\", sym);",
1031 "\t//GLib.debug(\"save sym on %s\", expand.get_parent().get_parent().get_type().name());",
1033 "\t//GLib.debug(\"got %d children for %s\" , (int)sym.children.get_n_items(), sym.name);",
1035 " expand.set_hide_expander( sym.children.get_n_items() < 1);",
1036 " \texpand.set_list_row(lr);",
1037 " \t//this.in_bind = true;",
1038 " \t// default is to expand",
1040 " \t//this.in_bind = false;",
1042 " \tsym.bind_property(\"symbol_icon\",",
1043 " img, \"icon_name\",",
1044 " GLib.BindingFlags.SYNC_CREATE);",
1046 " \thbox.css_classes = { sym.symbol_icon };",
1048 " \tsym.bind_property(\"name\",",
1050 " GLib.BindingFlags.SYNC_CREATE);",
1051 " \t// should be better?- --line no?",
1052 " \tsym.bind_property(\"tooltip\",",
1053 " lbl, \"tooltip_markup\",",
1054 " GLib.BindingFlags.SYNC_CREATE);",
1055 " \t// bind image...",
1063 "\tvar expand = new Gtk.TreeExpander();",
1065 "\texpand.set_indent_for_depth(true);",
1066 "\texpand.set_indent_for_icon(true);",
1067 "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
1068 "\tvar icon = new Gtk.Image();",
1069 "\tvar lbl = new Gtk.Label(\"\");",
1070 "\tlbl.use_markup = true;",
1071 "\tlbl.ellipsize = Pango.EllipsizeMode.END;",
1073 "\ticon.margin_end = 4;",
1074 " \tlbl.justify = Gtk.Justification.LEFT;",
1075 " \tlbl.xalign = 0;",
1077 "//\tlistitem.activatable = true; ??",
1079 "\thbox.append(icon);",
1080 "\thbox.append(lbl);",
1081 "\texpand.set_child(hbox);",
1082 "\t((Gtk.ListItem)listitem).set_child(expand);",
1088 "xtype" : "SignalListItemFactory"
1091 "string title" : "Code Navigation",
1092 "xtype" : "ColumnViewColumn"
1097 "id" : "navigationselmodel",
1102 "id" : "navigationsort",
1105 "$ Gtk.TreeListModelCreateModelFunc create_func" : [
1108 "\treturn ((Lsp.DocumentSymbol)item).children;",
1114 "bool autoexpand" : true,
1115 "bool passthrough" : false,
1118 "$ GLib.Type item_type" : "typeof(Lsp.DocumentSymbol)",
1121 "id" : "navliststore",
1122 "xtype" : "ListStore",
1123 "| Lsp.DocumentSymbol? symbolAtLine" : [
1124 "(uint line, uint chr) {",
1127 "\tfor(var i = 0; i < this.el.get_n_items();i++) {",
1128 "\t\tvar el = (Lsp.DocumentSymbol)this.el.get_item(i);",
1129 "\t\t//GLib.debug(\"Check sym %s : %d-%d\",",
1130 "\t\t//\tel.name , (int)el.range.start.line,",
1131 "\t\t//\t(int)el.range.end.line",
1133 "\t\tvar ret = el.containsLine(line,chr);",
1134 "\t\tif (ret != null) {",
1135 "\t\t\treturn ret;",
1147 "(position, removed, added) => {",
1148 "\tGLib.debug(\"tree item changed %d , %d , %d\",(int) position, (int)removed, (int) added);",
1149 "\t if (added < 1) { ",
1152 "\t//var sym = (Lsp.DocumentSymbol) this.el.get_item(position);",
1153 "\tvar row = this.el.get_row(position);",
1155 "\tGLib.debug(\"got %s\", row.get_item().get_type().name());",
1162 "xtype" : "TreeListModel"
1166 "* prop" : "sorter",
1170 "* prop" : "sorter",
1173 "$ GLib.Type this_type" : "typeof(Lsp.DocumentSymbol)",
1175 "* prop" : "expression",
1176 "string property_name" : "sort_key",
1177 "xtype" : "PropertyExpression"
1180 "xtype" : "StringSorter"
1183 "xtype" : "TreeListRowSorter"
1186 "xtype" : "SortListModel",
1187 "| Lsp.DocumentSymbol? getSymbolAt" : [
1190 " var tr = (Gtk.TreeListRow)this.el.get_item(row);",
1192 " var a = tr.get_item();; ",
1193 " GLib.debug(\"get_item (2) = %s\", a.get_type().name());",
1196 " return (Lsp.DocumentSymbol)tr.get_item();",
1200 "| int getRowFromSymbol" : [
1201 "(Lsp.DocumentSymbol sym) {",
1203 "\tfor (var i=0;i < this.el.get_n_items(); i++) {",
1204 "\t\tvar tr = (Gtk.TreeListRow)this.el.get_item(i);",
1206 "\t\tif (sym.equals( (Lsp.DocumentSymbol)tr.get_item())) {",
1213 "| void collapseOnLoad" : [
1215 "\tfor (var i=0;i < this.el.get_n_items(); i++) {",
1216 "\t\tvar tr = (Gtk.TreeListRow)this.el.get_item(i);",
1217 "\t\tvar sym = (Lsp.DocumentSymbol)tr.get_item();",
1218 "\t\tswitch (sym.kind) {",
1219 "\t \t\tcase Lsp.SymbolKind.Enum: ",
1220 "\t \t\t\ttr.expanded = false;",
1223 "\t\t\t\t//tr.expanded = true;",
1235 "xtype" : "NoSelection"
1241 "(n_press, x, y) => {",
1243 " \tvar row = _this.navigation.getRowWidgetAt(x,y, out pos );",
1245 " if (row == null) {",
1246 "\t GLib.debug(\"no row selected items\");",
1249 "\tGLib.debug(\"got click on %s\", row.get_type().name()); ",
1250 " //Lsp.DocumentSymbol",
1251 " var sym = row.get_data<Lsp.DocumentSymbol>(\"symbol\");",
1252 " if (sym == null) {",
1258 " \"line\" : 1410,",
1259 " \"character\" : 8",
1262 " \"line\" : 1410,",
1263 " \"character\" : 39",
1267 " GLib.debug(\"goto line %d\", (int)sym.range.start.line); ",
1268 " _this.scroll_to_line((int)sym.range.start.line);",
1269 " Gtk.TextIter iter;",
1270 " _this.buffer.el.get_iter_at_line_offset(out iter, ",
1271 " \t(int)sym.range.start.line,",
1272 " \t(int)sym.range.start.character",
1274 " _this.buffer.el.place_cursor(iter);",
1279 "xtype" : "GestureClick"
1282 "string name" : "editor-navigation",
1283 "xtype" : "ColumnView",
1284 "| Gtk.Widget? getRowWidgetAt" : [
1285 "(double x, double y, out string pos) {",
1288 "\tvar w = this.el.pick(x, y, Gtk.PickFlags.DEFAULT);",
1289 "\t//GLib.debug(\"got widget %s\", w == null ? \"nothing\" : w.get_type().name());",
1290 "\tif (w == null) {",
1294 "\tvar row= w.get_ancestor(GLib.Type.from_name(\"GtkColumnViewRowWidget\"));",
1295 "\tif (row == null) {",
1299 "\t//GLib.debug(\"got colview %s\", row == null ? \"nothing\" : row.get_type().name());",
1303 "\t//GLib.debug(\"row number is %d\", rn);",
1304 "\t//GLib.debug(\"click %d, %d\", (int)x, (int)y);",
1305 "\t// above or belw",
1306 "\tGraphene.Rect bounds;",
1307 "\trow.compute_bounds(this.el, out bounds);",
1308 "\t//GLib.debug(\"click x=%d, y=%d, w=%d, h=%d\", ",
1309 "\t//\t(int)bounds.get_x(), (int)bounds.get_y(),",
1310 "\t//\t(int)bounds.get_width(), (int)bounds.get_height()",
1312 "\tvar ypos = y - bounds.get_y();",
1313 "\t//GLib.debug(\"rel ypos = %d\", (int)ypos);\t",
1314 "\tvar rpos = 100.0 * (ypos / bounds.get_height());",
1315 "\t//GLib.debug(\"rel pos = %d %%\", (int)rpos);",
1316 "\tpos = \"over\";",
1318 "\tif (rpos > 80) {",
1319 "\t\tpos = \"below\";",
1320 "\t} else if (rpos < 20) {",
1321 "\t\tpos = \"above\";",
1326 "| int getRowAt" : [
1327 "(double x, double y, out string pos) {",
1330 "\tvar w = this.el.pick(x, y, Gtk.PickFlags.DEFAULT);",
1331 "\t//GLib.debug(\"got widget %s\", w == null ? \"nothing\" : w.get_type().name());",
1332 "\tif (w == null) {",
1336 "\tvar row= w.get_ancestor(GLib.Type.from_name(\"GtkColumnViewRowWidget\"));",
1337 "\tif (row == null) {",
1341 "\t//GLib.debug(\"got colview %s\", row == null ? \"nothing\" : row.get_type().name());",
1346 "\twhile (cr.get_prev_sibling() != null) {",
1348 "\t\tcr = cr.get_prev_sibling();",
1351 "\t//GLib.debug(\"row number is %d\", rn);",
1352 "\t//GLib.debug(\"click %d, %d\", (int)x, (int)y);",
1353 "\t// above or belw",
1354 "\tGraphene.Rect bounds;",
1355 "\trow.compute_bounds(this.el, out bounds);",
1356 "\t//GLib.debug(\"click x=%d, y=%d, w=%d, h=%d\", ",
1357 "\t//\t(int)bounds.get_x(), (int)bounds.get_y(),",
1358 "\t//\t(int)bounds.get_width(), (int)bounds.get_height()",
1360 "\tvar ypos = y - bounds.get_y();",
1361 "\t//GLib.debug(\"rel ypos = %d\", (int)ypos);\t",
1362 "\tvar rpos = 100.0 * (ypos / bounds.get_height());",
1363 "\t//GLib.debug(\"rel pos = %d %%\", (int)rpos);",
1364 "\tpos = \"over\";",
1366 "\tif (rpos > 80) {",
1367 "\t\tpos = \"below\";",
1368 "\t} else if (rpos < 20) {",
1369 "\t\tpos = \"above\";",
1375 "(Gee.ArrayList<Lsp.DocumentSymbol> syms) {",
1376 "\t_this.navigationwindow.el.show();",
1377 "\t//_this.navliststore.el.remove_all();",
1380 "\tvar ls = new GLib.ListStore(typeof(Lsp.DocumentSymbol));",
1382 "\tforeach(var sym in syms) {",
1383 "\t\tls.append(sym);",
1385 "\tLsp.DocumentSymbol.copyList(ls, _this.navliststore.el);",
1386 "\t//_this.navliststore.el.append(sym);",
1387 "\tthis.last_selected_line = -1;",
1388 "\tGLib.Idle.add(() => {",
1389 "\t\t_this.navigationsort.collapseOnLoad();",
1390 "\t\tGtk.TextIter iter;",
1391 "\t\t_this.buffer.el.get_iter_at_offset (",
1392 "\t\t\t\tout iter, _this.buffer.el.cursor_position);",
1394 "\t\tGLib.debug(\"idle update scroll %d, %d\", iter.get_line(),",
1395 "\t\t\t\titer.get_line_offset());",
1396 "\t\tthis.updateSelectedLine(",
1397 "\t\t\t\t(uint)iter.get_line(),",
1398 "\t\t\t\t(uint)iter.get_line_offset()",
1400 "\t\treturn false;",
1405 "| void updateSelectedLine" : [
1406 "(uint line, uint chr) {",
1407 "\tif (line == this.last_selected_line) {",
1410 "\tGLib.debug(\"select line %d\", (int)line);",
1411 "\tthis.last_selected_line = (int)line;",
1414 "\tvar new_row = -1;",
1415 "\tvar sym = _this.navliststore.symbolAtLine(line, chr);",
1416 "\tif (sym != null) {",
1417 "\t \tnew_row = _this.navigationsort.getRowFromSymbol(sym);",
1418 " \t\tGLib.debug(\"select line %d - row found %d\", (int)line, new_row);",
1420 " \t\tGLib.debug(\" no symbol found at line %d\", (int)line);",
1423 "\tif (this.selected_row != null) { ",
1424 "\t\tGLib.debug(\" remove selected row\");",
1425 "\t\tthis.selected_row.remove_css_class(\"selected-row\");",
1427 "\tthis.selected_row = null;",
1428 "\tif (new_row > -1) {",
1429 "\t\tthis.el.scroll_to(new_row,null,Gtk.ListScrollFlags.NONE, null);",
1430 "\t\tvar row = sym.get_data<Gtk.Widget>(\"widget\");",
1431 "\t\tif (row != null) {",
1432 "\t\t\tGLib.debug(\" Add selected row\");",
1434 "\t\t\trow.add_css_class(\"selected-row\");",
1435 "\t\t\tthis.selected_row = row;",
1439 "\t\t\tGLib.debug(\"could not find widget on row %d\", new_row);",
1449 "xtype" : "ScrolledWindow"
1459 "| bool saveContents" : [
1463 " if (_this.file == null) {",
1469 " var str = _this.buffer.toString();",
1471 " _this.buffer.checkSyntax();",
1475 " // LeftPanel.model.changed( str , false);",
1476 " _this.dirty = false;",
1477 " _this.save_button.el.sensitive = false;",
1479 " // find the text for the node..",
1480 " if (_this.file.xtype != \"PlainFile\") {",
1481 " // in theory these properties have to exist!?!",
1482 " \tthis.prop.val = str;",
1483 " //this.window.windowstate.left_props.reload();",
1485 " _this.file.setSource( str );",
1488 " // call the signal..",
1496 "(string in_txt) {",
1498 "\tvar s = new GtkSource.SearchSettings();",
1499 "\ts.case_sensitive = _this.case_sensitive.el.active;",
1500 "\ts.regex_enabled = _this.regex.el.active;\t",
1501 "\ts.wrap_around = false;",
1503 "\tthis.searchcontext = new GtkSource.SearchContext(this.buffer.el,s);",
1504 "\tthis.searchcontext.set_highlight(true);",
1505 "\tvar txt = in_txt;",
1507 "\tif (_this.multiline.el.active) {",
1508 "\t\ttxt = in_txt.replace(\"\\\\n\", \"\\n\");",
1511 "\ts.set_search_text(txt);",
1512 "\tGtk.TextIter beg, st,en;",
1514 "\tthis.buffer.el.get_start_iter(out beg);",
1515 "\tbool has_wrapped_around;",
1516 "\tthis.searchcontext.forward(beg, out st, out en, out has_wrapped_around);",
1517 "\tthis.last_search_end = 0;",
1519 "\treturn this.searchcontext.get_occurrences_count();",
1527 "| string tempFileContents" : [
1531 " if (_this.file == null) {",
1534 "\tvar str= this.buffer.toString();",
1535 "\tif (_this.file.xtype == \"PlainFile\") {",
1543 " GLib.debug(\"calling validate\"); ",
1544 " // clear the buttons.",
1545 " \tif (_this.prop.name == \"xns\" || _this.prop.name == \"xtype\") {",
1546 "\t\treturn this.file.toSource(); ;",
1549 "\tvar oldcode = _this.prop.val;",
1550 "\t_this.prop.val = str;",
1551 " var ret = _this.file.toSource();",
1552 " _this.prop.val = oldcode;",
1557 "| void backSearch" : [
1558 "(bool change_focus) {",
1560 "\tif (this.searchcontext == null) {",
1564 "\tGtk.TextIter beg, st,en;",
1565 "\tbool has_wrapped_around;",
1566 "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );",
1568 "\tif (!this.searchcontext.backward(beg, out st, out en, out has_wrapped_around)) {",
1569 "\t\tthis.last_search_end = 0;",
1571 "\t\tthis.last_search_end = en.get_offset();",
1572 "\t\tif (change_focus) {",
1573 "\t\t\tthis.view.el.grab_focus();",
1575 "\t\tthis.buffer.el.place_cursor(st);",
1576 "\t\tthis.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);",
1582 "| void forwardSearch" : [
1583 "(bool change_focus) {",
1585 "\tif (this.searchcontext == null) {",
1589 "\tGtk.TextIter beg, st,en;",
1590 "\t bool has_wrapped_around;",
1591 "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end);",
1592 "\tif (!this.searchcontext.forward(beg, out st, out en, out has_wrapped_around)) {",
1594 "\t\tthis.last_search_end = 0; // not sure if this should happen",
1596 "\t\tif (has_wrapped_around) {",
1600 "\t\tthis.last_search_end = en.get_offset();",
1601 "\t\tif (change_focus) {",
1602 "\t\t\tthis.view.el.grab_focus();",
1604 "\t\tthis.buffer.el.place_cursor(st);",
1605 "\t\tthis.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);",
1613 "\t this.file = null; ",
1615 " this.node = null;",
1616 " this.prop = null;",
1617 "\tthis.searchcontext = null;",
1622 "| void scroll_to_line" : [
1625 "\tGLib.Timeout.add(500, () => {",
1627 "\t\tvar buf = this.view.el.get_buffer();",
1629 "\t\tvar sbuf = (GtkSource.Buffer) buf;",
1632 "\t\tGtk.TextIter iter; ",
1633 "\t\tsbuf.get_iter_at_line(out iter, line);",
1634 "\t\tthis.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);",
1635 "\t\treturn false;",
1641 "(JsRender.JsRender file, JsRender.Node? node, JsRender.NodeProp? prop)",
1644 " if (this.file != null) {",
1645 " \tthis.file.navigation_tree_updated.disconnect(",
1646 " \t\t_this.navigation.show",
1649 " this.file = file; ",
1650 " this.file.navigation_tree_updated.connect(",
1651 "\t\t_this.navigation.show",
1653 " if (file.xtype != \"PlainFile\") {",
1654 " \tthis.prop = prop;",
1655 " this.node = node;",
1657 " // find the text for the node..",
1658 " this.view.load( prop.val );",
1659 " this.updateErrorMarks();",
1663 " this.close_btn.el.show(); ",
1666 " this.view.load( file.toSource() );",
1667 " this.updateErrorMarks();",
1668 " this.close_btn.el.hide();",
1669 " var ls = file.getLanguageServer();",
1670 " ls.queueDocumentSymbols(file);",
1671 " ////ls.documentSymbols.begin(file, (a,o) => {",
1672 " //\t_this.navigation.show(ls.documentSymbols.end(o)); ",
1674 " //documentSymbols",
1680 "| void updateErrorMarks" : [
1685 "\tvar buf = _this.buffer.el;",
1686 "\tGtk.TextIter start;",
1687 "\tGtk.TextIter end; ",
1688 "\tbuf.get_bounds (out start, out end);",
1693 "\t//GLib.debug(\"highlight errors\");\t\t ",
1695 "\t // we should highlight other types of errors..",
1697 "\tif (_this.window.windowstate.state != WindowState.State.CODEONLY ",
1699 "\t\t_this.window.windowstate.state != WindowState.State.CODE",
1701 "\t\t//GLib.debug(\"windowstate != CODEONLY?\");",
1707 "\tif (_this.file == null) {",
1708 "\t\tGLib.debug(\"file is null?\");",
1712 "\tvar ar = this.file.getErrors();",
1713 "\tif (ar.size < 1) {",
1714 "\t\tbuf.remove_source_marks (start, end, \"ERR\");",
1715 "\t\tbuf.remove_source_marks (start, end, \"WARN\");",
1716 "\t\tbuf.remove_source_marks (start, end, \"DEPR\");",
1717 "\t\tbuf.remove_tag_by_name (\"ERR\", start, end);",
1718 "\t\tbuf.remove_tag_by_name (\"WARN\", start, end);",
1719 "\t\tbuf.remove_tag_by_name (\"DEPR\", start, end);",
1720 "\t\tthis.last_error_counter = file.error_counter ;",
1721 "\t\t//GLib.debug(\"highlight %s : %s has no errors\", this.file.relpath, category);",
1726 " // basicaly check if there is no change, then we do not do any update..",
1727 " // we can do this by just using an error counter?",
1728 " // if that's changed then we will do an update, otherwise dont bother.",
1731 "\tvar offset = 0;",
1732 "\tvar hoffset = 0;",
1734 "\tvar tlines = buf.get_line_count () +1;",
1736 "\tif (_this.prop != null) {",
1737 "\t\t// this still seems flaky...",
1739 "\t\ttlines = _this.prop.end_line;",
1740 "\t\toffset = _this.prop.start_line;",
1741 "\t\thoffset = _this.node.node_pad.length + 2; //shift it left by 2 ? ..",
1745 "\t\t// no update...",
1746 "\t\tif (this.last_error_counter == file.error_counter) {",
1752 "\tbuf.remove_source_marks (start, end, \"ERR\");",
1753 "\tbuf.remove_source_marks (start, end, \"WARN\");",
1754 "\tbuf.remove_source_marks (start, end, \"DEPR\");",
1755 "\tbuf.remove_tag_by_name (\"ERR\", start, end);",
1756 "\tbuf.remove_tag_by_name (\"WARN\", start, end);",
1757 "\tbuf.remove_tag_by_name (\"DEPR\", start, end);",
1759 "\tforeach(var diag in ar) { ",
1760 "\t Gtk.TextIter iter;",
1761 "// print(\"get inter\\n\");",
1762 "\t var eline = (int)diag.range.start.line - offset;",
1763 "\t var eline_to = (int)diag.range.end.line - offset;",
1764 "\t //var eline = diag.range.end_line - offset;",
1765 "\t //GLib.debug(\"GOT ERROR on line %d -- converted to %d (offset = %d)\",",
1766 "\t //\terr.line ,eline, offset);",
1769 "\t if (eline > tlines || eline < 0) {",
1773 "\t buf.get_iter_at_line( out iter, eline);",
1774 "\t \tvar msg = \"Line: %d %s : %s\".printf(eline+1, diag.category, diag.message);",
1775 "\t buf.create_source_mark( msg, diag.category, iter);",
1777 " \t var spos = (int)diag.range.start.character - hoffset;",
1778 " \t if (spos < 0) { spos =0 ; }",
1779 " \t if (spos > iter.get_chars_in_line()) {",
1780 " \t \tspos = iter.get_chars_in_line();",
1782 "\t\tbuf.get_iter_at_line( out iter, eline_to);",
1783 "\t\tvar epos = (int)diag.range.end.character - hoffset;",
1784 " \t if (epos < 0) { epos =0 ; }",
1785 " \t if (epos > iter.get_chars_in_line()) {",
1786 " \t \tepos = iter.get_chars_in_line();",
1790 " \t buf.get_iter_at_line_offset( out start, eline, spos); ",
1792 " \t buf.get_iter_at_line_offset( out end, eline_to,epos); ",
1794 "\t buf.apply_tag_by_name(diag.category, start, end);",
1796 "\t // GLib.debug(\"set line %d to %s\", eline, msg);",
1797 "\t //this.marks.set(eline, msg);",
1799 "\tthis.last_error_counter = file.error_counter ;",