fix #7968 - language server support for syntax check and completion
[roobuilder] / src / Builder4 / FakeServer.vala
index 4739c61..b7cb936 100644 (file)
@@ -194,14 +194,17 @@ public class FakeServerCache : Object
 
 public class FakeServer : Object
 {
-       WebKit.WebView view;
+       //WebKit.WebView view;
        
+       static WebKit.WebContext cx = null;
        public FakeServer(WebKit.WebView wkview)
        {
-               this.view = wkview;
-               
+               //this.view = wkview;
+               if (cx != null) {
+                       return;
+               }
                 
-               var cx = WebKit.WebContext.get_default();
+                cx = WebKit.WebContext.get_default();
                //var cx = this.view.get_context();
                cx.register_uri_scheme("xhttp",  serve);
                cx.register_uri_scheme("resources",  serve);