tuned;
authorwenzelm
Wed, 16 Sep 2009 22:01:11 +0200
changeset 34741 4431c498726d
parent 34740 ec35626a2aa5
child 34742 7b8847852aae
tuned;
src/Tools/jEdit/src/jedit/TheoryView.scala
src/Tools/jEdit/src/proofdocument/ProofDocument.scala
src/Tools/jEdit/src/prover/Prover.scala
--- a/src/Tools/jEdit/src/jedit/TheoryView.scala	Wed Sep 16 17:13:14 2009 +0200
+++ b/src/Tools/jEdit/src/jedit/TheoryView.scala	Wed Sep 16 22:01:11 2009 +0200
@@ -290,7 +290,7 @@
     text_area.invalidateLineRange(start, stop)
 
     if (Isabelle.plugin.selected_state == cmd)
-        Isabelle.plugin.selected_state = cmd  // update State view
+      Isabelle.plugin.selected_state = cmd  // update State view
   }
 
   private def invalidate_all() =
--- a/src/Tools/jEdit/src/proofdocument/ProofDocument.scala	Wed Sep 16 17:13:14 2009 +0200
+++ b/src/Tools/jEdit/src/proofdocument/ProofDocument.scala	Wed Sep 16 22:01:11 2009 +0200
@@ -70,7 +70,7 @@
     ((this, Nil: StructureChange) /: change.edits)(edit_doc)
   }
 
-  def text_edit(e: Edit, id: String): (ProofDocument,StructureChange) =
+  def text_edit(e: Edit, id: String): (ProofDocument, StructureChange) =
   {
     case class TextChange(start: Int, added: String, removed: String)
     val change = e match {
--- a/src/Tools/jEdit/src/prover/Prover.scala	Wed Sep 16 17:13:14 2009 +0200
+++ b/src/Tools/jEdit/src/prover/Prover.scala	Wed Sep 16 22:01:11 2009 +0200
@@ -43,7 +43,7 @@
   /* prover process */
 
   private val process =
-  new Isabelle_Process(system, this, "-m", "xsymbols", logic) with Isar_Document
+    new Isabelle_Process(system, this, "-m", "xsymbols", logic) with Isar_Document
 
   def stop() { process.kill }
 
@@ -103,20 +103,21 @@
                   case Some(doc) =>
                     for {
                       XML.Elem(Markup.EDIT, (Markup.ID, cmd_id) :: (Markup.STATE, state_id) :: _, _)
-                      <- edits
-                    } {
-                      if (commands.contains(cmd_id)) {
-                        val cmd = commands(cmd_id)
-                        val state = new Command_State(cmd)
-                        states += (state_id -> state)
-                        doc.states += (cmd -> state)
-                        command_change.event(cmd)
-                     }
+                      <- edits }
+                    {
+                      commands.get(cmd_id) match {
+                        case Some(cmd) =>
+                          val state = new Command_State(cmd)
+                          states += (state_id -> state)
+                          doc.states += (cmd -> state)
+                          command_change.event(cmd)
+                        case None =>
+                      }
                     }
                   case None =>
                 }
 
-                // command and keyword declarations
+              // command and keyword declarations
               case XML.Elem(Markup.COMMAND_DECL, (Markup.NAME, name) :: (Markup.KIND, kind) :: _, _) =>
                 _command_decls += (name -> kind)
                 _completion += name
@@ -124,7 +125,7 @@
                 _keyword_decls += name
                 _completion += name
 
-                // process ready (after initialization)
+              // process ready (after initialization)
               case XML.Elem(Markup.READY, _, _) => prover_ready = true
 
               case _ =>