"src/Palete/Palete.vala",
"src/Palete/Roo.vala",
"src/Palete/ValaSourceCompiler.vala",
- "src/Palete/ValaSource.vala",
"src/Palete/VapiParser.vala",
"src/Builder4/WindowLeftTree.bjs",
"src/Builder4/PopoverAddProp.bjs",
"jsonrpc-glib-1.0",
"gio-unix-2.0"
]
-}
\ No newline at end of file
+}
}
- public void showSpinnerLspLog(Palete.LanguageClientAction action, string message) {
+ public static void showSpinnerLspLog(Palete.LanguageClientAction action, string message) {
var msg = action.to_string() + " " + message;
switch(action) {
// ?? restart = software-update-urgent - crash?
-
+
foreach (var win in BuilderApplication.windows) {
- if (icon == "") {
+ if (icon != "") {
win.statusbar_compile_spinner.start(icon, tooltip);
} else {
win.statusbar_compile_spinner.stop();
"() {",
" // clear list...",
" ",
- " ",
+ " ",
" _this.is_loading = true;",
" ",
- " ",
+ "",
" Project.Project.loadAll();",
" _this.project_list.el.set_model(new Gtk.SingleSelection(null));",
" Project.Project.loadIntoStore(this.projectmodel.el);",
public void load () {
// clear list...
-
+
_this.is_loading = true;
-
+
Project.Project.loadAll();
_this.project_list.el.set_model(new Gtk.SingleSelection(null));
Project.Project.loadIntoStore(this.projectmodel.el);
" var oldcode =_this.file.toSource();",
" _this.file.setSource(str);",
" _this.file.getLanguageServer().document_change(_this.file);",
- "\t BuilderApplication.showSpinner(true);",
+ "\t BuilderApplication.showSpinner(\"appointment soon\",\"document change pending\");",
" _this.file.setSource(oldcode);",
" ",
"\t\t ",
"",
"\tbuf.remove_source_marks (start, end, category);",
" ",
- "\tGLib.debug(\"highlight errors\");\t\t ",
+ "\t//GLib.debug(\"highlight errors\");\t\t ",
"",
"\t // we should highlight other types of errors..",
"",
"\t\t&&",
"\t\t_this.window.windowstate.state != WindowState.State.CODE",
"\t\t) {",
- "\t\tGLib.debug(\"windowstate != CODEONLY?\");",
+ "\t\t//GLib.debug(\"windowstate != CODEONLY?\");",
"\t\t",
"\t\treturn;",
"\t} ",
"\t}",
"\tvar ar = this.file.getErrors(category);",
"\tif (ar == null || ar.get_n_items() < 1) {",
- "\t\tGLib.debug(\"highlight %s : %s has no errors\", this.file.relpath, category);",
+ "\t\t//GLib.debug(\"highlight %s : %s has no errors\", this.file.relpath, category);",
"\t\treturn;",
"\t}",
" ",
"\tvar tlines = buf.get_line_count () +1;",
"\t",
"\tif (_this.prop != null) {",
- "\t",
+ "\t\t// this still seems flaky...",
+ "\t\t",
"\t\ttlines = _this.prop.end_line;",
"\t\toffset = _this.prop.start_line;",
- "\t\t",
- "\t",
+ "\t\t ",
"\t}",
"\t ",
"\tfor (var i = 0; i < ar.get_n_items();i++) {",
"\t Gtk.TextIter iter;",
"// print(\"get inter\\n\");",
"\t var eline = err.line - offset;",
- "\t GLib.debug(\"GOT ERROR on line %d -- converted to %d (offset = %d)\",",
- "\t \terr.line ,eline, offset);",
+ "\t //GLib.debug(\"GOT ERROR on line %d -- converted to %d (offset = %d)\",",
+ "\t //\terr.line ,eline, offset);",
"\t ",
"\t ",
"\t if (eline > tlines || eline < 0) {",
"\t ",
"\t\tvar msg = \"Line: %d %s : %s\".printf(eline+1, err.category, err.msg);",
"\t buf.create_source_mark( msg, err.category, iter);",
- "\t GLib.debug(\"set line %d to %s\", eline, msg);",
+ "\t // GLib.debug(\"set line %d to %s\", eline, msg);",
"\t //this.marks.set(eline, msg);",
"\t}",
"\treturn ;",
buf.remove_source_marks (start, end, category);
- GLib.debug("highlight errors");
+ //GLib.debug("highlight errors");
// we should highlight other types of errors..
&&
_this.window.windowstate.state != WindowState.State.CODE
) {
- GLib.debug("windowstate != CODEONLY?");
+ //GLib.debug("windowstate != CODEONLY?");
return;
}
}
var ar = this.file.getErrors(category);
if (ar == null || ar.get_n_items() < 1) {
- GLib.debug("highlight %s : %s has no errors", this.file.relpath, category);
+ //GLib.debug("highlight %s : %s has no errors", this.file.relpath, category);
return;
}
var tlines = buf.get_line_count () +1;
if (_this.prop != null) {
-
+ // this still seems flaky...
+
tlines = _this.prop.end_line;
offset = _this.prop.start_line;
-
-
+
}
for (var i = 0; i < ar.get_n_items();i++) {
Gtk.TextIter iter;
// print("get inter\n");
var eline = err.line - offset;
- GLib.debug("GOT ERROR on line %d -- converted to %d (offset = %d)",
- err.line ,eline, offset);
+ //GLib.debug("GOT ERROR on line %d -- converted to %d (offset = %d)",
+ // err.line ,eline, offset);
if (eline > tlines || eline < 0) {
var msg = "Line: %d %s : %s".printf(eline+1, err.category, err.msg);
buf.create_source_mark( msg, err.category, iter);
- GLib.debug("set line %d to %s", eline, msg);
+ // GLib.debug("set line %d to %s", eline, msg);
//this.marks.set(eline, msg);
}
return ;
var oldcode =_this.file.toSource();
_this.file.setSource(str);
_this.file.getLanguageServer().document_change(_this.file);
- BuilderApplication.showSpinner(true);
+ BuilderApplication.showSpinner("appointment soon","document change pending");
_this.file.setSource(oldcode);
"\t _this.statusbar_compile_icon.el.hide();",
" } else {",
"\t this.el.hide();",
+ "\t// GLib.debug(\"set status icon %s, %s\", icon, tooltip);",
"\t _this.statusbar_compile_icon.el.tooltip_text = tooltip;",
"\t _this.statusbar_compile_icon.el.icon_name = icon;",
"\t _this.statusbar_compile_icon.el.show();\t ",
_this.statusbar_compile_icon.el.hide();
} else {
this.el.hide();
+ // GLib.debug("set status icon %s, %s", icon, tooltip);
_this.statusbar_compile_icon.el.tooltip_text = tooltip;
_this.statusbar_compile_icon.el.icon_name = icon;
_this.statusbar_compile_icon.el.show();
BuilderApplication.updateWindows();
file.getLanguageServer().document_open(file);
- BuilderApplication.showSpinner(true);
+ BuilderApplication.showSpinner("spinner", "document open sent");
if (file.xtype == "PlainFile") {
this.win.codeeditviewbox.el.show();
// this.saveJS(); - disabled at present.. project settings will probably enable this later..
this.saveVala();
- BuilderApplication.showSpinner(true);
+
this.getLanguageServer().document_save(this);
+ BuilderApplication.showSpinner("spinner", "document save send");
}
// ignore these calls.
public override void saveHTML ( string html ) {}
var pviter = props.map_iterator();
while (!skip_props && pviter.next()) {
- GLib.debug ("Check: " +cls + "::(" + pviter.get_value().propertyof + ")" + pviter.get_key() + " " );
+ //GLib.debug ("Check: " +cls + "::(" + pviter.get_value().propertyof + ")" + pviter.get_key() + " " );
// skip items we have already handled..
if (!this.node.has(pviter.get_key())) {
this.msg = msg;
this.file = file;
this.category = 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);
+ //GLib.debug("new error %s : %d %s %s", file.path, this.line, this.category, this.msg);
this.compiler.isZombie();
GLib.debug("compile got %s", output);
if (output == "") {
- BuilderApplication.showSpinner(false);
+ BuilderApplication.showSpinner("face-sad", "compile failed - no error message?");
return;
}
-
+ if (this.requestType == ValaCompileRequestType.RUN) {
+ BuilderApplication.showSpinner("");
+ this.execResult();
+ return;
+ }
+
+ // below is not used anymore - as we dont use this
try {
//GLib.debug("GOT output %s", output);
var node = pa.get_root();
if (node.get_node_type () != Json.NodeType.OBJECT) {
- BuilderApplication.showSpinner(false);
+ BuilderApplication.showSpinner("");
return;
}
var ret = node.get_object ();
//CompileError.parseCompileResults(this,ret);
- BuilderApplication.showSpinner(false);
+ BuilderApplication.showSpinner("");
} catch (GLib.Error e) {
GLib.debug("parsing output got error %s", e.message);
- BuilderApplication.showSpinner(false);
+ BuilderApplication.showSpinner("");
return;
}
- if (this.requestType == ValaCompileRequestType.RUN) {
- this.execResult();
- }
}
public void onOutput(string line)
Javascript.singleton().validate(contents, this.file );
- BuilderApplication.showSpinner(false);
+ BuilderApplication.showSpinner("");
BuilderApplication.updateCompileResults();
//this.queue.onCompileComplete(this);
* x = new ValaSource();
* x.connect.compiled(... do something with results... );
*
+
+ THIS IS NOT USED ?? - replaced with valacompilerequest
*
*/
return false;
}
this.compiler.complete.connect(spawnResult);
- this.spinner(true);
+ BuilderApplication.showSpinner("spinner", "compiling file");
try {
this.compiler.run();
} catch (GLib.Error e) {
GLib.debug("Error %s",e.message);
- this.spinner(false);
+ BuilderApplication.showSpinner("face-sad", "compile failed %s".printf(e.message));
this.compiler = null;
this.deleteTemp();
return false;
}
- public void spinner(bool state)
- {
- foreach (var win in BuilderApplication.windows) {
- if (state) {
- win.statusbar_compile_spinner.start();
- } else {
- win.statusbar_compile_spinner.stop();
- }
- }
- }
+
public bool checkFileSpawn(JsRender.JsRender file )
switch( lang ) {
case "vala":
var ls = new Palete.LanguageClientVala(this);
- ls.log.connect(BuilderApplication.showSpinnerLspLog);
+ ls.log.connect((act, msg) => {
+ //GLib.debug("log %s: %s", act.to_string(), msg);
+ BuilderApplication.showSpinnerLspLog(act,msg);
+ });
this.language_servers.set(lang, ls);
break;
default :