offer sessions of group "main" first to increase chances that the user makes a sensible choice;
authorwenzelm
Mon, 17 Dec 2012 11:07:20 +0100
changeset 50574 0706797501a0
parent 50573 765c22baa1c9
child 50575 ae1da46022d1
offer sessions of group "main" first to increase chances that the user makes a sensible choice;
src/Tools/jEdit/src/isabelle_logic.scala
src/ZF/ROOT
--- a/src/Tools/jEdit/src/isabelle_logic.scala	Mon Dec 17 08:19:35 2012 +0100
+++ b/src/Tools/jEdit/src/isabelle_logic.scala	Mon Dec 17 11:07:20 2012 +0100
@@ -69,7 +69,10 @@
   def session_list(): List[String] =
   {
     val dirs = session_dirs().map((false, _))
-    Build.find_sessions(PIDE.options.value, dirs).topological_order.map(_._1).sorted
+    val session_tree = Build.find_sessions(PIDE.options.value, dirs)
+    val (main_sessions, other_sessions) =
+      session_tree.topological_order.partition(p => p._2.groups.contains("main"))
+    main_sessions.map(_._1).sorted ::: other_sessions.map(_._1).sorted
   }
 
   def session_content(inlined_files: Boolean): Build.Session_Content =
--- a/src/ZF/ROOT	Mon Dec 17 08:19:35 2012 +0100
+++ b/src/ZF/ROOT	Mon Dec 17 11:07:20 2012 +0100
@@ -1,4 +1,4 @@
-session ZF = Pure +
+session ZF (main) = Pure +
   description {*
     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     Copyright   1995  University of Cambridge