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 pos_root_x" : "",
14 "# int pos_root_y" : "",
15 "# string activeEditor" : "\"\"",
16 "$ homogeneous" : false,
19 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
20 "bool hexpand" : true,
21 "bool vexpand" : true,
22 "int last_search_end" : 0,
25 "$ homogeneous" : false,
27 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
28 "bool hexpand" : true,
37 " _this.saveContents();",
46 "bool hexpand" : true,
51 "* ctor" : "new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL,6, 30, 1)",
54 "\tthis.el.set_range(6,30);",
55 "\tthis.el.set_value(8);",
59 "bool draw_value" : false,
60 "bool has_origin" : true,
61 "bool sensitive" : true,
63 "int width_request" : 200,
69 "\t _this.view.css.load_from_string(",
70 "\t \t\t\"#editor-view { font: %dpx monospace; }\".printf((int)val)",
86 "Gtk.IconSize icon_size" : "Gtk.IconSize.NORMAL",
87 "string icon_name" : "window-close",
94 " _this.saveContents();",
95 " _this.window.windowstate.switchState(WindowState.State.PREVIEW);",
100 "string icon_name" : "window-close",
108 "Gtk.PolicyType hscrollbar_policy" : "Gtk.PolicyType.AUTOMATIC",
109 "Gtk.PolicyType vscrollbar_policy" : "Gtk.PolicyType.AUTOMATIC",
110 "bool overlay_scrolling" : false,
111 "bool vexpand" : true,
112 "id" : "RightEditor",
115 "# Gtk.CssProvider css" : "null",
116 "$ gboolean auto_indent" : true,
117 "$ xns" : "GtkSource",
121 "this.css = new Gtk.CssProvider();",
123 "this.css.load_from_string(",
124 "\t\"#editor-view { font: 12px monospace;}\"",
127 "Gtk.StyleContext.add_provider_for_display(",
128 "\tthis.el.get_display(),",
130 "\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
137 "this.el.completion.add_provider(new Palete.CompletionProvider(_this));",
140 "this.el.completion.unblock_interactive();",
141 "this.el.completion.select_on_show = true; // select",
143 "this.el.completion.remember_info_visibility\t = true;",
146 "var attrs = new GtkSource.MarkAttributes();",
147 "var pink = Gdk.RGBA();",
148 "pink.parse ( \"pink\");",
149 "attrs.set_background ( pink);",
150 "attrs.set_icon_name ( \"process-stop\"); ",
151 "attrs.query_tooltip_text.connect(( mark) => {",
152 " GLib.debug(\"tooltip query? %s\", mark.name);",
153 " return strdup( mark.name);",
155 " attrs.query_tooltip_markup.connect(( mark) => {",
156 " GLib.debug(\"tooltip query? %s\", mark.name);",
157 " return strdup( mark.name);",
159 "this.el.set_mark_attributes (\"ERR\", attrs, 1);",
161 " var wattrs = new GtkSource.MarkAttributes();",
162 "var blue = Gdk.RGBA();",
163 "blue.parse ( \"#ABF4EB\");",
164 "wattrs.set_background ( blue);",
165 "wattrs.set_icon_name ( \"process-stop\"); ",
166 "wattrs.query_tooltip_text.connect(( mark) => {",
167 " GLib.debug(\"tooltip query? %s\", mark.name);",
168 " return strdup(mark.name);",
170 "wattrs.query_tooltip_markup.connect(( mark) => {",
171 " GLib.debug(\"tooltip query? %s\", mark.name);",
172 " return strdup(mark.name);",
174 "this.el.set_mark_attributes (\"WARN\", wattrs, 1);",
178 " var dattrs = new GtkSource.MarkAttributes();",
179 "var purple = Gdk.RGBA();",
180 "purple.parse ( \"#EEA9FF\");",
181 "dattrs.set_background ( purple);",
182 "dattrs.set_icon_name ( \"process-stop\"); ",
183 "dattrs.query_tooltip_text.connect(( mark) => {",
184 "\tGLib.debug(\"tooltip query? %s\", mark.name);",
185 " return strdup(mark.name);",
187 "dattrs.query_tooltip_markup.connect(( mark) => {",
188 "\tGLib.debug(\"tooltip query? %s\", mark.name);",
189 " return strdup(mark.name);",
191 "this.el.set_mark_attributes (\"DEPR\", dattrs, 1);",
194 " this.el.get_space_drawer().set_matrix(null);",
195 " this.el.get_space_drawer().set_types_for_locations( ",
196 "\tGtkSource.SpaceLocationFlags.ALL,",
197 "\tGtkSource.SpaceTypeFlags.ALL",
199 "this.el.get_space_drawer().set_enable_matrix(true);",
201 "Gtk.SourceDrawSpacesFlags.LEADING + ",
202 "Gtk.SourceDrawSpacesFlags.TRAILING + ",
203 "Gtk.SourceDrawSpacesFlags.TAB + ",
204 "Gtk.SourceDrawSpacesFlags.SPACE",
208 "bool has_tooltip" : true,
209 "bool hexpand" : true,
210 "bool insert_spaces_instead_of_tabs" : true,
211 "bool vexpand" : true,
212 "boolean show_line_marks" : true,
213 "boolean show_line_numbers" : true,
214 "gboolean highlight_current_line" : true,
219 "$ Gee.HashMap<int,string>? xmarks" : "null",
220 "$ xns" : "GtkSource",
221 "$ xtype" : "Buffer",
223 "bool check_queued" : false,
224 "bool enable_undo" : true,
226 "int error_line" : "-1",
230 " // check syntax??",
232 " _this.save_button.el.sensitive = true;",
233 " print(\"EDITOR CHANGED\");",
234 " this.checkSyntax();",
236 " _this.dirty = true;",
238 " // this.get('/LeftPanel.model').changed( str , false);",
244 "| bool checkSyntax" : [
248 " var str = this.toString();",
251 " if (this.error_line > 0) {",
252 " Gtk.TextIter start;",
253 " Gtk.TextIter end; ",
254 " this.el.get_bounds (out start, out end);",
256 " this.el.remove_source_marks (start, end, null);",
258 " if (str.length < 1) {",
259 " print(\"checkSyntax - empty string?\\n\");",
263 " // bit presumptiona",
264 " if (_this.file.xtype == \"PlainFile\" && _this.file.project.xtype == \"Gtk\") {",
266 " // assume it's gtk...",
268 "\t\tBuilderApplication.valacompilequeue.addFile( ",
269 "\t\t\tPalete.ValaCompileRequestType.FILE_CHANGE, ",
270 "\t\t\t_this.file , str, false) ;",
276 " if (_this.file == null) {",
284 " GLib.debug(\"calling validate\"); ",
285 " // clear the buttons.",
287 " BuilderApplication.valacompilequeue.addProp( ",
288 " \t\tPalete.ValaCompileRequestType.PROP_CHANGE,",
296 " //print(\"done mark line\\n\");",
298 " return true; // at present allow saving - even if it's invalid..",
302 "| bool highlightErrors" : [
303 "( Gee.HashMap<int,string> validate_res) {",
305 "\tthis.error_line = validate_res.size;",
307 "\tif (this.error_line < 1) {",
310 "\tvar tlines = this.el.get_line_count ();",
311 "\tGtk.TextIter iter;",
312 "\tvar valiter = validate_res.map_iterator();",
313 "\twhile (valiter.next()) {",
315 "\t// print(\"get inter\\n\");",
316 "\t\tvar eline = valiter.get_key();",
317 "\t\tif (eline > tlines) {",
320 "\t\tthis.el.get_iter_at_line( out iter, eline);",
321 "\t\t//print(\"mark line\\n\");",
322 "\t\tthis.el.create_source_mark(valiter.get_value(), \"ERR\", iter);",
327 "| bool highlightErrorsJson" : [
328 "(string type, Json.Object obj) {",
329 "\tGtk.TextIter start;",
330 "\tGtk.TextIter end; ",
331 "\tthis.el.get_bounds (out start, out end);",
333 "\tthis.el.remove_source_marks (start, end, type);",
334 "\tGLib.debug(\"highlight errors\");\t\t ",
336 "\t // we should highlight other types of errors..",
338 "\tif (!obj.has_member(type)) {",
339 "\t\tGLib.debug(\"Return has no errors\\n\");",
343 "\tif (_this.window.windowstate.state != WindowState.State.CODEONLY ",
345 "\t\t_this.window.windowstate.state != WindowState.State.CODE",
347 "\t\tGLib.debug(\"windowstate != CODEONLY?\");",
352 "\t//this.marks = new Gee.HashMap<int,string>();",
353 "\tvar err = obj.get_object_member(type);",
355 "\tif (_this.file == null) {",
356 "\t\tGLib.debug(\"file is null?\");",
360 "\tvar valafn = _this.file.path;",
362 "\tif (_this.file.xtype != \"PlainFile\") {",
364 "\t\tvalafn = \"\";",
366 "\t\t\tvar regex = new Regex(\"\\\\.bjs$\");",
367 "\t\t\t// should not happen",
368 "\t \t\tvalafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");",
369 "\t\t} catch (GLib.RegexError e) {",
370 "\t\t\treturn true;",
376 "\tif (!err.has_member(valafn)) {",
377 "\t\tGLib.debug(\"File path has no errors\");",
381 "\tvar lines = err.get_object_member(valafn);",
384 "\tif (obj.has_member(\"line_offset\")) { // ?? why??",
385 "\t\toffset = (int)obj.get_int_member(\"line_offset\") + 1;",
389 "\tvar tlines = this.el.get_line_count () +1;",
391 "\tif (_this.prop != null) {",
393 "\t\ttlines = _this.prop.end_line + 1;",
394 "\t\toffset = _this.prop.start_line + 1;",
400 "\tlines.foreach_member((obj, line, node) => {",
402 "\t Gtk.TextIter iter;",
403 "// print(\"get inter\\n\");",
404 "\t var eline = int.parse(line) - offset;",
405 "\t GLib.debug(\"GOT ERROR on line %s -- converted to %d (offset = %d)\\n\", line,eline, offset);",
408 "\t if (eline > tlines || eline < 0) {",
413 "\t this.el.get_iter_at_line( out iter, eline);",
414 "\t //print(\"mark line\\n\");",
415 "\t var msg = \"\";",
416 "\t var ar = lines.get_array_member(line);",
417 "\t for (var i = 0 ; i < ar.get_length(); i++) {",
418 "\t \tif (ar.get_string_element(i) == \"Success\") {",
421 "\t\t\tmsg += (msg.length > 0) ? \"\\n\" : \"\";",
422 "\t\t\tmsg += ar.get_string_element(i);",
424 "\t\tif (msg == \"\") {",
427 "\t\tmsg = \"Line: %d\".printf(eline+1) + \" \" + msg;",
428 "\t this.el.create_source_mark(msg, type, iter);",
429 "\t GLib.debug(\"set line %d to %m\", eline, msg);",
430 "\t // this.marks.set(eline, msg);",
441 "| string toString" : [
446 " this.el.get_start_iter(out s);",
447 " this.el.get_end_iter(out e);",
448 " var ret = this.el.get_text(s,e,true);",
449 " //print(\"TO STRING? \" + ret);",
459 "(keyval, keycode, state) => {",
462 " if (keyval == Gdk.Key.s && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
463 " GLib.debug(\"SAVE: ctrl-S pressed\");",
464 " _this.saveContents();",
468 " if (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
469 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
470 "\t\t_this.forwardSearch(true);",
473 "\tif (keyval == Gdk.Key.f && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
474 "\t GLib.debug(\"SAVE: ctrl-f pressed\");",
475 "\t\t_this.search_entry.el.grab_focus();",
479 " // print(event.key.keyval)",
488 "xtype" : "EventControllerKey"
493 "(x, y, keyboard_tooltip, tooltip) => {",
495 "\t//GLib.debug(\"query tooltip\");",
496 "\tGtk.TextIter iter;",
499 "\tvar yoff = (int) _this.RightEditor.el.vadjustment.value;",
501 "\t// I think this is problematic - if it's compliing / updating at same time as query.",
503 "\t//if (_this.window.statusbar_compile_spinner.el.spinning) {",
504 "\t//\treturn false;",
507 "\tthis.el.get_iter_at_position (out iter, out trailing, x, y + yoff);",
509 "\tvar l = iter.get_line();",
513 "\t// GLib.debug(\"query tooltip line %d\", (int) l);",
519 "\tif (_this.buffer.marks != null && _this.buffer.marks.has_key(l)) {",
520 "\t\tGLib.debug(\"line %d setting tip to %s\", l, _this.buffer.marks.get(l));",
521 "\t\ttooltip.set_text(_this.buffer.marks.get(l).dup());",
529 "\t// this crashes?? - not sure why.",
530 "\tvar marks = _this.buffer.el.get_source_marks_at_line(l, \"ERR\");",
531 "\tif (marks.is_empty()) {",
532 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"WARN\");",
534 "\tif (marks.is_empty()) {",
535 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"DEPR\");",
538 "\t// GLib.debug(\"query tooltip line %d marks %d\", (int)l, (int) marks.length());",
540 "\tmarks.@foreach((m) => { ",
541 "\t\t//GLib.debug(\"got mark %s\", m.name);",
542 "\t\tstr += (str.length > 0 ? \"\\n\" : \"\") + m.category + \": \" + m.name;",
544 "\t// true if there is a mark..",
545 "\tif (str.length > 0 ) {",
546 "\t\ttooltip.set_text( str );",
548 "\treturn str.length > 0 ? true : false;",
554 "string name" : "editor-view",
555 "uint tab_width" : 4,
560 "// show the help page for the active node..",
561 " //this.get('/Help').show();",
563 " // this.get('/BottomPane').el.set_current_page(0);",
564 " \tGLib.debug(\"load called - Reset undo buffer\");",
566 " var buf = (GtkSource.Buffer)this.el.get_buffer();",
567 " buf.begin_irreversible_action();",
568 " buf.set_text(str, str.length);",
569 " buf.end_irreversible_action();",
571 " var lm = GtkSource.LanguageManager.get_default();",
572 " var lang = \"vala\";",
573 " if (_this.file != null) {",
574 " lang = _this.file.language;",
576 " print(\"lang=%s, content_type = %s\\n\", lang, _this.file.content_type);",
577 " var lg = _this.file.content_type.length > 0 ?",
578 " lm.guess_language(_this.file.path, _this.file.content_type) :",
579 " lm.get_language(lang);",
582 " ((GtkSource.Buffer)(this.el.get_buffer())) .set_language(lg); ",
584 " this.el.insert_spaces_instead_of_tabs = true;",
585 " if (lg != null) {",
586 "\t\tprint(\"sourcelanguage = %s\\n\", lg.name);",
587 "\t\tif (lg.name == \"Vala\") {",
588 "\t\t this.el.insert_spaces_instead_of_tabs = false;",
591 " _this.dirty = false;",
592 " this.el.grab_focus();",
593 " _this.save_button.el.sensitive = false;",
598 "xtype" : "ScrolledWindow"
603 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
604 "bool homogeneous" : false,
605 "bool vexpand" : false,
610 "Gtk.CssProvider css" : "",
611 "bool hexpand" : true,
612 "id" : "search_entry",
618 "(keyval, keycode, state) => {",
620 "\tif (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
621 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
622 "\t\t_this.forwardSearch(true);",
627 " \tif (keyval == Gdk.Key.Return && _this.search_entry.el.text.length > 0) {",
628 "\t\t_this.forwardSearch(true);",
634 " // print(event.key.keyval)",
641 "xtype" : "EventControllerKey"
648 "_this.search(_this.search_entry.el.text);",
649 "\t _this.search_results.updateResults();",
651 "\tGLib.Timeout.add_seconds(1,() => {",
652 "\t\t _this.search_results.updateResults();",
653 "\t\t return false;",
659 "string name" : "editor-search-entry",
660 "string placeholder_text" : "Press enter to search",
661 "uint search_delay" : 3,
662 "xtype" : "SearchEntry",
663 "| void forwardSearch" : [
664 "(bool change_focus) {",
667 "\t_this.forwardSearch(change_focus);",
671 "\tswitch(_this.windowstate.state) {",
672 "\t\tcase WindowState.State.CODEONLY:",
673 "\t\t//case WindowState.State.CODE:",
674 "\t\t\t// search the code being edited..",
675 "\t\t\t_this.windowstate.code_editor_tab.forwardSearch(change_focus);",
678 "\t\tcase WindowState.State.PREVIEW:",
679 "\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {",
680 "\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);",
682 "\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);",
695 "id" : "search_results",
696 "int margin_end" : 4,
697 "int margin_start" : 4,
698 "string label" : "No Results",
700 "| void updateResults" : [
702 "\tthis.el.visible = true;",
704 "\tvar res = _this.searchcontext.get_occurrences_count();",
706 "\t\t_this.search_results.el.label = \"??? Matches\";\t\t",
710 "\t_this.nextBtn.el.sensitive = false;",
711 "\t_this.backBtn.el.sensitive = false;\t",
714 "\t\t_this.search_results.el.label = \"%d Matches\".printf(res);",
715 "\t\t_this.nextBtn.el.sensitive = true;",
716 "\t\t_this.backBtn.el.sensitive = true;",
719 "\t_this.search_results.el.label = \"No Matches\";",
726 "bool always_show_image" : true,
727 "bool sensitive" : false,
733 "\t_this.forwardSearch(true);",
740 "string icon_name" : "go-down",
745 "bool always_show_image" : true,
746 "bool sensitive" : false,
752 "\t_this.backSearch(true);",
758 "string icon_name" : "go-up",
763 "bool always_show_arrow" : true,
764 "bool always_show_image" : true,
768 "* prop" : "popover",
769 "id" : "search_settings",
774 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
785 "id" : "case_sensitive",
786 "string label" : "Case Sensitive",
787 "xtype" : "CheckButton"
798 "string label" : "Regex",
799 "xtype" : "CheckButton"
804 "string label" : "Multi-line (add \\n)",
805 "xtype" : "CheckButton"
814 "string icon_name" : "emblem-system",
815 "xtype" : "MenuButton"
822 "| bool saveContents" : [
826 " if (_this.file == null) {",
832 " var str = _this.buffer.toString();",
834 " _this.buffer.checkSyntax();",
838 " // LeftPanel.model.changed( str , false);",
839 " _this.dirty = false;",
840 " _this.save_button.el.sensitive = false;",
842 " // find the text for the node..",
843 " if (_this.file.xtype != \"PlainFile\") {",
844 " // in theory these properties have to exist!?!",
845 " \tthis.prop.val = str;",
846 " //this.window.windowstate.left_props.reload();",
848 " _this.file.setSource( str );",
851 " // call the signal..",
861 "\tvar s = new GtkSource.SearchSettings();",
862 "\ts.case_sensitive = _this.case_sensitive.el.active;",
863 "\ts.regex_enabled = _this.regex.el.active;\t",
864 "\ts.wrap_around = false;",
866 "\tthis.searchcontext = new GtkSource.SearchContext(this.buffer.el,s);",
867 "\tthis.searchcontext.set_highlight(true);",
868 "\tvar txt = in_txt;",
870 "\tif (_this.multiline.el.active) {",
871 "\t\ttxt = in_txt.replace(\"\\\\n\", \"\\n\");",
874 "\ts.set_search_text(txt);",
875 "\tGtk.TextIter beg, st,en;",
877 "\tthis.buffer.el.get_start_iter(out beg);",
878 "\tbool has_wrapped_around;",
879 "\tthis.searchcontext.forward(beg, out st, out en, out has_wrapped_around);",
880 "\tthis.last_search_end = 0;",
882 "\treturn this.searchcontext.get_occurrences_count();",
890 "| void backSearch" : [
891 "(bool change_focus) {",
893 "\tif (this.searchcontext == null) {",
897 "\tGtk.TextIter beg, st,en;",
898 "\tbool has_wrapped_around;",
899 "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );",
901 "\tif (!this.searchcontext.backward(beg, out st, out en, out has_wrapped_around)) {",
902 "\t\tthis.last_search_end = 0;",
904 "\t\tthis.last_search_end = en.get_offset();",
905 "\t\tif (change_focus) {",
906 "\t\t\tthis.view.el.grab_focus();",
908 "\t\tthis.buffer.el.place_cursor(st);",
909 "\t\tthis.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);",
915 "| void forwardSearch" : [
916 "(bool change_focus) {",
918 "\tif (this.searchcontext == null) {",
922 "\tGtk.TextIter beg, st,en;",
923 "\t bool has_wrapped_around;",
924 "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end);",
925 "\tif (!this.searchcontext.forward(beg, out st, out en, out has_wrapped_around)) {",
927 "\t\tthis.last_search_end = 0; // not sure if this should happen",
929 "\t\tif (has_wrapped_around) {",
933 "\t\tthis.last_search_end = en.get_offset();",
934 "\t\tif (change_focus) {",
935 "\t\t\tthis.view.el.grab_focus();",
937 "\t\tthis.buffer.el.place_cursor(st);",
938 "\t\tthis.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);",
946 "\t this.file = null; ",
948 " this.node = null;",
949 " this.prop = null;",
950 "\tthis.searchcontext = null;",
955 "| void scroll_to_line" : [
958 "\tGLib.Timeout.add(500, () => {",
960 "\t\tvar buf = this.view.el.get_buffer();",
962 "\t\tvar sbuf = (GtkSource.Buffer) buf;",
965 "\t\tGtk.TextIter iter; ",
966 "\t\tsbuf.get_iter_at_line(out iter, line);",
967 "\t\tthis.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);",
974 "(JsRender.JsRender file, JsRender.Node? node, JsRender.NodeProp? prop)",
977 " this.file = file; ",
979 " if (file.xtype != \"PlainFile\") {",
980 " \tthis.prop = prop;",
981 " this.node = node;",
983 " // find the text for the node..",
984 " this.view.load( prop.val );",
987 " this.close_btn.el.show(); ",
990 " this.view.load( file.toSource() );",
991 " this.close_btn.el.hide();",
996 "| void updateErrorMarks" : [
997 "(GLib.ListStore? ar) {",
1001 "\t var buf = _this.buffer.el;",
1002 "\tGtk.TextIter start;",
1003 "\tGtk.TextIter end; ",
1004 "\tbuf.get_bounds (out start, out end);",
1006 "\tbuf.remove_source_marks (start, end, \"ERR\");",
1007 "\tbuf.remove_source_marks (start, end, \"WARN\");",
1008 "\tbuf.remove_source_marks (start, end, \"DEPR\");",
1009 "\tGLib.debug(\"highlight errors\");\t\t ",
1011 "\t // we should highlight other types of errors..",
1013 "\tif (ar == null || ar.get_n_items() < 1) {",
1014 "\t\tGLib.debug(\"Return has no errors\\n\");",
1018 "\tif (_this.window.windowstate.state != WindowState.State.CODEONLY ",
1020 "\t\t_this.window.windowstate.state != WindowState.State.CODE",
1022 "\t\tGLib.debug(\"windowstate != CODEONLY?\");",
1028 "\tif (_this.file == null) {",
1029 "\t\tGLib.debug(\"file is null?\");",
1037 "\tvar offset = 1;",
1040 "\tvar tlines = buf.get_line_count () +1;",
1042 "\tif (_this.prop != null) {",
1044 "\t\ttlines = _this.prop.end_line + 1;",
1045 "\t\toffset = _this.prop.start_line + 1;",
1049 "\tfor (var i = 0; i < ar.get_n_items();i++) {",
1050 "\t\tvar err = (Palete.CompileError) ar.get_item(i);",
1052 "\t Gtk.TextIter iter;",
1053 "// print(\"get inter\\n\");",
1054 "\t var eline = err.line - offset;",
1055 "\t GLib.debug(\"GOT ERROR on line %d -- converted to %d (offset = %d)\",",
1056 "\t \terr.line ,eline, offset);",
1059 "\t if (eline > tlines || eline < 0) {",
1064 "\t buf.get_iter_at_line( out iter, eline);",
1067 "\t\tvar msg = \"Line: %d %s : %s\".printf(eline+1, err.category, err.msg);",
1068 "\t buf.create_source_mark( msg, err.category, iter);",
1069 "\t GLib.debug(\"set line %d to %m\", eline, msg);",
1070 "\t // this.marks.set(eline, msg);",