separate README dockable, which allows to make it more prominent first and remove it later;
authorwenzelm
Tue, 29 May 2012 16:39:42 +0200
changeset 48014 63021e59cbf0
parent 48013 44de84112a67
child 48015 878de88db080
separate README dockable, which allows to make it more prominent first and remove it later;
src/Tools/jEdit/lib/Tools/jedit
src/Tools/jEdit/src/Isabelle.props
src/Tools/jEdit/src/actions.xml
src/Tools/jEdit/src/dockables.xml
src/Tools/jEdit/src/jEdit.props
src/Tools/jEdit/src/readme_dockable.scala
src/Tools/jEdit/src/session_dockable.scala
--- a/src/Tools/jEdit/lib/Tools/jedit	Tue May 29 13:46:50 2012 +0200
+++ b/src/Tools/jEdit/lib/Tools/jedit	Tue May 29 16:39:42 2012 +0200
@@ -22,6 +22,7 @@
   "src/plugin.scala"
   "src/protocol_dockable.scala"
   "src/raw_output_dockable.scala"
+  "src/readme_dockable.scala"
   "src/scala_console.scala"
   "src/session_dockable.scala"
   "src/text_area_painter.scala"
@@ -260,7 +261,7 @@
 
 if [ ! -e "$JEDIT_SETTINGS/perspective.xml" ]; then
   cat > "$JEDIT_SETTINGS/DockableWindowManager/perspective-view0.xml" <<EOF
-<DOCKING LEFT="" TOP="" RIGHT="" BOTTOM="isabelle-session" LEFT_POS="0" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" />
+<DOCKING LEFT="" TOP="" RIGHT="" BOTTOM="isabelle-readme" LEFT_POS="0" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" />
 EOF
   cat > "$JEDIT_SETTINGS/perspective.xml" <<EOF
 <?xml version="1.0" encoding="UTF-8" ?>
--- a/src/Tools/jEdit/src/Isabelle.props	Tue May 29 13:46:50 2012 +0200
+++ b/src/Tools/jEdit/src/Isabelle.props	Tue May 29 16:39:42 2012 +0200
@@ -51,17 +51,19 @@
 
 #menu actions
 plugin.isabelle.jedit.Plugin.menu.label=Isabelle
-plugin.isabelle.jedit.Plugin.menu=isabelle.session-panel isabelle.output-panel isabelle.raw-output-panel isabelle.protocol-panel
+plugin.isabelle.jedit.Plugin.menu=isabelle.session-panel isabelle.output-panel isabelle.raw-output-panel isabelle.protocol-panel isabelle.readme-panel
 isabelle.session-panel.label=Prover Session panel
 isabelle.output-panel.label=Output panel
 isabelle.raw-output-panel.label=Raw Output panel
 isabelle.protocol-panel.label=Protocol panel
+isabelle.readme-panel.label=README panel
 
 #dockables
 isabelle-session.title=Prover Session
 isabelle-output.title=Output
 isabelle-raw-output.title=Raw Output
 isabelle-protocol.title=Protocol
+isabelle-readme.title=README
 
 #SideKick
 sidekick.parser.isabelle.label=Isabelle
--- a/src/Tools/jEdit/src/actions.xml	Tue May 29 13:46:50 2012 +0200
+++ b/src/Tools/jEdit/src/actions.xml	Tue May 29 16:39:42 2012 +0200
@@ -7,6 +7,11 @@
 			wm.addDockableWindow("isabelle-session");
 		</CODE>
 	</ACTION>
+	<ACTION NAME="isabelle.readme-panel">
+		<CODE>
+			wm.addDockableWindow("isabelle-readme");
+		</CODE>
+	</ACTION>
 	<ACTION NAME="isabelle.output-panel">
 		<CODE>
 			wm.addDockableWindow("isabelle-output");
--- a/src/Tools/jEdit/src/dockables.xml	Tue May 29 13:46:50 2012 +0200
+++ b/src/Tools/jEdit/src/dockables.xml	Tue May 29 16:39:42 2012 +0200
@@ -5,6 +5,9 @@
 	<DOCKABLE NAME="isabelle-session" MOVABLE="TRUE">
 		new isabelle.jedit.Session_Dockable(view, position);
 	</DOCKABLE>
+	<DOCKABLE NAME="isabelle-readme" MOVABLE="TRUE">
+		new isabelle.jedit.README_Dockable(view, position);
+	</DOCKABLE>
 	<DOCKABLE NAME="isabelle-output" MOVABLE="TRUE">
 		new isabelle.jedit.Output_Dockable(view, position);
 	</DOCKABLE>
--- a/src/Tools/jEdit/src/jEdit.props	Tue May 29 13:46:50 2012 +0200
+++ b/src/Tools/jEdit/src/jEdit.props	Tue May 29 16:39:42 2012 +0200
@@ -181,6 +181,7 @@
 isabelle-output.height=174
 isabelle-output.width=412
 isabelle-session.dock-position=bottom
+isabelle-readme.dock-position=bottom
 line-end.shortcut=END
 line-home.shortcut=HOME
 lookAndFeel=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/jEdit/src/readme_dockable.scala	Tue May 29 16:39:42 2012 +0200
@@ -0,0 +1,24 @@
+/*  Title:      Tools/jEdit/src/readme_dockable.scala
+    Author:     Makarius
+
+Dockable window for README.
+*/
+
+package isabelle.jedit
+
+
+import isabelle._
+
+import org.gjt.sp.jedit.View
+
+
+class README_Dockable(view: View, position: String) extends Dockable(view: View, position: String)
+{
+  private val readme = new HTML_Panel("SansSerif", 14)
+  private val readme_path = Path.explode("$JEDIT_HOME/README.html")
+  readme.render_document(
+    Isabelle_System.platform_file_url(readme_path),
+    Isabelle_System.try_read(List(readme_path)))
+
+  set_content(readme)
+}
--- a/src/Tools/jEdit/src/session_dockable.scala	Tue May 29 13:46:50 2012 +0200
+++ b/src/Tools/jEdit/src/session_dockable.scala	Tue May 29 16:39:42 2012 +0200
@@ -26,12 +26,6 @@
 {
   /* main tabs */
 
-  private val readme = new HTML_Panel("SansSerif", 14)
-  private val readme_path = Path.explode("$JEDIT_HOME/README.html")
-  readme.render_document(
-    Isabelle_System.platform_file_url(readme_path),
-    Isabelle_System.try_read(List(readme_path)))
-
   val status = new ListView(Nil: List[Document.Node.Name]) {
     listenTo(mouse.clicks)
     reactions += {
@@ -46,7 +40,6 @@
   private val syslog = new TextArea(Isabelle.session.current_syslog())
 
   private val tabs = new TabbedPane {
-    pages += new TabbedPane.Page("README", Component.wrap(readme))
     pages += new TabbedPane.Page("Theory Status", new ScrollPane(status))
     pages += new TabbedPane.Page("System Log", new ScrollPane(syslog))