re-use options from resources;
authorwenzelm
Thu, 29 Dec 2016 22:10:29 +0100
changeset 64704 08c2d80428ff
parent 64703 a115391494ed
child 64705 7596b0736ab9
child 64706 3ebf9f8299df
re-use options from resources;
src/Tools/VSCode/src/document_model.scala
src/Tools/VSCode/src/server.scala
src/Tools/VSCode/src/vscode_rendering.scala
src/Tools/VSCode/src/vscode_resources.scala
--- a/src/Tools/VSCode/src/document_model.scala	Thu Dec 29 21:54:04 2016 +0100
+++ b/src/Tools/VSCode/src/document_model.scala	Thu Dec 29 22:10:29 2016 +0100
@@ -72,6 +72,5 @@
 
   def snapshot(): Document.Snapshot = session.snapshot(node_name, text_edits)
 
-  def rendering(options: Options): VSCode_Rendering =
-    new VSCode_Rendering(this, snapshot(), options, resources)
+  def rendering(): VSCode_Rendering = new VSCode_Rendering(this, snapshot(), resources)
 }
--- a/src/Tools/VSCode/src/server.scala	Thu Dec 29 21:54:04 2016 +0100
+++ b/src/Tools/VSCode/src/server.scala	Thu Dec 29 22:10:29 2016 +0100
@@ -101,7 +101,7 @@
   def rendering_offset(node_pos: Line.Node_Position): Option[(VSCode_Rendering, Text.Offset)] =
     for {
       model <- resources.get_model(node_pos.name)
-      rendering = model.rendering(options)
+      rendering = model.rendering()
       offset <- model.doc.offset(node_pos.pos)
     } yield (rendering, offset)
 
--- a/src/Tools/VSCode/src/vscode_rendering.scala	Thu Dec 29 21:54:04 2016 +0100
+++ b/src/Tools/VSCode/src/vscode_rendering.scala	Thu Dec 29 22:10:29 2016 +0100
@@ -37,9 +37,8 @@
 class VSCode_Rendering(
     val model: Document_Model,
     snapshot: Document.Snapshot,
-    options: Options,
     resources: VSCode_Resources)
-  extends Rendering(snapshot, options, resources)
+  extends Rendering(snapshot, resources.options, resources)
 {
   /* diagnostics */
 
--- a/src/Tools/VSCode/src/vscode_resources.scala	Thu Dec 29 21:54:04 2016 +0100
+++ b/src/Tools/VSCode/src/vscode_resources.scala	Thu Dec 29 22:10:29 2016 +0100
@@ -101,7 +101,7 @@
           for {
             node_name <- st.pending_output.iterator
             model <- st.models.get(node_name.node)
-            rendering = model.rendering(options)
+            rendering = model.rendering()
             (diagnostics, model1) <- model.publish_diagnostics(rendering)
           } yield {
             channel.diagnostics(model1.uri, rendering.diagnostics_output(diagnostics))