:Revert "fix line numbering issues with vala generator - hopefully fixes completion...
[roobuilder] / src / Project / Project.vala
index d10c23a..c15db61 100644 (file)
@@ -492,6 +492,14 @@ namespace Project {
                        }
                        GLib.debug("load is_scanned = false");
                        
+                       
+                       // used to load paths..
+                       this.sub_paths = new Gee.ArrayList<JsRender.JsRender>();
+                       this.files = new Gee.HashMap<string,JsRender.JsRender>();
+                       this.loadSubDirectories("", 0); // must happend before loadJson! (as compile groups checks if file exists.
+                        
+
+                       
                        if (FileUtils.test(this.path + "/.roobuilder.jcfg", FileTest.EXISTS)) {
                                  
                                var pa = new Json.Parser();
@@ -512,12 +520,7 @@ namespace Project {
                                 
                                this.loadJson(obj);
                        } 
-                       // used to load paths..
-                       this.sub_paths = new Gee.ArrayList<JsRender.JsRender>();
-                       this.files = new Gee.HashMap<string,JsRender.JsRender>();
-                       this.loadSubDirectories("", 0);
-                        
-                       this.initDatabase();
+                       this.initDatabase();    
                        this.is_scanned = true; // loaded.. dont need to do it again..
                         GLib.debug("load is_scanned = true");
                        
@@ -858,6 +861,8 @@ namespace Project {
 
                        
                        file.remove();
+                       this.save();
+                       
                        // remove it from 
                        
                        
@@ -993,15 +998,16 @@ namespace Project {
                        return ret;
                }
                
-               public void updateErrorsforFile(JsRender.JsRender f) 
+               public void updateErrorsforFile(JsRender.JsRender? f) 
                {
-                       var n = this.updateErrorsByType(f, "WARN");
-                       n += this.updateErrorsByType(f, "ERR");
-                       n += this.updateErrorsByType(f, "DEPR");
-                       
-                       if (n > 0) {
-                               BuilderApplication.updateCompileResults();
+                       if (f != null)  {
+                               var n = this.updateErrorsByType(f, "WARN");
+                               n += this.updateErrorsByType(f, "ERR");
+                               n += this.updateErrorsByType(f, "DEPR");
                        }
+
+                       BuilderApplication.updateCompileResults();
+                       
                        
                }
                public int  updateErrorsByType(JsRender.JsRender f, string n)