decentralized Isabelle component names;
authorwenzelm
Fri, 26 Jun 2009 19:56:52 +0200
changeset 34624 5e4f33d033ba
parent 34623 a356a8ee6f00
child 34625 799a40faa4f1
decentralized Isabelle component names;
src/Tools/jEdit/src/jedit/IsabelleEncoding.scala
src/Tools/jEdit/src/jedit/Plugin.scala
src/Tools/jEdit/src/jedit/ProverSetup.scala
src/Tools/jEdit/src/jedit/VFS.scala
--- a/src/Tools/jEdit/src/jedit/IsabelleEncoding.scala	Fri Jun 26 18:24:03 2009 +0200
+++ b/src/Tools/jEdit/src/jedit/IsabelleEncoding.scala	Fri Jun 26 19:56:52 2009 +0200
@@ -15,6 +15,11 @@
 import scala.io.{Source, BufferedSource}
 
 
+object IsabelleEncoding
+{
+  val NAME = "UTF-8-Isabelle"
+}
+
 class IsabelleEncoding extends Encoding
 {
   private val charset = Charset.forName(Isabelle_System.charset)
--- a/src/Tools/jEdit/src/jedit/Plugin.scala	Fri Jun 26 18:24:03 2009 +0200
+++ b/src/Tools/jEdit/src/jedit/Plugin.scala	Fri Jun 26 19:56:52 2009 +0200
@@ -28,9 +28,6 @@
   /* name */
 
   val NAME = "Isabelle"
-  val VFS_PREFIX = "isabelle:"
-
-  val ISABELLE_ENCODING = "UTF-8-Isabelle"
 
 
   /* properties */
--- a/src/Tools/jEdit/src/jedit/ProverSetup.scala	Fri Jun 26 18:24:03 2009 +0200
+++ b/src/Tools/jEdit/src/jedit/ProverSetup.scala	Fri Jun 26 19:56:52 2009 +0200
@@ -41,7 +41,7 @@
 
     theory_view = new TheoryView(view.getTextArea, prover)
     prover.set_document(theory_view.change_receiver,
-      if (path.startsWith(Isabelle.VFS_PREFIX)) path.substring(Isabelle.VFS_PREFIX.length)
+      if (path.startsWith(VFS.PREFIX)) path.substring(VFS.PREFIX.length)
       else path)
     theory_view.activate
     val MAX = TheoryView.MAX_CHANGE_LENGTH
--- a/src/Tools/jEdit/src/jedit/VFS.scala	Fri Jun 26 18:24:03 2009 +0200
+++ b/src/Tools/jEdit/src/jedit/VFS.scala	Fri Jun 26 19:56:52 2009 +0200
@@ -22,6 +22,8 @@
 
 object VFS
 {
+  val PREFIX = "isabelle:"
+
   val BUFFER_SIZE = 1024
 
   def input_converter(in: InputStream): ByteArrayInputStream =
@@ -89,17 +91,16 @@
     if (file == null) null else new VFS.File(this, path, file)
 
   private def drop_prefix(path: String): String =
-    if (path.startsWith(Isabelle.VFS_PREFIX))
-      path.substring(Isabelle.VFS_PREFIX.length)
+    if (path.startsWith(VFS.PREFIX)) path.substring(VFS.PREFIX.length)
     else path
 
   private def expand_path(path: String): String =
-    Isabelle.VFS_PREFIX + Isabelle.system.expand_path(drop_prefix(path))
-  
+    VFS.PREFIX + Isabelle.system.expand_path(drop_prefix(path))
+
   private def platform_path(path: String): String =
     Isabelle.system.platform_path(drop_prefix(path))
 
-  
+
   override def getCapabilities = base.getCapabilities
   override def getExtendedAttributes = base.getExtendedAttributes