+
+ public CompileError.new_jserror(JsRender.JsRender file, string category, int line, string msg)
+ {
+ this.lines = new GLib.ListStore(typeof(CompileError));
+ this.line = line;
+ this.msg = msg;
+ this.file = file;
+ this.category = category;
+
+
+ }
+
+ public CompileError.new_from_diagnostic(JsRender.JsRender file, Lsp.Diagnostic diag)
+ {
+ this.file = file;
+ this.category = diag.category;
+ this.line = (int) diag.range.start.line;
+ this.msg = diag.message;
+ this.lines = new GLib.ListStore(typeof(CompileError));
+ GLib.debug("new error %s : %d %s %s", file.path, this.line, this.category, this.msg);
+
+
+
+ }
+
+ public CompileError.new_from_file(JsRender.JsRender file, string category)
+ {
+ this.file = file;
+ this.category = category;
+ this.lines = file.getErrors(category);
+ this.title = file.relpath + " (" + lines.get_n_items().to_string() + ")";
+ }
+
+/*
+ public CompileError.new_line(CompileError? parent, int line, string msg)