eliminated obsolete session_manager.scala;
authorwenzelm
Fri Jul 20 22:39:59 2012 +0200 (2012-07-20)
changeset 484105539322f68c9
parent 48409 0d2114eb412a
child 48411 5b3440850d36
eliminated obsolete session_manager.scala;
src/Pure/System/session_manager.scala
src/Pure/build-jars
     1.1 --- a/src/Pure/System/session_manager.scala	Fri Jul 20 22:29:25 2012 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,48 +0,0 @@
     1.4 -/*  Title:      Pure/System/isabelle_manager.scala
     1.5 -    Author:     Makarius
     1.6 -
     1.7 -Isabelle session manager.
     1.8 -*/
     1.9 -
    1.10 -package isabelle
    1.11 -
    1.12 -
    1.13 -import java.io.{File, FileFilter}
    1.14 -
    1.15 -
    1.16 -class Session_Manager
    1.17 -{
    1.18 -  val ROOT_NAME = "session.root"
    1.19 -
    1.20 -  def is_session_file(file: File): Boolean =
    1.21 -    file.isFile && file.getName == ROOT_NAME
    1.22 -
    1.23 -  def is_session_dir(dir: File): Boolean =
    1.24 -    dir.isDirectory && (new File(dir, ROOT_NAME)).isFile
    1.25 -
    1.26 -
    1.27 -  // FIXME handle (potentially cyclic) directory graph
    1.28 -  private def find_sessions(reverse_prefix: List[String], reverse_sessions: List[List[String]],
    1.29 -    dir: File): List[List[String]] =
    1.30 -  {
    1.31 -    val (reverse_prefix1, reverse_sessions1) =
    1.32 -      if (is_session_dir(dir)) {
    1.33 -        val name = dir.getName  // FIXME from root file
    1.34 -        val reverse_prefix1 = name :: reverse_prefix
    1.35 -        val reverse_sessions1 = reverse_prefix1.reverse :: reverse_sessions
    1.36 -        (reverse_prefix1, reverse_sessions1)
    1.37 -      }
    1.38 -      else (reverse_prefix, reverse_sessions)
    1.39 -
    1.40 -    val subdirs =
    1.41 -      dir.listFiles(new FileFilter { def accept(entry: File) = entry.isDirectory })
    1.42 -    (reverse_sessions1 /: subdirs)(find_sessions(reverse_prefix1, _, _))
    1.43 -  }
    1.44 -
    1.45 -  def component_sessions(): List[List[String]] =
    1.46 -  {
    1.47 -    val toplevel_sessions =
    1.48 -      Isabelle_System.components().map(Isabelle_System.platform_file).filter(is_session_dir)
    1.49 -    ((Nil: List[List[String]]) /: toplevel_sessions)(find_sessions(Nil, _, _)).reverse
    1.50 -  }
    1.51 -}
     2.1 --- a/src/Pure/build-jars	Fri Jul 20 22:29:25 2012 +0200
     2.2 +++ b/src/Pure/build-jars	Fri Jul 20 22:39:59 2012 +0200
     2.3 @@ -51,7 +51,6 @@
     2.4    System/options.scala
     2.5    System/platform.scala
     2.6    System/session.scala
     2.7 -  System/session_manager.scala
     2.8    System/standard_system.scala
     2.9    System/swing_thread.scala
    2.10    System/system_channel.scala