tests/TreeBuilder.vala
[app.Builder.js] / tests / TreeBuilder.vala
index 0295226..604aa40 100644 (file)
@@ -3,15 +3,15 @@
 
 public class MyReport  : Vala.Report {
        
-       public overide void err (Vala.SourceReference? source, string message) {
+       public override void err (Vala.SourceReference? source, string message) {
                errors++;
                if (source == null) {
                        stderr.printf ("My error: %s\n", message);
                } else {
                        stderr.printf ("%s: My error: %s\n", source.to_string (), message);
-                       if (verbose_errors) {
-                               this.report_source (source);
-                       }
+               
+                       //Vala.Report.report_source (source);
+                       
                }
        }
        
@@ -31,7 +31,7 @@ public class TreeBuilder : Vala.CodeVisitor {
                context.report.enable_warnings = true;
                context.metadata_directories = { };
                context.gir_directories = {};
-               context.erport = new MyReport();
+               context.report = new MyReport();
                
                context.basedir = Posix.realpath (".");
                
@@ -58,13 +58,15 @@ public class TreeBuilder : Vala.CodeVisitor {
 
                //register_source_file (source_package, source_file);
 
+               
+               
                //if (context.profile == Vala.Profile.GOBJECT) {
                        // import the GLib namespace by default (namespace of backend-specific standard library)
                        var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
                        source_file.add_using_directive (ns_ref);
                        context.root.add_using_directive (ns_ref);
                //}
-
+               context.add_external_package ("glib-2.0");
                context.add_source_file (source_file);