renamed VFS protocol prefix from "isa:" to "isabelle:";
authorwenzelm
Tue, 21 Oct 2008 22:28:58 +0200
changeset 34337 5d5b69f2956b
parent 34336 c9a96ddfceab
child 34338 b7fdb6b14e0b
renamed VFS protocol prefix from "isa:" to "isabelle:";
src/Tools/jEdit/plugin/services.xml
src/Tools/jEdit/src/jedit/Plugin.scala
src/Tools/jEdit/src/jedit/VFS.scala
--- a/src/Tools/jEdit/plugin/services.xml	Tue Oct 21 22:27:53 2008 +0200
+++ b/src/Tools/jEdit/plugin/services.xml	Tue Oct 21 22:28:58 2008 +0200
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE SERVICES SYSTEM "services.dtd">
 <SERVICES>
-	<SERVICE NAME="isa" CLASS="org.gjt.sp.jedit.io.VFS">
+	<SERVICE NAME="isabelle" CLASS="org.gjt.sp.jedit.io.VFS">
 		new isabelle.jedit.VFS();
 	</SERVICE>
 </SERVICES>
--- a/src/Tools/jEdit/src/jedit/Plugin.scala	Tue Oct 21 22:27:53 2008 +0200
+++ b/src/Tools/jEdit/src/jedit/Plugin.scala	Tue Oct 21 22:28:58 2008 +0200
@@ -16,6 +16,7 @@
 object Plugin {
   val NAME = "Isabelle"
   val OPTION_PREFIX = "options.isabelle."
+  val VFS_PREFIX = "isabelle:"
   
   def property(name : String) = jEdit.getProperty(OPTION_PREFIX + name)
   def property(name : String, value : String) = 
@@ -49,7 +50,7 @@
     prover.start(if (logic == null) logic else "HOL")
     val dir = view.getBuffer().getDirectory()
     prover.setDocument(theoryView, 
-                       if (dir.startsWith("isa:")) dir.substring(4) else dir)
+                       if (dir.startsWith(VFS_PREFIX)) dir.substring(VFS_PREFIX.length) else dir)
     TheoryView.activateTextArea(view.getTextArea())
   }
   
--- a/src/Tools/jEdit/src/jedit/VFS.scala	Tue Oct 21 22:27:53 2008 +0200
+++ b/src/Tools/jEdit/src/jedit/VFS.scala	Tue Oct 21 22:28:58 2008 +0200
@@ -69,7 +69,7 @@
       base.getName()
 
     override def getPath() =
-      "isa:" + base.getPath()
+      Plugin.VFS_PREFIX + base.getPath()
 
     override def getSymlinkPath() =
       base.getSymlinkPath()
@@ -131,11 +131,11 @@
  * 
  * @author Johannes Hölzl <hoelzl@in.tum.de>
  */
-class VFS extends io.VFS("isa", VFSManager.getVFSForProtocol("file").getCapabilities()) {
+class VFS extends io.VFS("isabelle", VFSManager.getVFSForProtocol("file").getCapabilities()) {
   private var baseVFS = VFSManager.getVFSForProtocol("file") 
 
   private def cutPath(path : String) = 
-    if (path.startsWith("isa:")) path.substring(4) else path
+    if (path.startsWith(Plugin.VFS_PREFIX)) path.substring(Plugin.VFS_PREFIX.length) else path
   
   override def createVFSSession(path : String, comp : Component) = 
     baseVFS.createVFSSession(cutPath(path), comp)
@@ -147,10 +147,10 @@
     baseVFS.getExtendedAttributes()
   
   override def getParentOfPath(path : String) = 
-    "isa:" + baseVFS.getParentOfPath(cutPath(path))
+    Plugin.VFS_PREFIX + baseVFS.getParentOfPath(cutPath(path))
   
   override def constructPath(parent : String, path : String) = 
-    "isa:" + baseVFS.constructPath(cutPath(parent), path)
+    Plugin.VFS_PREFIX + baseVFS.constructPath(cutPath(parent), path)
   
   override def getFileName(path : String) = 
     baseVFS.getFileName(path)
@@ -159,10 +159,10 @@
     baseVFS.getFileSeparator()
   
   override def getTwoStageSaveName(path : String) = 
-    "isa:" + baseVFS.getTwoStageSaveName(cutPath(path))
+    Plugin.VFS_PREFIX + baseVFS.getTwoStageSaveName(cutPath(path))
   
   override def _canonPath(session : Object, path : String, comp : Component) =
-    "isa:" + baseVFS._canonPath(session, cutPath(path), comp)
+    Plugin.VFS_PREFIX + baseVFS._canonPath(session, cutPath(path), comp)
   
   override def _createInputStream(session : Object, path : String,
                                   ignoreErrors : Boolean, comp : Component) =