more uniform treatment of dockables and their standard actions;
authorwenzelm
Tue Feb 18 20:20:42 2014 +0100 (2014-02-18)
changeset 55558298274c970b6
parent 55557 aa1adeca714b
child 55559 d4aea4bbe87f
more uniform treatment of dockables and their standard actions;
src/Tools/jEdit/src/Isabelle.props
src/Tools/jEdit/src/actions.xml
src/Tools/jEdit/src/dockables.xml
src/Tools/jEdit/src/isabelle.scala
src/Tools/jEdit/src/jEdit.props
     1.1 --- a/src/Tools/jEdit/src/Isabelle.props	Tue Feb 18 19:00:13 2014 +0100
     1.2 +++ b/src/Tools/jEdit/src/Isabelle.props	Tue Feb 18 20:20:42 2014 +0100
     1.3 @@ -27,48 +27,48 @@
     1.4  options.isabelle-rendering.label=Rendering
     1.5  options.isabelle-rendering.code=new isabelle.jedit.Isabelle_Options2();
     1.6  
     1.7 -#menu actions
     1.8 +#menu actions and dockables
     1.9  plugin.isabelle.jedit.Plugin.menu.label=Isabelle
    1.10  plugin.isabelle.jedit.Plugin.menu= \
    1.11 -  isabelle.documentation-panel \
    1.12 -  isabelle.find-panel \
    1.13 -  isabelle.monitor-panel \
    1.14 -  isabelle.output-panel \
    1.15 -  isabelle.protocol-panel \
    1.16 -  isabelle.raw-output-panel \
    1.17 -  isabelle.simplifier-trace-panel \
    1.18 -  isabelle.sledgehammer-panel \
    1.19 -  isabelle.symbols-panel \
    1.20 -  isabelle.syslog-panel \
    1.21 -  isabelle.theories-panel \
    1.22 -  isabelle.timing-panel
    1.23 -isabelle.documentation-panel.label=Documentation panel
    1.24 -isabelle.find-panel.label=Find panel
    1.25 -isabelle.monitor-panel.label=Monitor panel
    1.26 -isabelle.output-panel.label=Output panel
    1.27 -isabelle.protocol-panel.label=Protocol panel
    1.28 -isabelle.raw-output-panel.label=Raw Output panel
    1.29 -isabelle.simplifier-trace-panel.label=Simplifier Trace panel
    1.30 -isabelle.sledgehammer-panel.label=Sledgehammer panel
    1.31 -isabelle.symbols-panel.label=Symbols panel
    1.32 -isabelle.syslog-panel.label=Syslog panel
    1.33 -isabelle.theories-panel.label=Theories panel
    1.34 -isabelle.timing-panel.label=Timing panel
    1.35 -
    1.36 -#dockables
    1.37 +  isabelle-documentation \
    1.38 +  isabelle-find \
    1.39 +  isabelle-monitor \
    1.40 +  isabelle-output \
    1.41 +  isabelle-protocol \
    1.42 +  isabelle-raw-output \
    1.43 +  isabelle-simplifier-trace \
    1.44 +  isabelle-sledgehammer \
    1.45 +  isabelle-symbols \
    1.46 +  isabelle-syslog \
    1.47 +  isabelle-theories \
    1.48 +  isabelle-timing
    1.49 +isabelle-documentation.label=Documentation panel
    1.50 +isabelle-documentation.title=Documentation
    1.51 +isabelle-find.label=Find panel
    1.52  isabelle-find.title=Find
    1.53 +isabelle-graphview.label=Graphview panel
    1.54  isabelle-graphview.title=Graphview
    1.55 +isabelle-info.label=Info panel
    1.56  isabelle-info.title=Info
    1.57 +isabelle-monitor.label=Monitor panel
    1.58  isabelle-monitor.title=Monitor
    1.59 +isabelle-output.label=Output panel
    1.60  isabelle-output.title=Output
    1.61 -isabelle-simplifier-trace.title=Simplifier Trace
    1.62 +isabelle-protocol.label=Protocol panel
    1.63  isabelle-protocol.title=Protocol
    1.64 +isabelle-raw-output.label=Raw Output panel
    1.65  isabelle-raw-output.title=Raw Output
    1.66 -isabelle-documentation.title=Documentation
    1.67 +isabelle-simplifier-trace.label=Simplifier Trace panel
    1.68 +isabelle-simplifier-trace.title=Simplifier Trace
    1.69 +isabelle-sledgehammer.label=Sledgehammer panel
    1.70  isabelle-sledgehammer.title=Sledgehammer
    1.71 +isabelle-symbols.label=Symbols panel
    1.72  isabelle-symbols.title=Symbols
    1.73 +isabelle-syslog.label=Syslog panel
    1.74  isabelle-syslog.title=Syslog
    1.75 +isabelle-theories.label=Theories panel
    1.76  isabelle-theories.title=Theories
    1.77 +isabelle-timing.label=Timing panel
    1.78  isabelle-timing.title=Timing
    1.79  
    1.80  #SideKick
     2.1 --- a/src/Tools/jEdit/src/actions.xml	Tue Feb 18 19:00:13 2014 +0100
     2.2 +++ b/src/Tools/jEdit/src/actions.xml	Tue Feb 18 20:20:42 2014 +0100
     2.3 @@ -2,66 +2,6 @@
     2.4  <!DOCTYPE ACTIONS SYSTEM "actions.dtd">
     2.5  
     2.6  <ACTIONS>
     2.7 -	<ACTION NAME="isabelle.theories-panel">
     2.8 -		<CODE>
     2.9 -			wm.addDockableWindow("isabelle-theories");
    2.10 -		</CODE>
    2.11 -	</ACTION>
    2.12 -	<ACTION NAME="isabelle.timing-panel">
    2.13 -		<CODE>
    2.14 -			wm.addDockableWindow("isabelle-timing");
    2.15 -		</CODE>
    2.16 -	</ACTION>
    2.17 -	<ACTION NAME="isabelle.syslog-panel">
    2.18 -		<CODE>
    2.19 -			wm.addDockableWindow("isabelle-syslog");
    2.20 -		</CODE>
    2.21 -	</ACTION>
    2.22 -	<ACTION NAME="isabelle.documentation-panel">
    2.23 -		<CODE>
    2.24 -			wm.addDockableWindow("isabelle-documentation");
    2.25 -		</CODE>
    2.26 -	</ACTION>
    2.27 -	<ACTION NAME="isabelle.find-panel">
    2.28 -		<CODE>
    2.29 -			wm.addDockableWindow("isabelle-find");
    2.30 -		</CODE>
    2.31 -	</ACTION>
    2.32 -	<ACTION NAME="isabelle.sledgehammer-panel">
    2.33 -		<CODE>
    2.34 -			wm.addDockableWindow("isabelle-sledgehammer");
    2.35 -		</CODE>
    2.36 -	</ACTION>
    2.37 -	<ACTION NAME="isabelle.output-panel">
    2.38 -		<CODE>
    2.39 -			wm.addDockableWindow("isabelle-output");
    2.40 -		</CODE>
    2.41 -	</ACTION>
    2.42 -	<ACTION NAME="isabelle.raw-output-panel">
    2.43 -		<CODE>
    2.44 -			wm.addDockableWindow("isabelle-raw-output");
    2.45 -		</CODE>
    2.46 -	</ACTION>
    2.47 -	<ACTION NAME="isabelle.simplifier-trace-panel">
    2.48 -		<CODE>
    2.49 -			wm.addDockableWindow("isabelle-simplifier-trace");
    2.50 -		</CODE>
    2.51 -	</ACTION>
    2.52 -	<ACTION NAME="isabelle.protocol-panel">
    2.53 -		<CODE>
    2.54 -			wm.addDockableWindow("isabelle-protocol");
    2.55 -		</CODE>
    2.56 -	</ACTION>
    2.57 -	<ACTION NAME="isabelle.monitor-panel">
    2.58 -		<CODE>
    2.59 -			wm.addDockableWindow("isabelle-monitor");
    2.60 -		</CODE>
    2.61 -	</ACTION>
    2.62 -	<ACTION NAME="isabelle.symbols-panel">
    2.63 -		<CODE>
    2.64 -			wm.addDockableWindow("isabelle-symbols");
    2.65 -		</CODE>
    2.66 -	</ACTION>
    2.67  	<ACTION NAME="isabelle.set-continuous-checking">
    2.68  	  <CODE>
    2.69  	    isabelle.jedit.Isabelle.set_continuous_checking();
     3.1 --- a/src/Tools/jEdit/src/dockables.xml	Tue Feb 18 19:00:13 2014 +0100
     3.2 +++ b/src/Tools/jEdit/src/dockables.xml	Tue Feb 18 20:20:42 2014 +0100
     3.3 @@ -2,46 +2,46 @@
     3.4  <!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
     3.5  
     3.6  <DOCKABLES>
     3.7 -	<DOCKABLE NAME="isabelle-theories" MOVABLE="TRUE">
     3.8 -		new isabelle.jedit.Theories_Dockable(view, position);
     3.9 -	</DOCKABLE>
    3.10 -	<DOCKABLE NAME="isabelle-timing" MOVABLE="TRUE">
    3.11 -		new isabelle.jedit.Timing_Dockable(view, position);
    3.12 -	</DOCKABLE>
    3.13 -	<DOCKABLE NAME="isabelle-syslog" MOVABLE="TRUE">
    3.14 -		new isabelle.jedit.Syslog_Dockable(view, position);
    3.15 -	</DOCKABLE>
    3.16  	<DOCKABLE NAME="isabelle-documentation" MOVABLE="TRUE">
    3.17  		new isabelle.jedit.Documentation_Dockable(view, position);
    3.18  	</DOCKABLE>
    3.19 -	<DOCKABLE NAME="isabelle-output" MOVABLE="TRUE">
    3.20 -		new isabelle.jedit.Output_Dockable(view, position);
    3.21 -	</DOCKABLE>
    3.22  	<DOCKABLE NAME="isabelle-find" MOVABLE="TRUE">
    3.23  		new isabelle.jedit.Find_Dockable(view, position);
    3.24  	</DOCKABLE>
    3.25 -	<DOCKABLE NAME="isabelle-sledgehammer" MOVABLE="TRUE">
    3.26 -		new isabelle.jedit.Sledgehammer_Dockable(view, position);
    3.27 -	</DOCKABLE>
    3.28  	<DOCKABLE NAME="isabelle-info" MOVABLE="TRUE">
    3.29  		new isabelle.jedit.Info_Dockable(view, position);
    3.30  	</DOCKABLE>
    3.31  	<DOCKABLE NAME="isabelle-graphview" MOVABLE="TRUE">
    3.32  		new isabelle.jedit.Graphview_Dockable(view, position);
    3.33  	</DOCKABLE>
    3.34 -	<DOCKABLE NAME="isabelle-raw-output" MOVABLE="TRUE">
    3.35 -		new isabelle.jedit.Raw_Output_Dockable(view, position);
    3.36 +	<DOCKABLE NAME="isabelle-monitor" MOVABLE="TRUE">
    3.37 +		new isabelle.jedit.Monitor_Dockable(view, position);
    3.38 +	</DOCKABLE>
    3.39 +	<DOCKABLE NAME="isabelle-output" MOVABLE="TRUE">
    3.40 +		new isabelle.jedit.Output_Dockable(view, position);
    3.41  	</DOCKABLE>
    3.42  	<DOCKABLE NAME="isabelle-protocol" MOVABLE="TRUE">
    3.43  		new isabelle.jedit.Protocol_Dockable(view, position);
    3.44  	</DOCKABLE>
    3.45 -	<DOCKABLE NAME="isabelle-monitor" MOVABLE="TRUE">
    3.46 -		new isabelle.jedit.Monitor_Dockable(view, position);
    3.47 +	<DOCKABLE NAME="isabelle-raw-output" MOVABLE="TRUE">
    3.48 +		new isabelle.jedit.Raw_Output_Dockable(view, position);
    3.49 +	</DOCKABLE>
    3.50 +	<DOCKABLE NAME="isabelle-simplifier-trace" MOVABLE="TRUE">
    3.51 +		new isabelle.jedit.Simplifier_Trace_Dockable(view, position);
    3.52 +	</DOCKABLE>
    3.53 +	<DOCKABLE NAME="isabelle-sledgehammer" MOVABLE="TRUE">
    3.54 +		new isabelle.jedit.Sledgehammer_Dockable(view, position);
    3.55  	</DOCKABLE>
    3.56  	<DOCKABLE NAME="isabelle-symbols" MOVABLE="TRUE">
    3.57  		new isabelle.jedit.Symbols_Dockable(view, position);
    3.58  	</DOCKABLE>
    3.59 -	<DOCKABLE NAME="isabelle-simplifier-trace" MOVABLE="TRUE">
    3.60 -		new isabelle.jedit.Simplifier_Trace_Dockable(view, position);
    3.61 +	<DOCKABLE NAME="isabelle-syslog" MOVABLE="TRUE">
    3.62 +		new isabelle.jedit.Syslog_Dockable(view, position);
    3.63 +	</DOCKABLE>
    3.64 +	<DOCKABLE NAME="isabelle-theories" MOVABLE="TRUE">
    3.65 +		new isabelle.jedit.Theories_Dockable(view, position);
    3.66 +	</DOCKABLE>
    3.67 +	<DOCKABLE NAME="isabelle-timing" MOVABLE="TRUE">
    3.68 +		new isabelle.jedit.Timing_Dockable(view, position);
    3.69  	</DOCKABLE>
    3.70  </DOCKABLES>
     4.1 --- a/src/Tools/jEdit/src/isabelle.scala	Tue Feb 18 19:00:13 2014 +0100
     4.2 +++ b/src/Tools/jEdit/src/isabelle.scala	Tue Feb 18 20:20:42 2014 +0100
     4.3 @@ -58,45 +58,75 @@
     4.4  
     4.5    private def wm(view: View): DockableWindowManager = view.getDockableWindowManager
     4.6  
     4.7 -  def docked_theories(view: View): Option[Theories_Dockable] =
     4.8 -    wm(view).getDockableWindow("isabelle-theories") match {
     4.9 -      case dockable: Theories_Dockable => Some(dockable)
    4.10 +  def documentation_dockable(view: View): Option[Documentation_Dockable] =
    4.11 +    wm(view).getDockableWindow("isabelle-documentation") match {
    4.12 +      case dockable: Documentation_Dockable => Some(dockable)
    4.13        case _ => None
    4.14      }
    4.15  
    4.16 -  def docked_timing(view: View): Option[Timing_Dockable] =
    4.17 -    wm(view).getDockableWindow("isabelle-timing") match {
    4.18 -      case dockable: Timing_Dockable => Some(dockable)
    4.19 +  def find_dockable(view: View): Option[Find_Dockable] =
    4.20 +    wm(view).getDockableWindow("isabelle-find") match {
    4.21 +      case dockable: Find_Dockable => Some(dockable)
    4.22        case _ => None
    4.23      }
    4.24  
    4.25 -  def docked_output(view: View): Option[Output_Dockable] =
    4.26 +  def monitor_dockable(view: View): Option[Monitor_Dockable] =
    4.27 +    wm(view).getDockableWindow("isabelle-monitor") match {
    4.28 +      case dockable: Monitor_Dockable => Some(dockable)
    4.29 +      case _ => None
    4.30 +    }
    4.31 +
    4.32 +  def output_dockable(view: View): Option[Output_Dockable] =
    4.33      wm(view).getDockableWindow("isabelle-output") match {
    4.34        case dockable: Output_Dockable => Some(dockable)
    4.35        case _ => None
    4.36      }
    4.37  
    4.38 -  def docked_raw_output(view: View): Option[Raw_Output_Dockable] =
    4.39 +  def protocol_dockable(view: View): Option[Protocol_Dockable] =
    4.40 +    wm(view).getDockableWindow("isabelle-protocol") match {
    4.41 +      case dockable: Protocol_Dockable => Some(dockable)
    4.42 +      case _ => None
    4.43 +    }
    4.44 +
    4.45 +  def raw_output_dockable(view: View): Option[Raw_Output_Dockable] =
    4.46      wm(view).getDockableWindow("isabelle-raw-output") match {
    4.47        case dockable: Raw_Output_Dockable => Some(dockable)
    4.48        case _ => None
    4.49      }
    4.50  
    4.51 -  def docked_simplifier_trace(view: View): Option[Simplifier_Trace_Dockable] =
    4.52 +  def simplifier_trace_dockable(view: View): Option[Simplifier_Trace_Dockable] =
    4.53      wm(view).getDockableWindow("isabelle-simplifier-trace") match {
    4.54        case dockable: Simplifier_Trace_Dockable => Some(dockable)
    4.55        case _ => None
    4.56      }
    4.57  
    4.58 -  def docked_protocol(view: View): Option[Protocol_Dockable] =
    4.59 -    wm(view).getDockableWindow("isabelle-protocol") match {
    4.60 -      case dockable: Protocol_Dockable => Some(dockable)
    4.61 +  def sledgehammer_dockable(view: View): Option[Sledgehammer_Dockable] =
    4.62 +    wm(view).getDockableWindow("isabelle-sledgehammer") match {
    4.63 +      case dockable: Sledgehammer_Dockable => Some(dockable)
    4.64 +      case _ => None
    4.65 +    }
    4.66 +
    4.67 +  def symbols_dockable(view: View): Option[Symbols_Dockable] =
    4.68 +    wm(view).getDockableWindow("isabelle-symbols") match {
    4.69 +      case dockable: Symbols_Dockable => Some(dockable)
    4.70        case _ => None
    4.71      }
    4.72  
    4.73 -  def docked_monitor(view: View): Option[Monitor_Dockable] =
    4.74 -    wm(view).getDockableWindow("isabelle-monitor") match {
    4.75 -      case dockable: Monitor_Dockable => Some(dockable)
    4.76 +  def syslog_dockable(view: View): Option[Syslog_Dockable] =
    4.77 +    wm(view).getDockableWindow("isabelle-syslog") match {
    4.78 +      case dockable: Syslog_Dockable => Some(dockable)
    4.79 +      case _ => None
    4.80 +    }
    4.81 +
    4.82 +  def theories_dockable(view: View): Option[Theories_Dockable] =
    4.83 +    wm(view).getDockableWindow("isabelle-theories") match {
    4.84 +      case dockable: Theories_Dockable => Some(dockable)
    4.85 +      case _ => None
    4.86 +    }
    4.87 +
    4.88 +  def timing_dockable(view: View): Option[Timing_Dockable] =
    4.89 +    wm(view).getDockableWindow("isabelle-timing") match {
    4.90 +      case dockable: Timing_Dockable => Some(dockable)
    4.91        case _ => None
    4.92      }
    4.93  
     5.1 --- a/src/Tools/jEdit/src/jEdit.props	Tue Feb 18 19:00:13 2014 +0100
     5.2 +++ b/src/Tools/jEdit/src/jEdit.props	Tue Feb 18 20:20:42 2014 +0100
     5.3 @@ -188,8 +188,8 @@
     5.4  isabelle-output.dock-position=bottom
     5.5  isabelle-output.height=174
     5.6  isabelle-output.width=412
     5.7 +isabelle-simplifier-trace.dock-position=bottom
     5.8  isabelle-sledgehammer.dock-position=bottom
     5.9 -isabelle-simplifier-trace.dock-position=bottom
    5.10  isabelle-symbols.dock-position=bottom
    5.11  isabelle-theories.dock-position=right
    5.12  isabelle.complete.label=Complete Isabelle text