--- a/src/Pure/PIDE/document.scala Fri Jan 06 13:27:18 2017 +0100
+++ b/src/Pure/PIDE/document.scala Fri Jan 06 23:25:18 2017 +0100
@@ -467,6 +467,24 @@
}
+ /* model */
+
+ trait Model
+ {
+ /*session*/
+ def session: Session
+ def snapshot(): Snapshot
+
+ /*name*/
+ def node_name: Document.Node.Name
+ def is_theory: Boolean = node_name.is_theory
+ override def toString: String = node_name.toString
+
+ /*content*/
+ def get_blob: Option[Document.Blob]
+ }
+
+
/** global state -- document structure, execution process, editing history **/
--- a/src/Tools/VSCode/src/document_model.scala Fri Jan 06 13:27:18 2017 +0100
+++ b/src/Tools/VSCode/src/document_model.scala Fri Jan 06 23:25:18 2017 +0100
@@ -32,15 +32,8 @@
node_required: Boolean = false,
last_perspective: Document.Node.Perspective_Text = Document.Node.no_perspective_text,
pending_edits: Vector[Text.Edit] = Vector.empty,
- published_diagnostics: List[Text.Info[Command.Results]] = Nil)
+ published_diagnostics: List[Text.Info[Command.Results]] = Nil) extends Document.Model
{
- /* name */
-
- override def toString: String = node_name.toString
-
- def is_theory: Boolean = node_name.is_theory
-
-
/* external file */
def external(b: Boolean): Document_Model = copy(external_file = b)