Fix #8009 - remove libgda dependancy
[roobuilder] / src / Project / Roo.vala
index 639b96f..ce64d86 100644 (file)
@@ -4,7 +4,7 @@
 
 public class Project.Roo : Project {
 
-       public Palete.RooDatabase roo_database;
+       //public Palete.RooDatabase roo_database;
 
        public string runhtml = "";
        public string base_template = "";
@@ -25,10 +25,10 @@ public class Project.Roo : Project {
                this.initDatabase();
         
     }
-     public override void   initDatabase()
-    {
-         this.roo_database = new Palete.RooDatabase.from_project(this);   
-    }
+       public override void   initDatabase()
+       {
+               //this.roo_database = new Palete.RooDatabase.from_project(this);   
+       }
        public override void loadJson(Json.Object obj) 
        {
                // might not exist?
@@ -81,7 +81,32 @@ public class Project.Roo : Project {
        public override void initialize() {
                // ?? what kind of files can we set up a project ?
        }
-       
+       public override void onSave()
+       {
+                // nope
+       }
+
+       public override Palete.LanguageClient getLanguageServer(string lang)
+       {
+               if (this.language_servers.has_key(lang)) {
+                       return this.language_servers.get(lang);
+               }
+                 
+               switch(lang) {
+                       case "javascript":
+                               var ls = new Palete.LanguageClientJavascript(this);
+                               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:
+                               return this.language_servers.get("dummy");
+               }
+               return this.language_servers.get(lang);
+       }
 
 }