change run to use meson/ninja and then exec. - remove libvala code from application...
authorAlan Knowles <alan@roojs.com>
Sat, 20 Jan 2024 17:01:21 +0000 (01:01 +0800)
committerAlan Knowles <alan@roojs.com>
Sat, 20 Jan 2024 17:01:21 +0000 (01:01 +0800)
src/Palete/LanguageClientJavascript.vala [new file with mode: 0644]

diff --git a/src/Palete/LanguageClientJavascript.vala b/src/Palete/LanguageClientJavascript.vala
new file mode 100644 (file)
index 0000000..87303aa
--- /dev/null
@@ -0,0 +1,57 @@
+
+namespace Palete {
+       public class LanguageClientJavascript : LanguageClient {
+       
+       
+               public LanguageClientJavascript(Project.Project project)
+               {
+                       // extend versions will proably call initialize to start and connect to server.
+                       base(project);
+                       
+               
+               }
+               public override   void  initialize_server()   {
+                       GLib.debug("initialize javascript server");                     
+               }
+               public override void startServer()
+               {
+               }
+               string generateTempContents(JsRender.JsRender file, JsRender.NodeProp? prop, string alt_code) {
+               
+                       var oldcode  = "";
+                       var contents = alt_code;
+                       if (prop != null) {
+                               oldcode  = prop.val;
+                               prop.val = alt_code;
+                               contents = file.toSourceCode();
+                               prop.val = oldcode;
+                       }
+                       return contents;
+               }
+               
+               
+               
+               public new bool isReady() 
+               {
+                       return false;
+               }
+               public new void document_open (JsRender.JsRender file)  
+               {
+                       
+                       Javascript.singleton().validate(file.toSourceCode(), file );
+                       BuilderApplication.updateCompileResults();
+               
+               }
+               public new void document_save (JsRender.JsRender file)  
+               {
+                       Javascript.singleton().validate(file.toSourceCode(), file );
+                       BuilderApplication.updateCompileResults();
+               }
+               public new void document_change (JsRender.JsRender file   )    
+               {
+                       Javascript.singleton().validate(file.toSourceCode(), file );
+                       BuilderApplication.updateCompileResults();
+               }
+       }
+       
+}
\ No newline at end of file