src/Palete/ValaSource.vala
[app.Builder.js] / src / Palete / ValaSource.vala
index 2e4838c..ad43975 100644 (file)
@@ -42,10 +42,10 @@ namespace Palete {
                        }
                        
                        if (source.file.filename != "~~~~~testfile.vala") {
-                               this.file.compile_notice("Warn", this.file.path, source.begin.line, message);
+                               this.file.compile_notice("WARN", source.file.filename , source.begin.line, message);
                                return;
                        }
-                       this.notice("Warn", source.file.filename, source.begin.line, message);
+                       this.file.compile_notice("WARN", this.file.path, source.begin.line, message);
                        
                }
                public override void depr (Vala.SourceReference? source, string message) {
@@ -56,10 +56,10 @@ namespace Palete {
                        }
                        
                        if (source.file.filename != "~~~~~testfile.vala") {
-                               this.notice("Depr", this.file.path, source.begin.line, message);
+                               this.file.compile_notice("DEPR", source.file.filename, source.begin.line, message);
                                return;
                        }
-                       this.notice("Depr", source.file.filename, source.begin.line, message);
+                       this.file.compile_notice("DEPR",  this.file.path, source.begin.line, message);
                        
                }
                
@@ -70,7 +70,7 @@ namespace Palete {
                                //stderr.printf ("My error: %s\n", message);
                        }
                        if (source.file.filename != "~~~~~testfile.vala") {
-                               this.notice("Err", this.file.path, source.begin.line, message);
+                               this.file.compile_notice("ERR", source.file.filename, source.begin.line, message);
                                print ("Other file: Got error error: %d:  %s\n", source.begin.line, message);
                                return;
                        }
@@ -80,7 +80,7 @@ namespace Palete {
                                
                        }
                        line_errors.set(source.begin.line, pre +  message);
-                       this.notice("Err", source.file.filename, source.begin.line, message);
+                       this.file.compile_notice("ERR", this.file.path, source.begin.line, message);
                        print ("Test file: Got error error: %d: %s\n", source.begin.line, message);
                }
                public void dump()
@@ -313,7 +313,7 @@ namespace Palete {
                        
                        //context.add_external_package ("libvala-0.24");
                        
-                       
+                       this.file.compile_notice("START", "", 0, "");
 
                
                        //add_documented_files (context, settings.source_files);
@@ -324,7 +324,9 @@ namespace Palete {
                        if (context.report.get_errors () > 0) {
                                print("parse got errors");
                                ((ValaSourceReport)context.report).dump();
+                               
                                Vala.CodeContext.pop ();
+                               this.file.compile_notice("END", "", 0, "");
                                return this.report.line_errors;
                        }
 
@@ -336,6 +338,7 @@ namespace Palete {
                                print("check got errors");
                                ((ValaSourceReport)context.report).dump();
                                Vala.CodeContext.pop ();
+                               this.file.compile_notice("END", "", 0, "");
                                return this.report.line_errors;
                                
                        }
@@ -346,7 +349,7 @@ namespace Palete {
                        context.output = "/tmp/testbuild";
                        valac += " -o " +context.output;
                        context.codegen.emit (context);
-                        
+                       /*
                        var ccompiler = new Vala.CCodeCompiler ();
                        var cc_command = Environment.get_variable ("CC");
                        var pkg_config_command = Environment.get_variable ("PKG_CONFIG");
@@ -355,9 +358,10 @@ namespace Palete {
 #else
                        ccompiler.compile (context, cc_command, new string[] { });
 #endif
-
+                       */
  
                        Vala.CodeContext.pop ();
+                       this.file.compile_notice("END", "", 0, "");
                        print("%s\n", valac);
                        print("ALL OK?\n");
                        return this.report.line_errors;